Skip to content

docs(agent): activate the agent operating contract (.claude/CLAUDE.md) - #1169

Open
itcmsgr wants to merge 3 commits into
mainfrom
docs/claude-agent-init
Open

docs(agent): activate the agent operating contract (.claude/CLAUDE.md)#1169
itcmsgr wants to merge 3 commits into
mainfrom
docs/claude-agent-init

Conversation

@itcmsgr

@itcmsgr itcmsgr commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Docs-only. 2 files, zero product/packaging/CI/test change.

Why now

.claude/CLAUDE.md declared Current Version: v1.195.0 while the project ships v1.228.0. It governs every agent session before contributors or deputies touch the repository, so a stale authority file is itself an authority defect — and agents acted on it.

What changed

Version is now DERIVED, not hard-codedVERSION, VERSION_DATE, gh release list, origin/main, register baseline — with a STOP condition when those five disagree. The one dated figure is explicitly labelled a snapshot.

Restructured from a hallucination checklist into a 24-rule execution contract, each stating RULE / WHY / AUTHORITY / STOP. 401 lines.

Encodes what the v1.228.0 campaign established: authority hierarchy (runtime > code at an exact SHA > artifact > falsifiable test > register > comment) · a guard must measure the authority it claims to measure, with the nine observed instances · PASS != INJECTION PROVEN · derive sets, never pin names or counts · one file set one owner, with CROSS_LANE_DEPENDENCY instead of reaching across · parallel authoring, serial merging · the two-register rule and "planning docs are evidence, never status authority" · preserve chronology · handles are identities, not assignments · approval economy · CI truth including the measured non-determinism of local ci-bash · release gates (labs required; fleet skippable only by owner decision) · exit codes are a shipped contract · a component that cannot do its work must not report success.

Preserved: the [VERIFIED] protocol, NOT-SUPPORTED list, key paths, claim limits (no GPG signing, SLSA covers the standalone Go binary only, PAM detection-only, no competitor comparison), documentation-style authorities.

Replaced: the hard-coded CLI command list, with a derivation from commands.registry.yml — since that registry total_commands field was itself wrong by five.

.gitignore correction

.claude/ excluded the whole directory while CLAUDE.md was the single tracked file inside it, so staging required git add -f and a future git add would silently stage nothing.

Uses .claude/* + !.claude/CLAUDE.md, not !.claude/. Measured: a directory exclusion stops git descending, so a negation for a child never matches — the !.claude/ form un-ignores the entire directory and turns docs/, BRAND_GUIDE.md and WIKI_STYLE_GUIDE.md into untracked noise. The contents form re-includes exactly CLAUDE.md.

Two dangling references caught by pre-merge validation

  1. V1_139_FHS_AUTHORITY_GRAPH.md is in NFTBAN_ROADMAP/COMPLETED/, not the roadmap root. The wrong path was inherited verbatim from the file this rewrite replaces — a stale citation copied forward while rewriting the document whose purpose is to stop stale authority claims.
  2. The seven .claude/docs and .claude/*.md style authorities are local-only; .gitignore tracks exactly one file under .claude/, so a fresh clone has none of them. Now labelled as such, with instructions to fall back to the inline rules rather than assume the guidance does not exist.

Verification

  • TRACKED_REFERENCES_DANGLING = 0 after the fixes
  • fresh worktree contains the full 401-line contract
  • git add .claude/CLAUDE.md works with no -f
  • .claude/docs/, BRAND_GUIDE.md, WIKI_STYLE_GUIDE.md remain ignored — 0 untracked noise

Note: direct push to main was attempted per instruction and rejected by branch protection, so this goes through a PR.

🤖 Generated with Claude Code

itcmsgr and others added 3 commits July 28, 2026 08:34
The file declared "Current Version: v1.195.0" while the project shipped v1.228.0.
A stale authority file is itself an authority defect, and agents acted on it — so
the version is now DERIVED (VERSION, VERSION_DATE, gh release list, origin/main,
register baseline) with a STOP condition when those five disagree. The one dated
figure that remains is explicitly labelled a snapshot, not permanent truth.

Restructured from a hallucination-prevention checklist into an execution contract:
24 rules, each stating RULE / WHY / AUTHORITY / STOP. 395 lines.

Encodes what the v1.228.0 campaign established:

  - authority hierarchy: runtime > code at an exact SHA > artifact > falsifiable
    test > register > comment. Comments lie -- NFTBAN_VALID_MODES carried
    "# Used by other modules" with zero consumers.
  - a guard must measure the authority it claims to measure, with the nine
    observed instances listed. A guard whose subject is not the authority is
    worse than no guard: it manufactures confidence.
  - PASS != INJECTION PROVEN. Every new guard must be shown to fail.
  - derive sets, never pin names or counts.
  - one file set one owner; CROSS_LANE_DEPENDENCY instead of reaching across.
  - parallel authoring, serial merging, dependency order.
  - two-register rule; planning docs are evidence, never status authority.
  - preserve chronology; IMMUTABLE_EVENT_RECORD vs CURRENT_STATUS_PROJECTION.
  - handles are identities, not assignments -- do not rename on reorder.
  - approval economy: one per phase, with the explicit stop list.
  - CI truth: pagination, latest-run-per-name, stable double fetch, and the
    measured fact that local ci-bash is non-deterministic across runs.
  - release gates: labs required, fleet skippable only by owner decision, and
    the gate must exercise the migration being shipped.
  - exit codes are a shipped contract -- find the consumers before renumbering.
  - a component that cannot do its work must not report success.

Preserved from the previous file: the [VERIFIED] protocol, the NOT-SUPPORTED
hallucination list, key paths, claim limits (no GPG signing, SLSA covers the
standalone Go binary only, PAM detection-only, no competitor comparison) and the
documentation-style authorities. The hard-coded CLI command list is replaced by a
derivation from commands.registry.yml, since that registry's own total_commands
field was itself wrong by five.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.claude/ excluded the whole directory, so the single tracked file inside it —
the agent operating contract — required `git add -f`. A future `git add` for it
would silently stage nothing.

Uses `.claude/*` + `!.claude/CLAUDE.md` rather than `!.claude/`: a directory
exclusion stops git descending, so a negation for a child never matches. Measured:
the `!.claude/` form un-ignores the entire directory (docs/, BRAND_GUIDE.md and
WIKI_STYLE_GUIDE.md all become untracked noise); the contents form re-includes
exactly CLAUDE.md and nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Caught by running the contract's own reference validation before merging.

1. V1_139_FHS_AUTHORITY_GRAPH.md is in NFTBAN_ROADMAP/COMPLETED/, not the roadmap
   root. The wrong path was inherited verbatim from the file this rewrite replaces
   — a stale citation copied forward while rewriting the document whose whole
   purpose is to stop stale authority claims.

2. The seven .claude/docs and .claude/*.md style authorities are LOCAL-ONLY. The
   .gitignore tracks exactly one file under .claude/ (this contract), so a fresh
   clone or worktree has none of them. They are now labelled as such, with an
   instruction to fall back to the rules stated inline rather than assume the
   guidance does not exist. Making them tracked is recorded as an open decision.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant