mobius-loop 1.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/.claude/commands/linear/define.md +22 -0
- package/.claude/commands/linear/execute.md +22 -0
- package/.claude/commands/linear/refine.md +22 -0
- package/.claude/commands/linear/verify.md +22 -0
- package/.claude/skills/define-linear-issue/SKILL.md +386 -0
- package/.claude/skills/execute-linear-issue/SKILL.md +629 -0
- package/.claude/skills/refine-linear-issue/SKILL.md +379 -0
- package/.claude/skills/verify-linear-issue/SKILL.md +663 -0
- package/AGENTS.md +70 -0
- package/LICENSE +21 -0
- package/README.md +457 -0
- package/dist/bin/mobius.d.ts +3 -0
- package/dist/bin/mobius.d.ts.map +1 -0
- package/dist/bin/mobius.js +75 -0
- package/dist/bin/mobius.js.map +1 -0
- package/dist/commands/config.d.ts +6 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +88 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +86 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/run.d.ts +10 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +62 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +131 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/lib/checks/cclean.d.ts +3 -0
- package/dist/lib/checks/cclean.d.ts.map +1 -0
- package/dist/lib/checks/cclean.js +23 -0
- package/dist/lib/checks/cclean.js.map +1 -0
- package/dist/lib/checks/claude.d.ts +3 -0
- package/dist/lib/checks/claude.d.ts.map +1 -0
- package/dist/lib/checks/claude.js +38 -0
- package/dist/lib/checks/claude.js.map +1 -0
- package/dist/lib/checks/config.d.ts +4 -0
- package/dist/lib/checks/config.d.ts.map +1 -0
- package/dist/lib/checks/config.js +45 -0
- package/dist/lib/checks/config.js.map +1 -0
- package/dist/lib/checks/docker.d.ts +3 -0
- package/dist/lib/checks/docker.d.ts.map +1 -0
- package/dist/lib/checks/docker.js +46 -0
- package/dist/lib/checks/docker.js.map +1 -0
- package/dist/lib/checks/linear-mcp.d.ts +3 -0
- package/dist/lib/checks/linear-mcp.d.ts.map +1 -0
- package/dist/lib/checks/linear-mcp.js +46 -0
- package/dist/lib/checks/linear-mcp.js.map +1 -0
- package/dist/lib/checks/path.d.ts +5 -0
- package/dist/lib/checks/path.d.ts.map +1 -0
- package/dist/lib/checks/path.js +49 -0
- package/dist/lib/checks/path.js.map +1 -0
- package/dist/lib/config.d.ts +37 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +145 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/paths.d.ts +39 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +117 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/types.d.ts +39 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +19 -0
- package/dist/types.js.map +1 -0
- package/mobius.config.yaml +38 -0
- package/package.json +56 -0
- package/scripts/mobius.sh +394 -0
- package/scripts/render-diagrams.sh +38 -0
- package/scripts/render-terminal.sh +49 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execute-linear-issue
|
|
3
|
+
description: Execute the next ready sub-task from a Linear issue. Primes context from parent issue and completed dependencies, implements the change, verifies with tests/typecheck/lint, commits, pushes, and updates Linear status. Use when ready to implement a refined Linear issue, when the user mentions "execute", "implement", or "work on" a Linear issue.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Execute EXACTLY ONE sub-task from a refined Linear issue, then STOP. This skill is designed to run in a loop where each invocation completes one sub-task.
|
|
8
|
+
|
|
9
|
+
Key behavior:
|
|
10
|
+
- Find ONE ready sub-task (no unresolved blockers)
|
|
11
|
+
- Implement it completely
|
|
12
|
+
- Verify with tests/typecheck/lint
|
|
13
|
+
- Commit and push
|
|
14
|
+
- Update Linear status
|
|
15
|
+
- Report completion and STOP IMMEDIATELY
|
|
16
|
+
|
|
17
|
+
**CRITICAL**: After completing one sub-task (or determining none are ready), you MUST stop and end your response. Do NOT continue to the next sub-task. The calling loop will invoke you again for the next sub-task.
|
|
18
|
+
</objective>
|
|
19
|
+
|
|
20
|
+
<one_subtask_rule>
|
|
21
|
+
**THIS SKILL EXECUTES EXACTLY ONE SUB-TASK PER INVOCATION**
|
|
22
|
+
|
|
23
|
+
The workflow for each invocation:
|
|
24
|
+
1. Find the next ready sub-task
|
|
25
|
+
2. If none ready → output STATUS and STOP
|
|
26
|
+
3. If found → implement, verify, commit, push
|
|
27
|
+
4. Update Linear status
|
|
28
|
+
5. Output completion STATUS and STOP
|
|
29
|
+
|
|
30
|
+
**NEVER**:
|
|
31
|
+
- Process multiple sub-tasks in one invocation
|
|
32
|
+
- Ask "should I continue to the next task?"
|
|
33
|
+
- Loop through remaining sub-tasks
|
|
34
|
+
- Suggest running the skill again
|
|
35
|
+
|
|
36
|
+
The loop script handles iteration. This skill handles ONE task.
|
|
37
|
+
</one_subtask_rule>
|
|
38
|
+
|
|
39
|
+
<context>
|
|
40
|
+
This skill is the execution phase of the Linear workflow:
|
|
41
|
+
|
|
42
|
+
1. **define-linear-issue** - Creates well-defined issues with acceptance criteria
|
|
43
|
+
2. **refine-linear-issue** - Breaks issues into single-file-focused sub-tasks with dependencies
|
|
44
|
+
3. **execute-linear-issue** (this skill) - Implements ONE sub-task, then stops
|
|
45
|
+
|
|
46
|
+
**Loop-Based Execution Model**:
|
|
47
|
+
This skill is designed to be called repeatedly by a loop script (e.g., `linear-loop.sh`). Each invocation:
|
|
48
|
+
1. Finds the NEXT ready sub-task
|
|
49
|
+
2. Executes it completely
|
|
50
|
+
3. Reports completion
|
|
51
|
+
4. STOPS (does not continue to next sub-task)
|
|
52
|
+
|
|
53
|
+
The loop script will call this skill again for the next sub-task. This ensures:
|
|
54
|
+
- Fresh context for each sub-task
|
|
55
|
+
- Clear boundaries between tasks
|
|
56
|
+
- Predictable execution behavior
|
|
57
|
+
- Easy progress monitoring
|
|
58
|
+
|
|
59
|
+
Each sub-task is designed to:
|
|
60
|
+
- Target a single file (or source + test pair)
|
|
61
|
+
- Fit within one context window
|
|
62
|
+
- Have clear acceptance criteria
|
|
63
|
+
- Have explicit blocking relationships
|
|
64
|
+
</context>
|
|
65
|
+
|
|
66
|
+
<quick_start>
|
|
67
|
+
<invocation>
|
|
68
|
+
Pass the parent issue ID:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/execute-linear-issue VRZ-123
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The skill will find the next ready sub-task automatically.
|
|
75
|
+
</invocation>
|
|
76
|
+
|
|
77
|
+
<workflow>
|
|
78
|
+
1. **Load parent issue** - Get high-level context and acceptance criteria
|
|
79
|
+
2. **Find ready sub-task** - Identify sub-task with no unresolved blockers
|
|
80
|
+
3. **Prime context** - Load completed dependent tasks for implementation context
|
|
81
|
+
4. **Implement changes** - Execute the single-file-focused work
|
|
82
|
+
5. **Verify** - Run tests, typecheck, and lint
|
|
83
|
+
6. **Fix if needed** - Attempt automatic fixes on verification failures
|
|
84
|
+
7. **Commit and push** - Create commit with conventional message, push
|
|
85
|
+
8. **Update Linear** - Move sub-task to "In Progress" (ready for review)
|
|
86
|
+
9. **Report completion** - Show what was done and what's next
|
|
87
|
+
</workflow>
|
|
88
|
+
</quick_start>
|
|
89
|
+
|
|
90
|
+
<context_priming_phase>
|
|
91
|
+
<load_parent_issue>
|
|
92
|
+
First, fetch the parent issue for high-level context:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
mcp__plugin_linear_linear__get_issue
|
|
96
|
+
id: "{parent-issue-id}"
|
|
97
|
+
includeRelations: true
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Extract and retain:
|
|
101
|
+
- **Goal**: What the overall feature/fix achieves
|
|
102
|
+
- **Acceptance criteria**: High-level success conditions
|
|
103
|
+
- **Context**: Any technical notes or constraints
|
|
104
|
+
- **Related issues**: For broader understanding
|
|
105
|
+
</load_parent_issue>
|
|
106
|
+
|
|
107
|
+
<find_ready_subtask>
|
|
108
|
+
List all sub-tasks of the parent:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
mcp__plugin_linear_linear__list_issues
|
|
112
|
+
parentId: "{parent-issue-id}"
|
|
113
|
+
includeArchived: false
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
For each sub-task, check:
|
|
117
|
+
1. State is not "Done" or "Canceled"
|
|
118
|
+
2. All `blockedBy` issues are in "Done" state
|
|
119
|
+
|
|
120
|
+
Select the FIRST sub-task where all blockers are resolved.
|
|
121
|
+
|
|
122
|
+
**STOP CONDITIONS** (report and end immediately):
|
|
123
|
+
|
|
124
|
+
1. **All sub-tasks are Done**:
|
|
125
|
+
```
|
|
126
|
+
STATUS: ALL_COMPLETE
|
|
127
|
+
All N sub-tasks of {parent-id} are complete.
|
|
128
|
+
Parent issue is ready for review.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **All remaining sub-tasks are blocked**:
|
|
132
|
+
```
|
|
133
|
+
STATUS: ALL_BLOCKED
|
|
134
|
+
N sub-tasks remain, but all are blocked.
|
|
135
|
+
Waiting on: {list of blocking issues}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
3. **No sub-tasks exist**:
|
|
139
|
+
```
|
|
140
|
+
STATUS: NO_SUBTASKS
|
|
141
|
+
Issue {parent-id} has no sub-tasks.
|
|
142
|
+
Consider running /refine-linear-issue first.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
If any stop condition is met, output the status message and STOP. Do not continue.
|
|
146
|
+
</find_ready_subtask>
|
|
147
|
+
|
|
148
|
+
<load_dependency_context>
|
|
149
|
+
For each completed blocker of the selected sub-task:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
mcp__plugin_linear_linear__get_issue
|
|
153
|
+
id: "{blocker-id}"
|
|
154
|
+
includeRelations: false
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Extract from each completed dependency:
|
|
158
|
+
- **What was implemented**: Summary of changes
|
|
159
|
+
- **Files modified**: To understand current state
|
|
160
|
+
- **Patterns used**: To maintain consistency
|
|
161
|
+
- **Any notes**: Implementation decisions or gotchas
|
|
162
|
+
|
|
163
|
+
Compile into a context brief for the current task.
|
|
164
|
+
</load_dependency_context>
|
|
165
|
+
|
|
166
|
+
<context_brief_format>
|
|
167
|
+
Build context brief for implementation:
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
# Execution Context
|
|
171
|
+
|
|
172
|
+
## Parent Issue: {ID} - {Title}
|
|
173
|
+
{Parent description and acceptance criteria}
|
|
174
|
+
|
|
175
|
+
## Current Sub-task: {ID} - {Title}
|
|
176
|
+
**Target file**: {file path}
|
|
177
|
+
**Change type**: {Create/Modify}
|
|
178
|
+
{Sub-task description and acceptance criteria}
|
|
179
|
+
|
|
180
|
+
## Completed Dependencies
|
|
181
|
+
### {Dep-1 ID}: {Title}
|
|
182
|
+
- Modified: {files}
|
|
183
|
+
- Summary: {what was done}
|
|
184
|
+
|
|
185
|
+
### {Dep-2 ID}: {Title}
|
|
186
|
+
- Modified: {files}
|
|
187
|
+
- Summary: {what was done}
|
|
188
|
+
|
|
189
|
+
## Implementation Notes
|
|
190
|
+
- Follow patterns from: {relevant completed tasks}
|
|
191
|
+
- Key imports needed: {based on dependency analysis}
|
|
192
|
+
- Test file: {expected test location}
|
|
193
|
+
```
|
|
194
|
+
</context_brief_format>
|
|
195
|
+
</context_priming_phase>
|
|
196
|
+
|
|
197
|
+
<implementation_phase>
|
|
198
|
+
<read_target_file>
|
|
199
|
+
Before making changes, read the target file(s):
|
|
200
|
+
|
|
201
|
+
- If **Create**: Check directory exists, understand sibling file patterns
|
|
202
|
+
- If **Modify**: Read current file content completely
|
|
203
|
+
|
|
204
|
+
Also read:
|
|
205
|
+
- Related type definitions (from completed dependencies)
|
|
206
|
+
- Test file if it exists
|
|
207
|
+
- Any files imported by the target
|
|
208
|
+
</read_target_file>
|
|
209
|
+
|
|
210
|
+
<implement_changes>
|
|
211
|
+
Execute the implementation following:
|
|
212
|
+
|
|
213
|
+
1. **Match existing patterns** - Use same style as similar files
|
|
214
|
+
2. **Single file focus** - Only modify the target file(s) specified
|
|
215
|
+
3. **Meet acceptance criteria** - Each criterion should be addressed
|
|
216
|
+
4. **Add/update tests** - If target is source file, update corresponding test
|
|
217
|
+
|
|
218
|
+
Use Edit tool for modifications, Write tool for new files.
|
|
219
|
+
|
|
220
|
+
**Implementation checklist**:
|
|
221
|
+
- [ ] All acceptance criteria addressed
|
|
222
|
+
- [ ] Follows existing code patterns
|
|
223
|
+
- [ ] Proper imports added
|
|
224
|
+
- [ ] Types are correct
|
|
225
|
+
- [ ] Test coverage for new code
|
|
226
|
+
</implement_changes>
|
|
227
|
+
|
|
228
|
+
<scope_discipline>
|
|
229
|
+
**Stay within scope**:
|
|
230
|
+
- Only modify files specified in the sub-task
|
|
231
|
+
- Don't refactor unrelated code
|
|
232
|
+
- Don't add features not in acceptance criteria
|
|
233
|
+
- Don't fix unrelated issues discovered during work
|
|
234
|
+
|
|
235
|
+
If you discover issues outside scope:
|
|
236
|
+
- Note them for later
|
|
237
|
+
- Don't fix them now
|
|
238
|
+
- Can mention in completion report
|
|
239
|
+
</scope_discipline>
|
|
240
|
+
</implementation_phase>
|
|
241
|
+
|
|
242
|
+
<verification_phase>
|
|
243
|
+
<full_validation>
|
|
244
|
+
Run all three verification steps:
|
|
245
|
+
|
|
246
|
+
**1. Type checking**:
|
|
247
|
+
```bash
|
|
248
|
+
just typecheck
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**2. Tests**:
|
|
252
|
+
```bash
|
|
253
|
+
just test-file {pattern matching target file}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Or if new functionality spans multiple test files:
|
|
257
|
+
```bash
|
|
258
|
+
just test
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**3. Lint** (if available):
|
|
262
|
+
```bash
|
|
263
|
+
just lint
|
|
264
|
+
# or
|
|
265
|
+
bun run lint
|
|
266
|
+
```
|
|
267
|
+
</full_validation>
|
|
268
|
+
|
|
269
|
+
<handle_failures>
|
|
270
|
+
If any verification fails:
|
|
271
|
+
|
|
272
|
+
**Attempt automatic fix**:
|
|
273
|
+
1. Read the error output carefully
|
|
274
|
+
2. Identify the root cause
|
|
275
|
+
3. Apply targeted fix to resolve the issue
|
|
276
|
+
4. Re-run the failing verification
|
|
277
|
+
5. Repeat up to 3 times
|
|
278
|
+
|
|
279
|
+
**Common fixes**:
|
|
280
|
+
- Type errors: Add missing types, fix type mismatches
|
|
281
|
+
- Test failures: Update test expectations, fix logic errors
|
|
282
|
+
- Lint errors: Apply auto-fix if available, manual fix otherwise
|
|
283
|
+
|
|
284
|
+
**If fix attempts fail after 3 tries**:
|
|
285
|
+
- Stop execution immediately
|
|
286
|
+
- Do NOT ask user questions (this skill runs in an automated loop)
|
|
287
|
+
- Output failure status and terminate:
|
|
288
|
+
|
|
289
|
+
```markdown
|
|
290
|
+
STATUS: VERIFICATION_FAILED
|
|
291
|
+
|
|
292
|
+
## Sub-task Failed: {sub-task-id}
|
|
293
|
+
|
|
294
|
+
### Error Summary
|
|
295
|
+
{type of failure: typecheck/tests/lint}
|
|
296
|
+
|
|
297
|
+
### Last Error Output
|
|
298
|
+
```
|
|
299
|
+
{truncated error output, last 50 lines}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Attempted Fixes
|
|
303
|
+
1. {fix attempt 1}
|
|
304
|
+
2. {fix attempt 2}
|
|
305
|
+
3. {fix attempt 3}
|
|
306
|
+
|
|
307
|
+
### Files Modified (uncommitted)
|
|
308
|
+
- {file1}
|
|
309
|
+
- {file2}
|
|
310
|
+
|
|
311
|
+
The loop will stop. Review the errors and either:
|
|
312
|
+
- Fix manually and run `/execute-linear-issue {parent-id}` again
|
|
313
|
+
- Or rollback with `git checkout -- .`
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**CRITICAL**: After outputting this failure report, STOP. Do not continue trying.
|
|
317
|
+
</handle_failures>
|
|
318
|
+
|
|
319
|
+
<verification_success>
|
|
320
|
+
All checks must pass before proceeding:
|
|
321
|
+
|
|
322
|
+
```markdown
|
|
323
|
+
## Verification Results
|
|
324
|
+
- Typecheck: PASS
|
|
325
|
+
- Tests: PASS (X tests, Y assertions)
|
|
326
|
+
- Lint: PASS
|
|
327
|
+
|
|
328
|
+
Ready to commit.
|
|
329
|
+
```
|
|
330
|
+
</verification_success>
|
|
331
|
+
</verification_phase>
|
|
332
|
+
|
|
333
|
+
<commit_phase>
|
|
334
|
+
<commit_message>
|
|
335
|
+
Create conventional commit message:
|
|
336
|
+
|
|
337
|
+
Format:
|
|
338
|
+
```
|
|
339
|
+
{type}({scope}): {description}
|
|
340
|
+
|
|
341
|
+
{body with details}
|
|
342
|
+
|
|
343
|
+
Implements: {sub-task-id}
|
|
344
|
+
Part-of: {parent-issue-id}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Type mapping**:
|
|
348
|
+
- New file created → `feat`
|
|
349
|
+
- Bug fix → `fix`
|
|
350
|
+
- Modification/enhancement → `feat` or `refactor`
|
|
351
|
+
- Test only → `test`
|
|
352
|
+
- Types only → `types`
|
|
353
|
+
|
|
354
|
+
**Example**:
|
|
355
|
+
```
|
|
356
|
+
feat(theme): add ThemeContext provider
|
|
357
|
+
|
|
358
|
+
- Create ThemeProvider with light/dark/system modes
|
|
359
|
+
- Persist theme preference to localStorage
|
|
360
|
+
- Add useTheme hook for consuming context
|
|
361
|
+
|
|
362
|
+
Implements: VRZ-125
|
|
363
|
+
Part-of: VRZ-100
|
|
364
|
+
```
|
|
365
|
+
</commit_message>
|
|
366
|
+
|
|
367
|
+
<git_operations>
|
|
368
|
+
Execute git operations:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
# Stage only the files we modified
|
|
372
|
+
git add {target-file} {test-file-if-applicable}
|
|
373
|
+
|
|
374
|
+
# Commit with conventional message
|
|
375
|
+
git commit -m "{commit message}"
|
|
376
|
+
|
|
377
|
+
# Push to current branch
|
|
378
|
+
git push
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**Important**:
|
|
382
|
+
- Only stage files explicitly modified for this sub-task
|
|
383
|
+
- Don't use `git add -A` or `git add .`
|
|
384
|
+
- Verify staged files match expected scope before commit
|
|
385
|
+
</git_operations>
|
|
386
|
+
|
|
387
|
+
<commit_verification>
|
|
388
|
+
After push, verify:
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
git log -1 --oneline
|
|
392
|
+
git status
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Confirm:
|
|
396
|
+
- Commit created successfully
|
|
397
|
+
- Push completed without errors
|
|
398
|
+
- Working directory is clean
|
|
399
|
+
</commit_verification>
|
|
400
|
+
</commit_phase>
|
|
401
|
+
|
|
402
|
+
<linear_update_phase>
|
|
403
|
+
<update_subtask_status>
|
|
404
|
+
Move sub-task to "In Progress" (ready for review):
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
mcp__plugin_linear_linear__update_issue
|
|
408
|
+
id: "{sub-task-id}"
|
|
409
|
+
state: "In Progress"
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Note**: Using "In Progress" as the review state. Adjust if workspace has a dedicated review state.
|
|
413
|
+
</update_subtask_status>
|
|
414
|
+
|
|
415
|
+
<add_completion_comment>
|
|
416
|
+
Add comment documenting the implementation:
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
mcp__plugin_linear_linear__create_comment
|
|
420
|
+
issueId: "{sub-task-id}"
|
|
421
|
+
body: |
|
|
422
|
+
## Implementation Complete
|
|
423
|
+
|
|
424
|
+
**Commit**: {commit-hash}
|
|
425
|
+
**Files modified**:
|
|
426
|
+
- {file1}
|
|
427
|
+
- {file2}
|
|
428
|
+
|
|
429
|
+
**Changes**:
|
|
430
|
+
{brief summary of what was implemented}
|
|
431
|
+
|
|
432
|
+
**Verification**:
|
|
433
|
+
- Typecheck: PASS
|
|
434
|
+
- Tests: PASS
|
|
435
|
+
- Lint: PASS
|
|
436
|
+
|
|
437
|
+
Ready for review.
|
|
438
|
+
```
|
|
439
|
+
</add_completion_comment>
|
|
440
|
+
</linear_update_phase>
|
|
441
|
+
|
|
442
|
+
<completion_report>
|
|
443
|
+
<report_format>
|
|
444
|
+
After successful execution, report and STOP:
|
|
445
|
+
|
|
446
|
+
```markdown
|
|
447
|
+
# Sub-task Completed
|
|
448
|
+
|
|
449
|
+
STATUS: SUBTASK_COMPLETE
|
|
450
|
+
|
|
451
|
+
## {Sub-task ID}: {Title}
|
|
452
|
+
**Status**: Moved to In Progress (ready for review)
|
|
453
|
+
**Commit**: {hash} on {branch}
|
|
454
|
+
|
|
455
|
+
### Files Modified
|
|
456
|
+
- `{file1}` - {change summary}
|
|
457
|
+
- `{file2}` - {change summary}
|
|
458
|
+
|
|
459
|
+
### Acceptance Criteria
|
|
460
|
+
- [x] Criterion 1
|
|
461
|
+
- [x] Criterion 2
|
|
462
|
+
- [x] Criterion 3
|
|
463
|
+
|
|
464
|
+
### Verification
|
|
465
|
+
- Typecheck: PASS
|
|
466
|
+
- Tests: PASS
|
|
467
|
+
- Lint: PASS
|
|
468
|
+
|
|
469
|
+
---
|
|
470
|
+
|
|
471
|
+
## Progress
|
|
472
|
+
**Completed**: {X of Y sub-tasks}
|
|
473
|
+
**Ready next**: {list of now-unblocked sub-tasks, or "none" if all blocked/done}
|
|
474
|
+
**Still blocked**: {count of sub-tasks still waiting}
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
EXECUTION_COMPLETE: {sub-task-id}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
**CRITICAL**: After outputting this report, STOP IMMEDIATELY. Do not:
|
|
481
|
+
- Start working on the next sub-task
|
|
482
|
+
- Ask if the user wants to continue
|
|
483
|
+
- Suggest what to do next
|
|
484
|
+
- Make any further tool calls
|
|
485
|
+
|
|
486
|
+
The loop script will invoke this skill again for the next sub-task.
|
|
487
|
+
</report_format>
|
|
488
|
+
|
|
489
|
+
<discovered_issues>
|
|
490
|
+
If issues were discovered during implementation but not addressed:
|
|
491
|
+
|
|
492
|
+
```markdown
|
|
493
|
+
### Out-of-Scope Issues Discovered
|
|
494
|
+
- {Issue 1}: {brief description} in {file}
|
|
495
|
+
- {Issue 2}: {brief description} in {file}
|
|
496
|
+
|
|
497
|
+
Consider creating separate issues for these.
|
|
498
|
+
```
|
|
499
|
+
</discovered_issues>
|
|
500
|
+
</completion_report>
|
|
501
|
+
|
|
502
|
+
<examples>
|
|
503
|
+
<execution_example>
|
|
504
|
+
**Input**: `/execute-linear-issue VRZ-100`
|
|
505
|
+
|
|
506
|
+
**Flow**:
|
|
507
|
+
|
|
508
|
+
1. Load VRZ-100 (parent: "Add dark mode support")
|
|
509
|
+
2. Find sub-tasks:
|
|
510
|
+
- VRZ-124: Define types (Done)
|
|
511
|
+
- VRZ-125: Create ThemeProvider (blockedBy: VRZ-124 ✓) ← **Ready**
|
|
512
|
+
- VRZ-126: Add useTheme hook (blockedBy: VRZ-125) - Blocked
|
|
513
|
+
- VRZ-127: Update Header (blockedBy: VRZ-126) - Blocked
|
|
514
|
+
|
|
515
|
+
3. Select VRZ-125 (first ready task)
|
|
516
|
+
|
|
517
|
+
4. Load context from VRZ-124:
|
|
518
|
+
- Created `src/types/theme.ts`
|
|
519
|
+
- Exports: `Theme`, `ThemeMode`, `ThemeContextValue`
|
|
520
|
+
|
|
521
|
+
5. Implement VRZ-125:
|
|
522
|
+
- Create `src/contexts/ThemeContext.tsx`
|
|
523
|
+
- Import types from completed dependency
|
|
524
|
+
- Follow existing context patterns in codebase
|
|
525
|
+
|
|
526
|
+
6. Verify:
|
|
527
|
+
- `just typecheck` → PASS
|
|
528
|
+
- `just test-file ThemeContext` → PASS
|
|
529
|
+
- `just lint` → PASS
|
|
530
|
+
|
|
531
|
+
7. Commit and push:
|
|
532
|
+
```
|
|
533
|
+
feat(theme): create ThemeProvider context
|
|
534
|
+
|
|
535
|
+
- Add ThemeProvider component with light/dark/system modes
|
|
536
|
+
- Persist preference to localStorage
|
|
537
|
+
- Detect system preference changes
|
|
538
|
+
|
|
539
|
+
Implements: VRZ-125
|
|
540
|
+
Part-of: VRZ-100
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
8. Update Linear:
|
|
544
|
+
- VRZ-125 → "In Progress"
|
|
545
|
+
- Add completion comment
|
|
546
|
+
|
|
547
|
+
9. Report and STOP:
|
|
548
|
+
```
|
|
549
|
+
STATUS: SUBTASK_COMPLETE
|
|
550
|
+
|
|
551
|
+
## VRZ-125: Create ThemeProvider
|
|
552
|
+
Completed: 2 of 4 sub-tasks
|
|
553
|
+
Ready next: VRZ-126
|
|
554
|
+
|
|
555
|
+
EXECUTION_COMPLETE: VRZ-125
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
10. **STOP** - Do not continue to VRZ-126. The loop will invoke again.
|
|
559
|
+
</execution_example>
|
|
560
|
+
</examples>
|
|
561
|
+
|
|
562
|
+
<anti_patterns>
|
|
563
|
+
**Don't continue to next sub-task** (MOST IMPORTANT):
|
|
564
|
+
- BAD: "Sub-task A complete. Now let me work on sub-task B..."
|
|
565
|
+
- BAD: "Should I continue to the next sub-task?"
|
|
566
|
+
- BAD: Processing multiple sub-tasks in one invocation
|
|
567
|
+
- GOOD: Complete ONE sub-task, output STATUS, STOP
|
|
568
|
+
|
|
569
|
+
**Don't skip context priming**:
|
|
570
|
+
- BAD: Jump straight into coding without understanding dependencies
|
|
571
|
+
- GOOD: Load parent issue and completed blockers first
|
|
572
|
+
|
|
573
|
+
**Don't expand scope**:
|
|
574
|
+
- BAD: Fix unrelated issues discovered during work
|
|
575
|
+
- GOOD: Note them and stay focused on the sub-task
|
|
576
|
+
|
|
577
|
+
**Don't skip verification**:
|
|
578
|
+
- BAD: Commit without running tests
|
|
579
|
+
- GOOD: Full validation (tests, typecheck, lint) before every commit
|
|
580
|
+
|
|
581
|
+
**Don't commit unrelated files**:
|
|
582
|
+
- BAD: `git add -A` to stage everything
|
|
583
|
+
- GOOD: Stage only files specified in sub-task
|
|
584
|
+
|
|
585
|
+
**Don't ignore failures**:
|
|
586
|
+
- BAD: Push despite test failures
|
|
587
|
+
- GOOD: Fix issues or output VERIFICATION_FAILED and stop
|
|
588
|
+
|
|
589
|
+
**Don't forget Linear updates**:
|
|
590
|
+
- BAD: Complete work but leave sub-task in Backlog
|
|
591
|
+
- GOOD: Update status and add completion comment
|
|
592
|
+
|
|
593
|
+
**Don't ask user questions**:
|
|
594
|
+
- BAD: Using AskUserQuestion during automated loop execution
|
|
595
|
+
- GOOD: Make reasonable decisions or output failure STATUS and stop
|
|
596
|
+
</anti_patterns>
|
|
597
|
+
|
|
598
|
+
<success_criteria>
|
|
599
|
+
A successful execution achieves:
|
|
600
|
+
|
|
601
|
+
- [ ] Parent issue context loaded and understood
|
|
602
|
+
- [ ] Correct ready sub-task selected (no unresolved blockers)
|
|
603
|
+
- [ ] Context from completed dependencies incorporated
|
|
604
|
+
- [ ] Implementation addresses all acceptance criteria
|
|
605
|
+
- [ ] Only specified files modified (scope discipline)
|
|
606
|
+
- [ ] Typecheck passes
|
|
607
|
+
- [ ] Tests pass
|
|
608
|
+
- [ ] Lint passes
|
|
609
|
+
- [ ] Commit created with conventional message
|
|
610
|
+
- [ ] Changes pushed to remote
|
|
611
|
+
- [ ] Sub-task moved to "In Progress" in Linear
|
|
612
|
+
- [ ] Completion comment added to sub-task
|
|
613
|
+
- [ ] Completion report output with STATUS marker
|
|
614
|
+
- [ ] **STOPPED after one sub-task** (no continuation)
|
|
615
|
+
</success_criteria>
|
|
616
|
+
|
|
617
|
+
<termination_signals>
|
|
618
|
+
The skill outputs these status markers for loop script parsing:
|
|
619
|
+
|
|
620
|
+
| Status | Meaning | Loop Action |
|
|
621
|
+
|--------|---------|-------------|
|
|
622
|
+
| `STATUS: SUBTASK_COMPLETE` | One sub-task was implemented | Continue loop |
|
|
623
|
+
| `STATUS: ALL_COMPLETE` | All sub-tasks are done | Exit loop |
|
|
624
|
+
| `STATUS: ALL_BLOCKED` | Remaining sub-tasks are blocked | Exit loop |
|
|
625
|
+
| `STATUS: NO_SUBTASKS` | No sub-tasks exist | Exit loop |
|
|
626
|
+
| `STATUS: VERIFICATION_FAILED` | Tests/typecheck failed after retries | Exit loop |
|
|
627
|
+
|
|
628
|
+
Each invocation outputs exactly ONE status and then terminates.
|
|
629
|
+
</termination_signals>
|