curie / packages
CLAUDE.md53 starsChanged 3 months agoApache-2.0View on GitHub
packages/aci-protocol and packages/plugin-format are frozen interfaces. Read the root AGENTS.md's "Frozen contracts: STOP and escalate" section first -- it is not optional here. Every lane in this repo (runner, worker, CLI, UI) compiles against these two packages across three languages. Pydantic models are the single source of truth; JSON Schema, generated TypeScript, and generated Rust are committed derivatives, never hand-edited. Do not change either package unilaterally from a dependent lane. If your task needs a change here, stop and raise…
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cli/CLAUDE.mdCLAUDE.md
- runner/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- implementSkill
- update-architecture-atlasSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Read the root AGENTS.md's "Frozen contracts: STOP and escalate" section first -- it is not optional here.
- Distinctive: line 9
Every lane in this repo (runner, worker, CLI, UI) compiles against these two packages across three languages.
- Distinctive: line 40
Only a new optional field is compatible while we are in 0.x: tolerant consumers ignore it, so it is a patch and old consumers keep decoding.
- Distinctive: line 57
Commit the regenerated schema and generated types together with the model change, in the same commit.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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
CLAUDE.md - packages/
packages/aci-protocol and packages/plugin-format are frozen interfaces.
Read the root AGENTS.md's "Frozen contracts: STOP and escalate" section first
-- it is not optional here.
The rule
Every lane in this repo (runner, worker, CLI, UI) compiles against these two packages across three languages. Pydantic models are the single source of truth; JSON Schema, generated TypeScript, and generated Rust are committed derivatives, never hand-edited.
Do not change either package unilaterally from a dependent lane. If your task needs a change here, stop and raise it in an issue/PR first -- a contract change lands as its own reviewed, backward-compatible change before dependent lanes proceed.
When a change is genuinely approved
Bump
aci_protocol.version.PROTOCOL_VERSIONto the class the change earns (the plugin-format schema has no separate version today). The ACI is versioned as semver, independent of the Curie release: the number tracks the wire contract's compatibility, not the product's cadence. Backward compatibility is the default expectation. A consumer accepts a wire version with the samemajor.minorunder 0.x (the samemajorafter 1.0) and rejects anything else, loudly, naming both versions. Pick the bump from the change class:Change class 0.x today Post-1.0 New optional field (consumer ignores it) patch minor New required field minor (breaking) major New enum value minor (breaking) major Field removal minor (breaking) major Field rename minor (breaking) major Type change minor (breaking) major Doc/description only (no wire change) none none Only a new optional field is compatible while we are in 0.x: tolerant consumers ignore it, so it is a patch and old consumers keep decoding. Every other row breaks an old consumer, so under 0.x it bumps the minor (the breaking axis before 1.0) and old consumers reject it at the version gate with both versions named. A new enum value counts as breaking even though it looks additive:
SessionStatusis control-bearing, so an unknown value is rejected, never degraded (see ADR-0036). When a change cannot be made backward compatible, do not force it into a patch to keep the gate quiet: bump the breaking class, and if two versions must coexist on the wire, ship and name both explicitly rather than pretending one is compatible.- Regenerate every committed artifact and check for drift:
This regenerates both JSON Schemas, the generated Rust crate, and the generated TypeScript, then diffs them against what is committed. It fails loudly if anything drifted and was not regenerated../scripts/check-contracts.sh - Commit the regenerated schema and generated types together with the model change, in the same commit.
Enforcement
tests/test_schema_compat.pyin each package regenerates its schema in-process and fails if the committed copy differs -- this is the CI gate, not just a local nicety.- CI additionally compiles the generated Rust (
cargo testagainstpackages/aci-protocol/generated/rust) and the generated TypeScript (tsc --noEmit), so a schema that "compiles in Python" but breaks either target still fails the build.
Model conventions specific to these packages
aci-protocolis strict producers, tolerant consumers (conservative in what it sends, liberal in what it accepts). Constructing an event with an unknown field is still an error -- that is where the value of strictness lives, catching producer mistakes at the source. But a consumer decoding the wire ignores fields it does not model, so a new optional field is genuinely backward compatible and a minor bump means something. The version gate is compatibility-aware, not exact-match: it accepts any wire version that matches the build'smajor.minorunder 0.x (majorafter 1.0) and rejects across an incompatible boundary, naming both versions. Loosening the gate further (accepting an incompatible version) is a version-policy change -- raise it in an issue/PR first, do not quietly relax a model.plugin-formatis lenient by design. Its models useextra="allow"because real Claude Code plugin bundles carry keys this MVP does not model; rejecting them would reject valid bundles. Do not add strict validation here without checking this is compatible with the "verbatim Claude Code shape" mandate -- the wedge is compatibility, not schema purity.- Field names mirror the real Claude Code plugin format verbatim
(
allowed-tools, nottools;.claude-plugin/plugin.jsonas the primary manifest location). Never invent a friendlier field name here.
Verify
uv run pytest packages/aci-protocol/tests packages/plugin-format/tests -q
uv run ruff check packages/
uv run mypyDoes 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.

