A reusable scaffold for bootstrapping AI-assisted software development projects using Claude Code.
This repo is a framework template -- not a project. Clone it to start a new project with a pre-built system for:
- State management -- charter, roadmap, devlog, and session handoff files
- Knowledge base -- tag-routed context loading with blueprint versioning
- Decision tracking -- Decision Journal captures why plans changed, not just what changed
- Audit pipeline -- 7 specialized auditors with SOTA protocol (security, architecture, database, code quality, frontend, ops, pattern scout)
- Documentation discipline -- mandatory gates enforce KB updates, blueprint versioning, and decision recording
- Task validation -- dependency-aware task management with topological sort and cycle detection
- Python 3.7+
- Claude Code CLI
- Clone or use this repo as a template
- Fill in
state/charter.jsonwith your project details (name, constraints, tech stack) - Fill in the
CLAUDE.mdheader with your project name and description - Start a Claude Code session -- the agent follows the bootstrap sequence in
CLAUDE.mdautomatically - Run
python3 taskmaster.py validateto verify state file integrity
CLAUDE.md # Single origin -- framework rules, gates, bootstrap sequence
taskmaster.py # State validator + task manager (validate, order, ready, steps)
state/
charter.json # Project identity, constraints, tag taxonomy
roadmap.json # Tasks (DAG), decisions, open questions
devlog.ndjson # Append-only event journal (NDJSON)
handoff.md # Session context, memory marker, git status
KB/
KB_index.md # Context router -- controls what gets loaded and when
KB_01_architecture.md # Architecture overview + Decision Journal
blueprints/
BLUEPRINT_INDEX.md # Version pointer (current plan)
v0.1_initial_plan.md # Scaffold plan snapshot (template)
prompts/
supervisor.md # Taskmaster supervisor behavior contract
archeolog-prospector.md # Codebase archaeology protocol
ux-flow-reviewer.md # UX review protocol
auditors/
runner.md # Audit orchestrator + SOTA protocol
1-security.md # Security auditor
2-archeologist.md # Business logic mapper
3-database.md # Database auditor
4-code-quality.md # Code quality auditor
5-frontend.md # Frontend auditor
6-ops.md # Ops auditor
7-prospector.md # Pre-build explorer (pattern scout)
.claude/
settings.local.json # Permission whitelist (local, not committed)
agents/ # Claude Code agent stubs (all point to prompts/)
audit-*.md # Audit agent stubs -> prompts/auditors/
archeolog-prospector.md # Stub -> prompts/archeolog-prospector.md
pre-build-explorer.md # Stub -> prompts/auditors/7-prospector.md
ux-flow-reviewer.md # Stub -> prompts/ux-flow-reviewer.md
skills/
doc/SKILL.md # /doc command -- 9-step documentation gate
CLAUDE.md is the single origin. It defines a strict 7-step loading order that prevents context bloat while ensuring the agent has everything it needs. The agent loads state files, the KB router, then only the KB files relevant to the current task.
Four gates enforce documentation discipline:
- KB Gate -- code changes require KB updates
- Blueprint Gate -- architecture changes require a new blueprint version
- Decision Journal Gate -- superseded decisions require a DJ entry (Was/Now/Why/Lesson)
- Doc Gate -- completed tasks require running
/docto update all state files
All agents follow the stub/protocol pattern:
- Stubs (
.claude/agents/*.md) -- lightweight registration files for Claude Code (5-10 lines). Declare name, description, tools, model. - Protocols (
prompts/) -- full behavior contracts (80-130 lines). Portable and tool-agnostic.
This split keeps Claude Code registration clean while making protocols reusable outside Claude Code. Agent stub paths are relative to repository root.
taskmaster.py is a zero-dependency Python script with four commands:
validate-- checks all state files against schemaorder-- topological sort of tasks by dependenciesready-- shows next available tasks (todo + all deps done)steps T-001-- shows decomposition for complex tasks
Tasks in roadmap.json can optionally include decomposition fields:
{
"id": "T-001",
"title": "Deploy auth service",
"complexity": "complex",
"steps": [
{
"step": 1,
"title": "Backup current DB",
"status": "todo",
"critical": true,
"deliverable": "backup file verified",
"verify": "run restore test",
"rollback": "restore from previous backup"
}
]
}Fields: steps (array), complexity (string), and per-step: step, title, status, critical, deliverable, verify, rollback.
state/charter.json key fields under project.constraints:
| Field | Purpose |
|---|---|
app_code_dir |
Where application source code lives (e.g., src/, app/) |
infra_db |
Database technology (e.g., PostgreSQL 15, SQLite) |
infra_access |
How infrastructure is accessed (e.g., SSH, AWS CLI, local only) |
must_use |
Required technologies/libraries |
must_avoid |
Banned technologies/patterns |
- Edit
state/charter.json: set project name, constraints, tech stack, tag taxonomy - Edit
CLAUDE.md: update the header and description - Edit
.claude/settings.local.json: adjust the permission whitelist for your tools - Add KB pages as needed:
KB/KB_XX_<topic>.md+ updateKB/KB_index.md - Extend
charter.jsontag_taxonomywhen you need new domain tags
[Add your license here]