@raftlabs/raftstack 1.9.2 → 1.10.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/.claude/commands/raftstack/_planning-protocol.md +216 -0
- package/.claude/commands/raftstack/discover.md +53 -9
- package/.claude/commands/raftstack/help.md +63 -23
- package/.claude/commands/raftstack/index.md +49 -22
- package/.claude/commands/raftstack/init-context.md +54 -9
- package/.claude/commands/raftstack/inject.md +58 -11
- package/.claude/commands/raftstack/shape.md +112 -27
- package/.claude/settings.json +25 -1
- package/.claude/skills/tdd/SKILL.md +586 -0
- package/dist/cli.js +505 -44
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Surface relevant standards and skills for the current work context.
|
|
4
4
|
|
|
5
|
+
## 🔒 Planning Protocol
|
|
6
|
+
|
|
7
|
+
This command follows the RaftStack Planning Protocol:
|
|
8
|
+
- **No file modifications** - This command is read-only (context injection for planning)
|
|
9
|
+
- If user wants to implement after injecting context, recommend `/raftstack/shape [task]`
|
|
10
|
+
- That command will handle planning and approval gates
|
|
11
|
+
|
|
12
|
+
**Reference:** See `_planning-protocol.md` for full protocol details.
|
|
13
|
+
|
|
5
14
|
## Arguments
|
|
6
15
|
|
|
7
16
|
- `$ARGUMENTS` - (Optional) Specific domain or task context (e.g., "React component", "API endpoint", "database migration")
|
|
@@ -15,6 +24,15 @@ Surface relevant standards and skills for the current work context.
|
|
|
15
24
|
|
|
16
25
|
Never use plain text questions - always use the structured `AskUserQuestion` tool.
|
|
17
26
|
|
|
27
|
+
## Important Note About Implementation
|
|
28
|
+
|
|
29
|
+
**This command does NOT implement code.** It only surfaces relevant context for planning.
|
|
30
|
+
|
|
31
|
+
After injecting context, if the user wants to proceed with implementation:
|
|
32
|
+
1. Recommend running `/raftstack/shape [task description]`
|
|
33
|
+
2. The shape command will plan the work and require approval before implementation
|
|
34
|
+
3. Never proceed directly to implementation from this command
|
|
35
|
+
|
|
18
36
|
## Phase 1: Context Detection
|
|
19
37
|
|
|
20
38
|
If no specific context provided, infer from:
|
|
@@ -39,30 +57,30 @@ If context is unclear, use `AskUserQuestion`:
|
|
|
39
57
|
|
|
40
58
|
## Phase 2: Standards Discovery
|
|
41
59
|
|
|
42
|
-
Scan for standards files
|
|
60
|
+
Scan for standards files:
|
|
43
61
|
|
|
44
|
-
1. **
|
|
62
|
+
1. **Canonical locations:**
|
|
45
63
|
- `.claude/standards/` and subdirectories
|
|
46
|
-
- `
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
- `.claude/context/constitution.md`
|
|
65
|
+
|
|
66
|
+
2. **Legacy fallback (suggest migration):**
|
|
67
|
+
- `docs/standards/`, `standards/`, `*.standard.md`
|
|
68
|
+
- `CONSTITUTION.md`, `docs/constitution.md`
|
|
69
|
+
|
|
70
|
+
If found at legacy locations, suggest migration to `.claude/`.
|
|
49
71
|
|
|
50
|
-
|
|
72
|
+
3. **Match by domain:**
|
|
51
73
|
- React work → look for component, state, hooks standards
|
|
52
74
|
- API work → look for route, validation, error standards
|
|
53
75
|
- Database work → look for schema, query, migration standards
|
|
54
76
|
|
|
55
|
-
3. **Check for constitution/context:**
|
|
56
|
-
- `.claude/context/constitution.md`
|
|
57
|
-
- `CONSTITUTION.md`
|
|
58
|
-
- `docs/constitution.md`
|
|
59
|
-
|
|
60
77
|
## Phase 3: Skills Matching
|
|
61
78
|
|
|
62
79
|
Based on the detected domain, identify relevant RaftStack skills:
|
|
63
80
|
|
|
64
81
|
| Domain | Skill | Path |
|
|
65
82
|
|--------|-------|------|
|
|
83
|
+
| Testing/TDD | Test-Driven Development | `.claude/skills/tdd/SKILL.md` |
|
|
66
84
|
| React/Frontend | React Development | `.claude/skills/react/SKILL.md` |
|
|
67
85
|
| API/Backend | Backend Development | `.claude/skills/backend/SKILL.md` |
|
|
68
86
|
| Database | Database Design | `.claude/skills/database/SKILL.md` |
|
|
@@ -70,6 +88,28 @@ Based on the detected domain, identify relevant RaftStack skills:
|
|
|
70
88
|
| General | Code Quality | `.claude/skills/code-quality/SKILL.md` |
|
|
71
89
|
| Asana Integration | Asana Workflow | `.claude/skills/asana/SKILL.md` |
|
|
72
90
|
|
|
91
|
+
## Phase 3.5: Plugin Recommendations
|
|
92
|
+
|
|
93
|
+
Based on the detected domain, identify required Claude Code plugins:
|
|
94
|
+
|
|
95
|
+
### Plugin Enforcement Matrix
|
|
96
|
+
|
|
97
|
+
| Domain | Plugin | Skill/Tool | When to Trigger |
|
|
98
|
+
|--------|--------|------------|-----------------|
|
|
99
|
+
| React/Frontend/JSX | `frontend-design` | `/frontend-design` skill | Any UI component, JSX, CSS work |
|
|
100
|
+
| React/Frontend/JSX | `figma` | `/implement-design` | Figma files to code |
|
|
101
|
+
| Testing | `playwright` | Browser tools | E2E tests, browser automation |
|
|
102
|
+
| Testing | `superpowers` | `/tdd` skill | Test-driven development |
|
|
103
|
+
| Research/Documentation | `context7` | Documentation lookup | Getting library docs, API references |
|
|
104
|
+
| Code Review | `code-review` | `/code-review` | Before commits, PR creation |
|
|
105
|
+
| Code Review | `pr-review-toolkit` | `/review-pr` | Specialized review agents |
|
|
106
|
+
| Git/Commits | `commit-commands` | `/commit`, `/commit-push-pr` | Any git operations |
|
|
107
|
+
| Git/Commits | `github` | GitHub tools | Issue/PR management |
|
|
108
|
+
| Backend/API | `security-guidance` | Security warnings | API routes, handlers, auth |
|
|
109
|
+
| Deployment | `vercel` | Vercel tools | Deployment-related tasks |
|
|
110
|
+
| Project Management | `linear` | Linear tools | Task tracking with Linear |
|
|
111
|
+
| Project Management | `asana` | Asana tools | Task tracking with Asana |
|
|
112
|
+
|
|
73
113
|
## Phase 4: Context-Aware Summary
|
|
74
114
|
|
|
75
115
|
Present the injected context as a structured summary:
|
|
@@ -89,6 +129,13 @@ Present the injected context as a structured summary:
|
|
|
89
129
|
| [Name] | `[Path]` | [Trigger condition] |
|
|
90
130
|
| [Name] | `[Path]` | [Trigger condition] |
|
|
91
131
|
|
|
132
|
+
### 🔌 Recommended Plugins
|
|
133
|
+
| Plugin | Purpose | Skill to Use |
|
|
134
|
+
|--------|---------|--------------|
|
|
135
|
+
| [plugin] | [why needed for this domain] | `/[skill-name]` or [tool description] |
|
|
136
|
+
|
|
137
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
138
|
+
|
|
92
139
|
### Quick Reference (Most Important Rules)
|
|
93
140
|
1. **[Rule]** - [Brief explanation]
|
|
94
141
|
2. **[Rule]** - [Brief explanation]
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Plan a feature or task with scale-adaptive depth. Simple tasks get quick flow, complex tasks get full specs.
|
|
4
4
|
|
|
5
|
+
## 🔒 Planning Protocol
|
|
6
|
+
|
|
7
|
+
This command follows the RaftStack Planning Protocol:
|
|
8
|
+
- All changes are planned before implementation
|
|
9
|
+
- User approval is required before any file modifications
|
|
10
|
+
- Use `AskUserQuestion` for all approval gates
|
|
11
|
+
|
|
12
|
+
**Reference:** See `_planning-protocol.md` for full protocol details.
|
|
13
|
+
|
|
5
14
|
## Arguments
|
|
6
15
|
|
|
7
16
|
- `$ARGUMENTS` - Description of the feature or task to plan
|
|
@@ -13,6 +22,7 @@ Plan a feature or task with scale-adaptive depth. Simple tasks get quick flow, c
|
|
|
13
22
|
- Location negotiation
|
|
14
23
|
- Option selection
|
|
15
24
|
- Clarification questions
|
|
25
|
+
- **Implementation approval** (required before any file operations)
|
|
16
26
|
|
|
17
27
|
Never use plain text questions - always use the structured `AskUserQuestion` tool.
|
|
18
28
|
|
|
@@ -63,12 +73,14 @@ After assessment, use `AskUserQuestion` to confirm the complexity level:
|
|
|
63
73
|
|
|
64
74
|
## Phase 2: Execute Based on Scale
|
|
65
75
|
|
|
76
|
+
**IMPORTANT:** Each flow level (Quick/Light/Full) MUST include an approval gate before implementation.
|
|
77
|
+
|
|
66
78
|
### Quick Flow (Simple Tasks)
|
|
67
79
|
|
|
68
80
|
1. Clarify scope in 2-3 sentences
|
|
69
81
|
2. Identify the file(s) to change
|
|
70
82
|
3. Describe the change briefly
|
|
71
|
-
4.
|
|
83
|
+
4. **WAIT FOR APPROVAL** - Do NOT implement yet
|
|
72
84
|
|
|
73
85
|
Output format:
|
|
74
86
|
```markdown
|
|
@@ -80,13 +92,34 @@ Output format:
|
|
|
80
92
|
**Scope:** [What needs to change]
|
|
81
93
|
**Files:** [1-2 files]
|
|
82
94
|
**Approach:** [Brief description]
|
|
95
|
+
**Tests First:** [What test to write before implementation]
|
|
83
96
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
97
|
+
### 🔌 Use These Plugins
|
|
98
|
+
- [Plugin based on domain detected]
|
|
99
|
+
- `tdd` (mandatory for all implementation work)
|
|
87
100
|
```
|
|
88
101
|
|
|
89
|
-
|
|
102
|
+
#### ⚠️ PLANNING GATE (Quick Flow)
|
|
103
|
+
|
|
104
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
105
|
+
|
|
106
|
+
Before implementing:
|
|
107
|
+
|
|
108
|
+
1. **Present the Plan Above** (already done)
|
|
109
|
+
|
|
110
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
111
|
+
- [A] Proceed to implement (Recommended)
|
|
112
|
+
- [B] Add more detail
|
|
113
|
+
- [C] Change approach
|
|
114
|
+
- [D] Cancel
|
|
115
|
+
|
|
116
|
+
3. **Implementation Rules:**
|
|
117
|
+
- ✅ Wait for explicit [A] selection
|
|
118
|
+
- ✅ If [B] selected, provide more detail and re-present
|
|
119
|
+
- ✅ If [C] selected, revise approach and re-present
|
|
120
|
+
- ❌ Never skip approval
|
|
121
|
+
- ❌ Never implement without [A] selection
|
|
122
|
+
- ❌ Never create/modify files before approval
|
|
90
123
|
|
|
91
124
|
### Light Spec (Medium Tasks)
|
|
92
125
|
|
|
@@ -94,6 +127,7 @@ Use `AskUserQuestion` for options.
|
|
|
94
127
|
2. Identify related code patterns to follow
|
|
95
128
|
3. List files to create/modify
|
|
96
129
|
4. Note any standards to apply
|
|
130
|
+
5. **WAIT FOR APPROVAL** - Do NOT implement yet
|
|
97
131
|
|
|
98
132
|
Output format:
|
|
99
133
|
```markdown
|
|
@@ -109,18 +143,46 @@ Output format:
|
|
|
109
143
|
[Reference similar code in the codebase to follow]
|
|
110
144
|
|
|
111
145
|
### Implementation Plan
|
|
112
|
-
1.
|
|
113
|
-
2. [
|
|
114
|
-
3.
|
|
146
|
+
1. Write failing test for [core behavior]
|
|
147
|
+
2. Implement [step with file path]
|
|
148
|
+
3. Verify test passes
|
|
149
|
+
4. Add edge case tests
|
|
150
|
+
|
|
151
|
+
### 🔌 Plugins to Use
|
|
152
|
+
| Plugin | Purpose | When |
|
|
153
|
+
|--------|---------|------|
|
|
154
|
+
| `tdd` | Test-first development | All implementation work (mandatory) |
|
|
155
|
+
| [Plugin] | [Why needed] | [Trigger condition] |
|
|
156
|
+
|
|
157
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
115
158
|
|
|
116
159
|
### Standards to Apply
|
|
117
160
|
- [Reference any discovered standards: @.claude/standards/...]
|
|
118
161
|
- [Reference any skills: @.claude/skills/...]
|
|
119
|
-
|
|
120
|
-
**Your options:** [A] Proceed to implement [B] Save spec to file [C] Modify plan [D] Upgrade to full spec
|
|
121
162
|
```
|
|
122
163
|
|
|
123
|
-
|
|
164
|
+
#### ⚠️ PLANNING GATE (Light Spec)
|
|
165
|
+
|
|
166
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
167
|
+
|
|
168
|
+
Before implementing:
|
|
169
|
+
|
|
170
|
+
1. **Present the Plan Above** (already done)
|
|
171
|
+
|
|
172
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
173
|
+
- [A] Proceed to implement (Recommended)
|
|
174
|
+
- [B] Save spec to file
|
|
175
|
+
- [C] Modify plan
|
|
176
|
+
- [D] Upgrade to full spec
|
|
177
|
+
|
|
178
|
+
3. **Implementation Rules:**
|
|
179
|
+
- ✅ Wait for explicit [A] selection
|
|
180
|
+
- ✅ If [B] selected, save spec and await further instructions
|
|
181
|
+
- ✅ If [C] selected, revise plan and re-present
|
|
182
|
+
- ✅ If [D] selected, transition to Full Spec workflow
|
|
183
|
+
- ❌ Never skip approval
|
|
184
|
+
- ❌ Never implement without [A] selection
|
|
185
|
+
- ❌ Never create/modify files before approval
|
|
124
186
|
|
|
125
187
|
### Full Spec (Complex Tasks)
|
|
126
188
|
|
|
@@ -142,17 +204,15 @@ Use `AskUserQuestion` for options.
|
|
|
142
204
|
- Error handling strategy
|
|
143
205
|
|
|
144
206
|
4. **Break into phases:**
|
|
145
|
-
- Phase 1: Core
|
|
146
|
-
- Phase 2:
|
|
147
|
-
- Phase 3:
|
|
207
|
+
- Phase 1: Core tests (TDD) - [N test files]
|
|
208
|
+
- Phase 2: Core functionality - [N files]
|
|
209
|
+
- Phase 3: Edge cases/polish - [N files]
|
|
148
210
|
|
|
149
|
-
5. **
|
|
211
|
+
5. **Spec folder location:**
|
|
150
212
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
- Option C: `specs/[feature-slug]/` - At project root
|
|
155
|
-
- Option D: Other (let user specify)
|
|
213
|
+
Specs are always saved at: `.claude/specs/{YYYY-MM-DD-HHMM}-{feature-slug}/`
|
|
214
|
+
|
|
215
|
+
**Note:** For business requirements (PRD, user stories), use `docs/prd/` instead.
|
|
156
216
|
|
|
157
217
|
## Full Spec Folder Structure
|
|
158
218
|
|
|
@@ -204,6 +264,13 @@ After creating the spec folder, present:
|
|
|
204
264
|
- **references.md:** [N] similar patterns found
|
|
205
265
|
- **architecture.md:** Technical design
|
|
206
266
|
|
|
267
|
+
### 🔌 Plugins & Skills
|
|
268
|
+
| Plugin | Purpose | When |
|
|
269
|
+
|--------|---------|------|
|
|
270
|
+
| [Plugin] | [Why needed] | [Trigger condition] |
|
|
271
|
+
|
|
272
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
273
|
+
|
|
207
274
|
### 🔍 Implementation Phases
|
|
208
275
|
1. **Phase 1:** [Core functionality] - [N files]
|
|
209
276
|
2. **Phase 2:** [Edge cases] - [N files]
|
|
@@ -213,22 +280,40 @@ After creating the spec folder, present:
|
|
|
213
280
|
- [Risk or complexity] - **Mitigation:** [How to handle]
|
|
214
281
|
- [Dependency or blocker] - **Status:** [Current state]
|
|
215
282
|
|
|
216
|
-
###
|
|
283
|
+
### 📁 Spec Location
|
|
217
284
|
Spec folder created at: `{path}`
|
|
218
|
-
|
|
219
|
-
**Your options:** [A] Start implementation [B] Review spec files [C] Modify architecture [D] Add more detail
|
|
220
285
|
```
|
|
221
286
|
|
|
222
|
-
|
|
287
|
+
#### ⚠️ PLANNING GATE (Full Spec)
|
|
288
|
+
|
|
289
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
290
|
+
|
|
291
|
+
Before implementing:
|
|
292
|
+
|
|
293
|
+
1. **Present the Plan Above** (already done)
|
|
294
|
+
|
|
295
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
296
|
+
- [A] Start implementation (Recommended)
|
|
297
|
+
- [B] Review spec files in detail
|
|
298
|
+
- [C] Modify architecture
|
|
299
|
+
- [D] Add more detail
|
|
300
|
+
|
|
301
|
+
3. **Implementation Rules:**
|
|
302
|
+
- ✅ Wait for explicit [A] selection
|
|
303
|
+
- ✅ If [B] selected, review spec files and re-present
|
|
304
|
+
- ✅ If [C] selected, revise architecture and re-present
|
|
305
|
+
- ✅ If [D] selected, expand spec and re-present
|
|
306
|
+
- ❌ Never skip approval
|
|
307
|
+
- ❌ Never implement without [A] selection
|
|
308
|
+
- ❌ Never create/modify code files before approval
|
|
309
|
+
- ✅ Spec folder creation is allowed (it's planning, not implementation)
|
|
223
310
|
|
|
224
311
|
## Phase 3: Standards Injection
|
|
225
312
|
|
|
226
313
|
Before finalizing the plan, check for relevant standards and skills:
|
|
227
314
|
|
|
228
|
-
1. Scan for standards
|
|
315
|
+
1. Scan for standards at canonical location:
|
|
229
316
|
- `.claude/standards/`
|
|
230
|
-
- `docs/standards/`
|
|
231
|
-
- Project root (`*.standard.md`)
|
|
232
317
|
|
|
233
318
|
2. Identify relevant skills based on the task domain:
|
|
234
319
|
- React work → `@.claude/skills/react/SKILL.md`
|
package/.claude/settings.json
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"model": "opusplan"
|
|
2
|
+
"model": "opusplan",
|
|
3
|
+
"enabledPlugins": {
|
|
4
|
+
"frontend-design@claude-plugins-official": true,
|
|
5
|
+
"context7@claude-plugins-official": true,
|
|
6
|
+
"code-review@claude-plugins-official": true,
|
|
7
|
+
"github@claude-plugins-official": true,
|
|
8
|
+
"feature-dev@claude-plugins-official": true,
|
|
9
|
+
"typescript-lsp@claude-plugins-official": true,
|
|
10
|
+
"code-simplifier@claude-plugins-official": true,
|
|
11
|
+
"ralph-loop@claude-plugins-official": true,
|
|
12
|
+
"commit-commands@claude-plugins-official": true,
|
|
13
|
+
"playwright@claude-plugins-official": true,
|
|
14
|
+
"security-guidance@claude-plugins-official": true,
|
|
15
|
+
"pr-review-toolkit@claude-plugins-official": true,
|
|
16
|
+
"figma@claude-plugins-official": true,
|
|
17
|
+
"superpowers@claude-plugins-official": true,
|
|
18
|
+
"explanatory-output-style@claude-plugins-official": true,
|
|
19
|
+
"linear@claude-plugins-official": true,
|
|
20
|
+
"learning-output-style@claude-plugins-official": true,
|
|
21
|
+
"vercel@claude-plugins-official": true,
|
|
22
|
+
"asana@claude-plugins-official": true,
|
|
23
|
+
"claude-md-management@claude-plugins-official": true,
|
|
24
|
+
"claude-code-setup@claude-plugins-official": true,
|
|
25
|
+
"document-skills@anthropic-agent-skills": true
|
|
26
|
+
}
|
|
3
27
|
}
|