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.
npx claudepluginhub chrsmay/codebrain-plugin --plugin codebrainThis skill uses the workspace's default tool permissions.
Cross-artifact consistency analysis. Finds stale specs, spec-code divergence, missing requirements, conflicting tickets, and unresolved `[NEEDS CLARIFICATION]` markers.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
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. ...