@eskoubar95/spec 0.1.0 → 0.1.3
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/dist/commands/help.d.ts +5 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +23 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +30 -14
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +5 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +88 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +72 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/workspace.d.ts +5 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +17 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/index.js +42 -9
- package/dist/index.js.map +1 -1
- package/dist/lib/backup-cursor.d.ts +16 -0
- package/dist/lib/backup-cursor.d.ts.map +1 -0
- package/dist/lib/backup-cursor.js +50 -0
- package/dist/lib/backup-cursor.js.map +1 -0
- package/dist/lib/copy-template.d.ts +9 -1
- package/dist/lib/copy-template.d.ts.map +1 -1
- package/dist/lib/copy-template.js +94 -3
- package/dist/lib/copy-template.js.map +1 -1
- package/dist/lib/cursor-detection.d.ts +6 -0
- package/dist/lib/cursor-detection.d.ts.map +1 -0
- package/dist/lib/cursor-detection.js +31 -0
- package/dist/lib/cursor-detection.js.map +1 -0
- package/dist/lib/detection.d.ts +25 -0
- package/dist/lib/detection.d.ts.map +1 -0
- package/dist/lib/detection.js +186 -0
- package/dist/lib/detection.js.map +1 -0
- package/dist/lib/install-existing.d.ts +6 -0
- package/dist/lib/install-existing.d.ts.map +1 -0
- package/dist/lib/install-existing.js +63 -0
- package/dist/lib/install-existing.js.map +1 -0
- package/dist/lib/project-name.d.ts +7 -0
- package/dist/lib/project-name.d.ts.map +1 -0
- package/dist/lib/project-name.js +13 -0
- package/dist/lib/project-name.js.map +1 -0
- package/dist/lib/prompts.d.ts +6 -5
- package/dist/lib/prompts.d.ts.map +1 -1
- package/dist/lib/prompts.js +114 -0
- package/dist/lib/prompts.js.map +1 -1
- package/dist/lib/version-check.d.ts +21 -0
- package/dist/lib/version-check.d.ts.map +1 -0
- package/dist/lib/version-check.js +49 -0
- package/dist/lib/version-check.js.map +1 -0
- package/dist/lib/workspace.d.ts +7 -0
- package/dist/lib/workspace.d.ts.map +1 -0
- package/dist/lib/workspace.js +38 -0
- package/dist/lib/workspace.js.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +2 -2
- package/template/.cursor/commands/_shared/activation.md +220 -0
- package/template/.cursor/commands/_shared/coderabbit-integration.md +278 -0
- package/template/.cursor/commands/_shared/command-stacks.md +124 -0
- package/template/.cursor/commands/_shared/deployment-detection.md +294 -0
- package/template/.cursor/commands/_shared/detection.md +277 -0
- package/template/.cursor/commands/_shared/documentation-lookup.md +321 -0
- package/template/.cursor/commands/_shared/git-workflow.md +288 -0
- package/template/.cursor/commands/_shared/github-helpers.md +337 -0
- package/template/.cursor/commands/_shared/github-workflows.md +351 -0
- package/template/.cursor/commands/_shared/helper-metadata.md +481 -0
- package/template/.cursor/commands/_shared/linear-automation.md +388 -0
- package/template/.cursor/commands/_shared/linear-helpers.md +254 -0
- package/template/.cursor/commands/_shared/performance-monitoring.md +369 -0
- package/template/.cursor/commands/_shared/pr-description.md +279 -0
- package/template/.cursor/commands/_shared/retrospective-spec-creation.md +977 -0
- package/template/.cursor/commands/_shared/scaling.md +264 -0
- package/template/.cursor/commands/_shared/state-assertions.md +174 -0
- package/template/.cursor/commands/_shared/test-automation.md +388 -0
- package/template/.cursor/commands/_shared/verification-checkpoints.md +145 -0
- package/template/.cursor/commands/spec/audit.md +240 -0
- package/template/.cursor/commands/spec/evolve.md +163 -0
- package/template/.cursor/commands/spec/sync.md +196 -0
- package/template/.cursor/commands/tools/refactor.md +555 -0
- package/template/.cursor/rules/10-engineering.mdc +149 -0
- package/template/.cursor/rules/11-design.mdc +129 -0
- package/template/.cursor/rules/12-business.mdc +132 -0
- package/template/.cursor/rules/20-nextjs.mdc +146 -0
- package/template/.cursor/rules/21-api-design.mdc +176 -0
- package/template/.cursor/rules/30-database.mdc +183 -0
- package/template/.cursor/rules/31-testing.mdc +191 -0
- package/template/.cursor/scripts/validate-helpers.js +254 -0
- package/template/.sdd/detection-cache.json +1 -0
- package/template/.sdd/install-info.json +1 -0
- package/template/.sdd/version +1 -0
- package/template/spec/00-root-spec.md +8 -1
- package/template/work/backlog/tasks.local.md +92 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
---
|
|
2
|
+
helper_id: scaling
|
|
3
|
+
load_when:
|
|
4
|
+
- task_start
|
|
5
|
+
- spec_plan
|
|
6
|
+
sections:
|
|
7
|
+
workflow_variants:
|
|
8
|
+
title: "Workflow Variants"
|
|
9
|
+
lines: [1, 100]
|
|
10
|
+
complexity:
|
|
11
|
+
title: "Complexity Assessment"
|
|
12
|
+
lines: [101, 200]
|
|
13
|
+
always_load: false
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Scaling Logic
|
|
17
|
+
|
|
18
|
+
Scaling logic adapts workflows based on project size and phase, ensuring appropriate level of detail and process.
|
|
19
|
+
|
|
20
|
+
## Purpose
|
|
21
|
+
|
|
22
|
+
Different project sizes and phases require different workflows:
|
|
23
|
+
- Small projects: Simplified, lightweight process
|
|
24
|
+
- Medium projects: Standard SDD workflow
|
|
25
|
+
- Large projects: Extended, detailed process
|
|
26
|
+
- Enterprise projects: Complex, comprehensive process
|
|
27
|
+
|
|
28
|
+
## Size-Based Workflows
|
|
29
|
+
|
|
30
|
+
### Small Projects (< 50 files, < 10 dependencies)
|
|
31
|
+
|
|
32
|
+
**Spec Structure:**
|
|
33
|
+
- Minimal spec files (00-root-spec.md, 03-risks.md, 04-open-questions.md)
|
|
34
|
+
- Lightweight content, focus on essentials
|
|
35
|
+
- Skip detailed design/infrastructure docs unless critical
|
|
36
|
+
|
|
37
|
+
**Planning:**
|
|
38
|
+
- Simplified milestones (2-3 milestones max)
|
|
39
|
+
- Direct task execution (skip planning for simple tasks)
|
|
40
|
+
- Minimal task breakdown
|
|
41
|
+
|
|
42
|
+
**Validation:**
|
|
43
|
+
- Manual validation only
|
|
44
|
+
- Lightweight checklist
|
|
45
|
+
- Quick verification
|
|
46
|
+
|
|
47
|
+
**Example Workflow:**
|
|
48
|
+
```
|
|
49
|
+
/spec/init → /spec/plan (simplified) → /task/start → /task/validate (manual)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Medium Projects (50-200 files, 10-50 dependencies)
|
|
53
|
+
|
|
54
|
+
**Spec Structure:**
|
|
55
|
+
- Standard spec files (all standard files)
|
|
56
|
+
- Moderate detail level
|
|
57
|
+
- Include design/infrastructure if applicable
|
|
58
|
+
|
|
59
|
+
**Planning:**
|
|
60
|
+
- Standard SDD workflow
|
|
61
|
+
- 3-5 milestones
|
|
62
|
+
- Full task breakdown
|
|
63
|
+
- Standard acceptance criteria
|
|
64
|
+
|
|
65
|
+
**Validation:**
|
|
66
|
+
- Automated checks (linter, build, type check)
|
|
67
|
+
- Manual testing
|
|
68
|
+
- Standard checklist
|
|
69
|
+
|
|
70
|
+
**Example Workflow:**
|
|
71
|
+
```
|
|
72
|
+
/spec/init → /spec/refine → /spec/plan → /task/start → /task/validate
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Large Projects (200-1000 files, 50-200 dependencies)
|
|
76
|
+
|
|
77
|
+
**Spec Structure:**
|
|
78
|
+
- Extended spec (multiple spec files, detailed sections)
|
|
79
|
+
- Comprehensive documentation
|
|
80
|
+
- Design system and infrastructure docs required
|
|
81
|
+
|
|
82
|
+
**Planning:**
|
|
83
|
+
- Detailed planning (milestones, epics, tasks)
|
|
84
|
+
- 5-7 milestones
|
|
85
|
+
- Comprehensive task breakdown
|
|
86
|
+
- Detailed acceptance criteria
|
|
87
|
+
|
|
88
|
+
**Validation:**
|
|
89
|
+
- Comprehensive validation (automated + manual + integration)
|
|
90
|
+
- Full test suite
|
|
91
|
+
- Detailed checklist
|
|
92
|
+
|
|
93
|
+
**Example Workflow:**
|
|
94
|
+
```
|
|
95
|
+
/spec/init → /spec/refine → /spec/plan (detailed) → /task/start → /task/validate (comprehensive)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Enterprise Projects (> 1000 files, > 200 dependencies)
|
|
99
|
+
|
|
100
|
+
**Spec Structure:**
|
|
101
|
+
- Enterprise spec structure (multiple levels, comprehensive docs)
|
|
102
|
+
- Full documentation suite
|
|
103
|
+
- Architecture documentation
|
|
104
|
+
- Design system and infrastructure required
|
|
105
|
+
|
|
106
|
+
**Planning:**
|
|
107
|
+
- Complex planning (programs, epics, milestones, tasks)
|
|
108
|
+
- 7+ milestones
|
|
109
|
+
- Very detailed task breakdown
|
|
110
|
+
- Comprehensive acceptance criteria
|
|
111
|
+
|
|
112
|
+
**Validation:**
|
|
113
|
+
- Full validation suite (automated, manual, integration, performance)
|
|
114
|
+
- Complete test coverage
|
|
115
|
+
- Enterprise checklist
|
|
116
|
+
|
|
117
|
+
**Example Workflow:**
|
|
118
|
+
```
|
|
119
|
+
/spec/init → /spec/refine → /spec/plan (complex) → /task/start → /task/validate (enterprise)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Phase-Based Workflows
|
|
123
|
+
|
|
124
|
+
### Initialization Phase
|
|
125
|
+
|
|
126
|
+
**Characteristics:**
|
|
127
|
+
- New project
|
|
128
|
+
- Empty or initial spec
|
|
129
|
+
- No or minimal code
|
|
130
|
+
|
|
131
|
+
**Workflow:**
|
|
132
|
+
- Full spec → plan → task workflow
|
|
133
|
+
- Comprehensive setup
|
|
134
|
+
- Detailed planning
|
|
135
|
+
|
|
136
|
+
**Commands:**
|
|
137
|
+
- `/spec/init` - Create initial spec
|
|
138
|
+
- `/spec/refine` - Refine spec
|
|
139
|
+
- `/spec/plan` - Create detailed plan
|
|
140
|
+
- `/task/start` - Begin implementation
|
|
141
|
+
|
|
142
|
+
### Expansion Phase
|
|
143
|
+
|
|
144
|
+
**Characteristics:**
|
|
145
|
+
- Active development
|
|
146
|
+
- Growing spec
|
|
147
|
+
- Regular commits
|
|
148
|
+
|
|
149
|
+
**Workflow:**
|
|
150
|
+
- Spec refine → plan → task workflow
|
|
151
|
+
- Feature-focused
|
|
152
|
+
- Incremental planning
|
|
153
|
+
|
|
154
|
+
**Commands:**
|
|
155
|
+
- `/spec/refine` - Refine spec for new feature
|
|
156
|
+
- `/spec/plan` - Plan new feature
|
|
157
|
+
- `/task/start` - Implement feature
|
|
158
|
+
- `/task/validate` - Validate feature
|
|
159
|
+
|
|
160
|
+
### Maintenance Phase
|
|
161
|
+
|
|
162
|
+
**Characteristics:**
|
|
163
|
+
- Stable codebase
|
|
164
|
+
- Stable spec
|
|
165
|
+
- Bugfix/refactor commits
|
|
166
|
+
|
|
167
|
+
**Workflow:**
|
|
168
|
+
- Direct task execution
|
|
169
|
+
- Minimal spec changes
|
|
170
|
+
- Bugfix-focused
|
|
171
|
+
|
|
172
|
+
**Commands:**
|
|
173
|
+
- `/task/start` - Direct task execution (minimal spec changes)
|
|
174
|
+
- `/task/validate` - Validate fix
|
|
175
|
+
- `/spec/evolve` - Update spec if needed
|
|
176
|
+
|
|
177
|
+
### Migration Phase
|
|
178
|
+
|
|
179
|
+
**Characteristics:**
|
|
180
|
+
- Framework upgrade
|
|
181
|
+
- Architecture change
|
|
182
|
+
- Spec updates
|
|
183
|
+
|
|
184
|
+
**Workflow:**
|
|
185
|
+
- Spec update → plan → task workflow
|
|
186
|
+
- Architecture-focused
|
|
187
|
+
- Comprehensive planning
|
|
188
|
+
|
|
189
|
+
**Commands:**
|
|
190
|
+
- `/spec/refine` - Update spec for migration
|
|
191
|
+
- `/spec/plan` - Plan migration tasks
|
|
192
|
+
- `/task/start` - Execute migration
|
|
193
|
+
- `/task/validate` - Validate migration
|
|
194
|
+
|
|
195
|
+
### Legacy Phase
|
|
196
|
+
|
|
197
|
+
**Characteristics:**
|
|
198
|
+
- Existing codebase
|
|
199
|
+
- Old spec
|
|
200
|
+
- Minimal changes
|
|
201
|
+
|
|
202
|
+
**Workflow:**
|
|
203
|
+
- Spec audit → sync → refine workflow
|
|
204
|
+
- Documentation-focused
|
|
205
|
+
- Alignment-focused
|
|
206
|
+
|
|
207
|
+
**Commands:**
|
|
208
|
+
- `/spec/audit` - Audit spec compliance
|
|
209
|
+
- `/spec/sync` - Sync spec with code
|
|
210
|
+
- `/spec/refine` - Refine spec
|
|
211
|
+
- `/spec/evolve` - Evolve spec
|
|
212
|
+
|
|
213
|
+
## Workflow Adaptation
|
|
214
|
+
|
|
215
|
+
**In Commands:**
|
|
216
|
+
|
|
217
|
+
1. **Detect project size and phase** (from detection engine)
|
|
218
|
+
2. **Adapt workflow accordingly:**
|
|
219
|
+
- Small projects: Simplified steps, skip non-essential
|
|
220
|
+
- Medium projects: Standard steps
|
|
221
|
+
- Large projects: Extended steps, more detail
|
|
222
|
+
- Enterprise projects: Comprehensive steps, full detail
|
|
223
|
+
|
|
224
|
+
3. **Adapt to phase:**
|
|
225
|
+
- Initialization: Full workflow
|
|
226
|
+
- Expansion: Feature workflow
|
|
227
|
+
- Maintenance: Direct workflow
|
|
228
|
+
- Migration: Update workflow
|
|
229
|
+
- Legacy: Sync workflow
|
|
230
|
+
|
|
231
|
+
**Example in /spec/plan:**
|
|
232
|
+
|
|
233
|
+
```markdown
|
|
234
|
+
## Adapt Planning to Project Size
|
|
235
|
+
|
|
236
|
+
**Small Projects:**
|
|
237
|
+
- 2-3 milestones max
|
|
238
|
+
- Simplified task breakdown
|
|
239
|
+
- Lightweight acceptance criteria
|
|
240
|
+
|
|
241
|
+
**Medium Projects:**
|
|
242
|
+
- 3-5 milestones
|
|
243
|
+
- Standard task breakdown
|
|
244
|
+
- Standard acceptance criteria
|
|
245
|
+
|
|
246
|
+
**Large Projects:**
|
|
247
|
+
- 5-7 milestones
|
|
248
|
+
- Detailed task breakdown
|
|
249
|
+
- Comprehensive acceptance criteria
|
|
250
|
+
|
|
251
|
+
**Enterprise Projects:**
|
|
252
|
+
- 7+ milestones
|
|
253
|
+
- Very detailed task breakdown
|
|
254
|
+
- Enterprise acceptance criteria
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Usage in Commands
|
|
258
|
+
|
|
259
|
+
All commands should:
|
|
260
|
+
1. Read project size and phase from detection
|
|
261
|
+
2. Adapt workflow steps accordingly
|
|
262
|
+
3. Show adapted workflow to user
|
|
263
|
+
4. Execute with appropriate level of detail
|
|
264
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
helper_id: state-assertions
|
|
3
|
+
load_when:
|
|
4
|
+
- always
|
|
5
|
+
sections:
|
|
6
|
+
mode_boundaries:
|
|
7
|
+
title: "Mode Boundaries"
|
|
8
|
+
lines: [1, 50]
|
|
9
|
+
state_checks:
|
|
10
|
+
title: "State Checks"
|
|
11
|
+
lines: [51, 100]
|
|
12
|
+
always_load: true
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# State Assertions
|
|
16
|
+
|
|
17
|
+
State assertions provide explicit mode, boundaries, and context before each command executes.
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
State assertions ensure:
|
|
22
|
+
- **Explicit Mode**: Clear understanding of current mode
|
|
23
|
+
- **Clear Boundaries**: What will and won't be done
|
|
24
|
+
- **Context Awareness**: Detection results and active rules
|
|
25
|
+
- **Implementation Status**: Whether code changes are allowed
|
|
26
|
+
|
|
27
|
+
## State Assertion Template
|
|
28
|
+
|
|
29
|
+
**Before starting any command, output:**
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## State Assertion (REQUIRED)
|
|
33
|
+
|
|
34
|
+
**SDD MODE:** [Command Name]
|
|
35
|
+
- **Mode:** [Research/Ideation | Refinement | Planning | Execution | Validation]
|
|
36
|
+
- **Recommended Cursor Mode:** [Plan | Ask | Agent | Debug]
|
|
37
|
+
- **Why:** [Explanation of why this mode fits this command]
|
|
38
|
+
- **Alternative:** [Alternative modes if applicable]
|
|
39
|
+
- **Context:** [Detected context from activation system]
|
|
40
|
+
- **Active Rule Sets:**
|
|
41
|
+
- Foundation: [List foundation rules]
|
|
42
|
+
- Domain: [List domain rules]
|
|
43
|
+
- Technology: [List technology rules]
|
|
44
|
+
- **Implementation:** [BLOCKED | AUTHORIZED]
|
|
45
|
+
- **Boundaries:**
|
|
46
|
+
- WILL: [What will be done]
|
|
47
|
+
- WILL NOT: [What will not be done]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Mode Definitions
|
|
51
|
+
|
|
52
|
+
**Research/Ideation:**
|
|
53
|
+
- Understanding and exploration
|
|
54
|
+
- No code changes
|
|
55
|
+
- No spec changes (except initial creation)
|
|
56
|
+
- Focus on questions and clarification
|
|
57
|
+
|
|
58
|
+
**Refinement:**
|
|
59
|
+
- Improving existing specifications
|
|
60
|
+
- No code changes
|
|
61
|
+
- Spec updates only
|
|
62
|
+
- Focus on clarity and precision
|
|
63
|
+
|
|
64
|
+
**Planning:**
|
|
65
|
+
- Creating execution plans
|
|
66
|
+
- No code changes
|
|
67
|
+
- Creating tasks and milestones
|
|
68
|
+
- Focus on structure and traceability
|
|
69
|
+
|
|
70
|
+
**Execution:**
|
|
71
|
+
- Implementing code
|
|
72
|
+
- Code changes allowed
|
|
73
|
+
- Following spec and plan
|
|
74
|
+
- Focus on correctness and scope
|
|
75
|
+
|
|
76
|
+
**Validation:**
|
|
77
|
+
- Verifying completion
|
|
78
|
+
- No new code changes (only fixes)
|
|
79
|
+
- Testing and evidence gathering
|
|
80
|
+
- Focus on quality and completeness
|
|
81
|
+
|
|
82
|
+
## Context from Detection
|
|
83
|
+
|
|
84
|
+
Include detection results in state assertion:
|
|
85
|
+
- Project type (web-app, cli-tool, etc.)
|
|
86
|
+
- Project size (small, medium, large, enterprise)
|
|
87
|
+
- Project phase (initialization, expansion, etc.)
|
|
88
|
+
- Technologies (nextjs, postgres, etc.)
|
|
89
|
+
|
|
90
|
+
## Active Rule Sets
|
|
91
|
+
|
|
92
|
+
List all active rules organized by category:
|
|
93
|
+
- **Foundation:** Always active rules
|
|
94
|
+
- **Domain:** Context-based rules (engineering, design, business)
|
|
95
|
+
- **Technology:** Auto-activated rules (nextjs, api-design, database, etc.)
|
|
96
|
+
|
|
97
|
+
## Implementation Status
|
|
98
|
+
|
|
99
|
+
**BLOCKED:**
|
|
100
|
+
- No code changes allowed
|
|
101
|
+
- Spec/planning mode
|
|
102
|
+
- Research/ideation mode
|
|
103
|
+
|
|
104
|
+
**AUTHORIZED:**
|
|
105
|
+
- Code changes allowed
|
|
106
|
+
- Execution mode
|
|
107
|
+
- After explicit confirmation
|
|
108
|
+
|
|
109
|
+
## Boundaries
|
|
110
|
+
|
|
111
|
+
**WILL:**
|
|
112
|
+
- List what the command will do
|
|
113
|
+
- Be specific and concrete
|
|
114
|
+
- Include detection-based adaptations
|
|
115
|
+
|
|
116
|
+
**WILL NOT:**
|
|
117
|
+
- List what the command will not do
|
|
118
|
+
- Explicitly exclude out-of-scope actions
|
|
119
|
+
- Prevent scope creep
|
|
120
|
+
|
|
121
|
+
## Cursor Mode Recommendations
|
|
122
|
+
|
|
123
|
+
**Recommended Cursor Modes by Command Type:**
|
|
124
|
+
|
|
125
|
+
- **Spec commands** (init, refine, plan, evolve, sync): **Plan mode** - Creates/updates spec files without code changes
|
|
126
|
+
- **Spec audit:** **Debug mode** - For runtime evidence and debugging, **Plan mode** as alternative for static analysis
|
|
127
|
+
- **Task start:** **Agent mode** - For code changes and implementation, **Plan mode** as alternative for planning only
|
|
128
|
+
- **Task validate:** **Debug mode** - For debugging issues, **Plan mode** as alternative for validation only
|
|
129
|
+
|
|
130
|
+
**Why Cursor Mode Matters:**
|
|
131
|
+
- **Plan mode:** Optimal for spec/planning work, no code changes
|
|
132
|
+
- **Ask mode:** Read-only exploration and understanding
|
|
133
|
+
- **Agent mode:** Full code changes and implementation
|
|
134
|
+
- **Debug mode:** Runtime analysis, debugging, and evidence gathering
|
|
135
|
+
|
|
136
|
+
## Self-Correction Protocol
|
|
137
|
+
|
|
138
|
+
**Common Mistakes to Detect:**
|
|
139
|
+
|
|
140
|
+
1. **Mode Mixing:**
|
|
141
|
+
- DETECT: Suggesting code during spec mode, or introducing spec concerns during task mode
|
|
142
|
+
- CORRECT: "I apologize - I was [mixing modes]. Let me return to [correct mode]."
|
|
143
|
+
- EXAMPLE: During /spec/init, if suggesting implementation → "I apologize - I was introducing execution concerns. Let me return to specification mode."
|
|
144
|
+
|
|
145
|
+
2. **Scope Creep:**
|
|
146
|
+
- DETECT: Adding features not in spec, expanding beyond defined boundaries
|
|
147
|
+
- CORRECT: "I apologize - I was expanding scope. Let me return to the defined scope."
|
|
148
|
+
- EXAMPLE: During /task/start, if adding features not in task → "I apologize - I was expanding scope beyond the task definition. Let me return to the defined task scope."
|
|
149
|
+
|
|
150
|
+
3. **Assumption Making:**
|
|
151
|
+
- DETECT: Guessing instead of asking, making assumptions not in spec
|
|
152
|
+
- CORRECT: "I apologize - I was making assumptions. Let me ask for clarification."
|
|
153
|
+
- EXAMPLE: During /spec/init, if guessing user preferences → "I apologize - I was making assumptions about [assumption]. Let me ask for clarification."
|
|
154
|
+
|
|
155
|
+
4. **Skipping Validation:**
|
|
156
|
+
- DETECT: Skipping validation steps, proceeding without acceptance criteria
|
|
157
|
+
- CORRECT: "I apologize - I was skipping validation. Let me return to validation steps."
|
|
158
|
+
- EXAMPLE: During /task/validate, if skipping checks → "I apologize - I was skipping validation steps. Let me return to the validation checklist."
|
|
159
|
+
|
|
160
|
+
**Protocol:**
|
|
161
|
+
1. **DETECT:** Recognize the mistake immediately
|
|
162
|
+
2. **STOP:** Immediately halt execution
|
|
163
|
+
3. **CORRECT:** Acknowledge mistake explicitly with specific correction
|
|
164
|
+
4. **RESUME:** Continue correctly from point of error
|
|
165
|
+
|
|
166
|
+
## Usage in Commands
|
|
167
|
+
|
|
168
|
+
All commands must:
|
|
169
|
+
1. Output state assertion before starting
|
|
170
|
+
2. Include detection results
|
|
171
|
+
3. Include active rule sets
|
|
172
|
+
4. Explicitly state boundaries
|
|
173
|
+
5. Follow self-correction protocol if violated
|
|
174
|
+
|