From codebrain
Use when checking for stale artifacts, spec-code divergence, missing requirements, inconsistencies between specs and implementation, or cross-artifact conflicts. Detects drift, staleness, and gaps across all codebrain artifacts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codebrain:analyzeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Cross-artifact consistency analysis. Finds stale specs, spec-code divergence, missing requirements, conflicting tickets, and unresolved `[NEEDS CLARIFICATION]` markers.
Cross-artifact consistency analysis. Finds stale specs, spec-code divergence, missing requirements, conflicting tickets, and unresolved [NEEDS CLARIFICATION] markers.
/codebrain:analyze [epic-slug]
.codebrain/active/plan.md and any active epicScan ALL artifacts (specs, tickets, plans, decisions) for [NEEDS CLARIFICATION] markers.
These MUST be resolved before implementation proceeds. List each with its location.
For each spec file, check whether the code still matches:
mcp__codebase_memory__search_graph) to find code related to spec topics[SPEC_DEVIATION] markers showing exact divergencesFor each requirement in specs:
For tickets in an epic:
depends_on references pointing to real tickets?Read .codebrain/memory/constitution.md and check:
Read .codebrain/memory/decisions.md and epic decision files:
Gather all artifacts.
.codebrain/epics/{slug}/.codebrain/active/plan.md, .codebrain/memory/constitution.md, .codebrain/memory/decisions.mdScan for [NEEDS CLARIFICATION] markers across all gathered files.
Check spec-code alignment.
[SPEC_DEVIATION]Check coverage gaps.
Check ticket consistency.
Check constitution compliance.
Check decision staleness.
Present the analysis report.
# Consistency Analysis
**Date:** [ISO date]
**Scope:** [epic slug or "active plan"]
**Health:** HEALTHY | NEEDS ATTENTION | CRITICAL
## Unresolved Clarifications
- [ ] [file:line] — [the NEEDS CLARIFICATION text]
## Spec Deviations
- [SPEC_DEVIATION] [spec-file:line] says "[spec text]" but [code-file:line] does "[actual behavior]"
**Recommendation:** Update spec | Update code | Investigate
## Coverage Gaps
| Requirement | Ticket | Code | Test | Status |
|-------------|--------|------|------|--------|
| FR-001: ... | 001 | src/auth.ts | tests/auth.test.ts | Covered |
| FR-002: ... | — | — | — | **UNCOVERED** |
## Ticket Issues
- [issue description]
## Constitution Violations
- [violation description with Complexity Tracking recommendation]
## Stale Decisions
- [decision that no longer matches code]
## Recommendations
1. [Most important action]
2. [Second priority]
3. ...
npx claudepluginhub chrsmay/codebrain-plugin --plugin codebrainAnalyzes spec.md, plan.md, and tasks.md for inconsistencies, gaps, and quality issues after task generation. Read-only cross-artifact review to catch problems before implementation.
Scans GitHub issues, PRs, milestones, docs, and code to flag where plans have drifted from implementation reality. Produces a cited report with prioritized reconstruction steps.
Verifies V-Model artifact graph integrity: checks dead links, orphan artifacts, backlog completeness, valid references across BA sections, Epics, Features, Success Criteria, ADRs, arc42 sections, PLANs, Backlog, Wayfinder rows, and code. Syntactic default; semantic via agent.