Consistency check
Skill pssah4/digital-innovation-agents/skills/consistency-check
Verifies the V-Model artifact graph: Epics, Features, ADRs, PLANs, Backlog, Wayfinder rows, code refs. Syntactic and semantic modes. Explicit user command for "consistency check", "graph check", "dead links", "orphan features", or before a release; routine enforcement runs via the pre-commit hook, not per phase.From its SKILL.md
npx -y skills add pssah4/digital-innovation-agents --skill consistency-checkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
29.9 KB, as published. Nobody here has run it
Consistency Check
This skill treats the V-Model artifacts as a graph. Nodes are artifacts (BA sections, Epics, Features, Success Criteria, ADRs, arc42 sections, PLANs, Backlog items, Code files). Edges are references (Epic→Feature, Feature→ADR, Feature→Code via source paths, BL-Item→Feature, and so on). The check answers one question: is the graph complete and consistent, or do we have orphans, dead links, and semantic drift?
The skill is an explicit user command. It runs mandatorily once per cycle before release (security-audit Step 7 / Closing Handoff) and on demand any time. Between those points, the pre-commit hook enforces the drift-critical invariants (script-only, no skill load); phase skills do NOT invoke this skill at their boundaries.
Writing style: Every artifact this skill writes follows the
rules in skills/project-conventions/SKILL.md under "Writing style".
No em dashes, no AI vocabulary, ASCII for umlauts if the existing
project convention uses ASCII.
Three modes
- Mode A (syntactic, default): fast, no LLM, runs via the pre-commit hook, before release, and on demand.
- Mode B (semantic, on-demand): agent-based, runs before release
or on explicit
--deep. - Mode C (interactive fix-loop): guided fix workflow with
per-finding
AskUserQuestion, Pro/Con suggestions, skip and custom-message options. Triggered by--fix-interactiveor after a pre-commit hook block.
Mode reference
Mode A: Syntactic check (default, fast, no LLM)
Runs via the pre-commit hook, before release, and on demand. Uses Grep + filesystem probes only. Costs near zero.
Checks (8 quick-check items):
- Dead links. Every Markdown link to a project-internal path
(
_devprocess/...,src/...,docs/...) points to an existing file. - Backlog completeness. Every artifact file under
_devprocess/requirements/,_devprocess/architecture/,_devprocess/implementation/plans/,_devprocess/requirements/fixes/, and_devprocess/requirements/improvements/has exactly one row in the backlog. No artifact without a row, no row without an artifact. - Backlog as single source. Artifact frontmatter does NOT carry
status:orphase:fields. The backlog row is authoritative. Frontmatter that duplicates these fields gets flagged. - Spec references valid. Every Feature references a real Epic
ID. Every Backlog Refs entry resolves to an existing row or file.
Every PLAN's
feature-refs,adr-refs,fix-refs, andimp-refsresolve. - ADR references valid. Every ADR ID listed in a FEATURE's
adr-refs, in arc42 Par. 9 table, in JSDoc headers, or insrc/ARCHITECTURE.mapresolves to an existing ADR file. - ADR contradictions. No two ADRs cover overlapping topics with
opposing decisions. Heuristic: similar titles or matching
triggering-asrclusters surfaced for human review. - ADR abstraction rule. No ADR contains code paths
(
src/...strings, file basenames, line numbers, method signatures) in the core sections (Context, Decision Drivers, Considered Options, Decision, Consequences). Code paths in the## Implementation Notesappendix are exempt. - Backlog graph health. Every Refs entry in the backlog points at an existing row. The graph derived from the Refs columns is acyclic (Epic -> Feature -> Plan -> Fix forms a DAG).
Auto-fix mode
When run with --fix (or when called by another skill with
autofix=true), the syntactic check repairs the following drift
types automatically, without asking:
- Frontmatter
status:orphase:field present: REMOVE it. Backlog row is the single source of truth. The fix lifts the current value from the artifact into the backlog row only if no row exists yet; otherwise it just removes the duplicate. Reverse-engineering exception (graph-invariants N-10 / N-11): values starting withAnticipated,Observed,Inferred, orDraft (reverse-engineered, ...)are validation markers that/business-analysisstrips after validation. The autofix keeps them and only removes generic lifecycle status / phase entries. - Backlog row missing for an existing artifact file: create the row
with
status: Ready,phase: Buildingdefaults, place under the matching Epic section. - Artifact file missing for a backlog row: leave the row, flag for human triage (the row may be a placeholder or outdated entry).
- Dashboard counts differ from computed totals: rewrite the dashboard table.
- ARCHITECTURE.map row points at a missing entry-point file: flag, do not auto-delete. Renames may have happened.
The auto-fix report lists what was changed. Items that cannot be auto-fixed (orphan ADR, dead link, ADR abstraction violation) are reported and left for the user.
Mode B: Semantic check (on-demand, agent-based)
Runs on explicit user request or before a release. Uses subagents to read paired artifacts and judge whether their content remains consistent. Costs measurable agent-time.
Checks (6 deep-check items):
- Spec-code coherence. For every Feature with status Done in the backlog, sample-check whether the Success Criteria described in the FEATURE spec are plausibly verifiable in the code (sampling, not exhaustive).
- Rule-set drift. Compare
_devprocess/rules/technical.mdagainst the actual project state (linter config, test thresholds, framework versions). Surface contradictions for human triage. - Orphan artifacts. Specs without code (FEATURE Done in
backlog but no entry-point in
src/ARCHITECTURE.map); code without spec (entry-point insrc/ARCHITECTURE.mapwith no matching FEATURE backlog row). - ADR duplication check. Two ADRs covering the same topic at different abstraction levels are flagged for consolidation.
- Map completeness. Every module under
src/that owns substance has anARCHITECTURE.mapentry. Triggers: more than 3 source files in a directory, or any directory with aREADME.md. - Backlog graph render. Produce a mermaid or JSON graph from the backlog Refs columns, surface orphan nodes (no incoming or outgoing edges) and status mismatches (e.g. PLAN Done but parent FEATURE still In Progress).
Each finding includes file path, row reference, and enough context
to locate the issue. Findings that cannot be auto-fixed become BL
items in the Standalone Items section with Source = CONSISTENCY-CHECK.
Mode C: Interactive fix-loop (on-demand or post-block)
Triggered by /consistency-check --fix-interactive or by the
pre-commit hook when Mode A leaves non-auto-fixable findings. The
loop picks up the latest run from
.git/consistency-check.last-run.json (Mode A always writes this
file) and walks every finding with the user, one by one.
Resume contract. The findings file persists across Claude Code
sessions. If the user exits Claude mid-loop, the next
/consistency-check --fix-interactive invocation reads the same
file and continues at the first unresolved finding. Resolved
findings are marked status: "fixed" or status: "skipped" in the
JSON; the loop never re-asks about them. The file is deleted only
after the loop completes and the user confirms the commit.
Universal interaction rules (the "never leave the user alone"
contract). Every step in this loop ends with one
AskUserQuestion that satisfies all of:
- One short recommendation sentence ("Empfehlung: A, weil ...").
- Two to four concrete options, each with a one-line
Pro:and one-lineCon:block. - A
Skipoption that defers the finding without losing it. - A
Customoption ("eigene Anweisung schreiben") so the user can always override. - The recommendation and the option list are derived from the current finding plus the project state, not boilerplate.
This rule is invariant. The loop never returns control to the user without an explicit next-step question. If a step has no decision left to make (e.g. all findings resolved), the question still asks about the next workflow step (commit, push, /testing, /release).
Loop structure (six phases):
-
Load. Read
.git/consistency-check.last-run.json. If absent or empty, run Mode A first and then continue. -
Triage. AskUserQuestion: which strategy (sequential, by severity, by class, batch-fix-only, trust-mode auto-approve, custom). Recommendation adapts to finding count: sequential up to 10, by-severity 11+, trust-mode when the user explicitly says "mach wie du denkst" or selects it.
Trust mode (auto-approve all): the user delegates all fix decisions to the agent. The loop applies the recommended option for every finding without asking, except when:
- A finding's three options have no clear recommendation (recommendation field empty in the suggestion bundle)
- A fix would touch shared infrastructure (CI configs, hooks, governance code) -- always escalate
- A fix would delete substance (more than just a Status duplicate or dead link) -- escalate to confirm
In trust mode, after every batch of 10 fixes the loop posts a one-line progress update so the user sees movement. At the end it produces a complete audit log: per-finding the chosen option, the resulting diff hunk reference, and any escalations.
-
Per-finding loop. For each unresolved finding, AskUserQuestion with file:line pointer, finding text, two to four concrete fix options with Pro/Con, plus Skip and Custom. Recommendation names the option and gives the reason from project state.
-
Re-check. Run Mode A again. List remaining findings (Skips and any new findings produced by fixes). AskUserQuestion: how to handle remaining findings (file as backlog items with Source=CONSISTENCY-CHECK, commit anyway via --no-verify, return to skips, custom). Recommendation defaults to backlog-filing.
-
Commit. Build the commit message from the resolved findings list, show it to the user, AskUserQuestion: confirm message, edit message, or cancel. Recommendation is "confirm" when the message accurately summarizes the fixes.
-
Follow-up. AskUserQuestion: what next (push, /coding, /testing, /security-audit, /release, custom). Recommendation follows the V-Model checklist (after /coding -> /testing, after /testing -> /security-audit, before release -> Mode B semantic check).
Fix actions per finding type. The loop dispatches to specific
fix patterns based on the finding's type field:
| Finding type | Auto-fix candidates surfaced as options |
|---|---|
dead-link | Remove, mark planned with FEAT-ref, correct path |
adr-abstraction-violation | Move path to ## Implementation Notes appendix, move path to src/ARCHITECTURE.map, replace path with concept name |
orphan-adr | Mark Superseded with reference, mark Deprecated, link from a feature |
orphan-feature | Assign to existing epic, create new epic, mark Planned |
feature-without-sc | Add [AWAITING BA] placeholder, write SC inline, defer |
source-path-broken | Update path, mark feature Planned, remove path entry |
frontmatter-status-duplicate | Always auto-fixed in Mode A; only surfaces here if auto-fix failed |
status-coherence-breach | Open the owning phase skill (/business-analysis for BA Draft, /requirements-engineering for RE-side BA promotion, /architecture for ADR Proposed), Defer (file as backlog item with Source=CONSISTENCY-CHECK), Skip with reason. No direct edit option: status promotion is a semantic claim and belongs in the phase skill. |
feature-activation-path-missing | Open /requirements-engineering to add the Activation Path entry, Demote FEATURE backlog status from Done to In Progress, Defer (file as backlog item with Source=CONSISTENCY-CHECK), Skip with reason. No direct edit option: subtype-aware contract is owned by /requirements-engineering. |
stub-without-fix-row | Open /coding to create the missing FIX-row, Remove the stale FIXME marker (only if the stub has been resolved in code), Skip with reason. |
fix-without-stub-evidence | Open /coding to add the FIXME marker at the stubbed code location, Resolve the FIX (mark Done if the stub is gone), Defer, Skip with reason. |
artefact-cap-exceeded | Shrink the artefact to within the cap, Move detail to a child artefact (BA -> Mini-BA, FEATURE -> PLAN), Add a ## Reasoned exception block at the top, Skip with reason. |
forbidden-section-resurfaced | Remove the section / frontmatter key, Move substance into the BACKLOG row, Open the owning phase skill, Skip with reason. |
Output of the loop. The loop writes a single audit row in
_devprocess/context/METRICS.md under "Consistency-Check Runs"
with: timestamp, mode (C), findings-total, fixed, skipped, deferred-
to-backlog, and the commit SHA when applicable.
Invocation
/consistency-checkwith no args: runs Mode A on the current project root, reports results, and writes.git/consistency-check.last-run.json./consistency-check --fix: Mode A with auto-fix enabled (no user interaction). Used by the pre-commit hook before falling back to Mode C if findings remain./consistency-check --fix-interactive: Mode C interactive fix-loop. Reads the last-run file and walks the user through./consistency-check --deepor with user saying "semantic check": runs Mode A + Mode B./consistency-check --viewor user says "zeig mir den Graph", "show me the graph": runs Mode A and opens the interactive graph viewer (see Viewer-Tool below).- Called from another skill: the calling skill passes a scope
argument (e.g.
scope=feature:FEAT-NN-19to check only a single feature's neighbourhood). - Called from pre-commit hook: hook runs
--fixfirst, then if findings remain prompts the user to launch--fix-interactive.
Tooling
The syntactic checker (Mode A) and the pre-commit hook live in
tools/ of this DIA repo:
tools/consistency-check.py-- project-agnostic Mode A driver. Auto-detects the repo root viagit rev-parse --show-topleveland expects the standard DIA layout (_devprocess/, optionalsrc/). Optionaldia.config.jsonin the project root overrides defaults.tools/git-hooks/pre-commit-- pre-commit hook template that runs the Mode A driver, then on findings asks the user (y/N) whether to launch the interactive Mode C fix-loop in Claude Code.tools/install-git-hooks.sh-- installer. Run from the target project's repo root:bash <DIA-checkout>/tools/install-git-hooks.sh. Copies the script to the target's.git/hooks-data/and installs the pre-commit hook into.git/hooks/pre-commit.
Mode B (semantic) and Mode C (interactive fix-loop) are orchestrated inside Claude Code by this skill, not by the script.
Caps
N-20 reads the per-artefact line caps at runtime from the single
source skills/project-conventions/references/artifact-caps.json
(caps, counting boundaries, and the tolerance factor). There is no
mirror table anywhere; the script exits loudly when the JSON is
missing. A top-level ## Reasoned exception heading suppresses an
over-cap finding.
Viewer tool (for team meetings and navigation)
The graph is NOT persisted in a separate file. It exists implicitly in the backlog Refs columns and Markdown references; it is generated on-demand from the source files.
Two entry points:
-
Direct shell:
bash ~/.claude/skills/dia-guide/tools/open-graph.sh <project-root>The parser builds the JSON in memory, passes it as a URL parameter to the viewer, and opens the default browser. No file on disk.
-
From this skill:
/consistency-check --viewcalls the same mechanism.
Viewer features:
- Cytoscape.js based, standalone HTML, no build pipeline.
- Filters / lenses:
Overview(Epics, Features, ADRs),Persona lens(BA persona -> Epic -> Feature),Phase lens(colored by Released/Building/Planned/Candidates),Health lens(orphans highlighted),Epic focus(one Epic with direct neighbors). - Click on a node: details panel with type, phase, status (read from the backlog row), and file path (clickable, opens in the default editor).
- No editor: all changes stay in Markdown. The viewer navigates; it does not persist.
Use in meetings:
- Screen share with the viewer URL.
- Phase lens gives the status panorama (mostly Building, a few Planned highlights).
- Health lens for backlog refinement sessions (what is loose, what is missing).
Tool files
skills/dia-guide/tools/parse-graph.py- Markdown to JSON. Stdlib only, no dependencies.skills/dia-guide/tools/graph-viewer.html- standalone viewer with Cytoscape.js (CDN).skills/dia-guide/tools/open-graph.sh- wrapper that parses and opens the viewer.
Output
Every run produces two artifacts:
1. Console report (summary)
Consistency Check, Mode: {A | A+B}, Run: {date}
Graph state:
- Epics: {n}
- Features: {n} (Released {a}, Building {b}, Planned {c}, Candidates {d})
- ADRs: {n}
- PLANs: {n}
- BL-Items: {n}
Findings:
- Dead links: {n}
- Orphan features: {n}
- Orphan Epics: {n}
- Orphan ADRs: {n}
- Features without SC: {n}
- Source paths broken: {n}
- Backlog format issues: {n}
- arc42-ADR table drift: {n}
- Status coherence breach: {n} (warn, fail under --strict)
- Activation path missing: {n} (warn, fail under --strict)
- Stub without FIX-row: {n} (warn)
- FIX without stub evidence: {n} (warn)
- Artefact cap exceeded: {n} (warn)
- Forbidden section resurfaced: {n} (warn)
{if Mode B:}
- Feature-ADR semantic: {n}
- BA-Feature semantic: {n}
- arc42-ADR semantic: {n}
- Code-Feature semantic: {n}
2. Backlog update in {ROOT}/context/BACKLOG.md
-
Graph-Health section (create or replace):
## Graph-Health (letzter Check: {YYYY-MM-DD}, Modus: {A | A+B}) | Invariante | Status | Count | | --------------------------- | ------ | ----- | | Dead links | {ok/fail} | {n} | | Orphan features | {ok/fail} | {n} | | Orphan Epics | {ok/fail} | {n} | | Orphan ADRs | {ok/fail} | {n} | | Features without SC | {ok/fail} | {n} | | Source paths broken | {ok/fail} | {n} | | Backlog format issues | {ok/fail} | {n} | | arc42-ADR table drift | {ok/fail} | {n} | | Status coherence breach | {ok/warn/fail} | {n} | | Activation path missing | {ok/warn/fail} | {n} | | Stub-FIX binding (E-14) | {ok/warn} | {n} | {...if Mode B, extra rows} -
Automatic BL-items. Every finding that represents a real gap (not a false positive) becomes a BL-row in the Standalone Items section with
Source = CONSISTENCY-CHECK,Prio = P3(default, user reprioritises),Phase = Candidates, and a concreteneeds refinement: {specific issue}note. Fixes that are purely mechanical (dead link, broken source path) getPhase = Buildingbecause no refinement is needed. -
Deduplication. If a finding from a previous run already has a BL-item, do not create a duplicate. Refresh the existing item's Notes with the latest run date.
Workflow
- Detect project structure. Same rules as
/dia-realign:docs/or_devprocess/as root. Abort with a clear message if neither is found. - Build the node set. Grep for:
_devprocess/requirements/epics/EPIC-*.md-> Epics_devprocess/requirements/features/FEATURE-*.md-> Features_devprocess/architecture/ADR-*.md-> ADRs_devprocess/implementation/plans/PLAN-*.md-> PLANs_devprocess/analysis/BA-*.md-> BA sections (parsed by headers)_devprocess/architecture/arc42.md-> arc42 sectionssrc/ARCHITECTURE.map-> wayfinder rows- JSDoc headers in entry-point files -> wayfinder cross-checks
_devprocess/context/BACKLOG.md-> BL-Items
- Build the edge set. Parse references in each node:
- Feature's
Epic:field -> edge to Epic - Feature's
Related ADRs:-> edges to ADRs - Feature's
Source (Implementation):-> edges to Code files - ADR's
Related Decisions:/References:-> edges to ADRs/Features - BL-Item's Feature-Spec / ADR columns -> edges
- arc42 Par. 9 table -> edges to ADRs
- Epic's / Feature's / IMP's / FIX's
ba-ref:-> edge to BA - Item-BA's
project-ba-ref:-> edge to Project-BA - architect-handoff
source-ba:-> edge to BA
- Feature's
- Apply invariants. For each check, list violations with file
path and line number if possible. For N-17, walk the
Status-Coherence-Pairs table from
graph-invariants.md: per pair, read the parent'sstatus:field and check the child evidence condition. Emitstatus-coherence-breachfindings with parent path, parent status, child path, child evidence, and suggested promotion target. For N-18, walk Done-FEATUREs (per backlog), parse the FEATURE file for an## Activation Pathsection, emitfeature-activation-path-missingif the section is absent or empty (and the FEATURE hassubtype:set, otherwise skip per backwards-compat rule). For E-14, grep the source tree forFIXME(stub):markers, parse the embedded FIX-ID, cross-reference against backlog FIX-rows; bidirectional check both ways. - Write report and backlog update.
- Handoff. Report completion with finding count. Hand back to the calling skill or return to user.
Invariants reference
This is the binding set. The same list lives in
skills/project-conventions/references/graph-invariants.md (source
of truth for all V-Model skills).
Node invariants
-
N-1Every Feature has exactly one Epic parent. -
N-2Every Epic has either at least one Feature in its MVP table or is explicitly marked Phase Candidates withneeds refinement. -
N-3Every ADR is referenced at least once from a Feature, arc42, or Backlog entry. -
N-4Every Feature has at least one Success Criterion entry (may be placeholder[AWAITING BA]or[AWAITING RE]). -
N-6Every backlog row has a Phase label (Released | Building | Planned | Candidates) and a Status label. -
N-7Every backlog row with Phase Candidates has aneeds refinement: {reason}marker. -
N-13Every FIX hasfeature:andepic:in the frontmatter. -
N-14Every IMP hasfeature:andepic:in the frontmatter. -
N-15(NEW) No artifact frontmatter contains astatus:orphase:field. The backlog row is the single source of truth. -
N-17(NEW) Status coherence between parent and child artifacts: a parent must not stay at a pre-validation status while a derived child has been exercised. Pair table below.Parent-child pair table (initial, append-only):
Parent Parent draft status Child evidence triggering breach BA DraftorDraft (...)prefix (e.g.Draft (reverse-engineered, ...))architect-handoff.mdexists and references this BA, OR an Epic / Feature / IMP / FIX withba-ref:pointing here has phaseBuildingorReleasedADR ProposedA Feature with adr-refs:pointing here has phaseBuildingorReleasedSeverity defaults to
warn(Mode A reports, does not fail the run). Under--strict(typically before release),warnbecomesfail. Auto-fix is NOT performed; the finding surfaces in Mode C with the fix option "Open the owning phase skill" so the promotion happens through the canonical path. Detail rule and match semantics live inskills/project-conventions/references/graph-invariants.mdunder "Status-Coherence-Pairs". -
N-20(NEW)artefact-cap-exceeded: an artefact exceeds its line cap by more than 10%. Severitywarn. Cap source: see the Caps section below (mirrorsskills/project-conventions/SKILL.md#canonical-specs, Reader budget). A top-level## Reasoned exceptionsection suppresses the finding for that file. Counting rules:backlog-headercounts lines up to## Active Epics;planexcludes everything from## Change Logonwards; all other artefacts count the full file. Auto-fix is NOT performed; shrink the artefact or add a## Reasoned exceptionblock. -
N-21(NEW)forbidden-section-resurfaced: a section or frontmatter key removed by the v3.6.0 shrink has come back. Covers## Statusin any detail artefact (BACKLOG.md exempt),Backlog row pointerblockquote / section,## Next Stepsin BA / EXPLORATION-BOARD / FIX / IMP,Instructions for the agentHTML comments with more than 3 lines, and the forbidden frontmatter keysstatus,phase,last_updated,last-updated,lastUpdated,author,deciders. Severitywarn(mediumfor the section findings,lowfor the oversized agent-instruction comment). Auto-fix is NOT performed in the script; the existingtools/migration/strip_frontmatter_status.pyhandles the frontmatter keys when run explicitly. -
N-18(NEW) Every FEATURE with backlog statusDonecarries an## Activation Pathsection in its Definition of Done with at least one filled entry (Type and Identifier non-empty). FEATUREs withoutsubtype:in frontmatter are exempt for backwards compatibility; FEATUREs withsubtype: user-facing(default when set) orsubtype: libraryMUST satisfy this invariant. Severity defaults towarn(Mode A reports),failunder--strict. Auto- fix is NOT performed; Mode C surfaces "Open/requirements-engineeringto add the Activation Path entry" or "Demote backlog status from Done to Active" as the resolution path.
Edge invariants
E-1Every Markdown link to a project-internal path resolves.E-3Every ADR listed in a FEATURE'sadr-refsexists.E-4Every ADR listed in arc42 Par. 9 exists in_devprocess/architecture/.E-5Every ADR under_devprocess/architecture/appears in arc42 Par. 9 or is explicitly deprecated or superseded.E-6Every backlog row's Refs column resolves to existing rows or files.E-10Everydepends-onentry resolves to an existing artifact ID.E-11The graph derived fromdepends-onAND backlog Refs columns is acyclic.E-12(NEW) Every artifact file under_devprocess/requirements/,_devprocess/architecture/,_devprocess/implementation/plans/,_devprocess/requirements/fixes/,_devprocess/requirements/improvements/has exactly one row in the backlog.E-13(NEW) Every entry-point file referenced insrc/ARCHITECTURE.mapexists.E-14(NEW) Bidirectional binding betweenFIXME(stub):markers in source code and FIX-rows in the backlog. For everyFIXME(stub): <reason> -- see FIX-{ee}-{ff}-{nn}in the source tree: the referenced FIX-ID exists in the backlog and is in an unresolved state (status notDone). For every FIX-row whose notes containWiring offen,stub, ordeferred-stub: at least one source location references this FIX-ID via aFIXME(stub):marker. Findings:stub-without-fix-row(marker references missing or resolved FIX-ID) andfix-without-stub-evidence(FIX-row claims a stub but no marker references it). Both surface aswarnin Mode A. Auto-fix not performed (manual triage: either add the missing FIX-row, remove the stale marker, or resolve the FIX).
ADR abstraction invariants
A-1(NEW) No ADR containssrc/...paths, file basenames, line numbers, or method signatures in the core sections (Context, Decision Drivers, Considered Options, Decision, Consequences). Code paths in the optional## Implementation Notesappendix are exempt and explicitly allowed to go stale.
Semantic invariants (Mode B only)
S-1FEATURE description does not contradict referenced ADRs.S-2FEATURE without a matching BA JTBD is flagged asneeds BA-anchor.S-3arc42 sections describing an ADR's decision match the ADR's current Decision text (not an old revision).S-4FEATUREs with backlog status Done have their key Success Criteria verifiable in the code (plausibility, not exhaustive).S-5(NEW) Every module undersrc/that owns substance has anARCHITECTURE.maprow (heuristic: more than 3 source files in the directory, or any directory with aREADME.md).S-6(NEW) For every FEATURE with backlog statusDone, every Success Criterion entry maps onto a concrete code path (file:line range or symbol). Subagent samples per FEATURE; reportssc-without-evidencefindings for SCs that cannot be tied to code. Plausibility check, not exhaustive proof.S-7(NEW) The## Activation Pathentry in a Done-FEATURE actually exists in the code. Subagent verifies the claim per activation type (route registered, command registered, public symbol exported, scheduled job hooked, etc.). Reportsactivation-path-missingfindings when the claimed identifier is absent from the code.
Quality gates for the skill itself
Before this skill reports completion:
- Every reported finding includes file path and enough context to locate the issue.
- No finding is silently dropped; unclear cases go into the report
with an
unclear:prefix so a human can triage. - BL-items created by this skill carry
Source = CONSISTENCY-CHECKso they are distinguishable from other backlog entries. - Duplicates are avoided via the dedup rule.
When NOT to use
- Trivial edits (typo fix, single comment). Running the full check is overkill.
- Active refactoring where artifacts are intentionally in flux. Wait for the refactor to settle, then run the check.
- Greenfield projects without V-Model artifacts. Bootstrap via
/dia-guideor/dia-realignfirst.
Keywords
consistency check, graph check, Konsistenzpruefung, graph-health, dead links, orphan features, orphan epics, orphan ADRs, V-Model integrity, artifact graph, reference check, semantic drift, backlog health