consistency-check
Skill2 starsChanged 3 days agoMITView on GitHub
Checks the structural integrity of the repo. Dead references, orphan files, adapter SoT drift, navigation desync, doc-currency drift (stale banners + reading-map index-omission). Triggers when structural repo integrity must be validated after structural changes or before commit (dead refs, orphans, adapter drift, stale "Task N pending" banners, reading-map gone stale); NOT for content/logic review.
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read and follow framework/work-principle.md before taking up work.
- Very specific: line 183
Every run checks the frozen zones (docs/tasks/archive/, context/history/, documents/) for modify / rename / delete since the baseline tag.
- Very specific: line 229
NOT: run on every content change.
- Distinctive: line 234
NOT: treat WARNINGS as ERRORS. INSTEAD the agent decides whether action is needed.
- Distinctive: line 242
NOT: check archive / history as ref sources.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Read and follow framework/work-principle.md before taking up work.
Resolve this reference against the framework root; retain the consumer CWD.
Skill: consistency-check
Purpose
Checks the structural integrity of the repo. Finds dead
references, orphan files, adapter-SoT drift, navigation desync,
boot-map drift (workflows / skills in boot-navigation.md vs
disk), and doc-currency drift (a doc or reading-map entry whose
content has gone stale while its structure still resolves).
Complementary to knowledge-processor:
knowledge-processor processes information (brain logic);
consistency-check checks structure. The two trigger each other
during the consistency cascade (detail: REFERENCE.md).
Detail mechanics (definitions, full checks, refactoring
checklists, frozen-zone bash): REFERENCE.md.
When to call
As a blocking gate (MUST)
| Trigger | Gate condition |
| Structural commit | CLEAN before the next work step. ERROR = fix loop. |
| Refactoring task done | CLEAN before commit. |
As a check (SHOULD)
| Trigger | Who |
User says consistency-check | Buddy |
| Methodology change (consistency cascade) | Buddy |
| Suspicion of drift | Any agent |
Definitions of "structural commit" and "methodology change":
REFERENCE.md.
Gate enforcement: pre-harness via
agents/buddy/context-rules.md §Consistency-Check Gate
(blocking). Post-harness via the pre-commit hook (when
implemented).
The 14 checks (short form)
- Dead references — scan
*.mdfor path refs (backticks, "load and follow", SoT tables). Miss → ERROR. - Orphan files — agents / skills / adapters without an incoming reference → WARNING.
- Adapter-SoT sync —
agents/SoT ↔.claude/agents/↔orchestrators/opencode/→ ERROR on divergence. 3b. Framework invariants —framework/invariants.mdholds## Invariants, no adapter keeps a second copy, both adapters point to it,operational.mddelegates without duplication, "load and follow" block present → ERROR on divergence (detail:REFERENCE.md§3b). - Navigation-tree sync —
context/navigation.md↔ directory structure → ERROR on miss. - Refactoring checklists — on structural changes: a check per category (agent / context area / skill / spec / rename / skill move).
- Boot-map drift —
framework/boot-navigation.mdworkflows + skills ↔workflows/runbooks/*/WORKFLOW.md+skills/*/SKILL.md(excluding_protocols/). New / deleted / moved workflow or skill without a boot-map update → ERROR. Detail:REFERENCE.md§6. - Rationalization test — on framework refactorings,
verify that the change is methodologically justified (not
just housekeeping), considers the solution space, and
documents explicit trade-offs. Missing rationalization
artifacts → WARNING (on structural refactoring without
rationale: ERROR). Detail:
REFERENCE.md§7. - Navigation-layer drift —
navigation.mdper top-level depth-3 directory exists; the AUTO block is regenerated (no diff:scripts/generate_navigation.py --check, exit 1 on drift); the manual reader-journey sections are filled (no placeholder text left). Expectednavigation.mdtargets + bash diff:REFERENCE-drift.md§8. Disk hasnavigation.mdwithout a generator target, or a generator target without a disk file → ERROR. AUTO-block drift → ERROR. Placeholder manual → WARNING. - Folder-taxonomy drift —
docs/subdirs/files vsdocs/STRUCTURE.md. Undeclared path → WARNING; drift alias → ERROR. Detail:REFERENCE-drift.md§9. - Wrapper + router drift — two chained generators.
(a)
skills/workflow_router/SKILL.md(the workflow-router SoT) vs a freshscripts/generate_workflow_router.pyrun; (b) CC skill-wrappers (.claude/skills/*/SKILL.md) vs a freshscripts/generate_skill_wrappers.pyrun. A missing wrapper for an eligible skill, an orphan wrapper, or a hand-edited / stale wrapper/router that doesn't match generator output → drift. Mechanicallygenerate_workflow_router.py --checkTHENgenerate_skill_wrappers.py --check(non-zero exit on drift). Chained-run ordering (discipline, not mechanically enforced): when REgenerating, run router-gen before wrapper-gen — wrapper-gen reads the router SoT, so regenerating the wrapper from a stale router SoT bakes in stale content. This check still catches it (router--checkfires non-zero on a stale router SoT), so the check is order-independent; the ordering only matters on the write/regen path. Mirrors the skill-map idempotence sub-check. Drift → WARNING (WARN-first calibration; escalate to BLOCK after burn-in). Detail:REFERENCE-drift.md§10. - Enforcement-registry integrity — every Live-table row in
framework/enforcement-registry.mdcarries a valid class tag ([STRUCTURAL]/[GATE]/[WORKFLOW]/[DISCIPLINE]) and an artifact pointer that resolves on disk. Stale pointer or bad tag → ERROR. Mechanicallyscripts/consistency_check.py --check enforcement-registry(non-zero exit on failure). Guards against the phantom-enforcement class — a registry that claims a mechanism whose artifact was renamed or removed. - Doc-currency — the content-currency the structural checks
are blind to (a doc whose structure resolves but whose content or
index entry lied). Judgment-applied (not regex): the agent reads
the current-state doc-set (
docs/{specs,architecture}/**/*.md) + the project's reading-map (the §0 entry itsintent.mdnames) and flags (a) a banner naming a Task as pending/open whiledocs/tasks/<N>.yamlstatus is terminal → WARNING (the stale "Task N pending" rot); (b) a doc whoselast_updatedpredates a date on one of its own banner lines → WARNING (the stamp lags the banner); (c) a reading-map SoT pointer that no longer resolves to the current doc, or a doc-of-record the map should index but omits → WARNING (index-omission — the rot a spec born on a bypass route leaves, which no diff-scoped step sees); (d) adocs/plan.yamlmilestonedesccarrying a hardcoded status label ("Status: pending/done/blocked/…") that contradicts the statusplan_engine.py --statuscomputes for that milestone key → WARNING (shadow state the engine computes authoritatively — the fix is deletion, not re-sync; nodocs/plan.yaml→ (d) skips). The "banner / currency claim / right SoT?" calls are read semantically — the LLM-strength judgment a pattern-match gets wrong. No reading-map declared → (c) skips. Contract + vocabulary:REFERENCE-drift.md§12. - User-scope drift — when a user scope is configured
(
framework/user-scope.md), read<user_repo>/context/user/: (a) legacy facet tags, badges or counters, found by the exact search inREFERENCE-drift.md§13 → WARNING per file with its count; (b) one claim stated in two places, or a user-scope statement older than evidence an activity area of the user repo holds (REFERENCE-drift.md§13) → WARNING naming both places and the current statement; (c) a topic file not routed fromnavigation.md(recovery files excepted) → WARNING. Judgment for (b), exact search for (a). Report only; reconciliation stays with the knowledge processor under the user scope's maintenance authority. No user scope → skip. - Instruction-unit size — every instruction unit a step reads
whole (skill and protocol files, framework docs,
agents/buddy/andagents/_protocols/units, runbook narratives, adapter rules,CLAUDE.md,AGENTS.md, the soul) stays within the unit budget, and every lookup reference the guard lists (read for one entry: a check, a row, a pattern) within its read ceiling; every file of the boot entry's reread list exists. Both limits come from measured host behaviour (skills/_protocols/piebald-budget.md§Loading policy), so a unit arrives whole in one read on every host. Over budget or missing → ERROR. Mechanicallyscripts/consistency_check.py --check instruction-units(non-zero exit on failure). A unit that fails is split at its steps (agents/buddy/operational.mdshows the pattern), not trimmed of rules.
Running checks 3b, 5, 6 and 7 requires REFERENCE.md, checks 8, 10
and 13 REFERENCE-drift.md, to be co-loaded (sub-checks, scan targets, checklist items,
bash).
Frozen-zone integrity
Every run checks the frozen zones (docs/tasks/archive/,
context/history/, documents/)
for modify / rename / delete since the baseline tag. A = OK
(WORM); M / R / D = INCIDENT. Exception:
.correction.md (corrections addendum).
Bash command + repair flow: REFERENCE.md.
Output format
→ CONSISTENCY-CHECK
Checked: <N> files, <M> references, <K> adapters
ERRORS (must be fixed):
- <file:line>: dead reference to `<path>`
- <adapter>: points at `<path>`, SoT is `<correct>`
WARNINGS (review):
- <file>: orphan
CHECKLIST (<category>):
✅ <done item>
❌ <missing item> — action: <what to do>
Result: CLEAN / <N> ERRORS, <M> WARNINGSOn ERROR: fix before task done. On WARNING: agent decision.
Boundary
- No content review — that's
spec_boardorcode_review_board. - No knowledge check — that's
knowledge_processor(IMPACT CHAIN). Check 13 only reports user-scope drift (copies, legacy metadata, unrouted files); reconciling it is the knowledge processor's. - No linting — that's
python_code_quality_enforcement. - No auto-fix — the check reports; it does not fix itself.
- No self-growth — on convention changes the skill must
grow manually (rules:
REFERENCE.md§Self-Update-Rules).
Anti-patterns
- NOT run on every content change. INSTEAD only on
structural commits (definition + full path list:
REFERENCE.md§Structural commit). Because: content edits don't produce structural drift — the check is expensive and gains nothing. - NOT treat WARNINGS as ERRORS. INSTEAD the agent decides whether action is needed. Because: orphan files can be legitimate (templates, draft specs with a planned consumer).
- NOT skip the check because "it's just a small rename". INSTEAD trigger the rename category of the refactoring checklist. Because: small renames are the most frequent drift source.
- NOT check archive / history as ref sources. INSTEAD frozen zones are WORM — historical paths are correct for their point in time; only check modifications. Because: a ref check on archive produces false-positive drift.
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- striderZA/OpenCodeGameStudios★ 93same name
- cenconq25/claude-code-app-studio★ 40same name
- dawn840705/codex-code-studios★ 17same name
- lilangMax/ClaudeCodeGameStudios★ 8same name
- hongyuanc/codex-game-studios★ 5same name
- sakuruamayday-ops/enterprise-project-application-assistant★ 2same name
- dawn840705/claude-code-studios★ 1same name
- HunLuanZhiZhu/Game-Studios-Plugin★ 1same name
- venus2099/codex-game-studios★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository85 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversary-test-planSkill
- api-and-interface-designSkill
- architecture-coherence-reviewSkill
- bedrock-drillSkill
- cavemanSkill
- code-review-boardSkill
- consistency-checkSkill
- councilSkill
- cross-spec-consistency-checkSkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- frameSkill
- frontend-design-ttySkill
- frontend-ui-engineeringSkill
- get-api-docsSkill
- impl-plan-reviewSkill
- improve-codebase-architectureSkill
- knowledge-captureSkill
- knowledge-processorSkill
- pre-build-spec-auditSkill
- retroactive-spec-updateSkill
- root-cause-fixSkill
- scopingSkill
- sectional-deep-reviewSkill
- security-and-hardeningSkill
- session-diagnosisSkill
- shipping-and-launchSkill
- show-open-tasksSkill
- source-spec-reduceSkill
- spec-authoringSkill
- spec-boardSkill
- task-creationSkill
- task-status-updateSkill
- testingSkill
- transparency-headerSkill
- ux-authoringSkill
- workflow-routerSkill
- youtube-subtitlesSkill
- adversary-test-planSkill
- api-and-interface-designSkill
- architecture-coherence-reviewSkill
- bedrock-drillSkill
- cavemanSkill
- close-retroSkill
- code-review-boardSkill
- convergence-loopSkill
- councilSkill
- cross-spec-consistency-checkSkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- frameSkill
- frontend-design-ttySkill
- frontend-ui-engineeringSkill
- get-api-docsSkill
- impl-plan-reviewSkill
- improve-codebase-architectureSkill
- knowledge-captureSkill
- knowledge-processorSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

