lathe
CLAUDE.md71 starsChanged 56 days agoApache-2.0View on GitHub
AGENTS.md links to this file. Read CLAUDE.local.md if present. Lathe generates inspectable Cobra CLIs and Agent Skills from Swagger 2.0, OpenAPI 3, google.api.http protobuf APIs, and policy-curated GraphQL. lathe init and lathe skill install support this workflow. Keep generic scaffolding, plugin loaders, GUI/TUI, API gateways, and hand-written SDK replacement out of scope. See docs/architecture.md for package ownership and request flow. See docs/contracts.md for machine contracts and docs/cli-usage.md for generation and execution. Use make help for targets and go.mod for the…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- lathe-releaseSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow CONTRIBUTING.md for contribution scope, Go conventions, Conventional Commits, and DCO sign-off.
- Very specific: line 32
Use make help for targets and go.mod for the Go version.
- Very specific: line 35
Run generation with go run ./cmd/lathe specsync, codegen, or bootstrap.
- Very specific: line 37
Run make check before commit or PR: format check, vet, lint, and tests.
- Very specific: line 45
Use .agents/skills/lathe-release/SKILL.md for versioned release validation.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lathe agent guide
AGENTS.md links to this file. Read CLAUDE.local.md if present.
Product and sources
Lathe generates inspectable Cobra CLIs and Agent Skills from Swagger 2.0, OpenAPI 3, google.api.http protobuf APIs, and policy-curated GraphQL. lathe init and lathe skill install support this workflow. Keep generic scaffolding, plugin loaders, GUI/TUI, API gateways, and hand-written SDK replacement out of scope.
- Durable inputs are
specs/sources.yaml,cli.yaml, declared specs, and optional overlays and Skill includes. Pinned Git sources are reproducible;local_pathfollows the referenced working tree, and sync state must record and validate its resolved path. - Change inputs or the generator, never hand-edit generated files. Do not commit
internal/generated/,.cache/, example build artifacts, or ad-hoc generatedskills/<cli-name>/in this repository. Starter repositories have their own generated-output policy. - Follow CONTRIBUTING.md for contribution scope, Go conventions, Conventional Commits, and DCO sign-off. Use live code and Makefile targets to check documentation claims.
Architecture boundaries
See docs/architecture.md for package ownership and request flow.
cmd/latheandinternal/lathecmdorchestrate generation;internal/sourceconfig,internal/specsync,internal/codegen/**, andinternal/overlayown its pipeline.internal/projectinitowns initialization;internal/latheskillowns the bundled Lathe Skill.- Generated
runtime.CommandSpecdeclarations cross into the runtime throughgenerated.Mount, alongside compiled workflows and bundled capabilities.pkg/runtimemust not depend oninternal/codegen/**or read raw specs, overlays, or sync caches. - Overlays are codegen-time inputs that can alter command semantics; compile them into runtime declarations without introducing overlay concepts at runtime.
pkg/config,pkg/runtime,pkg/lathe, andpkg/skillbundleare downstream-facing, compatibility-sensitive packages.internal/**is implementation-only.
Agent contract
See docs/contracts.md for machine contracts and docs/cli-usage.md for generation and execution.
- The running CLI catalog is execution authority; generated Skills provide guidance. Discover with
search "<intent>" --json, then inspectcommands show <path...> --jsonbefore execution. Never execute directly from search results. - When
auth.required=true, useauth status -o jsonand readhostnameandsource; pass the same explicit--hostnamefor status and execution when overriding the host. Readmutationanddry_runfrom command detail: for anything other thanread, preview when supported; otherwise obtain explicit user confirmation. Prefer-o jsonfor machine output unless another format was requested. - Changes to command shape, catalog, auth, body, output, retry/debug, or Skill rendering must preserve agent inspectability. Check generated-code compatibility (
runtime.SchemaVersion) separately from catalog compatibility (runtime.CatalogSchemaVersion); keep generated Skill guidance aligned.
Commands and verification
Use make help for targets and go.mod for the Go version.
make buildproducesbin/lathe;make installcopies it toBINDIR.- Run generation with
go run ./cmd/lathe specsync,codegen, orbootstrap; use--helpfor flags. - Prove the changed behavior with focused package tests or an example run. Add tests when they protect a behavior boundary; use golden fixtures only when serialized output is the contract.
- Run
make checkbefore commit or PR: format check, vet, lint, and tests. Documentation-only changes may skip it only with user agreement. CI also builds and runsgo test -race ./...; for runtime-sensitive changes, run the relevant example script or race tests. - For codegen changes, regenerate and exercise the generated CLI. Run
<cli> __lathe verify --jsonbefore broader acceptance checks. Do not commit scratch outputs. - For init or bundled Skill changes, run focused package tests and a scratch init. Skill installation smoke must combine a user-scope dry-run with a project-scope install in scratch; never override
HOMEor write to the real user Skill directory. - Report missing dependencies and unrun checks explicitly.
Sensitive paths and releases
- HTTP and auth changes must protect credentials and account for SSRF, TLS, redirects, retries, headers, and debug/error leakage. Spec sync and generation must reject traversal, unsafe output roots, and deletion of non-owned directories; escape spec text emitted as code, flags, paths, or Skill Markdown.
- Use .agents/skills/lathe-release/SKILL.md for versioned release validation. Tagging and publishing require explicit authorization.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

