@tudeorangbiasa/sdd-multiagent-opencode 0.1.3 → 0.2.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.
- package/.opencode/agents/sdd-explorer.md +1 -2
- package/.opencode/agents/sdd-implementer.md +4 -5
- package/.opencode/agents/sdd-orchestrator.md +17 -127
- package/.opencode/agents/sdd-planner.md +5 -6
- package/.opencode/agents/sdd-reviewer.md +0 -1
- package/.opencode/agents/sdd-verifier.md +3 -4
- package/.opencode/commands/sdd-apply.md +83 -0
- package/.opencode/commands/sdd-explore.md +63 -0
- package/.opencode/commands/sdd-propose.md +116 -0
- package/.opencode/commands/sdd-ship.md +71 -0
- package/.opencode/plugins/sdd-auto-reasoning.js +141 -0
- package/.opencode/plugins/sdd-register.js +22 -0
- package/.opencode/skills/sdd-audit/SKILL.md +5 -5
- package/.opencode/skills/sdd-implementation/SKILL.md +10 -12
- package/.opencode/skills/sdd-planning/SKILL.md +20 -29
- package/.opencode/skills/sdd-research/SKILL.md +5 -5
- package/.sdd/config.json +10 -10
- package/.sdd/templates/design-template.md +21 -0
- package/.sdd/templates/model-profile-template.json +35 -3
- package/.sdd/templates/progress-template.md +23 -0
- package/.sdd/templates/project-profile-template.json +2 -2
- package/.sdd/templates/proposal-template.md +22 -0
- package/.sdd/templates/reasoning-profile-template.json +21 -0
- package/.sdd/templates/spec-template.md +19 -0
- package/.sdd/templates/tasks-template.md +8 -0
- package/.sdd/templates/verification-template.md +17 -0
- package/GUIDE.md +128 -0
- package/README.md +185 -150
- package/bin/sdd-opencode.js +34 -7
- package/opencode.json +10 -14
- package/package.json +6 -4
- package/.opencode/commands/audit.md +0 -75
- package/.opencode/commands/brief.md +0 -190
- package/.opencode/commands/evolve.md +0 -87
- package/.opencode/commands/execute-parallel.md +0 -116
- package/.opencode/commands/execute-task.md +0 -81
- package/.opencode/commands/generate-prd.md +0 -82
- package/.opencode/commands/generate-rules.md +0 -67
- package/.opencode/commands/grill-me.md +0 -99
- package/.opencode/commands/implement.md +0 -149
- package/.opencode/commands/init-sdd.md +0 -141
- package/.opencode/commands/plan.md +0 -96
- package/.opencode/commands/refine.md +0 -115
- package/.opencode/commands/research.md +0 -194
- package/.opencode/commands/sdd-full-plan.md +0 -91
- package/.opencode/commands/specify.md +0 -124
- package/.opencode/commands/tasks.md +0 -110
- package/.opencode/commands/upgrade.md +0 -107
- package/.opencode/skills/sdd-evolve/SKILL.md +0 -95
- package/.sdd/templates/feature-brief-v2.md +0 -65
- package/.sdd/templates/plan-compact.md +0 -50
- package/.sdd/templates/research-compact.md +0 -114
- package/.sdd/templates/roadmap-template.json +0 -29
- package/.sdd/templates/roadmap-template.md +0 -66
- package/.sdd/templates/spec-compact.md +0 -71
- package/.sdd/templates/tasks-compact.md +0 -48
- package/.sdd/templates/todo-compact.md +0 -30
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate a Product Requirements Document through guided Socratic questioning, creating both comprehensive and AI-optimized versions
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
**Product requirements analyst** - Guide users through strategic questions to create comprehensive, well-structured PRDs. Ask questions one at a time, probe vague answers, generate both full and quick PRD versions, and validate PRD quality.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/generate-prd $1 $ARGUMENTS
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Examples:**
|
|
16
|
-
```
|
|
17
|
-
/generate-prd saas-dashboard
|
|
18
|
-
/generate-prd ecommerce-app Multi-vendor marketplace
|
|
19
|
-
/generate-prd mobile-banking
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Instructions
|
|
25
|
-
|
|
26
|
-
### Phase 1: Introduction
|
|
27
|
-
|
|
28
|
-
**Start the PRD session:**
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
## PRD Generation Session
|
|
32
|
-
|
|
33
|
-
I'll help you create a solid Product Requirements Document through a few key questions. By the end, you'll have clear documentation of what to build and why.
|
|
34
|
-
|
|
35
|
-
**Project:** $1
|
|
36
|
-
|
|
37
|
-
Let's begin with the first question...
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Phase 2: Strategic Questioning
|
|
41
|
-
|
|
42
|
-
Ask 5 questions one at a time:
|
|
43
|
-
|
|
44
|
-
1. **Problem & Goal** - What are we building and why? (Must have both problem AND goal)
|
|
45
|
-
2. **Core Features** - List 3-5 must-have features (Need at least 2 concrete features)
|
|
46
|
-
3. **Tech Stack** - Technical requirements, integrations, constraints (Optional)
|
|
47
|
-
4. **Out of Scope** - What's explicitly NOT in v1? (Need at least 1 exclusion)
|
|
48
|
-
5. **Additional Context** - Compliance, accessibility, deadlines, etc. (Optional)
|
|
49
|
-
|
|
50
|
-
**Validation:** Probe vague answers, suggest options when stuck, enforce minimum requirements before proceeding.
|
|
51
|
-
|
|
52
|
-
### Phase 3: PRD Generation
|
|
53
|
-
|
|
54
|
-
**Verify minimum requirements:** Q1 (problem + goal), Q2 (2+ features), Q4 (1+ exclusion). Ask follow-ups if missing.
|
|
55
|
-
|
|
56
|
-
**Generate two documents:**
|
|
57
|
-
|
|
58
|
-
1. **full-prd.md** - Comprehensive PRD with: Executive Summary, Problem Statement, Target Users, Functional/Non-Functional Requirements, Technical Constraints, Out of Scope, Success Metrics, Timeline, Open Questions, Appendix
|
|
59
|
-
|
|
60
|
-
2. **quick-prd.md** - AI-optimized summary with: Problem, Core Features, Technical Approach, Out of Scope, Success Metrics
|
|
61
|
-
|
|
62
|
-
### Phase 4: Quality Validation
|
|
63
|
-
|
|
64
|
-
Assess clarity, completeness, and actionability (0-100% each). Overall status: Ready for Planning or Needs Refinement.
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Output
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
✅ PRD generated successfully!
|
|
72
|
-
|
|
73
|
-
**Files created:**
|
|
74
|
-
- `specs/active/$1/full-prd.md` - Comprehensive PRD
|
|
75
|
-
- `specs/active/$1/quick-prd.md` - AI-optimized summary
|
|
76
|
-
|
|
77
|
-
**Quality:** Clarity [X]%, Completeness [X]%, Actionability [X]%, Overall [X]%
|
|
78
|
-
|
|
79
|
-
**Summary:** Problem [one sentence], [N] core features, [N] exclusions
|
|
80
|
-
|
|
81
|
-
**Next steps:** Review PRD, refine with `/refine $1`, create tasks with `/tasks $1`, or start brief with `/brief $1`
|
|
82
|
-
```
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Automatically generate comprehensive coding rules based on technology stack detection and codebase analysis
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
**Coding standards architect** - Analyze project, detect technology stack, analyze codebase patterns, and generate comprehensive rule files including language-specific, framework-specific, and project-specific rules with 10X dev principles (DRY, KISS, SOLID).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/generate-rules
|
|
13
|
-
/generate-rules --language $1 --framework $2
|
|
14
|
-
/generate-rules --analyze-codebase
|
|
15
|
-
/generate-rules --update-existing
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Instructions
|
|
21
|
-
|
|
22
|
-
### Phase 1: Analysis
|
|
23
|
-
|
|
24
|
-
**Technology Detection:** Check package files (package.json, requirements.txt, Cargo.toml, go.mod, etc.)
|
|
25
|
-
|
|
26
|
-
**Framework Detection:** Analyze dependencies (React, Vue, Next.js, Django, Flask, etc.)
|
|
27
|
-
|
|
28
|
-
**Codebase Analysis:** Use `codebase-memory-mcp` to review code organization, naming conventions, import patterns, error handling, testing patterns
|
|
29
|
-
|
|
30
|
-
**Existing Rules:** Check `.opencode/rules/` for files to merge or replace
|
|
31
|
-
|
|
32
|
-
### Phase 2: Planning
|
|
33
|
-
|
|
34
|
-
**Present detection results:** Detected stack, codebase analysis, and proposed rule files.
|
|
35
|
-
|
|
36
|
-
**Options:** Generate all new rules, generate only missing, or customize selection. Wait for user approval.
|
|
37
|
-
|
|
38
|
-
### Phase 3: Execution
|
|
39
|
-
|
|
40
|
-
**Generate rule files in order:**
|
|
41
|
-
|
|
42
|
-
1. **coding-principles.md** (always include) - DRY, KISS, SOLID, code quality, performance mindset
|
|
43
|
-
2. **Language-specific rules** (e.g., typescript-rules.md) - Type safety, naming conventions, best practices
|
|
44
|
-
3. **Framework-specific rules** (e.g., react-rules.md) - Component design, state management, performance, patterns
|
|
45
|
-
4. **testing-rules.md** - Test structure, coverage, mocking
|
|
46
|
-
5. **security-rules.md** - Input validation, authentication, secrets
|
|
47
|
-
6. **performance-rules.md** - General optimization, loading, runtime
|
|
48
|
-
7. **project-specific.md** - Detected patterns, file organization, import conventions, custom rules
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Output
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
✅ Rules generated successfully!
|
|
56
|
-
|
|
57
|
-
**Created files:**
|
|
58
|
-
- `.opencode/rules/coding-principles.md` - Core 10X principles
|
|
59
|
-
- `.opencode/rules/[language]-rules.md` - [Language] best practices
|
|
60
|
-
- `.opencode/rules/[framework]-rules.md` - [Framework] patterns
|
|
61
|
-
- `.opencode/rules/testing-rules.md` - Testing practices
|
|
62
|
-
- `.opencode/rules/security-rules.md` - Security guidelines
|
|
63
|
-
- `.opencode/rules/performance-rules.md` - Performance optimization
|
|
64
|
-
- `.opencode/rules/project-specific.md` - Project conventions
|
|
65
|
-
|
|
66
|
-
**Total:** [N] rule files. Rules are now active for all AI interactions.
|
|
67
|
-
```
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Interview the user relentlessly about a plan or design until reaching shared understanding. Use before /brief to clarify vague ideas, or to stress-test existing plans
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Interview the user relentlessly about every aspect of their plan until you reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/grill-me $ARGUMENTS
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Examples:**
|
|
16
|
-
```
|
|
17
|
-
/grill-me I want to add authentication to my app
|
|
18
|
-
/grill-me We need a notification system
|
|
19
|
-
/grill-me I'm thinking of rebuilding the checkout flow
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Protocol
|
|
25
|
-
|
|
26
|
-
### Rules
|
|
27
|
-
|
|
28
|
-
1. **Ask ONE question at a time.** Never batch multiple questions.
|
|
29
|
-
2. **For each question, provide your recommended answer.** Make it easy for the user to just say "yes" if they agree.
|
|
30
|
-
3. **If a question can be answered by exploring the codebase, explore the codebase instead.** Use `codebase-memory-mcp` to find existing patterns before asking.
|
|
31
|
-
4. **Track the decision tree mentally.** Walk down each branch until resolved, then move to the next.
|
|
32
|
-
5. **Stop when all branches are resolved** and you have enough clarity to proceed.
|
|
33
|
-
|
|
34
|
-
### Question Categories
|
|
35
|
-
|
|
36
|
-
Ask questions from these categories in order, skipping ones already answered:
|
|
37
|
-
|
|
38
|
-
1. **Problem & Goal** — What are we building and why?
|
|
39
|
-
2. **Users** — Who will use this? What do they need?
|
|
40
|
-
3. **Scope** — What's in v1? What's explicitly out?
|
|
41
|
-
4. **Technical** — Existing patterns? New tech? Constraints?
|
|
42
|
-
5. **Success** — How do we know it's done? What metrics matter?
|
|
43
|
-
|
|
44
|
-
### Question Format
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
**Question N:** [Your question]
|
|
48
|
-
|
|
49
|
-
**My recommendation:** [Your suggested answer with brief rationale]
|
|
50
|
-
|
|
51
|
-
Does this work, or would you change it?
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Codebase Exploration
|
|
55
|
-
|
|
56
|
-
Before asking about technical decisions, check the codebase first:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
Let me check how your codebase currently handles [topic]...
|
|
60
|
-
|
|
61
|
-
[Use codebase-memory-mcp to explore]
|
|
62
|
-
|
|
63
|
-
Found: [existing pattern at path/to/file]
|
|
64
|
-
|
|
65
|
-
Given this, I'd recommend [recommendation]. Does that align with your thinking?
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Completion
|
|
69
|
-
|
|
70
|
-
When all branches are resolved, summarize the shared understanding:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
## Shared Understanding
|
|
74
|
-
|
|
75
|
-
Here's what we've agreed on:
|
|
76
|
-
|
|
77
|
-
1. **Problem:** [summary]
|
|
78
|
-
2. **Users:** [who]
|
|
79
|
-
3. **Scope:** [in v1 / out of v1]
|
|
80
|
-
4. **Technical approach:** [direction]
|
|
81
|
-
5. **Success criteria:** [metrics]
|
|
82
|
-
|
|
83
|
-
**Ready to create a brief?** Run `/brief [task-id] [description]` and I'll generate the feature brief document.
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## When to Use
|
|
89
|
-
|
|
90
|
-
- User has a vague idea and needs to clarify it before planning
|
|
91
|
-
- User has a plan but wants to stress-test it for holes
|
|
92
|
-
- User mentions "grill me" or "interrogate me"
|
|
93
|
-
- After `/brief` if the brief feels incomplete and needs deeper exploration
|
|
94
|
-
|
|
95
|
-
## When NOT to Use
|
|
96
|
-
|
|
97
|
-
- User already has a clear, detailed spec → skip to `/specify` or `/plan`
|
|
98
|
-
- User wants quick planning → use `/brief` directly
|
|
99
|
-
- User is in a hurry → batch questions instead
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Execute the planned implementation with systematic todo-list execution and continuous progress tracking
|
|
3
|
-
agent: sdd-implementer
|
|
4
|
-
subtask: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**You are an implementation agent.** Execute the planned implementation systematically:
|
|
8
|
-
- Read all planning documents (plan.md, tasks.md, spec.md)
|
|
9
|
-
- Generate a todo-list if one doesn't exist
|
|
10
|
-
- Execute todos in order, respecting dependencies
|
|
11
|
-
- Mark each item complete as you finish it
|
|
12
|
-
- Document blockers and deviations
|
|
13
|
-
- Write production-quality code
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Prerequisites
|
|
18
|
-
|
|
19
|
-
- `plan.md` file in `specs/active/$1/`
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
/implement $1
|
|
25
|
-
/implement $1 --tdd
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Flags:**
|
|
29
|
-
| Flag | Description |
|
|
30
|
-
|------|-------------|
|
|
31
|
-
| `--tdd` | Test-Driven Development: write failing test first, then implement to pass |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Instructions
|
|
36
|
-
|
|
37
|
-
### Phase 1: Analysis
|
|
38
|
-
|
|
39
|
-
Read planning documents in order:
|
|
40
|
-
1. `specs/active/$1/plan.md` (REQUIRED)
|
|
41
|
-
2. `specs/active/$1/spec.md` (if exists)
|
|
42
|
-
3. `specs/active/$1/tasks.md` (if exists)
|
|
43
|
-
4. `specs/active/$1/research.md` (if exists)
|
|
44
|
-
5. `specs/active/$1/feature-brief.md` (if exists)
|
|
45
|
-
|
|
46
|
-
**If plan.md doesn't exist:** Suggest running `/plan $1` or `/brief $1` first.
|
|
47
|
-
|
|
48
|
-
Check for existing `todo-list.md` in the task directory.
|
|
49
|
-
|
|
50
|
-
### Phase 2: Planning
|
|
51
|
-
|
|
52
|
-
Present implementation plan before starting:
|
|
53
|
-
- What will be built
|
|
54
|
-
- Execution order/phases
|
|
55
|
-
- Files to create/modify
|
|
56
|
-
- Patterns to follow
|
|
57
|
-
- Todo-list preview (5-10 key items)
|
|
58
|
-
|
|
59
|
-
**Wait for user approval before proceeding.**
|
|
60
|
-
|
|
61
|
-
### Phase 3: Execution
|
|
62
|
-
|
|
63
|
-
**Create directory if it doesn't exist:** `specs/active/$1/`
|
|
64
|
-
|
|
65
|
-
**Create or update todo-list.md** with task phases, individual todos with dependencies, and progress log table.
|
|
66
|
-
|
|
67
|
-
**Execute todos systematically:**
|
|
68
|
-
1. Read entire todo-list before starting
|
|
69
|
-
2. Execute in order, respecting dependencies
|
|
70
|
-
3. Mark completion: `- [ ]` → `- [x]` after each item
|
|
71
|
-
4. Document blockers - never skip silently
|
|
72
|
-
5. Update progress log
|
|
73
|
-
|
|
74
|
-
**Show progress** after every 3-5 completed items.
|
|
75
|
-
|
|
76
|
-
### Phase 3b: TDD Mode (if --tdd flag)
|
|
77
|
-
|
|
78
|
-
When `--tdd` is specified, follow this loop for each todo:
|
|
79
|
-
|
|
80
|
-
**Step 1: Define expected behavior**
|
|
81
|
-
- Read the todo description
|
|
82
|
-
- Write a failing test that captures the expected behavior
|
|
83
|
-
- Test should fail with clear error message
|
|
84
|
-
|
|
85
|
-
**Step 2: Write minimum code to pass**
|
|
86
|
-
- Implement only what's needed to make the test pass
|
|
87
|
-
- Do NOT add extra features or polish
|
|
88
|
-
- Keep it minimal
|
|
89
|
-
|
|
90
|
-
**Step 3: Run test**
|
|
91
|
-
- Execute the specific test
|
|
92
|
-
- Verify it passes
|
|
93
|
-
|
|
94
|
-
**Step 4: Refactor (optional)**
|
|
95
|
-
- Only after test passes, refactor if needed
|
|
96
|
-
- Ensure tests still pass after refactor
|
|
97
|
-
|
|
98
|
-
**TDD todo format in todo-list.md:**
|
|
99
|
-
```markdown
|
|
100
|
-
- [ ] [Task name] --tdd
|
|
101
|
-
- Test file: `tests/[feature].test.ts`
|
|
102
|
-
- Test describes: [expected behavior]
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Rules for TDD:**
|
|
106
|
-
- Never write implementation code before the failing test
|
|
107
|
-
- Test must fail before implementation starts
|
|
108
|
-
- Only implement enough to make test pass
|
|
109
|
-
- Refactor AFTER tests pass, not before
|
|
110
|
-
|
|
111
|
-
### Phase 4: Verification
|
|
112
|
-
|
|
113
|
-
Spawn `sdd-verifier` subagent to independently validate:
|
|
114
|
-
- [ ] All todos complete or blocked
|
|
115
|
-
- [ ] Code follows project patterns
|
|
116
|
-
- [ ] No linter errors
|
|
117
|
-
- [ ] Tests pass (if applicable)
|
|
118
|
-
- [ ] Spec requirements met
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Output
|
|
123
|
-
|
|
124
|
-
**End response with:**
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
✅ Implementation complete: $1
|
|
128
|
-
|
|
129
|
-
**Summary:**
|
|
130
|
-
- Completed: [X]/[Y] tasks
|
|
131
|
-
- Blocked: [N] items (if any)
|
|
132
|
-
- Files created: [count]
|
|
133
|
-
- Files modified: [count]
|
|
134
|
-
|
|
135
|
-
**What was built:**
|
|
136
|
-
- [Feature/component 1]
|
|
137
|
-
- [Feature/component 2]
|
|
138
|
-
|
|
139
|
-
**Blocked items (if any):**
|
|
140
|
-
- [Item]: [Reason]
|
|
141
|
-
|
|
142
|
-
**Next steps:**
|
|
143
|
-
- Run tests: `[test command]`
|
|
144
|
-
- Review changes in IDE
|
|
145
|
-
- Update specs: `/evolve $1 [discovery]`
|
|
146
|
-
|
|
147
|
-
**Files:**
|
|
148
|
-
- Todo list: `specs/active/$1/todo-list.md`
|
|
149
|
-
```
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Install or refresh SDD workflow into current project
|
|
3
|
-
agent: sdd-orchestrator
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Install Spec-Driven Development workflow (commands, agents, skills, templates) into a project that already has base rules.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Usage
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
/init-sdd
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Prerequisites
|
|
19
|
-
|
|
20
|
-
This command expects `opencode-agent-rules` to be installed first. Check for:
|
|
21
|
-
- `AGENTS.md` in project root
|
|
22
|
-
- `.opencode/rules/context-budget.md` exists
|
|
23
|
-
|
|
24
|
-
If missing, output:
|
|
25
|
-
```
|
|
26
|
-
⚠️ Base rules not found.
|
|
27
|
-
|
|
28
|
-
Please install opencode-agent-rules first:
|
|
29
|
-
1. Clone or copy base rules to project
|
|
30
|
-
2. Run /init-rules
|
|
31
|
-
3. Then run /init-sdd
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Behavior
|
|
37
|
-
|
|
38
|
-
### Phase 1: Verify Prerequisites
|
|
39
|
-
|
|
40
|
-
1. Check if `AGENTS.md` exists
|
|
41
|
-
2. Check if `.opencode/rules/context-budget.md` exists
|
|
42
|
-
3. If either missing, abort and show install instructions
|
|
43
|
-
|
|
44
|
-
### Phase 2: Create Directory Structure
|
|
45
|
-
|
|
46
|
-
Create if missing:
|
|
47
|
-
```
|
|
48
|
-
.sdd/
|
|
49
|
-
├── config.json
|
|
50
|
-
├── templates/
|
|
51
|
-
specs/
|
|
52
|
-
├── active/
|
|
53
|
-
├── backlog/
|
|
54
|
-
├── completed/
|
|
55
|
-
└── todo-roadmap/
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Phase 3: Install SDD Files
|
|
59
|
-
|
|
60
|
-
Copy from this repo:
|
|
61
|
-
- `.opencode/agents/*` → `.opencode/agents/`
|
|
62
|
-
- `.opencode/commands/*` → `.opencode/commands/`
|
|
63
|
-
- `.opencode/skills/*` → `.opencode/skills/`
|
|
64
|
-
- `.sdd/config.json` → `.sdd/config.json`
|
|
65
|
-
- `.sdd/templates/*` → `.sdd/templates/`
|
|
66
|
-
|
|
67
|
-
Note: Do NOT overwrite existing `.opencode/` directories if project has custom commands.
|
|
68
|
-
|
|
69
|
-
### Phase 4: Create Project Profile
|
|
70
|
-
|
|
71
|
-
Create `.sdd/project-profile.json` with this structure:
|
|
72
|
-
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"projectState": "unknown",
|
|
76
|
-
"initialized": "DATE",
|
|
77
|
-
"stack": {
|
|
78
|
-
"framework": null,
|
|
79
|
-
"language": null,
|
|
80
|
-
"packageManager": null,
|
|
81
|
-
"styling": null
|
|
82
|
-
},
|
|
83
|
-
"commands": {
|
|
84
|
-
"dev": null,
|
|
85
|
-
"build": null,
|
|
86
|
-
"test": null,
|
|
87
|
-
"lint": null
|
|
88
|
-
},
|
|
89
|
-
"design": {
|
|
90
|
-
"sourceOfTruth": null,
|
|
91
|
-
"hasDesignMd": false,
|
|
92
|
-
"hasProductMd": false,
|
|
93
|
-
"componentRoots": []
|
|
94
|
-
},
|
|
95
|
-
"skillRouting": {
|
|
96
|
-
"uiDefault": "existing-design-system",
|
|
97
|
-
"visualVerification": "sdd-verifier",
|
|
98
|
-
"codeReview": "sdd-reviewer"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Phase 5: Merge opencode.json
|
|
104
|
-
|
|
105
|
-
If project has `opencode.json`, merge these sections:
|
|
106
|
-
- `agents` definitions
|
|
107
|
-
- `permission` rules
|
|
108
|
-
|
|
109
|
-
If project doesn't have `opencode.json`, create from this repo's template.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Output
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
✅ SDD workflow installed
|
|
117
|
-
|
|
118
|
-
Files installed:
|
|
119
|
-
- .opencode/agents/ (6 agents)
|
|
120
|
-
- .opencode/commands/ (16 commands)
|
|
121
|
-
- .opencode/skills/ (5 skills)
|
|
122
|
-
- .sdd/config.json
|
|
123
|
-
- .sdd/templates/ (8 templates)
|
|
124
|
-
- .sdd/project-profile.json
|
|
125
|
-
|
|
126
|
-
⚠️ Next steps:
|
|
127
|
-
1. Update project-profile.json with your stack
|
|
128
|
-
2. Run /brief <feature> to start
|
|
129
|
-
|
|
130
|
-
Available commands:
|
|
131
|
-
/brief /research /specify /plan /tasks /implement /audit
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Re-run Behavior
|
|
137
|
-
|
|
138
|
-
If running again (project already has SDD):
|
|
139
|
-
- Report: "SDD already installed"
|
|
140
|
-
- Offer to refresh: "Run with --force to refresh all files"
|
|
141
|
-
- Update `initialized` date in project-profile.json
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate a detailed technical implementation plan from specifications, including architecture decisions, tech stack, and design patterns
|
|
3
|
-
agent: sdd-planner
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
**You are a technical architect agent.** Transform requirements into a detailed technical implementation strategy without writing implementation code.
|
|
7
|
-
|
|
8
|
-
**Skill:** Uses `sdd-planning` skill.
|
|
9
|
-
|
|
10
|
-
**Output:** `specs/active/$1/plan.md`
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Prerequisites
|
|
15
|
-
|
|
16
|
-
- Must have existing `spec.md` OR `feature-brief.md` in task directory
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
/plan $1
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Examples:**
|
|
25
|
-
```
|
|
26
|
-
/plan user-auth-system
|
|
27
|
-
/plan checkout-flow
|
|
28
|
-
/plan notification-system
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Instructions
|
|
34
|
-
|
|
35
|
-
### Phase 1: Analysis
|
|
36
|
-
|
|
37
|
-
1. **Read specifications** in order:
|
|
38
|
-
- `specs/active/$1/spec.md` (preferred)
|
|
39
|
-
- `specs/active/$1/feature-brief.md` (alternative)
|
|
40
|
-
- `specs/active/$1/research.md` (if exists)
|
|
41
|
-
|
|
42
|
-
**If no spec found:** Prompt user to run `/specify` or `/brief` first.
|
|
43
|
-
|
|
44
|
-
2. **Extract requirements:** Functional and non-functional requirements, constraints, user stories, acceptance criteria
|
|
45
|
-
|
|
46
|
-
3. **Analyze codebase:** Use `codebase-memory-mcp` to understand existing patterns, tech stack, conventions, integration points
|
|
47
|
-
|
|
48
|
-
4. **Identify decisions needed:** Architecture style, data storage, API design, integrations, security
|
|
49
|
-
|
|
50
|
-
### Phase 2: Plan Preview
|
|
51
|
-
|
|
52
|
-
**Present plan structure and wait for approval:**
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
## Technical Plan Preview
|
|
56
|
-
|
|
57
|
-
**Task ID:** $1
|
|
58
|
-
**Architecture:** [High-level approach]
|
|
59
|
-
**Tech stack:** [Key technologies with rationale]
|
|
60
|
-
**Components:** [Main components and purposes]
|
|
61
|
-
**Data model:** [Key entities]
|
|
62
|
-
**API design:** [Key endpoints]
|
|
63
|
-
|
|
64
|
-
Ready to generate the full plan?
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Phase 3: Generate Plan
|
|
68
|
-
|
|
69
|
-
**Create directory if it doesn't exist:** `specs/active/$1/`
|
|
70
|
-
|
|
71
|
-
**Generate `plan.md`** with: System Architecture (with Mermaid diagram), Technology Stack, Component Design, Data Model, API Contracts, Security Considerations, Performance Strategy, Implementation Phases, Risk Assessment, Open Questions, Next Steps.
|
|
72
|
-
|
|
73
|
-
**Verify:** Read the file back to confirm it was created correctly.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Output
|
|
78
|
-
|
|
79
|
-
**End your response with:**
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
✅ Plan created: `specs/active/$1/plan.md`
|
|
83
|
-
|
|
84
|
-
**Architecture:** [Brief description]
|
|
85
|
-
**Components:** [Count] main components
|
|
86
|
-
**Phases:** [Count] implementation phases
|
|
87
|
-
|
|
88
|
-
**Key decisions:**
|
|
89
|
-
- [Decision 1]: [Choice]
|
|
90
|
-
- [Decision 2]: [Choice]
|
|
91
|
-
|
|
92
|
-
**Next steps:**
|
|
93
|
-
- Review the technical plan
|
|
94
|
-
- Run `/tasks $1` to generate implementation tasks
|
|
95
|
-
- Or run `/implement $1` if tasks are clear
|
|
96
|
-
```
|