| name | codebase-audit-sprint-planner |
| description | Run a full deep-dive, evidence-first codebase audit and convert findings into prioritized sprint plans with implementation-ready task documents. Use when you need comprehensive architecture, quality, risk, and delivery planning from current code and docs. |
| argument-hint | Repository scope, depth, sprint horizon, and target outcomes |
| user-invocable | true |
| disable-model-invocation | false |
Codebase Audit to Sprint Plan
Inherits from task-core-loop.
Use this skill to perform a comprehensive codebase audit, then distill evidence into an actionable sprint backlog and task documents.
Outcome
Produce a delivery package with:
- Evidence-backed audit report
- Prioritized issue and opportunity backlog
- Sprint plan with goals, capacity assumptions, and sequencing
- Task documents ready for implementation handoff
- Explicit assumptions, open questions, risks, and confidence percentages
- Escalated critical decisions through
/council (or self-simulated council analysis)
Use When
Use this workflow when you need:
- Full-repository deep dives before major feature work or refactors
- Recovery plans for architecture drift, quality regressions, or unclear priorities
- A roadmap that translates findings into sprint-ready tasks
- Traceable planning grounded in code, tests, configs, and docs
Do not use this workflow for one-file fixes, superficial style reviews, or ad hoc brainstorming without evidence collection.
For high-impact architecture, governance, schema, orchestration, or retrieval decisions, invoke /council.
Inputs
Collect or confirm before running:
- Audit scope: full repo, subdomains, or critical paths
- Timebox and depth: quick, medium, or full deep dive
- Sprint horizon: number of sprints and sprint duration
- Primary planning surface:
Data/Tasks/ backed task records
- Team assumptions: capacity, skills, constraints
- Quality gates: tests, benchmarks, security, docs, deployment checks
- Required output location and naming for audit and planning documents
Procedure
-
Define scope and acceptance criteria.
Lock what is in and out of scope.
Define mandatory outputs and quality bars before analysis.
-
Build an evidence map.
Gather evidence from:
- Core product docs and plans (
Docs/Memories/, Docs/Plans/)
- Source code and call chains (
src/Orchestrator.*/, src/SplitBrain.Dashboard/, src/NodeClient.*/)
- Tests, benchmark artifacts, and validation scripts
- Configuration and deployment paths
- Known incidents, bug patterns, or debt areas
- Audit by domain.
Run structured analysis across domains:
- Architecture and boundaries (orchestration, node clients, dashboard, wiki service)
- Data contracts and schema consistency
- Retrieval/search/chat pathways where applicable
- Security, auth, and governance controls
- Test coverage, reliability, and observability
- Build/release/deployment resilience
- Record findings with severity.
For each finding, capture:
- Evidence and source reference
- Impact and risk surface
- Probable root cause
- Severity: critical, high, medium, low
- Confidence percentage
- Branch on uncertainty.
If evidence is weak, contradictory, or stale:
- Mark as unresolved
- Define validation tasks to close uncertainty
- Do not promote to high-priority implementation without validation
- Escalate critical decisions to council review.
For high-impact decisions, run
/council before final sprint commitment.
Default to self-simulated council analysis. Use subagents only when the user has given explicit permission in the current request.
If direct council invocation is not feasible, run a self-simulated critical analysis with explicit seats:
- Source-Grounded Archivist
- Data Model Architect
- Retrieval Specialist
- Skeptical Reviewer
- Synthesizer
Each seat must provide recommendation, key risks, assumptions, open questions, and confidence percentage.
- Convert findings into backlog items.
Translate each accepted finding into a normalized task candidate:
- Create or update task records in
Data/Tasks/ with status and linked findings.
- Preserve traceability in each task by linking the relevant evidence note or audit finding identifier.
- Problem statement
- Desired outcome
- Scope and non-goals
- Dependencies and blockers
- Estimated size and risk
- Validation plan and definition of done
-
Prioritize and sequence.
Apply prioritization using impact, urgency, dependency depth, and risk reduction.
Sequence tasks into sprint slices that minimize integration risk.
-
Build sprint plans.
For each sprint, define:
- Sprint objective
- Committed items
- Stretch items
- Capacity assumptions
- Exit criteria and demo targets
- Generate task documents.
Create or update one
Data/Tasks/ record per committed item with:
- Context and rationale
- Implementation approach
- Acceptance criteria
- Test and validation commands
- Rollback and monitoring notes
- Final consistency and readiness check.
Verify:
- Every sprint item maps to an audit finding or required enabler
- Dependencies are represented
- Risks and open questions are explicit
- Confidence values are realistic
- If in execution mode, planned validation is executable
- If in planning-only discovery mode, deferred validation gates are explicit
- High-impact decision items include council output (invoked or self-simulated) and dissent notes
Decision Branches
-
Branch A: Stability-first vs feature-first planning
If critical reliability or security risk exists, prioritize stabilization work before net-new features.
-
Branch B: Refactor now vs defer
Refactor now only when current architecture blocks delivery, quality, or safety. Otherwise prefer narrow, reversible changes.
-
Branch C: Monolithic task vs sliced delivery
If uncertainty is high or integration risk is broad, slice into smaller vertical tasks with checkpoints.
-
Branch D: Missing measurements
If no objective baseline exists, schedule instrumentation or benchmark tasks before major optimization work.
-
Branch E: Planning-only discovery mode
If the request is discovery/planning only, do not require immediate execution of tests or benchmarks. Instead, include explicit deferred validation tasks and gates in sprint scope.
-
Branch F: Council-triggered governance review
If a finding affects schema, retrieval behavior, trust/safety boundaries, or long-lived architecture, require /council before final sprint commitment. If unavailable, require self-simulated council output with explicit dissent.
Completion Checks
The workflow is complete only when all are true:
- Audit findings include source-grounded evidence
- Findings include severity and confidence percentages
- Backlog items are traceable to findings
- Sprint plans include explicit capacity assumptions and exit criteria
- Each committed item has a task record in
Data/Tasks/ with acceptance criteria and validation
- Open questions and risks are listed with proposed owners or decision gates
- For planning-only mode, each item includes deferred validation gates and execution prerequisites
- High-impact decisions include council analysis output with confidence values and visible dissent
Output Templates
Use this structure for the final package.
# Comprehensive Codebase Audit Report
## Scope
- Included:
- Excluded:
- Timebox:
## Evidence Reviewed
- <doc/code/test references>
## Findings
| ID | Domain | Severity | Confidence | Summary | Evidence |
|---|---|---|---:|---|---|
| F-001 | Architecture | High | 85% | ... | ... |
## Risk Register
- R-001: <risk>, impact, likelihood, mitigation
## Open Questions
- Q-001: <question>, decision owner, due gate
# Sprint Plan - <Sprint Name>
## Sprint Objective
<one sentence objective>
## Capacity Assumptions
- Team size:
- Effective days:
- Risk buffer:
## Committed Items
- T-001 <title> (estimate, dependency)
## Stretch Items
- T-00X <title>
## Exit Criteria
- <measurable criteria>
## Demo Targets
- <what is demonstrable>
## Task Links
- <task id / key and why it is in the sprint>
# Task Document - <Task ID> <Task Title>
## Problem Statement
## Desired Outcome
## Scope
- In scope:
- Out of scope:
## Dependencies
## Implementation Plan
1.
2.
3.
## Acceptance Criteria
-
## Validation
- Commands:
- Tests:
- Observability checks:
## Rollback Plan
## Risks and Unknowns
## Confidence
- Delivery confidence: <percent>
Prompt Pattern
Use prompts in this form:
Run a full deep-dive codebase audit for <scope>.
Then convert findings into <N> sprint plans and implementation-ready `Data/Tasks/` records.
Use severity, confidence percentages, explicit assumptions, and open questions.
Require evidence links for all high-impact findings.
Invoke /council for high-impact decisions; if unavailable, run a self-simulated critical council analysis.
References
Docs/Memories/ — current distilled knowledge
Docs/Plans/MasterPlanV4.md — canonical architecture blueprint
Docs/Reviews/ — external and automated review reports
.github/skills/council/SKILL.md (command name: council)
- Source code under
src/