-
Notifications
You must be signed in to change notification settings - Fork 0
Sync §5.7 Agent Context Files — Standard v1.46 #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # CLAUDE.md | ||
|
|
||
| @AGENTS.md | ||
|
|
||
| > Record project knowledge in `AGENTS.md`, not here. This file holds only | ||
| > Claude-Code-only context (Standard §5.7). | ||
|
|
||
| ## Claude Code specifics | ||
|
|
||
| - `microsoft-rust-guidelines` is `user-invocable: false` on purpose — it is the | ||
| mandatory auto-load Rust base and is hidden from the `/` menu by design. See | ||
| the editing rules in `AGENTS.md`; do not "fix" its absence from the menu. | ||
| - Skills reach Claude at `~/.claude/skills/<skill>`, one of the per-harness paths | ||
| Home Manager provisions (see "Local agent fan-out" in `AGENTS.md`). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # CLAUDE.md | ||
|
|
||
| @AGENTS.md | ||
|
|
||
| > Record project knowledge in `AGENTS.md`, not here. This file holds only | ||
| > Claude-Code-only context (Standard §5.7). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,84 +1,67 @@ | ||
| # CLAUDE.md — <PROJECT_NAME> | ||
|
|
||
| <!-- | ||
| Spacecraft Software CLAUDE.md template, version 1.0.0. | ||
| Spacecraft Software CLAUDE.md template, version 2.0.0. | ||
| License: GPL-3.0-or-later | ||
|
|
||
| CLAUDE.md is a strict superset of AGENTS.md. Start by mirroring the | ||
| AGENTS.md content (either symlink or copy), then add the | ||
| Claude-specific sections at the bottom. | ||
| Standard §5.7 governs this file. AGENTS.md is the authority: it holds | ||
| every project fact — build commands, invariants, layout, forbidden | ||
| patterns. This file imports it and adds ONLY what a non-Claude harness | ||
| cannot act on. | ||
|
|
||
| Do NOT duplicate the CLI Standard here — those rules live in the | ||
| spacecraft-cli-standard and spacecraft-agentic-cli skills. | ||
| --> | ||
|
|
||
| <!-- ===== AGENTS.md content (mirror or symlink) ===== --> | ||
|
|
||
| ## Project identity | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
|
|
||
| ## Build, test, lint | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
|
|
||
| ## Architectural invariants | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
| Do NOT copy, symlink, summarize, or mirror AGENTS.md here. If you find | ||
| yourself writing "keep these two files in sync," the split is wrong. | ||
|
|
||
| ## Forbidden patterns | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
| Do NOT duplicate the CLI Standard here either — those rules live in the | ||
| spacecraft-cli-standard and spacecraft-agentic-cli skills. | ||
|
|
||
| ## Environment expectations | ||
| CLAUDE.md is REQUIRED even when it holds nothing else. Claude Code reads | ||
| CLAUDE.md, not AGENTS.md — a project with only an AGENTS.md gives a | ||
| Claude session no project context at all. With nothing Claude-only to | ||
| say, the heading + @AGENTS.md + the blockquote is the whole file. | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
| Both AGENTS.md and CLAUDE.md are tracked. Neither may be gitignored, and | ||
| neither carries credentials, private hostnames, or personal filesystem | ||
| paths. | ||
| --> | ||
|
|
||
| ## Where to look for ___ | ||
| @AGENTS.md | ||
|
|
||
| <COPY-FROM-AGENTS.MD> | ||
| > Record project knowledge in `AGENTS.md`, not here. This file holds only | ||
| > Claude-Code-only context (skills, `.claude/`, slash commands, MCP client). | ||
|
|
||
| <!-- ===== Claude-specific additions ===== --> | ||
| <!-- ===== Claude-only content below this line ===== --> | ||
|
|
||
| ## Skills referenced | ||
| ## Skills to load | ||
|
|
||
| The following Spacecraft Software skills apply to this project. Claude should | ||
| consult them when their triggers match: | ||
| The following Spacecraft Software skills apply to this project. Consult them | ||
| via the Skill tool when their triggers match: | ||
|
|
||
| - `spacecraft-standard-constitution` — master Steelbore Standard | ||
| - `spacecraft-cli-standard` — structural CLI Standard rules | ||
| - `spacecraft-agentic-cli` — agent-facing UX for the CLI | ||
| - `spacecraft-brand-guidelines` — Steelbore 2 color palette (values from `steelbore-color-palette`) | ||
| - `spacecraft-brand-guidelines` — brand look-and-feel | ||
| - `steelbore-color-palette` — canonical palette values (§11) | ||
| - `microsoft-rust-guidelines` — Microsoft Pragmatic Rust Guidelines | ||
| - `spacecraft-cli-preference` — preferred external CLI tools (rg, fd, bat) | ||
| - `spacecraft-cli-shell` — shell syntax for generated commands | ||
| - <ADD-PROJECT-SPECIFIC-SKILLS> | ||
|
|
||
| ## MCP servers expected | ||
|
|
||
| This project may coexist with the following MCP servers in agent | ||
| sessions: | ||
|
|
||
| - `<TOOL_NAME> mcp` — this project's own MCP surface (when implemented) | ||
| - <ADD-PROJECT-SPECIFIC-MCP-SERVERS> | ||
|
|
||
| ## Tool preferences | ||
|
|
||
| - Use `rg` over `grep`, `fd` over `find`, `bat` over `cat` (per | ||
| spacecraft-cli-preference). | ||
| - Use `cargo nextest` over `cargo test` if available; fall back if not. | ||
| - Use `jaq` over `jq` for JSON filtering. | ||
| - <ADD-PROJECT-SPECIFIC-TOOL-PREFERENCES> | ||
| ## Claude Code specifics | ||
|
|
||
| ## Notes for Claude specifically | ||
|
|
||
| - Inline TODOs use `// TODO(claude):` to distinguish from human TODOs. | ||
| - Commit messages use the format `<type>(<scope>): <subject>` with | ||
| conventional-commits types. | ||
| - <Slash commands this repo installs, `.claude/` layout, plan-mode notes, | ||
| subagent conventions, TaskMaster wiring — anything meaningless to Codex, | ||
| Cursor, or Goose.> | ||
| - <ADD-PROJECT-SPECIFIC-CLAUDE-NOTES> | ||
|
|
||
| ## Standards compliance | ||
|
|
||
| This project follows the Spacecraft Software Dual-Mode Self-Documenting CLI Standard (v1.0.0). The CLI Standard skills | ||
| are authoritative on structural and agentic conventions. This file | ||
| documents project-specific deviations and supplements only. | ||
| <!-- | ||
| Tool preferences, commit-message format, and TODO conventions are NOT | ||
| Claude-only — they belong in AGENTS.md. Likewise CLAUDECODE=1 detection: | ||
| a CLI that checks it alongside CURSOR_AGENT and GEMINI_CLI is documenting | ||
| its own behavior, which every harness needs to know. | ||
| --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,8 +25,8 @@ does NOT belong, and provides anti-pattern catalogs. | |
|
|
||
| | File | Reader | Lifetime | Authoritative on | | ||
| |------|--------|----------|------------------| | ||
| | `AGENTS.md` | Generic agents (Codex CLI, Cursor, Aider, OpenCode, Goose) | Loaded each session | Coding conventions, build/test commands, project invariants | | ||
| | `CLAUDE.md` | Claude Code | Loaded each session | Same as AGENTS.md, plus Claude-specific tool/skill/MCP context | | ||
| | `AGENTS.md` | **Every** agent, Claude included (via the import below) | Loaded each session | **Authoritative.** Coding conventions, build/test commands, project invariants | | ||
| | `CLAUDE.md` | Claude Code | Loaded each session | An `@AGENTS.md` import plus Claude-only tool/skill/MCP context — nothing else | | ||
| | `SKILL.md` | Spacecraft Software Skills, CLI-Anything, `gws`-style skill systems | Loaded by skill loader | The CLI's own capability surface and triggering description | | ||
| | `CONTRIBUTING.md` | Human contributors | Read once during onboarding | Dev environment setup, PR conventions | | ||
|
|
||
|
|
@@ -123,13 +123,29 @@ Cargo workspace. It targets POSIX shell environments first and PowerShell | |
|
|
||
| ## §3 — CLAUDE.md: how it differs from AGENTS.md | ||
|
|
||
| CLAUDE.md MUST be a strict superset of AGENTS.md. Start by symlinking or | ||
| copying AGENTS.md, then add Claude-specific sections: | ||
| **Standard §5.7 governs this file.** CLAUDE.md is an `@AGENTS.md` import | ||
| plus Claude-only content — it MUST NOT restate, summarize, or mirror | ||
| AGENTS.md. Copying or symlinking AGENTS.md into it is non-compliant: the | ||
| two copies are edited in different sessions, drift, and the agent reading | ||
| the stale one is never told it is stale. | ||
|
|
||
| > **This rule was inverted at Standard v1.46.** Earlier revisions of this | ||
| > reference told authors to make CLAUDE.md a strict superset by symlinking | ||
| > or copying. That produced duplication by construction. If you find a | ||
| > project still arranged that way, or a file carrying a "keep these two in | ||
| > sync" instruction, that instruction is the bug — fold the content into | ||
| > AGENTS.md and reduce CLAUDE.md to the shape below. | ||
|
|
||
| Anything that is true of the *project* goes in AGENTS.md. Only what a | ||
| non-Claude harness cannot act on belongs here: | ||
|
Comment on lines
+139
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When authors follow this canonical example, the subsequent AGENTS.md reference: AGENTS.md:L434-L436 Useful? React with 👍 / 👎. |
||
|
|
||
| ```markdown | ||
| # CLAUDE.md — <project-name> | ||
|
|
||
| <!-- All AGENTS.md content above --> | ||
| @AGENTS.md | ||
|
|
||
| > Record project knowledge in `AGENTS.md`, not here. This file holds | ||
| > only Claude-Code-only context. | ||
|
|
||
| ## Skills referenced | ||
| - `spacecraft-standard-constitution` — master Standard | ||
|
|
@@ -158,6 +174,27 @@ The Claude-specific sections matter because Claude Code has features | |
| Mentioning them in AGENTS.md would mislead a Codex CLI session into | ||
| expecting capabilities it doesn't have. | ||
|
|
||
| **The test for where a fact belongs:** would a Codex CLI or Cursor session | ||
| be worse off without it? If yes, it goes in AGENTS.md. `CLAUDECODE=1` is | ||
| the classic false positive — a CLI that detects it alongside `CURSOR_AGENT` | ||
| and `GEMINI_CLI` is documenting its own product behavior, which every | ||
| harness needs to know, so it belongs in AGENTS.md. | ||
|
|
||
| **CLAUDE.md is mandatory, even when it holds nothing else.** Claude Code | ||
| reads `CLAUDE.md`, not `AGENTS.md` — a project with only an AGENTS.md | ||
| gives a Claude session *no* project context at all. When there is nothing | ||
| Claude-only to say, the file is still four lines: the heading, the | ||
| `@AGENTS.md` import, and the blockquote. | ||
|
|
||
| Both files are tracked (§5.7). Neither may be gitignored: an ignored | ||
| AGENTS.md makes the import dangle on a fresh clone. Because they are | ||
| published artifacts, keep credentials, private hostnames, and personal | ||
| filesystem paths out of both — and review a previously-ignored context | ||
| file for sensitive content *before* un-ignoring it. | ||
|
|
||
| Tooling that renders managed blocks into context files (rule | ||
| synchronizers, task systems) targets AGENTS.md only. | ||
|
|
||
| --- | ||
|
|
||
| ## §4 — SKILL.md: the CLI's own skill manifest | ||
|
|
@@ -295,7 +332,7 @@ are inline in `#[cfg(test)] mod tests {}` blocks." | |
| | File | Target length | Hard cap | | ||
| |------|---------------|----------| | ||
| | AGENTS.md | 80–200 lines | 400 lines | | ||
| | CLAUDE.md | 100–250 lines | 500 lines | | ||
| | CLAUDE.md | 5–40 lines | 80 lines | | ||
| | SKILL.md | 50–150 lines | 300 lines | | ||
| | CONTRIBUTING.md | (no agent-loaded budget) | — | | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For users who install
spacecraft-agentic-cli.zipor.skill, both unchanged bundles still contain the old guidance thatCLAUDE.mdshould duplicateAGENTS.md; they also omit all four updated source/reference/template files in this commit. Rebuild and commit both bundles so the install surface actually delivers the policy introduced here.AGENTS.md reference: AGENTS.md:L406-L409
Useful? React with 👍 / 👎.