fix(vision-to-backlog): organize artifacts in .product-strategy/ directory

Create .product-strategy/ directory to organize all strategy artifacts
instead of cluttering root directory.

Changes:
- Step 2: Create .product-strategy/ directory early in workflow
- Each agent spawn: Specify output path (e.g., .product-strategy/problem-map.md)
- Agents reference prior artifacts by path
- Final report lists all artifact locations

Artifacts saved:
- .product-strategy/problem-map.md
- .product-strategy/context-map.md
- .product-strategy/domain-*.md (one per context)
- .product-strategy/capabilities.md
- .product-strategy/backlog.md

Keeps root directory clean and strategy artifacts organized.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-01-12 18:53:47 +01:00
parent eead1e15dd
commit fd713c8697

View File

@@ -39,7 +39,16 @@ cat ./vision.md
Verify both files exist. If vision doesn't exist, help user create it following product-strategy framework. Verify both files exist. If vision doesn't exist, help user create it following product-strategy framework.
### 2. Vision Decision Gate ### 2. Create Artifacts Directory
Create directory for strategy artifacts:
```bash
mkdir -p .product-strategy
```
All artifacts will be saved here to keep root clean.
### 3. Vision Decision Gate
Show vision to user and ask: Show vision to user and ask:
@@ -52,7 +61,7 @@ Show vision to user and ask:
If NO → help refine vision first, don't proceed. If NO → help refine vision first, don't proceed.
If YES → continue to problem space. If YES → continue to problem space.
### 3. Spawn Problem Space Analyst ### 4. Spawn Problem Space Analyst
Use Task tool to spawn `problem-space-analyst` agent: Use Task tool to spawn `problem-space-analyst` agent:
@@ -70,12 +79,14 @@ Output:
- Irreversible vs reversible actions - Irreversible vs reversible actions
- Where mistakes are expensive - Where mistakes are expensive
Save artifact to: .product-strategy/problem-map.md
Follow problem-space-analyst agent instructions. Follow problem-space-analyst agent instructions.
``` ```
Agent returns Problem Map artifact. Agent returns Problem Map artifact saved to `.product-strategy/problem-map.md`.
### 4. Problem Space Decision Gate ### 5. Problem Space Decision Gate
Show Problem Map to user and ask: Show Problem Map to user and ask:
@@ -83,14 +94,14 @@ Show Problem Map to user and ask:
- If NO → problem space needs more work - If NO → problem space needs more work
- If YES → continue to context mapping - If YES → continue to context mapping
### 5. Spawn Context Mapper ### 6. Spawn Context Mapper
Use Task tool to spawn `context-mapper` agent: Use Task tool to spawn `context-mapper` agent:
``` ```
Identify bounded contexts from the problem space. Identify bounded contexts from the problem space.
Problem Map: [from previous step] Problem Map: .product-strategy/problem-map.md
Codebase: [current directory] Codebase: [current directory]
Analyze: Analyze:
@@ -103,12 +114,14 @@ Output:
- Boundary rules - Boundary rules
- Refactoring needs (if brownfield) - Refactoring needs (if brownfield)
Save artifact to: .product-strategy/context-map.md
Follow context-mapper agent instructions. Follow context-mapper agent instructions.
``` ```
Agent returns Bounded Context Map. Agent returns Bounded Context Map saved to `.product-strategy/context-map.md`.
### 6. Context Decision Gate ### 7. Context Decision Gate
Show Bounded Context Map to user and ask: Show Bounded Context Map to user and ask:
@@ -119,14 +132,14 @@ Show Bounded Context Map to user and ask:
If NO → revise contexts If NO → revise contexts
If YES → continue to domain modeling If YES → continue to domain modeling
### 7. Spawn Domain Modeler (Per Context) ### 8. Spawn Domain Modeler (Per Context)
For each bounded context, spawn `domain-modeler` agent: For each bounded context, spawn `domain-modeler` agent:
``` ```
Model the domain for bounded context: [CONTEXT_NAME] Model the domain for bounded context: [CONTEXT_NAME]
Context: [context details from map] Context: [context details from .product-strategy/context-map.md]
Codebase: [current directory] Codebase: [current directory]
Identify: Identify:
@@ -138,12 +151,14 @@ Identify:
Compare with existing code if present. Compare with existing code if present.
Save artifact to: .product-strategy/domain-[context-name].md
Follow domain-modeler agent instructions. Follow domain-modeler agent instructions.
``` ```
Agent returns Domain Model for this context. Agent returns Domain Model saved to `.product-strategy/domain-[context-name].md`.
### 8. Domain Model Decision Gate ### 9. Domain Model Decision Gate
For each context, verify: For each context, verify:
@@ -151,25 +166,27 @@ For each context, verify:
- If NO → simplify (might be read model or policy) - If NO → simplify (might be read model or policy)
- If YES → continue - If YES → continue
### 9. Spawn Capability Extractor ### 10. Spawn Capability Extractor
Use Task tool to spawn `capability-extractor` agent: Use Task tool to spawn `capability-extractor` agent:
``` ```
Extract product capabilities from domain models. Extract product capabilities from domain models.
Domain Models: [all contexts] Domain Models: .product-strategy/domain-*.md
Output: Output:
- Capability Map - Capability Map
- System abilities that cause meaningful domain changes - System abilities that cause meaningful domain changes
Save artifact to: .product-strategy/capabilities.md
Follow capability-extractor agent instructions. Follow capability-extractor agent instructions.
``` ```
Agent returns Capability Map. Agent returns Capability Map saved to `.product-strategy/capabilities.md`.
### 10. Capability Decision Gate ### 11. Capability Decision Gate
Show Capability Map to user and ask: Show Capability Map to user and ask:
@@ -178,15 +195,15 @@ Show Capability Map to user and ask:
- Let user select subset - Let user select subset
- Prioritize if needed - Prioritize if needed
### 11. Spawn Backlog Builder ### 12. Spawn Backlog Builder
Use Task tool to spawn `backlog-builder` agent: Use Task tool to spawn `backlog-builder` agent:
``` ```
Generate features and issues from selected capabilities. Generate features and issues from selected capabilities.
Selected Capabilities: [user selection] Selected Capabilities: [user selection from .product-strategy/capabilities.md]
Domain Models: [all contexts] Domain Models: .product-strategy/domain-*.md
Codebase: [current directory] Codebase: [current directory]
For each capability: For each capability:
@@ -196,12 +213,14 @@ For each capability:
Follow issue-writing skill format. Follow issue-writing skill format.
Save artifact to: .product-strategy/backlog.md
Follow backlog-builder agent instructions. Follow backlog-builder agent instructions.
``` ```
Agent returns Features + Issues. Agent returns Features + Issues saved to `.product-strategy/backlog.md`.
### 12. Feature Decision Gate ### 13. Feature Decision Gate
Show generated features and ask: Show generated features and ask:
@@ -211,9 +230,9 @@ Show generated features and ask:
If NO → refine features If NO → refine features
If YES → continue to issue creation If YES → continue to issue creation
### 13. Issue Review ### 14. Issue Review
Present all generated issues to user: Present all generated issues from `.product-strategy/backlog.md` to user:
``` ```
## Generated Backlog ## Generated Backlog
@@ -237,7 +256,7 @@ Ask user:
- If YES → automatically proceed to create all issues (step 14) - If YES → automatically proceed to create all issues (step 14)
- If NO → ask what to modify, regenerate, ask again - If NO → ask what to modify, regenerate, ask again
### 14. Create Issues in Gitea (automatic after approval) ### 15. Create Issues in Gitea (automatic after approval)
**After user approves in step 13, automatically create all issues.** **After user approves in step 13, automatically create all issues.**
@@ -253,14 +272,14 @@ Apply labels:
- `bounded-context/[context-name]` - `bounded-context/[context-name]`
- `capability/[capability-name]` - `capability/[capability-name]`
### 15. Link Dependencies ### 16. Link Dependencies
For issues with dependencies: For issues with dependencies:
```bash ```bash
tea issues deps add <dependent-issue> <blocker-issue> tea issues deps add <dependent-issue> <blocker-issue>
``` ```
### 16. Final Report ### 17. Final Report
Show created issues with links: Show created issues with links:
@@ -279,6 +298,13 @@ Show created issues with links:
Total: 6 issues created across 2 contexts Total: 6 issues created across 2 contexts
View backlog: [gitea issues link] View backlog: [gitea issues link]
All artifacts saved in .product-strategy/:
- problem-map.md
- context-map.md
- domain-*.md (one per context)
- capabilities.md
- backlog.md
``` ```
## Guidelines ## Guidelines