Repository navigation
docs(loop): trim the root guide, and nest the skill and hook rules beside their files - #201
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The root
AGENTS.mdgoes from 16,545 → 11,476 chars (−31%). Every session that edits this repo reads all of it, and the copies it held ofls, 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.jsonkey 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
versionbump below.Commits
e6d1632)ls -la)leanGate.command)ls,packageManager)disable-model-invocation(grep -L)git log)${CLAUDE_PLUGIN_ROOT:-<claude-workflow>/workflow}fallback.workflow/hooks/AGENTS.md(with aCLAUDE.mdsymlink) holds "Editing a hook".workflow/skills/AGENTS.mdholds "Writing a skill". It has no symlink: a symlink there failsclaude plugin validate --strict. The root's one-line pointer is how it is found.loop-config.jsonandworkflow/lib/: a skill's length is a running cost, no hard-coded values,loop-config.jsonholds values only, scripts own mechanical rules.version3.7.0 → 3.7.1. The new guides sit underworkflow/skills/**andworkflow/hooks/**, andcut-releasesays a change there always bumps.04513d8): "Here the only protected file is.claude/workflow.json" was wrong, becausegit ls-files .claudealso lists.claude/settings.json. The same sentence said nested guides exist only "in the product repos".Stale claims checked against the tree
docs/routine-setup.mdimprove-looprunsrule-delta.mjs, andaudit-code's comment sweep runsste-lint.py --jsondisable-model-invocationstart-runand the skills that use it, and is accurateTest results
claude plugin validate ./workflow --strict: passed. It does not mistakeworkflow/skills/AGENTS.mdfor a skill.node --test workflow/lib/*.test.mjs: 95/95 passed.rule-delta.mjs --base origin/mainonworkflow/skillsand onworkflow/hooks: no directive disappeared. Each gains the rule moved in.rule-delta.mjsin before/after mode across the root guide and the two nested ones: 2 → 2, so no rule was lost in the move.No ticket.
prAllowlistGlobsis**.🤖 Generated with Claude Code