@raftlabs/raftstack 1.9.2 → 1.9.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/.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 +57 -11
- package/.claude/commands/raftstack/shape.md +102 -21
- package/.claude/settings.json +25 -1
- package/dist/cli.js +1 -1
- 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,24 +57,23 @@ 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:
|
|
@@ -70,6 +87,28 @@ Based on the detected domain, identify relevant RaftStack skills:
|
|
|
70
87
|
| General | Code Quality | `.claude/skills/code-quality/SKILL.md` |
|
|
71
88
|
| Asana Integration | Asana Workflow | `.claude/skills/asana/SKILL.md` |
|
|
72
89
|
|
|
90
|
+
## Phase 3.5: Plugin Recommendations
|
|
91
|
+
|
|
92
|
+
Based on the detected domain, identify required Claude Code plugins:
|
|
93
|
+
|
|
94
|
+
### Plugin Enforcement Matrix
|
|
95
|
+
|
|
96
|
+
| Domain | Plugin | Skill/Tool | When to Trigger |
|
|
97
|
+
|--------|--------|------------|-----------------|
|
|
98
|
+
| React/Frontend/JSX | `frontend-design` | `/frontend-design` skill | Any UI component, JSX, CSS work |
|
|
99
|
+
| React/Frontend/JSX | `figma` | `/implement-design` | Figma files to code |
|
|
100
|
+
| Testing | `playwright` | Browser tools | E2E tests, browser automation |
|
|
101
|
+
| Testing | `superpowers` | `/tdd` skill | Test-driven development |
|
|
102
|
+
| Research/Documentation | `context7` | Documentation lookup | Getting library docs, API references |
|
|
103
|
+
| Code Review | `code-review` | `/code-review` | Before commits, PR creation |
|
|
104
|
+
| Code Review | `pr-review-toolkit` | `/review-pr` | Specialized review agents |
|
|
105
|
+
| Git/Commits | `commit-commands` | `/commit`, `/commit-push-pr` | Any git operations |
|
|
106
|
+
| Git/Commits | `github` | GitHub tools | Issue/PR management |
|
|
107
|
+
| Backend/API | `security-guidance` | Security warnings | API routes, handlers, auth |
|
|
108
|
+
| Deployment | `vercel` | Vercel tools | Deployment-related tasks |
|
|
109
|
+
| Project Management | `linear` | Linear tools | Task tracking with Linear |
|
|
110
|
+
| Project Management | `asana` | Asana tools | Task tracking with Asana |
|
|
111
|
+
|
|
73
112
|
## Phase 4: Context-Aware Summary
|
|
74
113
|
|
|
75
114
|
Present the injected context as a structured summary:
|
|
@@ -89,6 +128,13 @@ Present the injected context as a structured summary:
|
|
|
89
128
|
| [Name] | `[Path]` | [Trigger condition] |
|
|
90
129
|
| [Name] | `[Path]` | [Trigger condition] |
|
|
91
130
|
|
|
131
|
+
### 🔌 Recommended Plugins
|
|
132
|
+
| Plugin | Purpose | Skill to Use |
|
|
133
|
+
|--------|---------|--------------|
|
|
134
|
+
| [plugin] | [why needed for this domain] | `/[skill-name]` or [tool description] |
|
|
135
|
+
|
|
136
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
137
|
+
|
|
92
138
|
### Quick Reference (Most Important Rules)
|
|
93
139
|
1. **[Rule]** - [Brief explanation]
|
|
94
140
|
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
|
|
@@ -81,12 +93,31 @@ Output format:
|
|
|
81
93
|
**Files:** [1-2 files]
|
|
82
94
|
**Approach:** [Brief description]
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
**Your options:** [A] Proceed to implement [B] Add more detail [C] Change approach [D] Cancel
|
|
96
|
+
### 🔌 Use These Plugins
|
|
97
|
+
- [Plugin based on domain detected]
|
|
87
98
|
```
|
|
88
99
|
|
|
89
|
-
|
|
100
|
+
#### ⚠️ PLANNING GATE (Quick Flow)
|
|
101
|
+
|
|
102
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
103
|
+
|
|
104
|
+
Before implementing:
|
|
105
|
+
|
|
106
|
+
1. **Present the Plan Above** (already done)
|
|
107
|
+
|
|
108
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
109
|
+
- [A] Proceed to implement (Recommended)
|
|
110
|
+
- [B] Add more detail
|
|
111
|
+
- [C] Change approach
|
|
112
|
+
- [D] Cancel
|
|
113
|
+
|
|
114
|
+
3. **Implementation Rules:**
|
|
115
|
+
- ✅ Wait for explicit [A] selection
|
|
116
|
+
- ✅ If [B] selected, provide more detail and re-present
|
|
117
|
+
- ✅ If [C] selected, revise approach and re-present
|
|
118
|
+
- ❌ Never skip approval
|
|
119
|
+
- ❌ Never implement without [A] selection
|
|
120
|
+
- ❌ Never create/modify files before approval
|
|
90
121
|
|
|
91
122
|
### Light Spec (Medium Tasks)
|
|
92
123
|
|
|
@@ -94,6 +125,7 @@ Use `AskUserQuestion` for options.
|
|
|
94
125
|
2. Identify related code patterns to follow
|
|
95
126
|
3. List files to create/modify
|
|
96
127
|
4. Note any standards to apply
|
|
128
|
+
5. **WAIT FOR APPROVAL** - Do NOT implement yet
|
|
97
129
|
|
|
98
130
|
Output format:
|
|
99
131
|
```markdown
|
|
@@ -113,14 +145,40 @@ Output format:
|
|
|
113
145
|
2. [Step with file path]
|
|
114
146
|
3. [Step with file path]
|
|
115
147
|
|
|
148
|
+
### 🔌 Plugins to Use
|
|
149
|
+
| Plugin | Purpose | When |
|
|
150
|
+
|--------|---------|------|
|
|
151
|
+
| [Plugin] | [Why needed] | [Trigger condition] |
|
|
152
|
+
|
|
153
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
154
|
+
|
|
116
155
|
### Standards to Apply
|
|
117
156
|
- [Reference any discovered standards: @.claude/standards/...]
|
|
118
157
|
- [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
158
|
```
|
|
122
159
|
|
|
123
|
-
|
|
160
|
+
#### ⚠️ PLANNING GATE (Light Spec)
|
|
161
|
+
|
|
162
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
163
|
+
|
|
164
|
+
Before implementing:
|
|
165
|
+
|
|
166
|
+
1. **Present the Plan Above** (already done)
|
|
167
|
+
|
|
168
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
169
|
+
- [A] Proceed to implement (Recommended)
|
|
170
|
+
- [B] Save spec to file
|
|
171
|
+
- [C] Modify plan
|
|
172
|
+
- [D] Upgrade to full spec
|
|
173
|
+
|
|
174
|
+
3. **Implementation Rules:**
|
|
175
|
+
- ✅ Wait for explicit [A] selection
|
|
176
|
+
- ✅ If [B] selected, save spec and await further instructions
|
|
177
|
+
- ✅ If [C] selected, revise plan and re-present
|
|
178
|
+
- ✅ If [D] selected, transition to Full Spec workflow
|
|
179
|
+
- ❌ Never skip approval
|
|
180
|
+
- ❌ Never implement without [A] selection
|
|
181
|
+
- ❌ Never create/modify files before approval
|
|
124
182
|
|
|
125
183
|
### Full Spec (Complex Tasks)
|
|
126
184
|
|
|
@@ -146,13 +204,11 @@ Use `AskUserQuestion` for options.
|
|
|
146
204
|
- Phase 2: Edge cases/polish
|
|
147
205
|
- Phase 3: Testing/docs
|
|
148
206
|
|
|
149
|
-
5. **
|
|
207
|
+
5. **Spec folder location:**
|
|
150
208
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
- Option C: `specs/[feature-slug]/` - At project root
|
|
155
|
-
- Option D: Other (let user specify)
|
|
209
|
+
Specs are always saved at: `.claude/specs/{YYYY-MM-DD-HHMM}-{feature-slug}/`
|
|
210
|
+
|
|
211
|
+
**Note:** For business requirements (PRD, user stories), use `docs/prd/` instead.
|
|
156
212
|
|
|
157
213
|
## Full Spec Folder Structure
|
|
158
214
|
|
|
@@ -204,6 +260,13 @@ After creating the spec folder, present:
|
|
|
204
260
|
- **references.md:** [N] similar patterns found
|
|
205
261
|
- **architecture.md:** Technical design
|
|
206
262
|
|
|
263
|
+
### 🔌 Plugins & Skills
|
|
264
|
+
| Plugin | Purpose | When |
|
|
265
|
+
|--------|---------|------|
|
|
266
|
+
| [Plugin] | [Why needed] | [Trigger condition] |
|
|
267
|
+
|
|
268
|
+
**Important:** Always use `context7` when researching libraries or getting documentation.
|
|
269
|
+
|
|
207
270
|
### 🔍 Implementation Phases
|
|
208
271
|
1. **Phase 1:** [Core functionality] - [N files]
|
|
209
272
|
2. **Phase 2:** [Edge cases] - [N files]
|
|
@@ -213,22 +276,40 @@ After creating the spec folder, present:
|
|
|
213
276
|
- [Risk or complexity] - **Mitigation:** [How to handle]
|
|
214
277
|
- [Dependency or blocker] - **Status:** [Current state]
|
|
215
278
|
|
|
216
|
-
###
|
|
279
|
+
### 📁 Spec Location
|
|
217
280
|
Spec folder created at: `{path}`
|
|
218
|
-
|
|
219
|
-
**Your options:** [A] Start implementation [B] Review spec files [C] Modify architecture [D] Add more detail
|
|
220
281
|
```
|
|
221
282
|
|
|
222
|
-
|
|
283
|
+
#### ⚠️ PLANNING GATE (Full Spec)
|
|
284
|
+
|
|
285
|
+
**DO NOT IMPLEMENT WITHOUT USER APPROVAL**
|
|
286
|
+
|
|
287
|
+
Before implementing:
|
|
288
|
+
|
|
289
|
+
1. **Present the Plan Above** (already done)
|
|
290
|
+
|
|
291
|
+
2. **Request Approval** using `AskUserQuestion` with these options:
|
|
292
|
+
- [A] Start implementation (Recommended)
|
|
293
|
+
- [B] Review spec files in detail
|
|
294
|
+
- [C] Modify architecture
|
|
295
|
+
- [D] Add more detail
|
|
296
|
+
|
|
297
|
+
3. **Implementation Rules:**
|
|
298
|
+
- ✅ Wait for explicit [A] selection
|
|
299
|
+
- ✅ If [B] selected, review spec files and re-present
|
|
300
|
+
- ✅ If [C] selected, revise architecture and re-present
|
|
301
|
+
- ✅ If [D] selected, expand spec and re-present
|
|
302
|
+
- ❌ Never skip approval
|
|
303
|
+
- ❌ Never implement without [A] selection
|
|
304
|
+
- ❌ Never create/modify code files before approval
|
|
305
|
+
- ✅ Spec folder creation is allowed (it's planning, not implementation)
|
|
223
306
|
|
|
224
307
|
## Phase 3: Standards Injection
|
|
225
308
|
|
|
226
309
|
Before finalizing the plan, check for relevant standards and skills:
|
|
227
310
|
|
|
228
|
-
1. Scan for standards
|
|
311
|
+
1. Scan for standards at canonical location:
|
|
229
312
|
- `.claude/standards/`
|
|
230
|
-
- `docs/standards/`
|
|
231
|
-
- Project root (`*.standard.md`)
|
|
232
313
|
|
|
233
314
|
2. Identify relevant skills based on the task domain:
|
|
234
315
|
- 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
|
}
|
package/dist/cli.js
CHANGED
|
@@ -3699,7 +3699,7 @@ async function runInstallCommands(targetDir = process.cwd()) {
|
|
|
3699
3699
|
// package.json
|
|
3700
3700
|
var package_default = {
|
|
3701
3701
|
name: "@raftlabs/raftstack",
|
|
3702
|
-
version: "1.9.
|
|
3702
|
+
version: "1.9.3",
|
|
3703
3703
|
description: "CLI tool for setting up Git hooks, commit conventions, and GitHub integration",
|
|
3704
3704
|
type: "module",
|
|
3705
3705
|
main: "./dist/index.js",
|