Skip to content

docs(claude): add an AGENTS.md contributor guide, with a CLAUDE.md symlink - #17

Merged
Ardnived merged 1 commit into
mainfrom
claude/agents-md-guide
Sep 1, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/agents-md-guide

Conversation

@Ardnived

@Ardnived Ardnived commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Why

This is now the fifth repo the loop works on (loop-config.json → repos), and it was the only one with no agent guide at all — just a user-facing README.md. An agent landing here had to infer the rules of a repo whose main branch is consumed live by every other repo's tooling.

The other four put the real guide in AGENTS.md and make CLAUDE.md a symlink to it, so Claude Code and the AGENTS.md-reading tools (Codex, Cursor) load one file that cannot drift. Same shape here:

$ git ls-files -s AGENTS.md CLAUDE.md
100644 2f4af8b 0  AGENTS.md
120000 47dc3e3 0  CLAUDE.md

Mode 120000, bare relative target AGENTS.md — the blob is byte-identical to SahajCloud's 31 symlinks.

What the guide says

It does not restate the README — it links to it and covers only what is hazardous or surprising about editing this repo:

  • Merging to main IS the deploy. For the routines and for /plugin install workflow@sydevs alike. The blast radius of a merge is the next run of all five repos; the only rollback is another PR, and a routine may fire before you have written it.
  • You cannot validate a change by running it. A skill edit takes effect on the next session — the loaded body is already in context. Hence: small reversible edits, one behaviour per PR, and never a skill change and a ceiling change in the same PR, because when the next run misbehaves you need to know which one did it.
  • The gate is claude plugin validate ./workflow --strict, and that is all of it. No test suite, and no .github/workflows/ in the repo at all. The validator checks the manifest and frontmatter; it cannot check whether prose is right. The real gate is a supervised loop run (--dry-run, or a manually fired routine whose journal and transcript you read — docs/routine-setup.md §6).
  • No package manager. No package.json, no lockfile, no node_modules. Hooks are plain node .mjs run directly, so node stdlib only. Adding a dependency is a signal the hook is doing too much.
  • The ops-journal trap. This repo is both a worked repo and the journal's home, so every worklist query needs -label:ops-journal or the loop reads its own diary as tickets.
  • Protected Paths, and why the docs are where they are. Writes under .claude/ need interactive approval, and that guard runs before permissions.allow, so no allowlist can pre-empt it. An unattended run does not fail — it waits invisibly (one WeMeditateWeb run burned ~75 minutes that way). That is why documentation lives outside .claude/ in all five repos. Noted precisely: here the only protected file is .claude/workflow.json; .claude-plugin/ and workflow/.claude-plugin/ are not under .claude/.
  • Layout — workflow/skills/, workflow/hooks/, both manifests, loop-config.json (ceilings, labels, assignment, identity), docs/routine-setup.md — plus the rule that no skill hard-codes a number or a label name.
  • Skill frontmatter is a security surface. allowed-tools is an instruction to an agent holding write access to five repos; disable-model-invocation: true on everything except the two helper skills.
  • Hook rules — resolve against the worktree root, never break a session on bad input, and the false-positive risk that block-wrong-bash already realised in fix(hooks): compare repositories, not containment, for the sibling exemption #16.
  • Conventions — conventional commits with scopes derived from the log, claude/* branches, open the PR and never merge it, and the ticketless-PR globs.

Sourcing

Derived by reading the repo, not assumed: README.md, .claude/workflow.json (selfModificationNote, leanGate, securityReview, journalNote), loop-config.json, the frontmatter of all 13 SKILL.md files, the four hooks and hooks/lib/workflow-config.mjs, both plugin manifests, and docs/routine-setup.md.

One claim was corrected during drafting: packageManager: "none" does not stop the npm/yarn rule in block-wrong-bash from firing, it only changes the message text, so the guide says what the key actually does.

Also

README.md gains one line in Development pointing at the new guide. Nothing else changed — deliberately no skill or config edits in this PR, per the small-reversible-edits rule the guide itself states.

Gate

$ claude plugin validate ./workflow --strict
✔ Validation passed

…mlink

This is now the fifth repo the autonomous loop works on, and it was the only
one with no agent guide at all — just a user-facing README. An agent landing
here had to infer the rules of a repo whose `main` branch is consumed live.

The other four repos put the real guide in `AGENTS.md` and make `CLAUDE.md` a
symlink to it, so Claude Code and the AGENTS.md-reading tools (Codex, Cursor)
load one file that cannot drift. Same shape here: `CLAUDE.md` is mode 120000
with the bare relative target `AGENTS.md`.

The guide deliberately does not restate the README — it covers only what is
hazardous or surprising about EDITING this repo:

  - merging to main IS the deploy, for the routines and for
    /plugin install alike, so the blast radius of a merge is the next run of
    all five repos and the only rollback is another PR
  - a change cannot be validated by running it: a skill edit takes effect on
    the NEXT session. Hence small reversible edits, and never a skill change
    and a ceiling change in the same PR
  - `claude plugin validate ./workflow --strict` is the ENTIRE automated gate
    — no test suite, and no .github/workflows at all. The skills are prose;
    their real gate is a supervised loop run
  - no package manager: no package.json, hooks are plain node .mjs on the
    standard library only
  - the ops-journal trap — this repo is both worked and the journal's home,
    so every worklist query needs -label:ops-journal
  - Protected Paths: writes under .claude/ need interactive approval that
    permissions.allow runs too late to pre-empt, so an unattended run waits
    invisibly. That is WHY the docs live outside .claude/ in all five repos
  - layout, skill frontmatter as a security surface, hook rules, and the
    commit/branch/PR conventions derived from the log

Sourced from the repo rather than assumed: README.md, .claude/workflow.json
(selfModificationNote, leanGate, securityReview), loop-config.json, every
SKILL.md's frontmatter, the hooks and their shared config loader, and
docs/routine-setup.md.

README gains one line pointing at it from the Development section.

Gate green: `claude plugin validate ./workflow --strict` — validation passed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit c7f611e into main Sep 1, 2026
@Ardnived
Ardnived deleted the claude/agents-md-guide branch September 1, 2026 15:38
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