sdd-mcp-server 3.5.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +97 -671
  2. package/agents/architect.md +15 -93
  3. package/agents/implementer.md +16 -141
  4. package/agents/planner.md +16 -84
  5. package/agents/reviewer.md +16 -239
  6. package/agents/security-auditor.md +16 -114
  7. package/agents/tdd-guide.md +17 -228
  8. package/dist/adapters/cli/SDDToolAdapter.d.ts +14 -5
  9. package/dist/adapters/cli/SDDToolAdapter.js +189 -362
  10. package/dist/adapters/cli/SDDToolAdapter.js.map +1 -1
  11. package/dist/application/services/ContextCompactionService.d.ts +81 -16
  12. package/dist/application/services/ContextCompactionService.js +370 -187
  13. package/dist/application/services/ContextCompactionService.js.map +1 -1
  14. package/dist/application/services/SpecPathResolver.d.ts +24 -0
  15. package/dist/application/services/SpecPathResolver.js +70 -0
  16. package/dist/application/services/SpecPathResolver.js.map +1 -0
  17. package/dist/application/services/WorkflowEngineService.d.ts +100 -46
  18. package/dist/application/services/WorkflowEngineService.js +468 -288
  19. package/dist/application/services/WorkflowEngineService.js.map +1 -1
  20. package/dist/cli/install-skills.d.ts +3 -9
  21. package/dist/cli/install-skills.js +130 -175
  22. package/dist/cli/install-skills.js.map +1 -1
  23. package/dist/cli/install-target.d.ts +45 -14
  24. package/dist/cli/install-target.js +26 -12
  25. package/dist/cli/install-target.js.map +1 -1
  26. package/dist/cli/sdd-mcp-cli.d.ts +1 -1
  27. package/dist/cli/sdd-mcp-cli.js +7 -6
  28. package/dist/cli/sdd-mcp-cli.js.map +1 -1
  29. package/dist/cli/tool-support/claude-code.js +13 -34
  30. package/dist/cli/tool-support/claude-code.js.map +1 -1
  31. package/dist/cli/tool-support/codex.d.ts +0 -53
  32. package/dist/cli/tool-support/codex.js +6 -94
  33. package/dist/cli/tool-support/codex.js.map +1 -1
  34. package/dist/cli/tool-support/index.d.ts +3 -2
  35. package/dist/cli/tool-support/index.js +3 -1
  36. package/dist/cli/tool-support/index.js.map +1 -1
  37. package/dist/cli/tool-support/omp.d.ts +5 -0
  38. package/dist/cli/tool-support/omp.js +43 -0
  39. package/dist/cli/tool-support/omp.js.map +1 -0
  40. package/dist/cli/tool-support/root-guidance.d.ts +2 -9
  41. package/dist/cli/tool-support/root-guidance.js +44 -37
  42. package/dist/cli/tool-support/root-guidance.js.map +1 -1
  43. package/dist/cli/tool-support/target-agent-renderer.d.ts +1 -0
  44. package/dist/cli/tool-support/target-agent-renderer.js +37 -4
  45. package/dist/cli/tool-support/target-agent-renderer.js.map +1 -1
  46. package/dist/cli/tool-support/target-installer.d.ts +8 -2
  47. package/dist/cli/tool-support/target-installer.js +94 -26
  48. package/dist/cli/tool-support/target-installer.js.map +1 -1
  49. package/dist/cli/utils/preserving-writer.d.ts +22 -0
  50. package/dist/cli/utils/preserving-writer.js +233 -11
  51. package/dist/cli/utils/preserving-writer.js.map +1 -1
  52. package/dist/domain/ports.d.ts +4 -0
  53. package/dist/index.d.ts +13 -10
  54. package/dist/index.js +16 -1199
  55. package/dist/index.js.map +1 -1
  56. package/dist/infrastructure/adapters/NodeFileSystemAdapter.d.ts +3 -0
  57. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js +10 -0
  58. package/dist/infrastructure/adapters/NodeFileSystemAdapter.js.map +1 -1
  59. package/dist/infrastructure/mcp/CapabilityNegotiator.js +3 -3
  60. package/dist/infrastructure/mcp/CapabilityNegotiator.js.map +1 -1
  61. package/dist/infrastructure/mcp/sddToolDefinitions.d.ts +6 -0
  62. package/dist/infrastructure/mcp/sddToolDefinitions.js +124 -0
  63. package/dist/infrastructure/mcp/sddToolDefinitions.js.map +1 -0
  64. package/dist/utils/atomicWrite.d.ts +8 -35
  65. package/dist/utils/atomicWrite.js +12 -60
  66. package/dist/utils/atomicWrite.js.map +1 -1
  67. package/mcp-server.js +5 -2883
  68. package/package.json +5 -2
  69. package/scripts/context-usage-report.mjs +602 -0
  70. package/sdd-entry.js +17 -6
  71. package/skills/sdd-commit/REFERENCE.md +31 -0
  72. package/skills/sdd-commit/SKILL.md +17 -273
  73. package/skills/sdd-design/REFERENCE.md +35 -0
  74. package/skills/sdd-design/SKILL.md +19 -265
  75. package/skills/sdd-implement/REFERENCE.md +26 -0
  76. package/skills/sdd-implement/SKILL.md +22 -283
  77. package/skills/sdd-requirements/REFERENCE.md +31 -0
  78. package/skills/sdd-requirements/SKILL.md +23 -135
  79. package/skills/sdd-review/REFERENCE.md +26 -0
  80. package/skills/sdd-review/SKILL.md +17 -181
  81. package/skills/sdd-security-check/REFERENCE.md +19 -0
  82. package/skills/sdd-security-check/SKILL.md +18 -184
  83. package/skills/sdd-steering/REFERENCE.md +25 -0
  84. package/skills/sdd-steering/SKILL.md +18 -216
  85. package/skills/sdd-steering-custom/REFERENCE.md +27 -0
  86. package/skills/sdd-steering-custom/SKILL.md +19 -203
  87. package/skills/sdd-tasks/REFERENCE.md +25 -0
  88. package/skills/sdd-tasks/SKILL.md +19 -248
  89. package/skills/sdd-test-gen/REFERENCE.md +15 -0
  90. package/skills/sdd-test-gen/SKILL.md +17 -287
  91. package/skills/simple-task/REFERENCE.md +22 -0
  92. package/skills/simple-task/SKILL.md +17 -138
  93. package/templates/CLAUDE.md +18 -30
  94. package/rules/git-workflow.md +0 -92
  95. package/rules/sdd-workflow.md +0 -116
@@ -1,229 +1,31 @@
1
1
  ---
2
2
  name: sdd-steering
3
- description: Create project-specific steering documents for SDD workflow. Use when setting up project context, documenting technology stack, or establishing project conventions. Invoked via /sdd-steering.
3
+ description: Create or update concise project steering from verified repository facts.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- # SDD Steering Document Generation
7
-
8
- Generate project-specific steering documents that provide context and guidance for AI-assisted development.
9
-
10
- ## What Are Steering Documents?
11
-
12
- Steering documents are markdown files in `.spec/steering/` that provide project-specific context to guide AI interactions. They describe YOUR project's unique characteristics.
13
-
14
- ## Document Types
15
-
16
- | Document | Purpose | Content |
17
- |----------|---------|---------|
18
- | `product.md` | Product context | Vision, users, features, goals |
19
- | `tech.md` | Technology stack | Languages, frameworks, tools, architecture |
20
- | `structure.md` | Project conventions | Directory structure, naming, patterns |
21
- | `custom-*.md` | Custom guidance | Specialized rules for specific contexts |
7
+ # Project Steering
22
8
 
23
9
  ## Workflow
24
10
 
25
- ### Step 1: Analyze Project
26
-
27
- Gather information from:
28
- 1. **Project manifest** - Dependencies and metadata (e.g., `package.json`, `Cargo.toml`, `pyproject.toml`, `pom.xml`, `go.mod`)
29
- 2. **Directory structure** - Folder organization
30
- 3. **Existing code patterns** - Naming conventions, architecture
31
- 4. **Documentation** - README, existing docs
32
- 5. **Build configuration** - Build tools, scripts, CI/CD
33
-
34
- ### Step 2: Generate Product Steering
35
-
36
- Create `.spec/steering/product.md`:
37
-
38
- ```markdown
39
- # Product Overview
40
-
41
- ## Description
42
- {Project description from manifest or analysis}
43
-
44
- ## Vision
45
- {Long-term product vision}
46
-
47
- ## Target Users
48
- - **Primary:** {Main user persona}
49
- - **Secondary:** {Other user types}
50
-
51
- ## Core Features
52
- 1. {Feature 1} - {Brief description}
53
- 2. {Feature 2} - {Brief description}
54
-
55
- ## Key Value Propositions
56
- - {Value 1}
57
- - {Value 2}
58
-
59
- ## Success Metrics
60
- - {Metric 1}: {Target}
61
- - {Metric 2}: {Target}
62
- ```
63
-
64
- ### Step 3: Generate Tech Steering
65
-
66
- Create `.spec/steering/tech.md`:
67
-
68
- ```markdown
69
- # Technology Overview
70
-
71
- ## Stack
72
-
73
- ### Language
74
- - **Primary:** {e.g., TypeScript, Python, Go, Rust, Java}
75
- - **Version:** {e.g., 5.x, 3.11, 1.21}
76
- - **Runtime:** {if applicable, e.g., Node.js, JVM, .NET}
77
-
78
- ### Frameworks
79
- - {Framework 1}: {Purpose}
80
- - {Framework 2}: {Purpose}
81
-
82
- ### Key Dependencies
83
- | Package | Version | Purpose |
84
- |---------|---------|---------|
85
- | {dep1} | {version} | {why used} |
86
-
87
- ## Architecture
88
-
89
- ### Pattern
90
- {e.g., Clean Architecture, MVC, Microservices, Hexagonal}
91
-
92
- ### Layers
93
- ```
94
- ┌─────────────────┐
95
- │ Presentation │ Controllers, CLI, UI
96
- ├─────────────────┤
97
- │ Application │ Services, Use Cases
98
- ├─────────────────┤
99
- │ Domain │ Entities, Business Logic
100
- ├─────────────────┤
101
- │ Infrastructure │ Database, External APIs
102
- └─────────────────┘
103
- ```
104
-
105
- ## Development Environment
11
+ 1. Inspect manifests, source layout, build/test configuration, existing documentation, and current `.spec/steering/`.
12
+ 2. Distinguish verified facts from assumptions. Do not invent commands, versions, architecture, users, or conventions.
13
+ 3. Create or update:
14
+ - `product.md`: purpose, users, capabilities, boundaries;
15
+ - `tech.md`: languages, versions, dependencies, architecture, verified commands;
16
+ - `structure.md`: directory roles, naming, module boundaries, test locations.
17
+ 4. Preserve user-authored guidance and unrelated sections. In update mode, merge precise changes rather than replacing the whole steering tree.
18
+ 5. Keep guidance project-specific, actionable, non-secret, and concise. Preserve mandatory security guidance; never copy credentials, private environment values, or generated output.
19
+ 6. Validate every documented path and command against the repository; report uncertain facts as unresolved rather than guessing.
106
20
 
107
- ### Prerequisites
108
- - {Language runtime and version}
109
- - {Package manager} (e.g., npm, pip, cargo, go mod, maven)
110
-
111
- ### Setup
112
- ```bash
113
- # Clone and install dependencies
114
- {package manager install command}
115
-
116
- # Run development server
117
- {dev server command}
118
- ```
119
-
120
- ### Common Commands
121
- | Command | Purpose |
122
- |---------|---------|
123
- | `{install}` | Install dependencies |
124
- | `{dev}` | Development server |
125
- | `{build}` | Production build |
126
- | `{test}` | Run tests |
127
- | `{lint}` | Code linting |
128
-
129
- ## Quality Standards
130
- - Test coverage: >= 80%
131
- - Linting: {language-appropriate linter}
132
- - Type checking: {if applicable}
133
- ```
134
-
135
- ### Step 4: Generate Structure Steering
136
-
137
- Create `.spec/steering/structure.md`:
138
-
139
- ```markdown
140
- # Project Structure
141
-
142
- ## Directory Layout
143
-
144
- ```
145
- project-root/
146
- ├── src/ # Source code
147
- │ ├── domain/ # Business logic
148
- │ ├── application/ # Use cases
149
- │ ├── infrastructure/ # External adapters
150
- │ └── {entry point} # Main entry point
151
- ├── tests/ # Test files
152
- ├── docs/ # Documentation
153
- └── {project manifest} # Dependencies/config
154
- ```
155
-
156
- ## Naming Conventions
157
-
158
- ### Files
159
- | Type | Convention | Example |
160
- |------|------------|---------|
161
- | Components | {project convention} | `UserProfile.{ext}` |
162
- | Services | {project convention} | `AuthService.{ext}` |
163
- | Utilities | {project convention} | `format_date.{ext}` |
164
- | Tests | {test convention} | `auth_test.{ext}` |
165
- | Types/Interfaces | {project convention} | `user_types.{ext}` |
166
-
167
- ### Code
168
- | Element | Convention | Example |
169
- |---------|------------|---------|
170
- | Classes/Types | PascalCase | `UserService` |
171
- | Functions/Methods | {language convention} | `get_user_by_id` or `getUserById` |
172
- | Constants | UPPER_SNAKE | `MAX_RETRY_COUNT` |
173
- | Variables | {language convention} | `user_name` or `userName` |
174
- | Interfaces | {project convention} | `UserRepository` or `IUserRepository` |
175
-
176
- ## Module Organization
177
-
178
- ### Import Order
179
- 1. Standard library / built-ins
180
- 2. External packages / dependencies
181
- 3. Internal modules (absolute paths)
182
- 4. Relative imports
183
- 5. Type/interface imports (if language separates them)
184
-
185
- ### Export Pattern
186
- - Use barrel exports / index files where appropriate
187
- - Named exports preferred over default (language-dependent)
188
- - Public API exposed from domain layer
189
-
190
- ## Patterns
191
-
192
- ### Dependency Injection
193
- {DI approach used, e.g., Inversify, manual}
194
-
195
- ### Error Handling
196
- {Error handling pattern, e.g., Result types, exceptions}
197
-
198
- ### Logging
199
- {Logging approach, e.g., structured logging}
200
- ```
201
-
202
- ### Step 5: Create Directory
203
-
204
- Ensure `.spec/steering/` directory exists and save documents.
205
-
206
- ## MCP Tool Integration
207
-
208
- This skill generates documents manually. For automated analysis, the `sdd-init` MCP tool creates basic steering during project initialization.
209
-
210
- ## Quality Checklist
21
+ ## Specialist Delegation
211
22
 
212
- - [ ] Product description is clear and specific
213
- - [ ] Target users are well-defined
214
- - [ ] Technology stack is accurately documented
215
- - [ ] Directory structure matches actual project
216
- - [ ] Naming conventions are consistent
217
- - [ ] Development setup instructions are complete
218
- - [ ] Key patterns are documented
23
+ Target renderers provide the `planner` route. When a native advisor is required, dispatch exactly one compact handoff with `specialistDepth: 1`; include only verified project facts, existing conventions, requested scope, and unresolved decisions. The specialist must not delegate again. Keep the handoff and returned summary at or below 2,048 estimated tokens. If the advisor or routed model is unavailable, record one fallback and continue in the parent without retrying or selecting a generic child. Where a native per-turn model override applies, execute in this turn.
219
24
 
220
- ## Notes
25
+ ## Output
221
26
 
222
- - Steering documents are **project-specific** - they describe YOUR project
223
- - Keep them updated as the project evolves
224
- - Use custom steering for domain-specific rules
225
- - Reference from AGENTS.md or CLAUDE.md in project root
27
+ Return affected steering paths, source evidence used, validation performed, preserved user content, and unresolved blockers.
226
28
 
227
- ## Specialist Delegation
29
+ ## Optional Reference
228
30
 
229
- When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the project facts, conventions, constraints, and requested steering scope. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
31
+ Read [REFERENCE.md](REFERENCE.md) only for document templates or the extended validation checklist.
@@ -0,0 +1,27 @@
1
+ # Custom Steering Reference
2
+
3
+ Read only for templates or scope examples.
4
+
5
+ ## Template
6
+
7
+ ```markdown
8
+ # Topic
9
+ ## Purpose
10
+ Why this guidance exists.
11
+ ## Scope
12
+ Included and excluded files or workflows.
13
+ ## Rules
14
+ Actionable MUST/SHOULD guidance with rationale.
15
+ ## Exceptions
16
+ Bounded exceptions and approval path.
17
+ ## Verification
18
+ How a maintainer proves compliance.
19
+ ```
20
+
21
+ ## Scope Examples
22
+
23
+ - Always: a repository-wide legal or safety constraint that applies to every task.
24
+ - Conditional: test conventions for `**/*.test.ts` and `**/*.spec.ts`; API rules for `src/api/**/*`.
25
+ - Manual: release procedure, rare migration playbook, or domain glossary.
26
+
27
+ Use forward-slash globs and test both matching and near-miss paths. Avoid a broad `**/*` conditional scope when manual inclusion is honest. A custom file supplements rather than contradicts mandatory security or workflow gates. Examples should use synthetic values and contain no live credentials or private endpoints.
@@ -1,215 +1,31 @@
1
1
  ---
2
2
  name: sdd-steering-custom
3
- description: Create custom steering documents for specialized contexts. Use when you need domain-specific guidance for particular file types, modules, or workflows. Invoked via /sdd-steering-custom.
3
+ description: Define scoped custom steering for a verified project convention or domain.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- # SDD Custom Steering Document Creation
7
+ # Custom Steering
7
8
 
8
- Create specialized steering documents that provide context-specific guidance beyond the standard product/tech/structure documents.
9
+ ## Required Workflow
9
10
 
10
- ## When to Use Custom Steering
11
+ 1. Define the missing guidance, its audience, and why standard steering is insufficient.
12
+ 2. Accept `fileName` only as a basename ending in `.md`; reject separators, absolute paths, traversal, control characters, and non-Markdown names.
13
+ 3. Choose the narrowest inclusion mode:
14
+ - always for genuinely universal project facts;
15
+ - conditional with explicit file globs;
16
+ - manual for rare or specialized guidance.
17
+ 4. Write purpose, scope, actionable rules, exceptions, and verification steps. Use examples only when they prevent ambiguity.
18
+ 5. Preserve user-authored content during updates. Never overwrite unrelated steering or weaken mandatory security guidance.
19
+ 6. Validate conditional globs against intended and unintended paths. Keep secrets and private environment values out of steering.
11
20
 
12
- Custom steering is useful for:
13
- - **Domain-specific rules**: API design, database conventions
14
- - **File-type guidance**: Test patterns, component standards
15
- - **Workflow processes**: PR reviews, deployment procedures
16
- - **Team conventions**: Code review standards, documentation rules
17
-
18
- ## Inclusion Modes
19
-
20
- Custom steering documents can be loaded in three ways:
21
-
22
- | Mode | Behavior | Use Case |
23
- |------|----------|----------|
24
- | **ALWAYS** | Loaded in every AI interaction | Core conventions, critical rules |
25
- | **CONDITIONAL** | Loaded when file patterns match | Test-specific, API-specific rules |
26
- | **MANUAL** | Referenced with `@filename.md` | Rarely needed, specialized contexts |
27
-
28
- ## Workflow
29
-
30
- ### Step 1: Identify the Need
31
-
32
- Ask yourself:
33
- - What specialized context is missing?
34
- - When should this guidance apply?
35
- - Is this project-wide or context-specific?
36
-
37
- ### Step 2: Choose Inclusion Mode
38
-
39
- ```
40
- Is this guidance ALWAYS relevant?
41
- ├── YES → Use ALWAYS mode
42
- │
43
- └── NO → Is it relevant for specific file types?
44
- ├── YES → Use CONDITIONAL mode with patterns
45
- │ Examples: *.test.ts, src/api/**/*
46
- │
47
- └── NO → Use MANUAL mode
48
- Reference with @filename.md when needed
49
- ```
50
-
51
- ### Step 3: Create Document
52
-
53
- Save to `.spec/steering/{filename}.md`:
54
-
55
- ```markdown
56
- # {Topic Name}
57
-
58
- ## Purpose
59
- {Why this steering document exists}
60
-
61
- ## Scope
62
- {When this guidance applies}
63
-
64
- ## Guidelines
65
-
66
- ### Guideline 1: {Name}
67
- {Detailed guidance}
68
-
69
- **Do:**
70
- - {Good practice}
71
-
72
- **Don't:**
73
- - {Anti-pattern}
74
-
75
- ### Guideline 2: {Name}
76
- {Detailed guidance}
77
-
78
- ## Examples
79
-
80
- ### Good Example
81
- ```{language}
82
- {Code showing good practice}
83
- ```
84
-
85
- ### Bad Example
86
- ```{language}
87
- // DON'T: {explanation}
88
- {Code showing anti-pattern}
89
- ```
90
-
91
- ## Checklist
92
- - [ ] {Verification item 1}
93
- - [ ] {Verification item 2}
94
-
95
- ---
96
- <!-- Steering Metadata -->
97
- Inclusion Mode: {ALWAYS | CONDITIONAL | MANUAL}
98
- File Patterns: {patterns for CONDITIONAL mode}
99
- Created: {date}
100
- ```
101
-
102
- ## Common Custom Steering Documents
103
-
104
- ### API Design Standards
105
- ```markdown
106
- # API Design Standards
107
-
108
- ## Inclusion
109
- Mode: CONDITIONAL
110
- Patterns: src/api/**/*.ts, src/routes/**/*.ts
111
-
112
- ## Guidelines
113
-
114
- ### RESTful Conventions
115
- - Use plural nouns for resources: `/users`, not `/user`
116
- - Use HTTP methods correctly: GET (read), POST (create), PUT (update), DELETE (remove)
117
- - Return appropriate status codes
118
-
119
- ### Request/Response Format
120
- - Use JSON for request/response bodies
121
- - Include `Content-Type: application/json` header
122
- - Wrap responses in consistent envelope
123
- ```
124
-
125
- ### Test Patterns
126
- ```markdown
127
- # Test Patterns
128
-
129
- ## Inclusion
130
- Mode: CONDITIONAL
131
- Patterns: **/*.test.ts, **/*.spec.ts
132
-
133
- ## Guidelines
134
-
135
- ### Arrange-Act-Assert
136
- Every test should follow:
137
- 1. **Arrange**: Set up test data and mocks
138
- 2. **Act**: Execute the code under test
139
- 3. **Assert**: Verify the results
140
-
141
- ### Naming Convention
142
- `describe('{Class/Function}', () => {`
143
- ` it('should {expected behavior} when {condition}', () => {`
144
- ```
145
-
146
- ### Component Standards
147
- ```markdown
148
- # Component Standards
149
-
150
- ## Inclusion
151
- Mode: CONDITIONAL
152
- Patterns: src/components/**/*.tsx
153
-
154
- ## Guidelines
155
-
156
- ### Component Structure
157
- 1. Imports (external, internal, types)
158
- 2. Type definitions
159
- 3. Component function
160
- 4. Helper functions
161
- 5. Exports
162
- ```
163
-
164
- ### Database Conventions
165
- ```markdown
166
- # Database Conventions
167
-
168
- ## Inclusion
169
- Mode: CONDITIONAL
170
- Patterns: src/db/**/*.ts, **/migrations/**/*
171
-
172
- ## Guidelines
173
-
174
- ### Table Naming
175
- - Use snake_case: `user_accounts`
176
- - Use plural: `orders`, not `order`
177
- - Prefix with domain: `auth_sessions`
178
-
179
- ### Column Naming
180
- - Use snake_case: `created_at`
181
- - Foreign keys: `{table}_id`
182
- - Booleans: `is_active`, `has_access`
183
- ```
184
-
185
- ## File Pattern Syntax
186
-
187
- Patterns use glob syntax:
188
-
189
- | Pattern | Matches |
190
- |---------|---------|
191
- | `*.test.ts` | All test files in current dir |
192
- | `**/*.test.ts` | All test files recursively |
193
- | `src/api/**/*` | All files in api directory tree |
194
- | `*.{ts,tsx}` | TypeScript and TSX files |
195
- | `!node_modules/**` | Exclude node_modules |
196
-
197
- ## MCP Tool Integration
21
+ ## Specialist Delegation
198
22
 
199
- Custom steering documents are managed manually. After creating:
200
- 1. Save to `.spec/steering/{name}.md`
201
- 2. Verify file patterns work as expected
202
- 3. Reference in AGENTS.md/CLAUDE.md if needed
23
+ Target renderers provide the `planner` route. When a native advisor is required, dispatch exactly one compact handoff with `specialistDepth: 1`; include only domain facts, intended file scope, project constraints, and output contract. The specialist must not delegate again. Keep the handoff and returned summary at or below 2,048 estimated tokens. If the advisor or routed model is unavailable, record one fallback and continue in the parent without retrying or selecting a generic child. Where a native per-turn model override applies, execute in this turn.
203
24
 
204
- ## Quality Checklist
25
+ ## Output
205
26
 
206
- - [ ] Purpose is clearly stated
207
- - [ ] Inclusion mode is appropriate
208
- - [ ] File patterns are specific (for CONDITIONAL)
209
- - [ ] Guidelines are actionable
210
- - [ ] Examples show good and bad practices
211
- - [ ] Checklist for verification included
27
+ Return the contained path, inclusion mode/globs, evidence used, validation results, preserved user content, and blockers.
212
28
 
213
- ## Specialist Delegation
29
+ ## Optional Reference
214
30
 
215
- When the host supports subagents, delegate this phase to the `planner` role with a compact handoff containing only the specialized domain, file scope, project constraints, and requested steering outcome. Wait for the specialist and then integrate its result into the current workflow. If specialist delegation is unavailable, state the fallback and continue in the current agent.
31
+ Read [REFERENCE.md](REFERENCE.md) only for templates, glob examples, or sample domain steering.
@@ -0,0 +1,25 @@
1
+ # Task Planning Reference
2
+
3
+ Read only for formatting and decomposition help.
4
+
5
+ ## Task Template
6
+
7
+ ```markdown
8
+ ### N.M Outcome
9
+ Affected artifacts:
10
+ Requirements/design traceability:
11
+ Dependencies:
12
+ RED: focused failing behavior test and command
13
+ GREEN: smallest complete behavior
14
+ REFACTOR: bounded cleanup
15
+ Acceptance criteria:
16
+ Verification:
17
+ ```
18
+
19
+ ## Decomposition
20
+
21
+ Prefer a vertical behavior slice over separate “write all tests” and “write all code” phases. Split when a task has distinct observable outcomes, ownership boundaries, or independently verifiable failure modes. Merge tasks that would otherwise require a serial handoff with no standalone value. Mark concurrency only when slices do not edit the same contract or require one another's output.
22
+
23
+ ## Checklist
24
+
25
+ Every requirement and design component is covered; dependencies form an acyclic order; each behavioral task begins with RED; edge/error/security/migration scenarios appear where relevant; acceptance criteria are measurable; optional test-case review is explicit; no task is merely “finish”, “wire up”, or “add tests”; and approval remains a separate user-visible gate.