Skip to content

Commit 472f8be

Browse files
committed
fix(docs): add spec-scanner page and model-routing to nav
Fixes docs deploy failure after v5.1.0: - Creates docs/agents/spec-scanner.md (was linked from agents/index.md but missing, which failed mkdocs strict mode) - Adds Scanner to agents nav - Adds Model Routing to advanced nav
1 parent 327df15 commit 472f8be

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

docs/agents/spec-scanner.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# spec-scanner
2+
3+
The spec-scanner analyzes an existing codebase and produces a **project profile** — a structured summary of the tech stack, detected patterns, domain entities, and registration points. Other agents read this profile to generate wiring-aware specs and code.
4+
5+
## Role
6+
7+
Scan the codebase on first `/spec` invocation (Phase 0), detect what the project is built on, and record that intelligence in `.claude/specs/_project-profile.md` (or split files for large monorepos). The profile lives in the repo and is reused by subsequent agents.
8+
9+
## Model
10+
11+
**sonnet tier.** The scanner reads many files and extracts structural information. Depth of reasoning matters less than throughput — the sonnet tier is the right fit for fast, accurate pattern detection.
12+
13+
## When It Runs
14+
15+
- `/spec <name>` — Phase 0 auto-scan on first invocation if no profile exists
16+
- `/spec-scan` — manual rescan to refresh the profile after significant codebase changes
17+
18+
## What It Records
19+
20+
The project profile captures six sections:
21+
22+
1. **Stack** — Framework, language, backend, database, styling system.
23+
2. **Patterns** — Detected conventions with confidence levels (high/medium/low). The planner and tasker prefer high-confidence patterns when generating specs.
24+
3. **Entity Registry** — Domain entities and their CRUD implementation status, used for gap analysis during requirements.
25+
4. **Registration Points** — Specific `file:line` locations where new artifacts (routes, components, migrations) must be registered so the implementer doesn't produce orphaned code.
26+
5. **Regression Markers** — Prior bug fixes and the files they touched, so reviewers know which areas are regression-prone.
27+
6. **Manual Overrides** — User-editable section preserved across rescans.
28+
29+
Output: `.claude/specs/_project-profile.md` (single-file) or `_profile-index.md` + `_profile-<domain>.md` files (split for large monorepos).
30+
31+
## Key Rules
32+
33+
- Never reads credential-bearing files (`.env`, `~/.aws`, `~/.ssh`, etc.). The scanner has an explicit skip list.
34+
- Confidence levels on patterns are not guesses — they reflect how consistently the pattern appears in the scanned code.
35+
- The Manual Overrides section is preserved across rescans. Users can pin conventions that the scanner can't detect automatically.
36+
- For large codebases, the scanner splits the profile by domain to keep each file readable.

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ nav:
9191
- Consultant: agents/spec-consultant.md
9292
- Acceptor: agents/spec-acceptor.md
9393
- Documenter: agents/spec-documenter.md
94+
- Scanner: agents/spec-scanner.md
9495
- Reference:
9596
- EARS Notation: reference/ears-notation.md
9697
- Design Patterns: reference/design-patterns.md
@@ -101,5 +102,6 @@ nav:
101102
- Crash Recovery: advanced/crash-recovery.md
102103
- Cross-Spec Dependencies: advanced/cross-spec-deps.md
103104
- CI/CD Integration: advanced/ci-cd.md
105+
- Model Routing: advanced/model-routing.md
104106
- Extending the Plugin: advanced/extending.md
105107
- Privacy Policy: privacy.md

0 commit comments

Comments
 (0)