vibe-fabric 0.3.2 → 0.4.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 (77) hide show
  1. package/.claude/prompts/analyze/assess.md +208 -0
  2. package/.claude/prompts/analyze/synthesize.md +239 -0
  3. package/.claude/prompts/analyze/task-analyze-repo.md +260 -0
  4. package/.claude/prompts/gaps/assess.md +203 -0
  5. package/.claude/prompts/gaps/synthesize.md +180 -0
  6. package/.claude/prompts/gaps/task-analyze-module.md +198 -0
  7. package/.claude/prompts/prd/assess.md +156 -0
  8. package/.claude/prompts/prd/synthesize.md +191 -0
  9. package/.claude/prompts/prd/task-capture-feature.md +133 -0
  10. package/.claude/prompts/prd/task-deprecate.md +84 -0
  11. package/.claude/prompts/prd/task-document-code.md +110 -0
  12. package/.claude/prompts/prd/task-fix-format.md +102 -0
  13. package/.claude/prompts/prd/task-update-status.md +89 -0
  14. package/.claude/prompts/scope/assess.md +201 -0
  15. package/.claude/prompts/scope/synthesize.md +270 -0
  16. package/.claude/prompts/scope/task-analyze-prd.md +125 -0
  17. package/.claude/prompts/scope/task-check-deps.md +188 -0
  18. package/.claude/prompts/scope/task-create-scope.md +207 -0
  19. package/.claude/prompts/scope/task-recommend.md +146 -0
  20. package/.claude/prompts/scope/task-review-scope.md +191 -0
  21. package/.claude/prompts/scope/task-validate.md +203 -0
  22. package/dist/cli/commands/analyze.d.ts +33 -0
  23. package/dist/cli/commands/analyze.d.ts.map +1 -0
  24. package/dist/cli/commands/analyze.js +243 -0
  25. package/dist/cli/commands/analyze.js.map +1 -0
  26. package/dist/cli/commands/config/get.d.ts +9 -0
  27. package/dist/cli/commands/config/get.d.ts.map +1 -0
  28. package/dist/cli/commands/config/get.js +69 -0
  29. package/dist/cli/commands/config/get.js.map +1 -0
  30. package/dist/cli/commands/config/list.d.ts +24 -0
  31. package/dist/cli/commands/config/list.d.ts.map +1 -0
  32. package/dist/cli/commands/config/list.js +146 -0
  33. package/dist/cli/commands/config/list.js.map +1 -0
  34. package/dist/cli/commands/config/set.d.ts +14 -0
  35. package/dist/cli/commands/config/set.d.ts.map +1 -0
  36. package/dist/cli/commands/config/set.js +111 -0
  37. package/dist/cli/commands/config/set.js.map +1 -0
  38. package/dist/cli/commands/repo/list.d.ts +26 -0
  39. package/dist/cli/commands/repo/list.d.ts.map +1 -0
  40. package/dist/cli/commands/repo/list.js +197 -0
  41. package/dist/cli/commands/repo/list.js.map +1 -0
  42. package/dist/cli/commands/repo/remove.d.ts +29 -0
  43. package/dist/cli/commands/repo/remove.d.ts.map +1 -0
  44. package/dist/cli/commands/repo/remove.js +219 -0
  45. package/dist/cli/commands/repo/remove.js.map +1 -0
  46. package/dist/cli/commands/report.d.ts +16 -0
  47. package/dist/cli/commands/report.d.ts.map +1 -0
  48. package/dist/cli/commands/report.js +160 -0
  49. package/dist/cli/commands/report.js.map +1 -0
  50. package/dist/cli/index.js +14 -0
  51. package/dist/cli/index.js.map +1 -1
  52. package/dist/core/config.d.ts +25 -0
  53. package/dist/core/config.d.ts.map +1 -1
  54. package/dist/core/config.js +77 -0
  55. package/dist/core/config.js.map +1 -1
  56. package/dist/core/project.d.ts.map +1 -1
  57. package/dist/core/project.js +49 -1
  58. package/dist/core/project.js.map +1 -1
  59. package/dist/core/repo/templates/claude-agents.d.ts.map +1 -1
  60. package/dist/core/repo/templates/claude-agents.js +136 -28
  61. package/dist/core/repo/templates/claude-agents.js.map +1 -1
  62. package/dist/core/repo/templates/claude-prompts.d.ts +1 -1
  63. package/dist/core/repo/templates/claude-prompts.d.ts.map +1 -1
  64. package/dist/core/repo/templates/claude-prompts.js +412 -157
  65. package/dist/core/repo/templates/claude-prompts.js.map +1 -1
  66. package/dist/core/repo/templates/claude-scripts.d.ts.map +1 -1
  67. package/dist/core/repo/templates/claude-scripts.js +555 -94
  68. package/dist/core/repo/templates/claude-scripts.js.map +1 -1
  69. package/dist/core/report.d.ts +25 -0
  70. package/dist/core/report.d.ts.map +1 -0
  71. package/dist/core/report.js +702 -0
  72. package/dist/core/report.js.map +1 -0
  73. package/dist/types/report.d.ts +158 -0
  74. package/dist/types/report.d.ts.map +1 -0
  75. package/dist/types/report.js +7 -0
  76. package/dist/types/report.js.map +1 -0
  77. package/package.json +2 -1
@@ -0,0 +1,102 @@
1
+ # Fix PRD Format Issues
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write task output | Yes |
9
+ | {TASK_NAME} | Name of this task | Yes |
10
+ | {TASK_DESCRIPTION} | Description of what to fix | Yes |
11
+ | {ISSUES} | JSON array of issues to fix | Yes |
12
+
13
+ ---
14
+
15
+ ## Context
16
+
17
+ You are fixing format issues in PRD files.
18
+
19
+ Project: {PROJECT_PATH}
20
+ Task: {TASK_NAME}
21
+
22
+ Issues to fix:
23
+ {ISSUES}
24
+
25
+ ---
26
+
27
+ ## Your Task
28
+
29
+ Fix the identified format issues in the PRD files.
30
+
31
+ ### Common Fixes
32
+
33
+ 1. **Missing priority field**
34
+ - Add `| **Priority** | P1 |` to metadata table
35
+ - Use P0 for critical, P1 for high, P2 for normal, P3 for low
36
+
37
+ 2. **Invalid requirement ID**
38
+ - Rename to format: `REQ-MODULE-NNN`
39
+ - Example: `REQ-AUTH-001`, `REQ-USER-002`
40
+
41
+ 3. **Missing status field**
42
+ - Add `| **Status** | draft |` to metadata table
43
+ - Valid statuses: draft, in_progress, implemented, deprecated
44
+
45
+ 4. **Invalid AC format**
46
+ - Convert to: "Given [context], when [action], then [result]"
47
+ - Example: "Given valid credentials, when user submits login, then session is created"
48
+
49
+ 5. **Missing module field**
50
+ - Add `| **Module** | module-name |` to metadata table
51
+
52
+ ### Step 1: Read Files
53
+
54
+ Read each file that needs fixing.
55
+
56
+ ### Step 2: Apply Fixes
57
+
58
+ Make the minimum changes needed to fix each issue.
59
+
60
+ ### Step 3: Write Changes
61
+
62
+ Write the corrected files back.
63
+
64
+ ---
65
+
66
+ ## Output Format
67
+
68
+ Write to: {OUTPUT_FILE}
69
+
70
+ ```json
71
+ {
72
+ "task": "fix-format",
73
+ "status": "complete",
74
+ "fixes": [
75
+ {
76
+ "file": "docs/prd/modules/auth/login.md",
77
+ "issue": "Missing priority field",
78
+ "fix": "Added priority: P1"
79
+ },
80
+ {
81
+ "file": "docs/prd/modules/users/profile.md",
82
+ "issue": "Invalid AC format",
83
+ "fix": "Converted AC-1 to Given/When/Then format"
84
+ }
85
+ ],
86
+ "files_modified": [
87
+ "docs/prd/modules/auth/login.md",
88
+ "docs/prd/modules/users/profile.md"
89
+ ]
90
+ }
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Rules
96
+
97
+ - Make MINIMUM changes to fix issues
98
+ - Do NOT change content meaning
99
+ - Do NOT add new requirements
100
+ - Do NOT reformat entire files
101
+ - Preserve existing formatting where possible
102
+ - If unsure about a fix, skip it and note in output
@@ -0,0 +1,89 @@
1
+ # Update PRD Requirement Statuses
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write task output | Yes |
9
+ | {TASK_NAME} | Name of this task | Yes |
10
+ | {TASK_DESCRIPTION} | Description of what to update | Yes |
11
+ | {UPDATES} | JSON array of status updates to make | Yes |
12
+
13
+ ---
14
+
15
+ ## Context
16
+
17
+ You are updating requirement statuses based on completed scopes.
18
+
19
+ Project: {PROJECT_PATH}
20
+ Task: {TASK_NAME}
21
+
22
+ Updates to make:
23
+ {UPDATES}
24
+
25
+ ---
26
+
27
+ ## Your Task
28
+
29
+ Update requirement statuses in PRD files based on completed scope work.
30
+
31
+ ### Step 1: Verify Completion
32
+
33
+ For each update, verify the scope is in `docs/scopes/completed/`.
34
+
35
+ ### Step 2: Update Status
36
+
37
+ Change the status field in the requirement's metadata table:
38
+ - From: `| **Status** | draft |`
39
+ - To: `| **Status** | implemented |`
40
+
41
+ ### Step 3: Add Coverage Reference
42
+
43
+ Update the "Covered By" field if present:
44
+ - `| **Covered By** | SCOPE-001 |`
45
+
46
+ Or add it if missing.
47
+
48
+ ---
49
+
50
+ ## Output Format
51
+
52
+ Write to: {OUTPUT_FILE}
53
+
54
+ ```json
55
+ {
56
+ "task": "update-status",
57
+ "status": "complete",
58
+ "updates": [
59
+ {
60
+ "requirement": "REQ-AUTH-001",
61
+ "file": "docs/prd/modules/auth/login.md",
62
+ "old_status": "draft",
63
+ "new_status": "implemented",
64
+ "scope": "SCOPE-001"
65
+ },
66
+ {
67
+ "requirement": "REQ-AUTH-002",
68
+ "file": "docs/prd/modules/auth/registration.md",
69
+ "old_status": "draft",
70
+ "new_status": "implemented",
71
+ "scope": "SCOPE-001"
72
+ }
73
+ ],
74
+ "files_modified": [
75
+ "docs/prd/modules/auth/login.md",
76
+ "docs/prd/modules/auth/registration.md"
77
+ ]
78
+ }
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Rules
84
+
85
+ - Only update status if scope is truly completed
86
+ - Do NOT change any other content
87
+ - Preserve file formatting
88
+ - If requirement file not found, skip and note in output
89
+ - If status already correct, skip (no update needed)
@@ -0,0 +1,201 @@
1
+ # Scope Assessment
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {OUTPUT_FILE} | Path to write the assessment output | Yes |
9
+
10
+ ---
11
+
12
+ ## Context
13
+
14
+ You are helping create implementation scopes from a Product Requirements Document (PRD).
15
+
16
+ Project: {PROJECT_PATH}
17
+
18
+ A scope is a self-contained work package that:
19
+ - Derives from PRD requirements
20
+ - Can be sent to a development repository
21
+ - Contains everything needed for implementation
22
+ - Has clear acceptance criteria
23
+
24
+ ---
25
+
26
+ ## Your Task
27
+
28
+ Analyze the PRD and help the user create scopes.
29
+
30
+ ### Step 1: Analyze Current State
31
+
32
+ Read and analyze:
33
+ - `docs/prd/modules/` - All requirement modules
34
+ - `docs/scopes/drafts/` - Existing draft scopes
35
+ - `docs/scopes/ready/` - Approved scopes waiting to send
36
+ - `docs/scopes/sent/` - Scopes already sent to dev repos
37
+ - `docs/scopes/completed/` - Completed scopes
38
+
39
+ Identify:
40
+ - **Unscoped requirements**: Requirements not covered by any scope
41
+ - **Existing drafts**: Scopes that may need review
42
+ - **Dependencies**: Requirements that depend on others
43
+ - **Priority order**: Which requirements should be scoped first
44
+
45
+ ### Step 2: Present Findings
46
+
47
+ Summarize your findings clearly:
48
+ - Total requirements in PRD
49
+ - Scopeable requirements (not yet covered)
50
+ - Existing draft scopes
51
+ - Recommended scope order based on dependencies
52
+
53
+ ### Step 3: Ask User Intent
54
+
55
+ Ask the user: **"What would you like to do?"**
56
+
57
+ Present options:
58
+ 1. **Create new scope** - Start a new scope from PRD requirements
59
+ 2. **Review existing draft** - Improve an existing draft scope
60
+ 3. **Check coverage** - See which requirements need scopes
61
+ 4. **Just checking** - Show summary only
62
+
63
+ Listen for specific requirements they want to scope (e.g., "scope the auth feature").
64
+
65
+ ### Step 4: Create Task List
66
+
67
+ Based on findings and user intent, create a list of tasks:
68
+
69
+ **Task Types:**
70
+ - `task-analyze-prd` - Categorize requirements by priority (non-interactive)
71
+ - `task-recommend` - Recommend scope boundaries (non-interactive)
72
+ - `task-create-scope` - Create scope through Q&A (interactive)
73
+ - `task-review-scope` - Review existing scope (interactive)
74
+ - `task-validate` - Validate scope format (non-interactive)
75
+ - `task-check-deps` - Check dependency ordering (non-interactive)
76
+
77
+ ---
78
+
79
+ ## Output Format
80
+
81
+ Write to: {OUTPUT_FILE}
82
+
83
+ ```json
84
+ {
85
+ "complexity": "S|M|L",
86
+ "assessment": {
87
+ "prd_exists": true,
88
+ "module_count": 5,
89
+ "requirement_count": 23,
90
+ "unscoped_count": 15,
91
+ "draft_scopes": 2,
92
+ "ready_scopes": 1,
93
+ "sent_scopes": 3,
94
+ "completed_scopes": 2,
95
+ "user_intent": "create scope for auth feature"
96
+ },
97
+ "tasks": [
98
+ {
99
+ "id": 1,
100
+ "name": "analyze-requirements",
101
+ "description": "Analyze and categorize PRD requirements",
102
+ "prompt": "task-analyze-prd",
103
+ "interactive": false,
104
+ "context": {
105
+ "modules": ["auth", "users", "payments"]
106
+ }
107
+ },
108
+ {
109
+ "id": 2,
110
+ "name": "recommend-scope",
111
+ "description": "Recommend scope boundaries for auth feature",
112
+ "prompt": "task-recommend",
113
+ "interactive": false,
114
+ "context": {
115
+ "target_feature": "auth",
116
+ "requirements": ["REQ-AUTH-001", "REQ-AUTH-002"]
117
+ }
118
+ },
119
+ {
120
+ "id": 3,
121
+ "name": "create-auth-scope",
122
+ "description": "Create scope for authentication feature",
123
+ "prompt": "task-create-scope",
124
+ "interactive": true,
125
+ "context": {
126
+ "feature": "auth",
127
+ "requirements": ["REQ-AUTH-001", "REQ-AUTH-002"],
128
+ "suggested_id": "SCOPE-001"
129
+ }
130
+ },
131
+ {
132
+ "id": 4,
133
+ "name": "validate-scope",
134
+ "description": "Validate scope format and completeness",
135
+ "prompt": "task-validate",
136
+ "interactive": false,
137
+ "context": {
138
+ "scope_id": "SCOPE-001"
139
+ }
140
+ }
141
+ ]
142
+ }
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Rules
148
+
149
+ - Focus ONLY on scope creation and management
150
+ - Maximum 6 tasks (group related work if needed)
151
+ - Always include validate task for new scopes
152
+ - Recommend scoping in dependency order (dependencies first)
153
+ - Be concise in your analysis - don't overwhelm the user
154
+ - If user says "just checking", output empty tasks array
155
+ - If no PRD requirements exist, suggest user runs `vibe prd` first
156
+
157
+ ---
158
+
159
+ ## Scope ID Convention
160
+
161
+ New scopes should use format: `SCOPE-XXX`
162
+ - Check existing scopes to determine next number
163
+ - Examples: SCOPE-001, SCOPE-002, SCOPE-003
164
+
165
+ ---
166
+
167
+ ## Examples
168
+
169
+ **User says "just checking":**
170
+ ```json
171
+ {
172
+ "complexity": "S",
173
+ "assessment": {...},
174
+ "tasks": []
175
+ }
176
+ ```
177
+
178
+ **User says "create a scope for payments":**
179
+ ```json
180
+ {
181
+ "complexity": "M",
182
+ "assessment": {...},
183
+ "tasks": [
184
+ {"id": 1, "name": "analyze-requirements", "prompt": "task-analyze-prd", "interactive": false, ...},
185
+ {"id": 2, "name": "recommend-payments", "prompt": "task-recommend", "interactive": false, ...},
186
+ {"id": 3, "name": "create-payments-scope", "prompt": "task-create-scope", "interactive": true, ...},
187
+ {"id": 4, "name": "validate-scope", "prompt": "task-validate", "interactive": false, ...}
188
+ ]
189
+ }
190
+ ```
191
+
192
+ **User says "review SCOPE-001":**
193
+ ```json
194
+ {
195
+ "complexity": "S",
196
+ "assessment": {...},
197
+ "tasks": [
198
+ {"id": 1, "name": "review-scope-001", "prompt": "task-review-scope", "interactive": true, "context": {"scope_id": "SCOPE-001"}}
199
+ ]
200
+ }
201
+ ```
@@ -0,0 +1,270 @@
1
+ # Scope Synthesis and Approval
2
+
3
+ ## Variables
4
+
5
+ | Variable | Description | Required |
6
+ |----------|-------------|----------|
7
+ | {PROJECT_PATH} | Path to the project directory | Yes |
8
+ | {TASK_OUTPUTS} | JSON array of task output file paths | Yes |
9
+ | {TOTAL_TASKS} | Number of tasks completed | Yes |
10
+
11
+ ---
12
+
13
+ ## Context
14
+
15
+ You are reviewing all work from the scope operation and getting user approval.
16
+
17
+ Project: {PROJECT_PATH}
18
+ Task outputs: {TASK_OUTPUTS}
19
+ Total tasks: {TOTAL_TASKS}
20
+
21
+ ---
22
+
23
+ ## Your Task
24
+
25
+ Present all scope changes for user approval and apply approved changes.
26
+
27
+ ### Step 1: Load All Task Outputs
28
+
29
+ Read each file in {TASK_OUTPUTS} and combine the results.
30
+
31
+ ### Step 2: Present Summary
32
+
33
+ Show what was created or modified:
34
+
35
+ ```
36
+ +======================================================================+
37
+ | SCOPE CHANGES TO APPLY |
38
+ +======================================================================+
39
+
40
+ NEW SCOPES (1)
41
+ ----------------------------------------------------------------
42
+ SCOPE-003: User Authentication
43
+ Target: backend
44
+ Complexity: M
45
+ Priority: P1
46
+ Requirements: 4
47
+ Acceptance Criteria: 8
48
+
49
+ Summary: Implement JWT-based authentication with login,
50
+ logout, and token refresh endpoints.
51
+
52
+ File: docs/scopes/drafts/SCOPE-003-user-authentication.md
53
+
54
+ UPDATED SCOPES (1)
55
+ ----------------------------------------------------------------
56
+ SCOPE-001: Dashboard Analytics (reviewed)
57
+ Changes:
58
+ - Refined acceptance criteria (3 updated)
59
+ - Added dependency on SCOPE-002
60
+ - Fixed format issues
61
+
62
+ File: docs/scopes/drafts/SCOPE-001-dashboard-analytics.md
63
+
64
+ VALIDATION RESULTS
65
+ ----------------------------------------------------------------
66
+ All scopes pass validation:
67
+ [x] SCOPE-003: Valid ID format
68
+ [x] SCOPE-003: Has required fields
69
+ [x] SCOPE-003: AC uses Given/When/Then
70
+ [x] SCOPE-003: Linked to PRD requirements
71
+
72
+ +======================================================================+
73
+ ```
74
+
75
+ ### Step 3: Get User Decision
76
+
77
+ Ask user:
78
+ - **"Approve"** - Save scope to drafts folder
79
+ - **"Approve and move to ready"** - Save and move to ready/ (approved for sending)
80
+ - **"Edit"** - Let user request specific changes
81
+ - **"Discard"** - Don't save any changes
82
+
83
+ ### Step 4: Apply Approved Changes
84
+
85
+ For approved scopes:
86
+ 1. Write scope file to appropriate directory
87
+ 2. Create `docs/scopes/ready/` directory if needed
88
+ 3. Update coverage tracking if applicable
89
+
90
+ For "Approve and move to ready":
91
+ 1. Write to `docs/scopes/ready/` instead of drafts
92
+ 2. Update scope status to "approved" in the file
93
+
94
+ ### Step 5: Generate Summary
95
+
96
+ After applying changes:
97
+ - List all files created
98
+ - List all files modified
99
+ - Show next steps
100
+
101
+ ---
102
+
103
+ ## Output Format
104
+
105
+ No file output needed - changes are applied directly to scope files.
106
+
107
+ Display to user:
108
+ ```
109
+ Applied changes:
110
+ - Created: docs/scopes/drafts/SCOPE-003-user-authentication.md
111
+ - Modified: docs/scopes/drafts/SCOPE-001-dashboard-analytics.md
112
+
113
+ Next steps:
114
+ - Review scopes: vibe scope --check
115
+ - Send to repo: vibe send SCOPE-003
116
+ - Continue working: vibe scope
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Rules
122
+
123
+ - NEVER apply changes without user approval
124
+ - If user says "discard", don't write ANY files
125
+ - If user says "edit", enter refinement conversation
126
+ - Always validate scope format before saving
127
+ - Use proper directory structure
128
+ - File naming: `SCOPE-XXX-slug-title.md`
129
+
130
+ ---
131
+
132
+ ## Scope File Structure
133
+
134
+ When writing scope files:
135
+
136
+ **File naming:**
137
+ `SCOPE-XXX-kebab-case-title.md`
138
+
139
+ Example: `SCOPE-003-user-authentication.md`
140
+
141
+ **Directory structure:**
142
+ ```
143
+ docs/scopes/
144
+ ├── drafts/ # Work in progress (default)
145
+ ├── ready/ # Approved, waiting to send
146
+ ├── sent/ # Sent to dev repos
147
+ └── completed/ # Implementation done
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Scope Template
153
+
154
+ Use this template when writing scope files:
155
+
156
+ ```markdown
157
+ # SCOPE-XXX: [Feature Title]
158
+
159
+ ## Metadata
160
+
161
+ | Field | Value |
162
+ |-------|-------|
163
+ | **ID** | `SCOPE-XXX` |
164
+ | **Status** | `draft` |
165
+ | **Target** | `frontend` / `backend` / `both` |
166
+ | **Complexity** | `S` / `M` / `L` / `XL` |
167
+ | **Module** | `[requirement-module-name]` |
168
+ | **Priority** | `P1` / `P2` / `P3` |
169
+
170
+ ---
171
+
172
+ ## Summary
173
+
174
+ [2-3 sentences describing what this scope delivers and why it matters]
175
+
176
+ ---
177
+
178
+ ## User Story
179
+
180
+ As a [role/persona],
181
+ I want to [action/capability],
182
+ so that [benefit/value].
183
+
184
+ ---
185
+
186
+ ## Requirements
187
+
188
+ ### Functional Requirements
189
+
190
+ - **REQ-1:** [Requirement from PRD]
191
+ - **REQ-2:** [Requirement from PRD]
192
+
193
+ ### Non-Functional Requirements
194
+
195
+ - **NFR-1:** [Performance, security, etc.]
196
+
197
+ ---
198
+
199
+ ## Acceptance Criteria
200
+
201
+ - **AC-1:** Given [context], when [action], then [expected result]
202
+ - **AC-2:** Given [context], when [action], then [expected result]
203
+
204
+ ---
205
+
206
+ ## Technical Constraints
207
+
208
+ - **C-1:** [Constraint]
209
+
210
+ ---
211
+
212
+ ## Dependencies
213
+
214
+ | Scope | Reason | Blocking |
215
+ |-------|--------|----------|
216
+ | SCOPE-XXX | [Why needed] | Yes/No |
217
+
218
+ ---
219
+
220
+ ## Out of Scope
221
+
222
+ - [Explicit exclusion]
223
+ - [Explicit exclusion]
224
+
225
+ ---
226
+
227
+ ## Implementation Notes
228
+
229
+ ### Suggested Approach
230
+
231
+ [Optional guidance]
232
+
233
+ ### Key Files/Modules
234
+
235
+ - `path/to/relevant/file.ts`
236
+
237
+ ---
238
+
239
+ ## Review Checklist
240
+
241
+ - [ ] Summary is accurate and concise
242
+ - [ ] All requirements have acceptance criteria
243
+ - [ ] Acceptance criteria are testable
244
+ - [ ] Dependencies identified
245
+ - [ ] Out of scope documented
246
+ ```
247
+
248
+ ---
249
+
250
+ ## Approval Flow
251
+
252
+ ```
253
+ User approves as draft
254
+ → Write to docs/scopes/drafts/
255
+ → Status: draft
256
+
257
+ User approves and moves to ready
258
+ → Write to docs/scopes/ready/
259
+ → Status: approved
260
+
261
+ User requests edits
262
+ → Enter refinement loop
263
+ → Ask what to change
264
+ → Make changes
265
+ → Present again
266
+
267
+ User discards
268
+ → Don't write anything
269
+ → Clean up any temp files
270
+ ```