@viniciuscarvalho/feature-marker 4.0.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/LICENSE +21 -0
- package/README.md +69 -0
- package/bin/feature-marker.js +299 -0
- package/dist/agents/feature-marker.md +656 -0
- package/dist/feature-marker/.claude/settings.local.json +13 -0
- package/dist/feature-marker/SKILL.md +405 -0
- package/dist/feature-marker/feature-marker.sh +239 -0
- package/dist/feature-marker/install.sh +183 -0
- package/dist/feature-marker/lib/config.sh +89 -0
- package/dist/feature-marker/lib/dependency-installer.sh +206 -0
- package/dist/feature-marker/lib/menu.sh +329 -0
- package/dist/feature-marker/lib/platform-detector.sh +105 -0
- package/dist/feature-marker/lib/spec-workflow-bridge.sh +383 -0
- package/dist/feature-marker/lib/state-manager.sh +168 -0
- package/dist/feature-marker/lib/ui.sh +148 -0
- package/dist/feature-marker/resources/commit.md +165 -0
- package/dist/feature-marker/resources/spec-workflow/ABSTRACTION_PLAN.md +712 -0
- package/dist/feature-marker/resources/spec-workflow/README.md +129 -0
- package/dist/feature-marker/resources/spec-workflow/references/config.md +201 -0
- package/dist/feature-marker/resources/spec-workflow/references/personas.md +165 -0
- package/dist/feature-marker/resources/spec-workflow/references/spec-template.md +189 -0
- package/dist/feature-marker/resources/spec-workflow/references/spec-writer-integration.md +150 -0
- package/dist/feature-marker/resources/spec-workflow/skills/create-worktree/SKILL.md +135 -0
- package/dist/feature-marker/resources/spec-workflow/skills/idea-explorer/SKILL.md +107 -0
- package/dist/feature-marker/resources/spec-workflow/skills/spec-executor/SKILL.md +367 -0
- package/dist/feature-marker/resources/spec-workflow/skills/spec-orchestrator/SKILL.md +398 -0
- package/dist/feature-marker/resources/spec-workflow/skills/spec-workflow-init/SKILL.md +331 -0
- package/dist/feature-marker/resources/spec-workflow/skills/spec-writer/SKILL.md +379 -0
- package/package.json +47 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-executor
|
|
3
|
+
description: Execute implementation specs with batched checkpoints. Follows specs exactly, stops on blockers, supports parallelization.
|
|
4
|
+
argument-hint: <spec-file> [--batch-size=<n>] [--no-checkpoint] [--dry-run] [--resume]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Spec Executor
|
|
8
|
+
|
|
9
|
+
Executes implementation specs (typically created by the spec-writer skill). Follows specs exactly with batched execution, checkpoints for user feedback, and parallelization support.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
|
|
13
|
+
- `spec-file` (required): Path to the spec file to execute
|
|
14
|
+
- `--batch-size=<n>`: Steps per checkpoint (overrides config)
|
|
15
|
+
- `--no-checkpoint`: Run without pausing for checkpoints
|
|
16
|
+
- `--dry-run`: Show what would be done without making changes
|
|
17
|
+
- `--resume`: Resume from last checkpoint
|
|
18
|
+
- `--parallel=<true|false>`: Enable/disable parallelization
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
Check for `.claude/spec-workflow/config.yaml`:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
paths:
|
|
26
|
+
worktrees: "./worktrees"
|
|
27
|
+
|
|
28
|
+
services:
|
|
29
|
+
backend:
|
|
30
|
+
path: "./backend"
|
|
31
|
+
build: "npm run build"
|
|
32
|
+
test: "npm test"
|
|
33
|
+
lint: "npm run lint"
|
|
34
|
+
frontend:
|
|
35
|
+
path: "./frontend"
|
|
36
|
+
build: "npm run build"
|
|
37
|
+
test: "npm test"
|
|
38
|
+
|
|
39
|
+
execution:
|
|
40
|
+
batchSize: 5
|
|
41
|
+
checkpoint:
|
|
42
|
+
behavior: "smart" # "pause" | "continue" | "smart"
|
|
43
|
+
parallel:
|
|
44
|
+
enabled: true
|
|
45
|
+
maxAgents: 3
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If no config, auto-detect services and use defaults.
|
|
49
|
+
|
|
50
|
+
## Core Philosophy
|
|
51
|
+
|
|
52
|
+
**Follow the spec. Stop on blockers. Never guess.**
|
|
53
|
+
|
|
54
|
+
This skill prioritizes:
|
|
55
|
+
|
|
56
|
+
1. **Spec-driven execution** - Follow spec instructions exactly, don't improvise
|
|
57
|
+
2. **Stop on blockers** - Pause and ask rather than guess when something is unclear
|
|
58
|
+
3. **Parallelization-aware** - Use sub-agents for concurrent work when spec indicates
|
|
59
|
+
4. **Leveraging git worktrees** - Isolate spec work in dedicated worktrees
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Phase 1: Environment Setup
|
|
64
|
+
|
|
65
|
+
Before executing, verify the environment is ready:
|
|
66
|
+
|
|
67
|
+
### Check for worktree (if specified in spec)
|
|
68
|
+
|
|
69
|
+
If spec frontmatter contains `worktree`:
|
|
70
|
+
|
|
71
|
+
1. Verify worktree exists at configured path (default: `./worktrees/[name]`)
|
|
72
|
+
2. Ensure we're working in that worktree
|
|
73
|
+
3. Verify branch matches frontmatter
|
|
74
|
+
|
|
75
|
+
If worktree doesn't exist:
|
|
76
|
+
|
|
77
|
+
1. Notify user: "Spec references worktree that doesn't exist. Create it?"
|
|
78
|
+
2. If yes, invoke `/create-worktree [name] --spec=[spec-path]`
|
|
79
|
+
3. Continue once created
|
|
80
|
+
|
|
81
|
+
### If no worktree specified
|
|
82
|
+
|
|
83
|
+
Proceed in current directory, but warn user that changes won't be isolated.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Phase 2: Load & Review
|
|
88
|
+
|
|
89
|
+
1. **Read the full spec file**
|
|
90
|
+
|
|
91
|
+
2. **Parse the spec**
|
|
92
|
+
- Extract Implementation Steps table
|
|
93
|
+
- Identify parallelization groups (if present)
|
|
94
|
+
- Note any Open Questions or unresolved items
|
|
95
|
+
- Check spec status
|
|
96
|
+
|
|
97
|
+
3. **Review critically before starting**
|
|
98
|
+
|
|
99
|
+
Present a summary:
|
|
100
|
+
```
|
|
101
|
+
**Spec Review: [Feature Name]**
|
|
102
|
+
|
|
103
|
+
**Tasks:** [N] implementation steps
|
|
104
|
+
**Parallelization:** [Yes/No - describe groups if present]
|
|
105
|
+
**Dependencies:** [List any external dependencies]
|
|
106
|
+
**Estimated scope:** [Small/Medium/Large based on task count]
|
|
107
|
+
|
|
108
|
+
**Concerns before starting:**
|
|
109
|
+
- [Any unclear instructions]
|
|
110
|
+
- [Any unresolved Open Questions from spec]
|
|
111
|
+
- [Any missing information]
|
|
112
|
+
|
|
113
|
+
**Parallelization Plan:**
|
|
114
|
+
[Describe how tasks will be parallelized if applicable]
|
|
115
|
+
|
|
116
|
+
Ready to proceed?
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
If `--dry-run`, stop here after showing the plan.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 3: Execute Batch
|
|
124
|
+
|
|
125
|
+
### Task Execution
|
|
126
|
+
|
|
127
|
+
For each task in the current batch:
|
|
128
|
+
|
|
129
|
+
1. **Mark task in_progress** in todo list
|
|
130
|
+
2. **Read related files** mentioned in spec's Appendix
|
|
131
|
+
3. **Execute the task** following spec instructions exactly
|
|
132
|
+
4. **Run verification** if specified (tests, lint, build)
|
|
133
|
+
5. **Mark task completed**
|
|
134
|
+
|
|
135
|
+
### Parallelization
|
|
136
|
+
|
|
137
|
+
If spec includes a Sub-agent Parallelization Plan:
|
|
138
|
+
|
|
139
|
+
1. **Identify independent tasks** in current group
|
|
140
|
+
2. **Launch sub-agents** using Task tool for parallel execution
|
|
141
|
+
3. **Wait for all agents** to complete before proceeding
|
|
142
|
+
4. **Collect results** and verify all succeeded
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
Launching parallel execution for Group 1:
|
|
146
|
+
|
|
147
|
+
Agent 1: Task 1.1 - [Description]
|
|
148
|
+
Agent 2: Task 1.2 - [Description]
|
|
149
|
+
|
|
150
|
+
Waiting for completion...
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Respect `execution.parallel.maxAgents` from config.
|
|
154
|
+
|
|
155
|
+
### Following the Spec
|
|
156
|
+
|
|
157
|
+
**DO:**
|
|
158
|
+
- Follow Implementation Steps in order (respecting dependencies)
|
|
159
|
+
- Use patterns described in Architecture & Design section
|
|
160
|
+
- Implement exactly what's specified in Requirements
|
|
161
|
+
- Run verifications specified in Validation & Testing Plan
|
|
162
|
+
|
|
163
|
+
**DON'T:**
|
|
164
|
+
- Add features not in the spec
|
|
165
|
+
- Skip steps or combine tasks arbitrarily
|
|
166
|
+
- Ignore the spec's design decisions
|
|
167
|
+
- Proceed past blockers without asking
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Phase 4: Report & Checkpoint
|
|
172
|
+
|
|
173
|
+
After each batch (based on `batchSize`):
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
**Checkpoint: Batch [N] Complete**
|
|
177
|
+
|
|
178
|
+
**Completed tasks:**
|
|
179
|
+
- [x] Task 1: [Brief description of what was done]
|
|
180
|
+
- [x] Task 2: [Brief description of what was done]
|
|
181
|
+
|
|
182
|
+
**Verification results:**
|
|
183
|
+
- Tests: [Pass/Fail - details]
|
|
184
|
+
- Lint: [Pass/Fail]
|
|
185
|
+
- Build: [Pass/Fail]
|
|
186
|
+
|
|
187
|
+
**Files modified:**
|
|
188
|
+
- `path/to/file1` - [What changed]
|
|
189
|
+
- `path/to/file2` - [What changed]
|
|
190
|
+
|
|
191
|
+
**Next batch:** Tasks [N+1] through [N+3]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Checkpoint behavior (from config or argument):
|
|
195
|
+
- `pause`: Always pause for user review
|
|
196
|
+
- `continue`: Auto-continue if no issues
|
|
197
|
+
- `smart`: Pause on warnings/errors, continue otherwise
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Phase 5: Continue
|
|
202
|
+
|
|
203
|
+
1. **Apply feedback** from previous checkpoint
|
|
204
|
+
2. **Execute next batch** following Phase 3 process
|
|
205
|
+
3. **Report progress** following Phase 4 process
|
|
206
|
+
4. **Repeat** until all tasks complete
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Phase 6: Finalize
|
|
211
|
+
|
|
212
|
+
After all tasks complete:
|
|
213
|
+
|
|
214
|
+
1. **Run full validation**
|
|
215
|
+
|
|
216
|
+
For each service in spec's `services` frontmatter (or all configured services if not specified):
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
# Use commands from config, or auto-detect
|
|
220
|
+
[service.build command]
|
|
221
|
+
[service.lint command]
|
|
222
|
+
[service.test command]
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
2. **Update spec status**
|
|
226
|
+
- Edit spec file frontmatter to change status to "Implemented"
|
|
227
|
+
- Add completion date
|
|
228
|
+
|
|
229
|
+
3. **Final summary**
|
|
230
|
+
```
|
|
231
|
+
**Spec Execution Complete: [Feature Name]**
|
|
232
|
+
|
|
233
|
+
**Tasks completed:** [N] of [N]
|
|
234
|
+
**Files modified:** [Count]
|
|
235
|
+
**Tests:** [Pass/Fail]
|
|
236
|
+
**Build:** [Pass/Fail]
|
|
237
|
+
|
|
238
|
+
**Summary of changes:**
|
|
239
|
+
- [High-level description of what was implemented]
|
|
240
|
+
|
|
241
|
+
**Next steps:**
|
|
242
|
+
- [ ] Manual testing per spec's Validation Plan
|
|
243
|
+
- [ ] Code review
|
|
244
|
+
- [ ] Commit and PR
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Critical Stop Points
|
|
250
|
+
|
|
251
|
+
**STOP and ask the user when:**
|
|
252
|
+
|
|
253
|
+
1. **Blockers encountered**
|
|
254
|
+
- Missing dependency or file
|
|
255
|
+
- Failed test that can't be fixed after several attempts
|
|
256
|
+
- Unclear instruction in spec
|
|
257
|
+
|
|
258
|
+
2. **Spec gaps**
|
|
259
|
+
- Implementation step references non-existent file
|
|
260
|
+
- Missing information needed to proceed
|
|
261
|
+
- Conflicting instructions
|
|
262
|
+
|
|
263
|
+
3. **Scope questions**
|
|
264
|
+
- Discovering additional work not in spec
|
|
265
|
+
- Edge cases not covered by spec
|
|
266
|
+
|
|
267
|
+
### Stop Format
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
**Execution Paused: [Reason]**
|
|
271
|
+
|
|
272
|
+
**Context:** [What I was trying to do]
|
|
273
|
+
**Issue:** [What went wrong or is unclear]
|
|
274
|
+
**Question:** [Specific question for user]
|
|
275
|
+
|
|
276
|
+
Options:
|
|
277
|
+
A) [Suggested resolution 1]
|
|
278
|
+
B) [Suggested resolution 2]
|
|
279
|
+
C) Skip this task and continue
|
|
280
|
+
D) Stop execution entirely
|
|
281
|
+
|
|
282
|
+
How should I proceed?
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Progress Tracking
|
|
288
|
+
|
|
289
|
+
### Managing TODOs
|
|
290
|
+
|
|
291
|
+
Mirror spec's Implementation Steps in todo list:
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
Todos:
|
|
295
|
+
- [x] Step 1: [Task from spec]
|
|
296
|
+
- [x] Step 2: [Task from spec]
|
|
297
|
+
- [ ] Step 3: [Task from spec] (in_progress)
|
|
298
|
+
- [ ] Step 4: [Task from spec] (pending)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Spec File Updates
|
|
302
|
+
|
|
303
|
+
Update checkboxes in spec's Validation & Testing Plan as tests are written/pass.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## Workflow Summary
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
spec-file
|
|
311
|
+
│
|
|
312
|
+
▼
|
|
313
|
+
┌─────────────────────────────────┐
|
|
314
|
+
│ PHASE 1: ENVIRONMENT SETUP │
|
|
315
|
+
│ • Check/create worktree │
|
|
316
|
+
│ • Verify environment ready │
|
|
317
|
+
└─────────────────────────────────┘
|
|
318
|
+
│
|
|
319
|
+
▼
|
|
320
|
+
┌─────────────────────────────────┐
|
|
321
|
+
│ PHASE 2: LOAD & REVIEW │
|
|
322
|
+
│ • Parse spec │
|
|
323
|
+
│ • Flag concerns │
|
|
324
|
+
│ • Confirm ready to proceed │
|
|
325
|
+
└─────────────────────────────────┘
|
|
326
|
+
│
|
|
327
|
+
▼
|
|
328
|
+
┌─────────────────────────────────┐
|
|
329
|
+
│ PHASE 3: EXECUTE BATCH │
|
|
330
|
+
│ • Follow spec exactly │
|
|
331
|
+
│ • Use sub-agents if parallel │
|
|
332
|
+
│ • Track tasks │
|
|
333
|
+
└─────────────────────────────────┘
|
|
334
|
+
│
|
|
335
|
+
▼
|
|
336
|
+
┌─────────────────────────────────┐
|
|
337
|
+
│ PHASE 4: CHECKPOINT │
|
|
338
|
+
│ • Report progress │
|
|
339
|
+
│ • Show verification results │
|
|
340
|
+
└─────────────────────────────────┘
|
|
341
|
+
│
|
|
342
|
+
▼
|
|
343
|
+
┌─────────────────────────────────┐
|
|
344
|
+
│ PHASE 5: CONTINUE │
|
|
345
|
+
│ • Next batch → Phase 3 │
|
|
346
|
+
└─────────────────────────────────┘
|
|
347
|
+
│
|
|
348
|
+
▼
|
|
349
|
+
┌─────────────────────────────────┐
|
|
350
|
+
│ PHASE 6: FINALIZE │
|
|
351
|
+
│ • Full validation │
|
|
352
|
+
│ • Update spec status │
|
|
353
|
+
│ • Summary & next steps │
|
|
354
|
+
└─────────────────────────────────┘
|
|
355
|
+
│
|
|
356
|
+
▼
|
|
357
|
+
Feature Implemented
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Upon Implementation Completion
|
|
363
|
+
|
|
364
|
+
1. Ask the user if they would like to commit the changes now.
|
|
365
|
+
2. If yes, create a commit with a summary of changes made.
|
|
366
|
+
3. If committed, ask if they would like to open a PR for review.
|
|
367
|
+
4. If yes, create a PR with appropriate title and description.
|