$npx -y skills add pssah4/digital-innovation-agents --skill consistency-checkVerifies the V-Model artifact graph is intact: BA sections, Epics, Features, Success Criteria, ADRs, arc42 sections, PLANs, Backlog, Wayfinder rows, and code references. Two modes: syntactic (links, IDs, Refs) and semantic (content coherence via an agent). Default syntactic at th
| 1 | # Consistency Check |
| 2 | |
| 3 | This skill treats the V-Model artifacts as a **graph**. Nodes are |
| 4 | artifacts (BA sections, Epics, Features, Success Criteria, ADRs, |
| 5 | arc42 sections, PLANs, Backlog items, Code files). Edges are |
| 6 | references (Epic→Feature, Feature→ADR, Feature→Code via source |
| 7 | paths, BL-Item→Feature, and so on). The check answers one question: |
| 8 | **is the graph complete and consistent, or do we have orphans, dead |
| 9 | links, and semantic drift?** |
| 10 | |
| 11 | The skill is called by other skills at the end of each phase, or |
| 12 | directly by the user when a health check is due. |
| 13 | |
| 14 | **Writing style:** Every artifact this skill writes follows the |
| 15 | rules in `skills/project-conventions/SKILL.md` under "Writing style". |
| 16 | No em dashes, no AI vocabulary, ASCII for umlauts if the existing |
| 17 | project convention uses ASCII. |
| 18 | |
| 19 | ## Three modes |
| 20 | |
| 21 | - **Mode A (syntactic, default):** fast, no LLM, runs on phase-end |
| 22 | triggers and pre-commit hooks. |
| 23 | - **Mode B (semantic, on-demand):** agent-based, runs before release |
| 24 | or on explicit `--deep`. |
| 25 | - **Mode C (interactive fix-loop):** guided fix workflow with |
| 26 | per-finding `AskUserQuestion`, Pro/Con suggestions, skip and |
| 27 | custom-message options. Triggered by `--fix-interactive` or after |
| 28 | a pre-commit hook block. |
| 29 | |
| 30 | ## Mode reference |
| 31 | |
| 32 | ### Mode A: Syntactic check (default, fast, no LLM) |
| 33 | |
| 34 | Runs on every Phase-End trigger. Uses Grep + filesystem probes |
| 35 | only. Costs near zero. |
| 36 | |
| 37 | Checks (8 quick-check items): |
| 38 | |
| 39 | 1. **Dead links.** Every Markdown link to a project-internal path |
| 40 | (`_devprocess/...`, `src/...`, `docs/...`) points to an existing |
| 41 | file. |
| 42 | 2. **Backlog completeness.** Every artifact file under |
| 43 | `_devprocess/requirements/`, `_devprocess/architecture/`, |
| 44 | `_devprocess/implementation/plans/`, `_devprocess/requirements/fixes/`, |
| 45 | and `_devprocess/requirements/improvements/` has exactly one row in |
| 46 | the backlog. No artifact without a row, no row without an |
| 47 | artifact. |
| 48 | 3. **Backlog as single source.** Artifact frontmatter does NOT carry |
| 49 | `status:` or `phase:` fields. The backlog row is authoritative. |
| 50 | Frontmatter that duplicates these fields gets flagged. |
| 51 | 4. **Spec references valid.** Every Feature references a real Epic |
| 52 | ID. Every Backlog Refs entry resolves to an existing row or file. |
| 53 | Every PLAN's `feature-refs`, `adr-refs`, `fix-refs`, and |
| 54 | `imp-refs` resolve. |
| 55 | 5. **ADR references valid.** Every ADR ID listed in a FEATURE's |
| 56 | `adr-refs`, in arc42 Par. 9 table, in JSDoc headers, or in |
| 57 | `src/ARCHITECTURE.map` resolves to an existing ADR file. |
| 58 | 6. **ADR contradictions.** No two ADRs cover overlapping topics with |
| 59 | opposing decisions. Heuristic: similar titles or matching |
| 60 | `triggering-asr` clusters surfaced for human review. |
| 61 | 7. **ADR abstraction rule.** No ADR contains code paths |
| 62 | (`src/...` strings, file basenames, line numbers, method |
| 63 | signatures) in the core sections (Context, Decision Drivers, |
| 64 | Considered Options, Decision, Consequences). Code paths in the |
| 65 | `## Implementation Notes` appendix are exempt. |
| 66 | 8. **Backlog graph health.** Every Refs entry in the backlog points |
| 67 | at an existing row. The graph derived from the Refs columns is |
| 68 | acyclic (Epic -> Feature -> Plan -> Fix forms a DAG). |
| 69 | |
| 70 | ## Auto-fix mode |
| 71 | |
| 72 | When run with `--fix` (or when called by another skill with |
| 73 | `autofix=true`), the syntactic check repairs the following drift |
| 74 | types automatically, without asking: |
| 75 | |
| 76 | - Frontmatter `status:` or `phase:` field present: REMOVE it. |
| 77 | Backlog row is the single source of truth. The fix lifts the |
| 78 | current value from the artifact into the backlog row only if no |
| 79 | row exists yet; otherwise it just removes the duplicate. |
| 80 | **Reverse-engineering exception** (graph-invariants N-10 / N-11): |
| 81 | values starting with `Anticipated`, `Observed`, `Inferred`, or |
| 82 | `Draft (reverse-engineered, ...)` are validation markers that |
| 83 | `/business-analysis` strips after validation. The autofix keeps |
| 84 | them and only removes generic lifecycle status / phase entries. |
| 85 | - Backlog row missing for an existing artifact file: create the row |
| 86 | with `status: Ready`, `phase: Building` defaults, place under |
| 87 | the matching Epic section. |
| 88 | - Artifact file missing for a backlog row: leave the row, flag for |
| 89 | human triage (the row may be a placeholder or outdated entry). |
| 90 | - Dashboard counts differ from computed totals: rewrite the |
| 91 | dashboard table. |
| 92 | - |