Skip to content

docs(loop): trim the root guide, and nest the skill and hook rules beside their files - #201

Merged
Ardnived merged 2 commits into
mainfrom
claude/docs-doctor-trim
Oct 20, 2026
Merged

Ardnived merged 2 commits into
mainfrom
claude/docs-doctor-trim

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

The root AGENTS.md goes from 16,545 → 11,476 chars (−31%). Every session that edits this repo reads all of it, and the copies it held of ls, config and file headers kept drifting. With the two new nested guides (787 + 1,325), all three total 13,588.

The failure this prevents: a contributor trusts a hand-copied inventory that has drifted. The Layout table's lib list and loop-config.json key list, the helper-skill list and the commit-scope examples have each been wrong before. Now one command answers each of them, so none can drift.

Docs only. No skill, hook, script or value changes behaviour. The one non-prose line is the version bump below.

Commits

  1. Trim, and nest (e6d1632)
    • Cut, because a command already answers each one:
      • the audience preamble and the symlink note (ls -la)
      • the gate's command block (leanGate.command)
      • the "no package.json" lines (ls, packageManager)
      • the Layout table
      • the list of skills without disable-model-invocation (grep -L)
      • the commit-scope examples (git log)
    • The Layout table had two facts no command gives you. They stay as prose: the marketplace manifest must stay valid, and the ${CLAUDE_PLUGIN_ROOT:-<claude-workflow>/workflow} fallback.
    • workflow/hooks/AGENTS.md (with a CLAUDE.md symlink) holds "Editing a hook".
    • workflow/skills/AGENTS.md holds "Writing a skill". It has no symlink: a symlink there fails claude plugin validate --strict. The root's one-line pointer is how it is found.
    • Four cross-cutting rules stay at the root, because they also govern loop-config.json and workflow/lib/: a skill's length is a running cost, no hard-coded values, loop-config.json holds values only, scripts own mechanical rules.
    • version 3.7.0 → 3.7.1. The new guides sit under workflow/skills/** and workflow/hooks/**, and cut-release says a change there always bumps.
  2. Stale fix (04513d8): "Here the only protected file is .claude/workflow.json" was wrong, because git ls-files .claude also lists .claude/settings.json. The same sentence said nested guides exist only "in the product repos".

Stale claims checked against the tree

Claim Result
"two scheduled routines" Already gone. The table says one per repo plus the nightly audit, which matches docs/routine-setup.md
"no test suite" Already gone. "No CI here" stays, and it is true
lint tools "never run steps" Already gone. improve-loop runs rule-delta.mjs, and audit-code's comment sweep runs ste-lint.py --json
helper list omitting disable-model-invocation Gone with the cut. The rule stays in the skill guide
"only protected file is workflow.json" Fixed (commit 2)
Layout lib, key and plugin-root entries The lib and key lists were cut. The plugin-root sentence was checked against start-run and the skills that use it, and is accurate
commit-scope examples Gone with the cut

Test results

  • claude plugin validate ./workflow --strict: passed. It does not mistake workflow/skills/AGENTS.md for a skill.
  • node --test workflow/lib/*.test.mjs: 95/95 passed.
  • rule-delta.mjs --base origin/main on workflow/skills and on workflow/hooks: no directive disappeared. Each gains the rule moved in.
  • rule-delta.mjs in before/after mode across the root guide and the two nested ones: 2 → 2, so no rule was lost in the move.

No ticket. prAllowlistGlobs is **.

🤖 Generated with Claude Code

Ardnived and others added 2 commits October 20, 2026 15:47
…side their files

AGENTS.md is read in full by every session that edits this repo. A third of
it restated what `ls`, `.claude/workflow.json` and the file headers already
say, and those copies drift: the Layout table's lib list and loop-config key
list had each fallen behind the code before. Cut what one command derives:

- the agent-audience preamble and the CLAUDE.md symlink note (`ls -la`);
- the gate's command block, which copies `leanGate.command` verbatim;
- "no package.json/lockfile" and the `packageManager: none` gloss;
- the Layout table. Two sentences in it cannot be derived and stay, moved
  into prose: the marketplace manifest must stay valid beside plugin.json,
  and a routine has no CLAUDE_PLUGIN_ROOT, so scripts run through
  `${CLAUDE_PLUGIN_ROOT:-<claude-workflow>/workflow}`;
- the hand-written list of skills that omit disable-model-invocation, which
  `grep -L` answers and which has been wrong before;
- the commit-scope examples, which `git log --oneline -30` answers and which
  named scopes no recent commit uses.

"Writing a skill" and "Editing a hook" apply only under one directory each,
so they move to workflow/skills/AGENTS.md and workflow/hooks/AGENTS.md, and
the root keeps a one-line pointer to each. The hook guide gets the usual
CLAUDE.md symlink. The skill guide does not: a symlink there fails
`claude plugin validate --strict`, so the root pointer is how it is found.
The four cross-cutting rules (a skill's length is a running cost, no
hard-coded values, values-only loop-config, scripts own mechanical rules)
stay at the root, because they also govern loop-config.json and
workflow/lib/.

No skill, hook or script changes. rule-delta finds no directive lost across
the three guides. Version 3.7.1: the new guides sit under workflow/skills/
and workflow/hooks/, which cut-release says always bump, so an install's
cache matches main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The protected-paths section said "Here the only protected file is
`.claude/workflow.json`". `git ls-files .claude` also lists
`.claude/settings.json`, which sets the output style for every session in
this repo, routines included. A session that believes settings.json is
freely writable walks into the prompt that stalls an unattended run.

The same sentence said the nested AGENTS.md guides live "in the product
repos". This repo now has two, under workflow/skills/ and workflow/hooks/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Ardnived
Ardnived merged commit 5136ce4 into main Oct 20, 2026
6 checks passed
@Ardnived
Ardnived deleted the claude/docs-doctor-trim branch October 20, 2026 22:50
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant