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,379 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refine-linear-issue
|
|
3
|
+
description: Break down a Linear issue into actionable sub-tasks through deep codebase research. Each sub-task is sized for single-file focus and context window efficiency. Creates sub-tasks with blocking relationships for parallel execution. Use when an issue needs implementation breakdown, when starting work on a complex Linear issue, or when the user mentions "refine", "break down", or "plan" for a Linear issue.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Transform a Linear issue into a set of focused, executable sub-tasks through deep codebase exploration. Each sub-task targets a single file or tightly-coupled file pair, sized to fit within one Claude context window. Sub-tasks are created with blocking relationships to enable parallel work where dependencies allow.
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<context>
|
|
11
|
+
This skill bridges high-level Linear issues and actionable implementation work. It:
|
|
12
|
+
|
|
13
|
+
1. **Deeply researches** the codebase to understand existing patterns, dependencies, and affected areas
|
|
14
|
+
2. **Decomposes** work into single-file-focused tasks that Claude can complete in one session
|
|
15
|
+
3. **Identifies dependencies** between tasks to establish blocking relationships
|
|
16
|
+
4. **Creates sub-tasks** in Linear as children of the parent issue with proper blocking order
|
|
17
|
+
|
|
18
|
+
Sub-tasks are designed for autonomous execution - each should be completable without needing to reference other sub-tasks or gather additional context.
|
|
19
|
+
</context>
|
|
20
|
+
|
|
21
|
+
<quick_start>
|
|
22
|
+
<invocation>
|
|
23
|
+
The skill expects a Linear issue identifier as argument:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
/refine-linear-issue VRZ-123
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or invoke programmatically:
|
|
30
|
+
```
|
|
31
|
+
Skill: refine-linear-issue
|
|
32
|
+
Args: VRZ-123
|
|
33
|
+
```
|
|
34
|
+
</invocation>
|
|
35
|
+
|
|
36
|
+
<workflow>
|
|
37
|
+
1. **Fetch issue** - Get full issue details from Linear including description and acceptance criteria
|
|
38
|
+
2. **Deep exploration** - Use Explore agent to thoroughly analyze related code, patterns, and dependencies
|
|
39
|
+
3. **Identify work units** - Break down into single-file-focused tasks
|
|
40
|
+
4. **Determine blocking order** - Analyze functional dependencies between tasks
|
|
41
|
+
5. **Present breakdown** - Show complete plan with all sub-tasks and their relationships
|
|
42
|
+
6. **Gather feedback** - Use AskUserQuestion for refinement
|
|
43
|
+
7. **Batch create** - Create all approved sub-tasks in Linear with blocking relationships
|
|
44
|
+
</workflow>
|
|
45
|
+
</quick_start>
|
|
46
|
+
|
|
47
|
+
<research_phase>
|
|
48
|
+
<fetch_issue>
|
|
49
|
+
First, retrieve the issue details:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
mcp__plugin_linear_linear__get_issue
|
|
53
|
+
id: "{issue-id}"
|
|
54
|
+
includeRelations: true
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Extract:
|
|
58
|
+
- Title and description
|
|
59
|
+
- Acceptance criteria
|
|
60
|
+
- Existing relationships
|
|
61
|
+
- Project context
|
|
62
|
+
- Labels and priority
|
|
63
|
+
</fetch_issue>
|
|
64
|
+
|
|
65
|
+
<deep_exploration>
|
|
66
|
+
Use the Task tool with Explore agent to thoroughly analyze the codebase:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Task tool:
|
|
70
|
+
subagent_type: Explore
|
|
71
|
+
prompt: |
|
|
72
|
+
Analyze the codebase to understand how to implement: {issue title and description}
|
|
73
|
+
|
|
74
|
+
Research:
|
|
75
|
+
1. Find all files that will need modification
|
|
76
|
+
2. Understand existing patterns in similar areas
|
|
77
|
+
3. Identify dependencies between affected files
|
|
78
|
+
4. Note any shared utilities, types, or services involved
|
|
79
|
+
5. Find test files that will need updates
|
|
80
|
+
|
|
81
|
+
For each file, note:
|
|
82
|
+
- What changes are needed
|
|
83
|
+
- What it imports/exports that affects other files
|
|
84
|
+
- Whether it has corresponding test files
|
|
85
|
+
|
|
86
|
+
Provide a comprehensive analysis of the implementation approach.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Set thoroughness to "very thorough" for complex issues.
|
|
90
|
+
</deep_exploration>
|
|
91
|
+
|
|
92
|
+
<analysis_output>
|
|
93
|
+
From the exploration, extract:
|
|
94
|
+
|
|
95
|
+
- **Affected files**: Complete list with change type (create/modify)
|
|
96
|
+
- **Dependency graph**: Which files import from which
|
|
97
|
+
- **Shared resources**: Types, utilities, services used across files
|
|
98
|
+
- **Test requirements**: Which test files need updates
|
|
99
|
+
- **Pattern notes**: Existing conventions to follow
|
|
100
|
+
</analysis_output>
|
|
101
|
+
</research_phase>
|
|
102
|
+
|
|
103
|
+
<decomposition_phase>
|
|
104
|
+
<single_file_principle>
|
|
105
|
+
Each sub-task should focus on ONE file (or tightly-coupled pair like component + test). This ensures:
|
|
106
|
+
|
|
107
|
+
- Task fits within one context window
|
|
108
|
+
- Clear scope prevents scope creep
|
|
109
|
+
- Easy to verify completion
|
|
110
|
+
- Enables parallel work on unrelated files
|
|
111
|
+
</single_file_principle>
|
|
112
|
+
|
|
113
|
+
<task_structure>
|
|
114
|
+
For each sub-task, define:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## Sub-task: [Sequential number] - [Brief title]
|
|
118
|
+
|
|
119
|
+
**Target file(s)**: `path/to/file.ts` (and `path/to/file.test.ts` if applicable)
|
|
120
|
+
|
|
121
|
+
**Change type**: Create | Modify | Delete
|
|
122
|
+
|
|
123
|
+
**Description**:
|
|
124
|
+
[2-3 sentences describing exactly what to implement in this file]
|
|
125
|
+
|
|
126
|
+
**Acceptance criteria**:
|
|
127
|
+
- [ ] Specific, verifiable outcome 1
|
|
128
|
+
- [ ] Specific, verifiable outcome 2
|
|
129
|
+
|
|
130
|
+
**Blocked by**: [List of sub-task numbers that must complete first, or "None"]
|
|
131
|
+
|
|
132
|
+
**Enables**: [List of sub-task numbers this unblocks]
|
|
133
|
+
```
|
|
134
|
+
</task_structure>
|
|
135
|
+
|
|
136
|
+
<ordering_principles>
|
|
137
|
+
Determine blocking order based on functional requirements:
|
|
138
|
+
|
|
139
|
+
1. **Foundation first**: Types, interfaces, schemas before implementations
|
|
140
|
+
2. **Dependencies flow down**: If A imports from B, B must be done first
|
|
141
|
+
3. **Tests with implementation**: Pair test files with their source files in same task
|
|
142
|
+
4. **UI last**: Components after their dependencies (services, hooks, types)
|
|
143
|
+
|
|
144
|
+
**Parallelization opportunities**:
|
|
145
|
+
- Independent services can run in parallel
|
|
146
|
+
- Unrelated UI components can run in parallel
|
|
147
|
+
- Tests for different features can run in parallel
|
|
148
|
+
</ordering_principles>
|
|
149
|
+
|
|
150
|
+
<sizing_guidelines>
|
|
151
|
+
A well-sized sub-task:
|
|
152
|
+
|
|
153
|
+
- Targets 1 file (or source + test pair)
|
|
154
|
+
- Has 2-4 acceptance criteria
|
|
155
|
+
- Can be described in 2-3 sentences
|
|
156
|
+
- Takes roughly 50-200 lines of changes
|
|
157
|
+
- Doesn't require reading many other files to understand
|
|
158
|
+
|
|
159
|
+
**Split if**:
|
|
160
|
+
- File needs multiple unrelated changes
|
|
161
|
+
- Description exceeds 5 sentences
|
|
162
|
+
- More than 5 acceptance criteria
|
|
163
|
+
- Changes span unrelated concerns in the file
|
|
164
|
+
|
|
165
|
+
**Combine if**:
|
|
166
|
+
- Two files are always modified together
|
|
167
|
+
- Changes are trivially small (< 10 lines each)
|
|
168
|
+
- One file is just re-exporting from another
|
|
169
|
+
</sizing_guidelines>
|
|
170
|
+
</decomposition_phase>
|
|
171
|
+
|
|
172
|
+
<presentation_phase>
|
|
173
|
+
<breakdown_format>
|
|
174
|
+
Present the complete breakdown:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Implementation Breakdown: {Issue ID} - {Issue Title}
|
|
178
|
+
|
|
179
|
+
## Overview
|
|
180
|
+
- **Total sub-tasks**: {count}
|
|
181
|
+
- **Parallelizable groups**: {count}
|
|
182
|
+
- **Critical path**: {list of sequential dependencies}
|
|
183
|
+
- **Estimated scope**: {total files affected}
|
|
184
|
+
|
|
185
|
+
## Dependency Graph
|
|
186
|
+
```
|
|
187
|
+
[1] Types/Interfaces
|
|
188
|
+
└─► [2] Service implementation
|
|
189
|
+
├─► [3] Hook implementation
|
|
190
|
+
│ └─► [5] Component A
|
|
191
|
+
└─► [4] Repository updates
|
|
192
|
+
└─► [6] Component B
|
|
193
|
+
|
|
194
|
+
Parallel groups:
|
|
195
|
+
- Group 1: [1]
|
|
196
|
+
- Group 2: [2]
|
|
197
|
+
- Group 3: [3], [4]
|
|
198
|
+
- Group 4: [5], [6]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Sub-tasks
|
|
202
|
+
|
|
203
|
+
### 1. Define TypeScript types for {feature}
|
|
204
|
+
**File**: `src/types/feature.ts`
|
|
205
|
+
**Blocked by**: None
|
|
206
|
+
**Enables**: 2, 3, 4
|
|
207
|
+
|
|
208
|
+
[Full sub-task details...]
|
|
209
|
+
|
|
210
|
+
### 2. Implement {feature} service
|
|
211
|
+
**File**: `src/lib/services/featureService.ts`
|
|
212
|
+
**Blocked by**: 1
|
|
213
|
+
**Enables**: 3, 4
|
|
214
|
+
|
|
215
|
+
[Full sub-task details...]
|
|
216
|
+
|
|
217
|
+
[Continue for all sub-tasks...]
|
|
218
|
+
```
|
|
219
|
+
</breakdown_format>
|
|
220
|
+
|
|
221
|
+
<refinement_questions>
|
|
222
|
+
After presenting, use AskUserQuestion:
|
|
223
|
+
|
|
224
|
+
Question: "How would you like to proceed with this breakdown?"
|
|
225
|
+
|
|
226
|
+
Options:
|
|
227
|
+
1. **Create all sub-tasks** - Breakdown looks correct, create in Linear
|
|
228
|
+
2. **Adjust scope** - Some tasks need to be split or combined
|
|
229
|
+
3. **Change ordering** - Blocking relationships need adjustment
|
|
230
|
+
4. **Add context** - I have additional information to include
|
|
231
|
+
5. **Start over** - Need a different approach entirely
|
|
232
|
+
</refinement_questions>
|
|
233
|
+
|
|
234
|
+
<iterative_refinement>
|
|
235
|
+
If user selects adjustment options:
|
|
236
|
+
|
|
237
|
+
- **Adjust scope**: Ask which specific tasks to modify, then present revised breakdown
|
|
238
|
+
- **Change ordering**: Present dependency graph and ask which relationships to change
|
|
239
|
+
- **Add context**: Incorporate new information and re-analyze affected tasks
|
|
240
|
+
|
|
241
|
+
Loop back to presentation after each refinement until user approves.
|
|
242
|
+
</iterative_refinement>
|
|
243
|
+
</presentation_phase>
|
|
244
|
+
|
|
245
|
+
<creation_phase>
|
|
246
|
+
<batch_creation>
|
|
247
|
+
After approval, create all sub-tasks in Linear:
|
|
248
|
+
|
|
249
|
+
For each sub-task in dependency order (leaves first):
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
mcp__plugin_linear_linear__create_issue
|
|
253
|
+
team: "{same team as parent}"
|
|
254
|
+
title: "[{parent-id}] {sub-task title}"
|
|
255
|
+
description: "{full sub-task description with acceptance criteria}"
|
|
256
|
+
parentId: "{parent issue id}"
|
|
257
|
+
labels: ["{inherited from parent}"]
|
|
258
|
+
priority: {inherited from parent}
|
|
259
|
+
state: "Backlog"
|
|
260
|
+
blockedBy: ["{ids of blocking sub-tasks}"]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Important**: Create in reverse dependency order so blockedBy references exist.
|
|
264
|
+
</batch_creation>
|
|
265
|
+
|
|
266
|
+
<creation_order>
|
|
267
|
+
1. Identify leaf tasks (blocked by nothing or only by already-created tasks)
|
|
268
|
+
2. Create leaf tasks first
|
|
269
|
+
3. Work up the dependency tree
|
|
270
|
+
4. Store created issue IDs to reference in blockedBy for later tasks
|
|
271
|
+
</creation_order>
|
|
272
|
+
|
|
273
|
+
<post_creation>
|
|
274
|
+
After all sub-tasks created, confirm:
|
|
275
|
+
|
|
276
|
+
```markdown
|
|
277
|
+
Created {count} sub-tasks for {parent issue ID}:
|
|
278
|
+
|
|
279
|
+
| ID | Title | Blocked By | Status |
|
|
280
|
+
|----|-------|------------|--------|
|
|
281
|
+
| VRZ-124 | Define types | - | Ready |
|
|
282
|
+
| VRZ-125 | Implement service | VRZ-124 | Blocked |
|
|
283
|
+
| VRZ-126 | Add hook | VRZ-124 | Blocked |
|
|
284
|
+
| VRZ-127 | Update component | VRZ-125, VRZ-126 | Blocked |
|
|
285
|
+
|
|
286
|
+
**Ready to start**: VRZ-124
|
|
287
|
+
**Parallel opportunities**: After VRZ-124, can work VRZ-125 and VRZ-126 simultaneously
|
|
288
|
+
```
|
|
289
|
+
</post_creation>
|
|
290
|
+
</creation_phase>
|
|
291
|
+
|
|
292
|
+
<examples>
|
|
293
|
+
<example_breakdown>
|
|
294
|
+
**Parent issue**: VRZ-100 - Add dark mode support
|
|
295
|
+
|
|
296
|
+
**Exploration findings**:
|
|
297
|
+
- Need theme types in `src/types/theme.ts`
|
|
298
|
+
- ThemeProvider context in `src/contexts/ThemeContext.tsx`
|
|
299
|
+
- useTheme hook in `src/hooks/useTheme.ts`
|
|
300
|
+
- Settings toggle in `src/components/settings/ThemeToggle.tsx`
|
|
301
|
+
- Update 3 components that have hardcoded colors
|
|
302
|
+
|
|
303
|
+
**Breakdown**:
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
1. Define theme types
|
|
307
|
+
File: src/types/theme.ts (create)
|
|
308
|
+
Blocked by: None
|
|
309
|
+
|
|
310
|
+
2. Create ThemeProvider context
|
|
311
|
+
File: src/contexts/ThemeContext.tsx (create)
|
|
312
|
+
Blocked by: 1
|
|
313
|
+
|
|
314
|
+
3. Implement useTheme hook
|
|
315
|
+
File: src/hooks/useTheme.ts (create)
|
|
316
|
+
Blocked by: 2
|
|
317
|
+
|
|
318
|
+
4. Add ThemeToggle component
|
|
319
|
+
File: src/components/settings/ThemeToggle.tsx (create)
|
|
320
|
+
Blocked by: 3
|
|
321
|
+
|
|
322
|
+
5. Update Header with theme support
|
|
323
|
+
File: src/components/layout/Header.tsx (modify)
|
|
324
|
+
Blocked by: 3
|
|
325
|
+
|
|
326
|
+
6. Update Sidebar with theme support
|
|
327
|
+
File: src/components/layout/Sidebar.tsx (modify)
|
|
328
|
+
Blocked by: 3
|
|
329
|
+
|
|
330
|
+
7. Update Card component with theme support
|
|
331
|
+
File: src/components/ui/Card.tsx (modify)
|
|
332
|
+
Blocked by: 3
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Parallel groups**:
|
|
336
|
+
- [1] → [2] → [3] (sequential foundation)
|
|
337
|
+
- [4], [5], [6], [7] can all run in parallel after [3]
|
|
338
|
+
</example_breakdown>
|
|
339
|
+
</examples>
|
|
340
|
+
|
|
341
|
+
<anti_patterns>
|
|
342
|
+
**Don't create vague sub-tasks**:
|
|
343
|
+
- BAD: "Update components for dark mode"
|
|
344
|
+
- GOOD: "Update Header.tsx to use theme context for background and text colors"
|
|
345
|
+
|
|
346
|
+
**Don't skip the research phase**:
|
|
347
|
+
- BAD: Guess at file structure and create tasks
|
|
348
|
+
- GOOD: Deep exploration to understand actual codebase patterns
|
|
349
|
+
|
|
350
|
+
**Don't over-split**:
|
|
351
|
+
- BAD: Separate task for each function in a file
|
|
352
|
+
- GOOD: One task per file with all related changes
|
|
353
|
+
|
|
354
|
+
**Don't under-split**:
|
|
355
|
+
- BAD: "Implement entire feature" as one task
|
|
356
|
+
- GOOD: One task per file, each independently completable
|
|
357
|
+
|
|
358
|
+
**Don't ignore existing patterns**:
|
|
359
|
+
- BAD: Create tasks that introduce new patterns
|
|
360
|
+
- GOOD: Research existing conventions and match them
|
|
361
|
+
|
|
362
|
+
**Don't create circular dependencies**:
|
|
363
|
+
- BAD: Task A blocks B, B blocks C, C blocks A
|
|
364
|
+
- GOOD: Clear hierarchical dependency flow
|
|
365
|
+
</anti_patterns>
|
|
366
|
+
|
|
367
|
+
<success_criteria>
|
|
368
|
+
A successful refinement produces:
|
|
369
|
+
|
|
370
|
+
- [ ] All affected files identified through deep exploration
|
|
371
|
+
- [ ] Each sub-task targets exactly one file (or source + test pair)
|
|
372
|
+
- [ ] Every sub-task has clear, verifiable acceptance criteria
|
|
373
|
+
- [ ] Blocking relationships are logically sound
|
|
374
|
+
- [ ] No circular dependencies exist
|
|
375
|
+
- [ ] Parallel opportunities are maximized
|
|
376
|
+
- [ ] Sub-tasks created in Linear as children of parent issue
|
|
377
|
+
- [ ] Ready tasks (no blockers) are clearly identified
|
|
378
|
+
- [ ] User approved breakdown before creation
|
|
379
|
+
</success_criteria>
|