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.
Files changed (72) hide show
  1. package/.claude/commands/linear/define.md +22 -0
  2. package/.claude/commands/linear/execute.md +22 -0
  3. package/.claude/commands/linear/refine.md +22 -0
  4. package/.claude/commands/linear/verify.md +22 -0
  5. package/.claude/skills/define-linear-issue/SKILL.md +386 -0
  6. package/.claude/skills/execute-linear-issue/SKILL.md +629 -0
  7. package/.claude/skills/refine-linear-issue/SKILL.md +379 -0
  8. package/.claude/skills/verify-linear-issue/SKILL.md +663 -0
  9. package/AGENTS.md +70 -0
  10. package/LICENSE +21 -0
  11. package/README.md +457 -0
  12. package/dist/bin/mobius.d.ts +3 -0
  13. package/dist/bin/mobius.d.ts.map +1 -0
  14. package/dist/bin/mobius.js +75 -0
  15. package/dist/bin/mobius.js.map +1 -0
  16. package/dist/commands/config.d.ts +6 -0
  17. package/dist/commands/config.d.ts.map +1 -0
  18. package/dist/commands/config.js +88 -0
  19. package/dist/commands/config.js.map +1 -0
  20. package/dist/commands/doctor.d.ts +2 -0
  21. package/dist/commands/doctor.d.ts.map +1 -0
  22. package/dist/commands/doctor.js +86 -0
  23. package/dist/commands/doctor.js.map +1 -0
  24. package/dist/commands/run.d.ts +10 -0
  25. package/dist/commands/run.d.ts.map +1 -0
  26. package/dist/commands/run.js +62 -0
  27. package/dist/commands/run.js.map +1 -0
  28. package/dist/commands/setup.d.ts +2 -0
  29. package/dist/commands/setup.d.ts.map +1 -0
  30. package/dist/commands/setup.js +131 -0
  31. package/dist/commands/setup.js.map +1 -0
  32. package/dist/lib/checks/cclean.d.ts +3 -0
  33. package/dist/lib/checks/cclean.d.ts.map +1 -0
  34. package/dist/lib/checks/cclean.js +23 -0
  35. package/dist/lib/checks/cclean.js.map +1 -0
  36. package/dist/lib/checks/claude.d.ts +3 -0
  37. package/dist/lib/checks/claude.d.ts.map +1 -0
  38. package/dist/lib/checks/claude.js +38 -0
  39. package/dist/lib/checks/claude.js.map +1 -0
  40. package/dist/lib/checks/config.d.ts +4 -0
  41. package/dist/lib/checks/config.d.ts.map +1 -0
  42. package/dist/lib/checks/config.js +45 -0
  43. package/dist/lib/checks/config.js.map +1 -0
  44. package/dist/lib/checks/docker.d.ts +3 -0
  45. package/dist/lib/checks/docker.d.ts.map +1 -0
  46. package/dist/lib/checks/docker.js +46 -0
  47. package/dist/lib/checks/docker.js.map +1 -0
  48. package/dist/lib/checks/linear-mcp.d.ts +3 -0
  49. package/dist/lib/checks/linear-mcp.d.ts.map +1 -0
  50. package/dist/lib/checks/linear-mcp.js +46 -0
  51. package/dist/lib/checks/linear-mcp.js.map +1 -0
  52. package/dist/lib/checks/path.d.ts +5 -0
  53. package/dist/lib/checks/path.d.ts.map +1 -0
  54. package/dist/lib/checks/path.js +49 -0
  55. package/dist/lib/checks/path.js.map +1 -0
  56. package/dist/lib/config.d.ts +37 -0
  57. package/dist/lib/config.d.ts.map +1 -0
  58. package/dist/lib/config.js +145 -0
  59. package/dist/lib/config.js.map +1 -0
  60. package/dist/lib/paths.d.ts +39 -0
  61. package/dist/lib/paths.d.ts.map +1 -0
  62. package/dist/lib/paths.js +117 -0
  63. package/dist/lib/paths.js.map +1 -0
  64. package/dist/types.d.ts +39 -0
  65. package/dist/types.d.ts.map +1 -0
  66. package/dist/types.js +19 -0
  67. package/dist/types.js.map +1 -0
  68. package/mobius.config.yaml +38 -0
  69. package/package.json +56 -0
  70. package/scripts/mobius.sh +394 -0
  71. package/scripts/render-diagrams.sh +38 -0
  72. package/scripts/render-terminal.sh +49 -0
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Create well-defined Linear issues using Socratic questioning
3
+ argument-hint: [issue description or type]
4
+ allowed-tools: Skill(define-linear-issue)
5
+ ---
6
+
7
+ <objective>
8
+ Delegate Linear issue creation to the define-linear-issue skill for: $ARGUMENTS
9
+
10
+ This routes to specialized skill containing Socratic questioning patterns, acceptance criteria best practices, and Linear MCP integration.
11
+ </objective>
12
+
13
+ <process>
14
+ 1. Use Skill tool to invoke define-linear-issue skill
15
+ 2. Pass user's request: $ARGUMENTS
16
+ 3. Let skill handle workflow
17
+ </process>
18
+
19
+ <success_criteria>
20
+ - Skill successfully invoked
21
+ - Arguments passed correctly to skill
22
+ </success_criteria>
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Execute the next ready sub-task from a Linear issue with full context
3
+ argument-hint: <parent-issue-id>
4
+ allowed-tools: Skill(execute-linear-issue)
5
+ ---
6
+
7
+ <objective>
8
+ Delegate Linear sub-task execution to the execute-linear-issue skill for: $ARGUMENTS
9
+
10
+ This routes to specialized skill that primes context from parent and dependencies, implements the change, verifies, commits, pushes, and updates Linear.
11
+ </objective>
12
+
13
+ <process>
14
+ 1. Use Skill tool to invoke execute-linear-issue skill
15
+ 2. Pass parent Linear issue ID: $ARGUMENTS
16
+ 3. Let skill handle context priming, implementation, verification, and git operations
17
+ </process>
18
+
19
+ <success_criteria>
20
+ - Skill successfully invoked
21
+ - Issue ID passed correctly to skill
22
+ </success_criteria>
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Break down a Linear issue into actionable sub-tasks with dependencies
3
+ argument-hint: <issue-id>
4
+ allowed-tools: Skill(refine-linear-issue)
5
+ ---
6
+
7
+ <objective>
8
+ Delegate Linear issue refinement to the refine-linear-issue skill for: $ARGUMENTS
9
+
10
+ This routes to specialized skill that performs deep codebase exploration and creates single-file-focused sub-tasks with blocking relationships.
11
+ </objective>
12
+
13
+ <process>
14
+ 1. Use Skill tool to invoke refine-linear-issue skill
15
+ 2. Pass Linear issue ID: $ARGUMENTS
16
+ 3. Let skill handle research, decomposition, and sub-task creation
17
+ </process>
18
+
19
+ <success_criteria>
20
+ - Skill successfully invoked
21
+ - Issue ID passed correctly to skill
22
+ </success_criteria>
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Verify a completed Linear issue against its acceptance criteria
3
+ argument-hint: <issue-id>
4
+ allowed-tools: Skill(verify-linear-issue)
5
+ ---
6
+
7
+ <objective>
8
+ Delegate Linear issue verification to the verify-linear-issue skill for: $ARGUMENTS
9
+
10
+ This routes to specialized skill that fetches issue context, reviews implementation against acceptance criteria, runs verification checks, and posts a review comment to Linear.
11
+ </objective>
12
+
13
+ <process>
14
+ 1. Use Skill tool to invoke verify-linear-issue skill
15
+ 2. Pass Linear issue ID: $ARGUMENTS
16
+ 3. Let skill handle context loading, code review, verification, and Linear updates
17
+ </process>
18
+
19
+ <success_criteria>
20
+ - Skill successfully invoked
21
+ - Issue ID passed correctly to skill
22
+ </success_criteria>
@@ -0,0 +1,386 @@
1
+ ---
2
+ name: define-linear-issue
3
+ description: Create well-defined Linear issues (bugs, features, tasks) using Socratic questioning to eliminate ambiguity. Use when creating new Linear issues, when the user mentions Linear, or needs to define work items with proper acceptance criteria and relationships.
4
+ ---
5
+
6
+ <objective>
7
+ Guide the creation of precise, unambiguous Linear issues through the Socratic method. Ask targeted questions to uncover edge cases, acceptance criteria, relationships, and constraints before creating the issue. A well-defined issue prevents thrashing and enables clear work execution.
8
+ </objective>
9
+
10
+ <context>
11
+ Linear is a project management tool with issues, projects, and cycles. Issues have:
12
+ - **States**: Backlog, Todo, In Progress, Done, Canceled, Duplicate
13
+ - **Labels**: Bug, Feature, Improvement (and custom labels)
14
+ - **Priority**: 0 (No priority), 1 (Urgent), 2 (High), 3 (Normal), 4 (Low)
15
+ - **Relationships**: blocks, blockedBy, relatedTo, duplicateOf
16
+ - **Hierarchy**: Issues can have parent issues (sub-issues)
17
+
18
+ Use the Linear MCP tools for all operations:
19
+ - `mcp__plugin_linear_linear__create_issue` - Create issues
20
+ - `mcp__plugin_linear_linear__list_issues` - Search existing issues
21
+ - `mcp__plugin_linear_linear__get_issue` - Get issue details
22
+ - `mcp__plugin_linear_linear__list_teams` - List available teams
23
+ - `mcp__plugin_linear_linear__list_issue_labels` - List available labels
24
+ </context>
25
+
26
+ <quick_start>
27
+ <initial_gate>
28
+ **CRITICAL - Run this BEFORE investigation**
29
+
30
+ If user provides no context (just invoked the skill), use AskUserQuestion:
31
+
32
+ Question: "What kind of issue do you need to create in Linear?"
33
+
34
+ Options:
35
+ 1. **Bug report** - Something is broken or not working as expected
36
+ 2. **Feature request** - New capability or enhancement
37
+ 3. **Task** - General work item
38
+ 4. **Improvement** - Enhancement to existing functionality
39
+ </initial_gate>
40
+
41
+ <workflow>
42
+ 1. **Determine issue type** - Bug, feature, task, or improvement
43
+ 2. **Identify team** - Use `list_teams` to find the target team
44
+ 3. **Gather core information** - Title, description, affected areas
45
+ 4. **Investigate with Socratic questions** - Ask until no ambiguities remain
46
+ 5. **Define acceptance criteria** - Verifiable outcomes
47
+ 6. **Identify relationships** - What blocks this? What does this block?
48
+ 7. **Set priority and metadata** - Priority 1-4, labels, project
49
+ 8. **Present for approval** - Show complete issue before creating
50
+ 9. **Create with Linear MCP** - Execute the create_issue tool
51
+ </workflow>
52
+ </quick_start>
53
+
54
+ <socratic_investigation>
55
+ <purpose>
56
+ Uncover hidden requirements, edge cases, and ambiguities through targeted questioning. Each question should reveal information that prevents incorrect implementation or scope creep.
57
+ </purpose>
58
+
59
+ <question_categories>
60
+ <bug_questions>
61
+ - "What is the expected behavior vs actual behavior?"
62
+ - "Can you reproduce this consistently? What are the exact steps?"
63
+ - "Does this affect all users or specific scenarios?"
64
+ - "What error messages or logs are shown?"
65
+ - "When did this start happening? Any recent changes?"
66
+ - "What is the impact - blocking users, data loss, degraded experience?"
67
+ </bug_questions>
68
+
69
+ <feature_questions>
70
+ - "Who is the primary user of this feature?"
71
+ - "What problem does this solve? What's the current workaround?"
72
+ - "What is the minimum viable version of this feature?"
73
+ - "Are there related features this should integrate with?"
74
+ - "What should happen at the edges - empty input, maximum values, errors?"
75
+ - "How will we know this feature is successful?"
76
+ </feature_questions>
77
+
78
+ <task_questions>
79
+ - "What is the definition of done for this task?"
80
+ - "What existing code or systems does this touch?"
81
+ - "Are there dependencies that must complete first?"
82
+ - "Who needs to be informed when this is complete?"
83
+ - "What could block progress on this?"
84
+ </task_questions>
85
+
86
+ <universal_questions>
87
+ - "What priority does this have? 1 (Urgent) to 4 (Low)?"
88
+ - "Is there a deadline or due date?"
89
+ - "Who should own this work?"
90
+ - "Are there labels that should be applied?"
91
+ - "Does this relate to any existing issues?"
92
+ - "Should this be part of a project?"
93
+ </universal_questions>
94
+ </question_categories>
95
+
96
+ <questioning_protocol>
97
+ 1. Start with 2-3 high-value questions using AskUserQuestion
98
+ 2. Based on answers, identify remaining ambiguities
99
+ 3. Ask follow-up questions until answers create no new questions
100
+ 4. Confirm understanding by summarizing back
101
+ 5. Only proceed to issue creation when requirements are clear
102
+
103
+ Use AskUserQuestion with descriptive options where applicable. For open-ended information gathering, direct questions in chat are acceptable.
104
+ </questioning_protocol>
105
+
106
+ <latent_error_prevention>
107
+ Watch for these common sources of unclear issues:
108
+
109
+ - **Assumed context**: "The usual flow" - which flow exactly?
110
+ - **Implicit scope**: "Handle errors" - which errors? How?
111
+ - **Missing acceptance criteria**: "Should work better" - how do we verify?
112
+ - **Hidden dependencies**: "After the API is ready" - which issue?
113
+ - **Vague priority**: "Soon" - Urgent or Low?
114
+ </latent_error_prevention>
115
+ </socratic_investigation>
116
+
117
+ <issue_structure>
118
+ <description_template>
119
+ A well-structured description includes:
120
+
121
+ ```markdown
122
+ ## Summary
123
+ [1-2 sentence overview of the issue]
124
+
125
+ ## Current Behavior (bugs only)
126
+ [What happens now that shouldn't]
127
+
128
+ ## Expected Behavior
129
+ [What should happen instead]
130
+
131
+ ## Reproduction Steps (bugs only)
132
+ 1. Step one
133
+ 2. Step two
134
+ 3. Observe issue
135
+
136
+ ## Acceptance Criteria
137
+ - [ ] Criterion 1 with verifiable outcome
138
+ - [ ] Criterion 2 with test method
139
+ - [ ] Criterion 3 with manual verification step
140
+
141
+ ## Additional Context
142
+ [Screenshots, logs, related issues]
143
+ ```
144
+ </description_template>
145
+
146
+ <acceptance_criteria_rules>
147
+ Write criteria as **behavioral outcomes**, not implementation details:
148
+
149
+ **GOOD (outcomes)**:
150
+ - "User can deactivate schedule without error"
151
+ - "All team members see updated schedule within 30 seconds"
152
+ - "Error message displays with actionable guidance"
153
+
154
+ **BAD (implementation)**:
155
+ - "Add try/catch around database call"
156
+ - "Use WebSocket for real-time sync"
157
+ - "Call scheduleService.deactivate()"
158
+
159
+ Each criterion should be:
160
+ 1. **Observable** - Can be seen or measured
161
+ 2. **Verifiable** - Has a test or check method
162
+ 3. **Unambiguous** - Only one interpretation
163
+ </acceptance_criteria_rules>
164
+ </issue_structure>
165
+
166
+ <linear_context_gathering>
167
+ <available_context>
168
+ Before creating an issue, gather context from Linear:
169
+
170
+ ```
171
+ # List existing issues that might be related
172
+ mcp__plugin_linear_linear__list_issues with query parameter
173
+
174
+ # Get issue details including relationships
175
+ mcp__plugin_linear_linear__get_issue with includeRelations: true
176
+
177
+ # List available teams
178
+ mcp__plugin_linear_linear__list_teams
179
+
180
+ # List available labels
181
+ mcp__plugin_linear_linear__list_issue_labels
182
+ ```
183
+ </available_context>
184
+
185
+ <relationship_discovery>
186
+ Ask about relationships using Linear context:
187
+
188
+ - "I found these related open issues: [list]. Does this new issue depend on any of them?"
189
+ - "Should any existing issues be blocked by this work?"
190
+ - "Is this related to an existing issue?"
191
+
192
+ Use relationship parameters at creation time:
193
+ - `blocks`: Issues this one blocks
194
+ - `blockedBy`: Issues blocking this one
195
+ - `relatedTo`: Related issues
196
+ - `duplicateOf`: If this duplicates another issue
197
+ </relationship_discovery>
198
+ </linear_context_gathering>
199
+
200
+ <priority_guidelines>
201
+ <priority_matrix>
202
+ | Priority | Meaning | When to use |
203
+ |----------|---------|-------------|
204
+ | 1 | Urgent | Production down, data loss, security |
205
+ | 2 | High | Major feature broken, many users affected |
206
+ | 3 | Normal | Important but not urgent, default |
207
+ | 4 | Low | Nice to have, improvements |
208
+ | 0 | No priority | Not yet triaged |
209
+ </priority_matrix>
210
+
211
+ <priority_questions>
212
+ Use AskUserQuestion for priority:
213
+
214
+ Question: "What priority should this have?"
215
+
216
+ Options:
217
+ 1. **Urgent (1)** - Production impact, must fix immediately
218
+ 2. **High (2)** - Major functionality affected, fix soon
219
+ 3. **Normal (3)** - Important but not urgent (recommended default)
220
+ 4. **Low (4)** - Enhancement, can wait
221
+ </priority_questions>
222
+ </priority_guidelines>
223
+
224
+ <approval_workflow>
225
+ <before_creating>
226
+ Present the complete issue in chat:
227
+
228
+ "Here is the issue I'll create in Linear:
229
+
230
+ **Title**: [title]
231
+ **Team**: [team name]
232
+ **Labels**: [Bug/Feature/Improvement]
233
+ **Priority**: [Urgent/High/Normal/Low]
234
+ **State**: [Backlog/Todo]
235
+ **Description**:
236
+ [full description with acceptance criteria]
237
+
238
+ **Relationships**: [if any]
239
+ **Project**: [if applicable]
240
+
241
+ Ready to create this issue?"
242
+
243
+ Use AskUserQuestion:
244
+ - **Create issue** - Issue looks correct, create it
245
+ - **Make changes** - I need to modify something
246
+ - **Add more context** - I have additional information
247
+ - **Cancel** - Don't create this issue
248
+ </before_creating>
249
+
250
+ <create_command>
251
+ After approval, use the Linear MCP tool:
252
+
253
+ ```
254
+ mcp__plugin_linear_linear__create_issue
255
+ team: "Team Name"
256
+ title: "Issue title"
257
+ description: "Full markdown description"
258
+ labels: ["Bug"] or ["Feature"] or ["Improvement"]
259
+ priority: 1-4
260
+ state: "Backlog" or "Todo"
261
+ blocks: ["ISSUE-123"] # optional
262
+ blockedBy: ["ISSUE-456"] # optional
263
+ relatedTo: ["ISSUE-789"] # optional
264
+ ```
265
+ </create_command>
266
+
267
+ <after_creation>
268
+ Confirm: "Created issue [ID]: [title]
269
+
270
+ Would you like to:
271
+ - Create related issues
272
+ - Set up additional relationships
273
+ - Add this to a project"
274
+ </after_creation>
275
+ </approval_workflow>
276
+
277
+ <examples>
278
+ <bug_example>
279
+ User: "There's a bug with schedules"
280
+
281
+ Response flow:
282
+ 1. "What is happening vs what should happen?"
283
+ 2. "Can you reproduce this? What are the steps?"
284
+ 3. "Does this affect all users or specific scenarios?"
285
+ 4. "What error message do you see?"
286
+
287
+ Resulting issue:
288
+ ```
289
+ mcp__plugin_linear_linear__create_issue
290
+ team: "Verz"
291
+ title: "Schedule deactivation throws 500 error"
292
+ description: "## Summary
293
+ Users receive HTTP 500 error when deactivating schedules.
294
+
295
+ ## Current Behavior
296
+ Clicking 'Deactivate' shows error toast and schedule remains active.
297
+
298
+ ## Expected Behavior
299
+ Schedule deactivates successfully with confirmation message.
300
+
301
+ ## Reproduction Steps
302
+ 1. Navigate to Schedule Settings
303
+ 2. Click 'Deactivate Schedule'
304
+ 3. Observe 500 error in toast
305
+
306
+ ## Acceptance Criteria
307
+ - [ ] User can deactivate schedule without error
308
+ - [ ] Schedule status updates to 'inactive'
309
+ - [ ] Team members see schedule status change
310
+ - [ ] Error logs capture root cause for monitoring"
311
+ labels: ["Bug"]
312
+ priority: 1
313
+ state: "Todo"
314
+ ```
315
+ </bug_example>
316
+
317
+ <feature_example>
318
+ User: "We need to add dark mode"
319
+
320
+ Response flow:
321
+ 1. "Who is the primary user of this feature?"
322
+ 2. "Should it follow system preferences or be manually toggled?"
323
+ 3. "Which screens/components need dark mode support?"
324
+ 4. "How will we know this feature is successful?"
325
+
326
+ Resulting issue:
327
+ ```
328
+ mcp__plugin_linear_linear__create_issue
329
+ team: "Verz"
330
+ title: "Add dark mode theme support"
331
+ description: "## Summary
332
+ Add dark mode support with system preference detection and manual toggle.
333
+
334
+ ## Expected Behavior
335
+ - App detects system dark mode preference on launch
336
+ - User can manually toggle between light/dark/system
337
+ - All screens render correctly in both modes
338
+
339
+ ## Acceptance Criteria
340
+ - [ ] Theme follows system preference by default
341
+ - [ ] Settings screen has theme toggle (Light/Dark/System)
342
+ - [ ] All text maintains 4.5:1 contrast ratio in both modes
343
+ - [ ] Theme preference persists across app restarts
344
+ - [ ] No flash of wrong theme on app launch"
345
+ labels: ["Feature"]
346
+ priority: 3
347
+ state: "Backlog"
348
+ ```
349
+ </feature_example>
350
+ </examples>
351
+
352
+ <anti_patterns>
353
+ **Don't accept vague requirements**:
354
+ - BAD: "Fix the scheduling bug"
355
+ - GOOD: "Fix 500 error on schedule deactivation affecting all users"
356
+
357
+ **Don't skip acceptance criteria**:
358
+ - BAD: Create issue with just title and description
359
+ - GOOD: Every issue has verifiable acceptance criteria
360
+
361
+ **Don't assume priority**:
362
+ - BAD: Default everything to Normal
363
+ - GOOD: Ask about impact and urgency to determine priority
364
+
365
+ **Don't ignore relationships**:
366
+ - BAD: Create isolated issues
367
+ - GOOD: Search for related issues and set up relationship links
368
+
369
+ **Don't create compound issues**:
370
+ - BAD: "Fix deactivation and add team sync and improve UI"
371
+ - GOOD: Create separate issues for each concern
372
+ </anti_patterns>
373
+
374
+ <success_criteria>
375
+ An issue is ready when:
376
+
377
+ - [ ] Labels match the nature of the work (Bug/Feature/Improvement)
378
+ - [ ] Title is specific and actionable
379
+ - [ ] Description includes all relevant context
380
+ - [ ] Acceptance criteria are behavioral outcomes
381
+ - [ ] Each criterion is verifiable
382
+ - [ ] Priority reflects actual urgency/impact
383
+ - [ ] Relationships are identified and linked
384
+ - [ ] Project is set (if applicable)
385
+ - [ ] User has approved before creation
386
+ </success_criteria>