mindsystem-cc 3.0.0 → 3.2.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/README.md +179 -332
- package/agents/ms-executor.md +0 -1
- package/agents/ms-roadmapper.md +0 -1
- package/bin/install.js +2 -2
- package/commands/ms/help.md +0 -30
- package/commands/ms/linear.md +231 -0
- package/commands/ms/progress.md +16 -2
- package/commands/ms/remove-phase.md +0 -2
- package/mindsystem/templates/state.md +0 -13
- package/mindsystem/workflows/execute-plan.md +0 -1
- package/mindsystem/workflows/transition.md +0 -14
- package/package.json +1 -1
- package/scripts/ms-linear/ms_linear/__init__.py +3 -0
- package/scripts/ms-linear/ms_linear/__main__.py +6 -0
- package/scripts/ms-linear/ms_linear/__pycache__/__init__.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/__main__.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/cli.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/client.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/config.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/errors.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/output.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/cli.py +604 -0
- package/scripts/ms-linear/ms_linear/client.py +503 -0
- package/scripts/ms-linear/ms_linear/config.py +102 -0
- package/scripts/ms-linear/ms_linear/errors.py +29 -0
- package/scripts/ms-linear/ms_linear/output.py +45 -0
- package/scripts/ms-linear/pyproject.toml +16 -0
- package/scripts/ms-linear/uv.lock +196 -0
- package/scripts/ms-linear-wrapper.sh +21 -0
- package/commands/ms/pause-work.md +0 -123
- package/commands/ms/resume-work.md +0 -40
- package/mindsystem/templates/continue-here.md +0 -78
- package/mindsystem/workflows/resume-project.md +0 -311
package/agents/ms-executor.md
CHANGED
package/agents/ms-roadmapper.md
CHANGED
package/bin/install.js
CHANGED
|
@@ -5,8 +5,8 @@ const path = require('path');
|
|
|
5
5
|
const os = require('os');
|
|
6
6
|
const readline = require('readline');
|
|
7
7
|
|
|
8
|
-
// Colors
|
|
9
|
-
const cyan = '\x1b[38;
|
|
8
|
+
// Colors (using 256-color mode for better terminal compatibility)
|
|
9
|
+
const cyan = '\x1b[38;5;37m'; // Closest to #2FA7A0 in 256-color palette
|
|
10
10
|
const green = '\x1b[32m';
|
|
11
11
|
const yellow = '\x1b[33m';
|
|
12
12
|
const dim = '\x1b[2m';
|
package/commands/ms/help.md
CHANGED
|
@@ -337,28 +337,6 @@ Check project status and intelligently route to next action.
|
|
|
337
337
|
|
|
338
338
|
Usage: `/ms:progress`
|
|
339
339
|
|
|
340
|
-
### Session Management
|
|
341
|
-
|
|
342
|
-
**`/ms:resume-work`**
|
|
343
|
-
Resume work from previous session with full context restoration.
|
|
344
|
-
|
|
345
|
-
- Use when: you paused mid-phase and want to restore context and continue.
|
|
346
|
-
- Reads STATE.md for project context
|
|
347
|
-
- Shows current position and recent progress
|
|
348
|
-
- Offers next actions based on project state
|
|
349
|
-
|
|
350
|
-
Usage: `/ms:resume-work`
|
|
351
|
-
|
|
352
|
-
**`/ms:pause-work`**
|
|
353
|
-
Create context handoff when pausing work mid-phase.
|
|
354
|
-
|
|
355
|
-
- Use when: you need to stop mid-stream and want a reliable handoff pointer for next time.
|
|
356
|
-
- Creates `.continue-here` file with current state
|
|
357
|
-
- Updates STATE.md session continuity section
|
|
358
|
-
- Captures in-progress work context
|
|
359
|
-
|
|
360
|
-
Usage: `/ms:pause-work`
|
|
361
|
-
|
|
362
340
|
### Debugging
|
|
363
341
|
|
|
364
342
|
**`/ms:debug [issue description]`**
|
|
@@ -606,14 +584,6 @@ Common options:
|
|
|
606
584
|
/ms:check-todos api # Filter by area
|
|
607
585
|
```
|
|
608
586
|
|
|
609
|
-
**Pausing and resuming mid-phase:**
|
|
610
|
-
|
|
611
|
-
```
|
|
612
|
-
/ms:pause-work # Creates a handoff pointer
|
|
613
|
-
# later...
|
|
614
|
-
/ms:resume-work # Restore context and continue
|
|
615
|
-
```
|
|
616
|
-
|
|
617
587
|
## Getting Help
|
|
618
588
|
|
|
619
589
|
- Read `.planning/PROJECT.md` for project vision
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:linear
|
|
3
|
+
description: Interact with Linear API to create, update, and manage issues
|
|
4
|
+
argument-hint: "[action or description]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
- AskUserQuestion
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Provide a conversational interface to Linear for issue management. Route to the appropriate CLI command based on user intent.
|
|
13
|
+
|
|
14
|
+
Apply Pareto principle: ask max 4 high-impact questions. Skip questions with obvious answers from context.
|
|
15
|
+
</objective>
|
|
16
|
+
|
|
17
|
+
<execution_context>
|
|
18
|
+
@~/.claude/mindsystem/scripts/ms-linear-wrapper.sh
|
|
19
|
+
</execution_context>
|
|
20
|
+
|
|
21
|
+
<cli_reference>
|
|
22
|
+
**CLI location:** `~/.claude/mindsystem/scripts/ms-linear-wrapper.sh`
|
|
23
|
+
|
|
24
|
+
**Commands:**
|
|
25
|
+
| Command | Usage | Purpose |
|
|
26
|
+
|---------|-------|---------|
|
|
27
|
+
| `create` | `create "<title>" [-d desc] [-p priority] [-e estimate] [--parent ID] [--project name] [--no-project]` | Create issue |
|
|
28
|
+
| `update` | `update <ID> [-t title] [-d desc] [-p priority]` | Update fields |
|
|
29
|
+
| `done` | `done <ID>` | Mark completed |
|
|
30
|
+
| `state` | `state <ID> "<name>"` | Change state |
|
|
31
|
+
| `break` | `break <ID> --issues '[{...}]' [--project name] [--no-project]` | Create sub-issues |
|
|
32
|
+
| `get` | `get <ID>` | Fetch details |
|
|
33
|
+
| `states` | `states` | List workflow states |
|
|
34
|
+
| `projects` | `projects` | List available projects |
|
|
35
|
+
|
|
36
|
+
**Priority values:** 0=None, 1=Urgent, 2=High, 3=Normal, 4=Low
|
|
37
|
+
|
|
38
|
+
**T-shirt to estimate mapping:**
|
|
39
|
+
- XS → 1, S → 2, M → 3, L → 5, XL → 8
|
|
40
|
+
|
|
41
|
+
**Project handling:**
|
|
42
|
+
- `--project "Name"` — Assign to project by name (overrides config default)
|
|
43
|
+
- `--no-project` — Don't assign to any project
|
|
44
|
+
- If neither specified, uses `projectId` from `.linear.json` if present
|
|
45
|
+
</cli_reference>
|
|
46
|
+
|
|
47
|
+
<config_format>
|
|
48
|
+
`.linear.json` in project root:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"teamId": "uuid-of-linear-team",
|
|
53
|
+
"projectId": "uuid-of-linear-project (optional)",
|
|
54
|
+
"defaultPriority": 3,
|
|
55
|
+
"defaultLabels": []
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- `teamId` — Required. Your Linear team UUID.
|
|
60
|
+
- `projectId` — Optional. Default project for new issues. Can be overridden with `--project` or `--no-project`.
|
|
61
|
+
</config_format>
|
|
62
|
+
|
|
63
|
+
<process>
|
|
64
|
+
|
|
65
|
+
<step name="parse_intent">
|
|
66
|
+
**Parse the command to determine intent:**
|
|
67
|
+
|
|
68
|
+
| Pattern | Intent | Action |
|
|
69
|
+
|---------|--------|--------|
|
|
70
|
+
| `done <ID>` | Mark complete | Execute `done` directly |
|
|
71
|
+
| `state <ID> "<name>"` | Change state | Execute `state` directly |
|
|
72
|
+
| `get <ID>` | Fetch details | Execute `get` directly |
|
|
73
|
+
| `states` | List states | Execute `states` directly |
|
|
74
|
+
| `projects` | List projects | Execute `projects` directly |
|
|
75
|
+
| `break <ID>` | Break into sub-issues | Go to break flow |
|
|
76
|
+
| `update <ID> <text>` | Update issue | Execute `update` with parsed fields |
|
|
77
|
+
| `<ID> <description>` | Create sub-issue | Go to create flow with parent |
|
|
78
|
+
| `<description>` | Create issue | Go to create flow |
|
|
79
|
+
| (empty) | No input | Ask what they want to do |
|
|
80
|
+
|
|
81
|
+
Issue ID pattern: 2-4 uppercase letters followed by hyphen and numbers (e.g., `ABC-123`, `PROJ-42`).
|
|
82
|
+
</step>
|
|
83
|
+
|
|
84
|
+
<step name="direct_commands">
|
|
85
|
+
**For direct commands (done, state, get, states, projects):**
|
|
86
|
+
|
|
87
|
+
Execute CLI and format output.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
~/.claude/mindsystem/scripts/ms-linear-wrapper.sh [command] [args] --json-pretty
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Parse JSON response and present result:
|
|
94
|
+
- Success: Show identifier, title, new state, and URL
|
|
95
|
+
- For `projects`: List projects grouped by team
|
|
96
|
+
- Error: Show error message and suggestions
|
|
97
|
+
</step>
|
|
98
|
+
|
|
99
|
+
<step name="create_flow">
|
|
100
|
+
**For create/sub-issue:**
|
|
101
|
+
|
|
102
|
+
1. **Parse input for hints:**
|
|
103
|
+
- Title from first sentence or quoted text
|
|
104
|
+
- Priority hints: "urgent", "high priority", "low priority", "blocker"
|
|
105
|
+
- Estimate hints: "XS", "S", "M", "L", "XL", "small", "medium", "large"
|
|
106
|
+
- Parent ID if pattern `<ID> <description>`
|
|
107
|
+
- Project hints: "in [Project]", "for [Project]", "(project: [Name])", "[Project] project"
|
|
108
|
+
|
|
109
|
+
2. **Ask clarifying questions (max 4, single AskUserQuestion call):**
|
|
110
|
+
|
|
111
|
+
Skip questions with obvious answers. Examples:
|
|
112
|
+
- Title clearly stated → don't ask for title
|
|
113
|
+
- Priority mentioned → don't ask for priority
|
|
114
|
+
- Simple task → skip estimate question
|
|
115
|
+
- Project mentioned → don't ask for project
|
|
116
|
+
|
|
117
|
+
Use AskUserQuestion with questions like:
|
|
118
|
+
- Priority (if not obvious from context)
|
|
119
|
+
- Estimate (if not mentioned)
|
|
120
|
+
- Project (if multiple projects exist and none specified)
|
|
121
|
+
- Description details (if ambiguous)
|
|
122
|
+
|
|
123
|
+
For project selection, first run `projects` command to get available options.
|
|
124
|
+
|
|
125
|
+
3. **Show preview and confirm:**
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
## Create Issue
|
|
129
|
+
|
|
130
|
+
**Title:** [parsed title]
|
|
131
|
+
**Project:** [project name or "Team backlog"]
|
|
132
|
+
**Priority:** [priority name]
|
|
133
|
+
**Estimate:** [estimate if set]
|
|
134
|
+
**Parent:** [parent ID if sub-issue]
|
|
135
|
+
|
|
136
|
+
Create this issue?
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Use AskUserQuestion: "Create this issue?" with options:
|
|
140
|
+
- "Yes, create it"
|
|
141
|
+
- "Edit first"
|
|
142
|
+
- "Cancel"
|
|
143
|
+
|
|
144
|
+
4. **Execute CLI:**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
~/.claude/mindsystem/scripts/ms-linear-wrapper.sh create "[title]" \
|
|
148
|
+
-d "[description]" -p [priority] -e [estimate] [--parent ID] \
|
|
149
|
+
[--project "Name"] [--no-project] --json-pretty
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
5. **Format result:**
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Created: **[identifier]** — [title]
|
|
156
|
+
Project: [project name]
|
|
157
|
+
[url]
|
|
158
|
+
```
|
|
159
|
+
</step>
|
|
160
|
+
|
|
161
|
+
<step name="break_flow">
|
|
162
|
+
**For breaking down issues:**
|
|
163
|
+
|
|
164
|
+
1. **Fetch parent issue:**
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
~/.claude/mindsystem/scripts/ms-linear-wrapper.sh get [ID] --json-pretty
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
2. **Analyze and propose sub-issues:**
|
|
171
|
+
|
|
172
|
+
Based on title and description, propose 2-5 sub-issues:
|
|
173
|
+
- Each with clear title
|
|
174
|
+
- Inherit parent's priority unless specified
|
|
175
|
+
- Suggest estimates if pattern is clear
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
## Break Down: [identifier] — [title]
|
|
179
|
+
|
|
180
|
+
Proposed sub-issues:
|
|
181
|
+
1. [Title 1] (M)
|
|
182
|
+
2. [Title 2] (S)
|
|
183
|
+
3. [Title 3] (M)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
3. **Confirm with user:**
|
|
187
|
+
|
|
188
|
+
Use AskUserQuestion: "Create these sub-issues?" with options:
|
|
189
|
+
- "Yes, create all"
|
|
190
|
+
- "Let me edit the list"
|
|
191
|
+
- "Cancel"
|
|
192
|
+
|
|
193
|
+
4. **Build JSON and execute:**
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
~/.claude/mindsystem/scripts/ms-linear-wrapper.sh break [ID] \
|
|
197
|
+
--issues '[{"title":"...","estimate":3},{"title":"...","estimate":2}]' --json-pretty
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
5. **Format result:**
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
Created 3 sub-issues under [parent-identifier]:
|
|
204
|
+
- **[ID-1]** — [title 1]
|
|
205
|
+
- **[ID-2]** — [title 2]
|
|
206
|
+
- **[ID-3]** — [title 3]
|
|
207
|
+
```
|
|
208
|
+
</step>
|
|
209
|
+
|
|
210
|
+
<step name="error_handling">
|
|
211
|
+
**Handle errors gracefully:**
|
|
212
|
+
|
|
213
|
+
- **MISSING_API_KEY:** Explain how to set LINEAR_API_KEY
|
|
214
|
+
- **MISSING_CONFIG:** Explain how to create .linear.json
|
|
215
|
+
- **ISSUE_NOT_FOUND:** Suggest checking the identifier
|
|
216
|
+
- **STATE_NOT_FOUND:** List available states from `states` command
|
|
217
|
+
- **PROJECT_NOT_FOUND:** List available projects from `projects` command
|
|
218
|
+
|
|
219
|
+
Always parse JSON error response and present human-friendly message with suggestions.
|
|
220
|
+
</step>
|
|
221
|
+
|
|
222
|
+
</process>
|
|
223
|
+
|
|
224
|
+
<success_criteria>
|
|
225
|
+
- [ ] Intent correctly parsed from input
|
|
226
|
+
- [ ] Direct commands execute immediately
|
|
227
|
+
- [ ] Create flow asks max 4 questions
|
|
228
|
+
- [ ] User confirms before creating/updating
|
|
229
|
+
- [ ] CLI output parsed and formatted for readability
|
|
230
|
+
- [ ] Errors handled with helpful suggestions
|
|
231
|
+
</success_criteria>
|
package/commands/ms/progress.md
CHANGED
|
@@ -31,7 +31,22 @@ Run /ms:new-project to start a new project.
|
|
|
31
31
|
|
|
32
32
|
Exit.
|
|
33
33
|
|
|
34
|
-
If missing STATE.md
|
|
34
|
+
**If missing STATE.md but PROJECT.md or ROADMAP.md exist:**
|
|
35
|
+
|
|
36
|
+
Reconstruct STATE.md from artifacts:
|
|
37
|
+
|
|
38
|
+
1. Read PROJECT.md → Extract "What This Is" and Core Value
|
|
39
|
+
2. Read ROADMAP.md → Determine phases, find current position
|
|
40
|
+
3. Scan *-SUMMARY.md files → Extract recent decisions, concerns
|
|
41
|
+
4. Count pending todos in .planning/todos/pending/
|
|
42
|
+
|
|
43
|
+
Write reconstructed STATE.md, then proceed to "load" step.
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
"STATE.md missing. Reconstructing from artifacts..."
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If missing both STATE.md and PROJECT.md/ROADMAP.md: suggest `/ms:new-project`.
|
|
35
50
|
|
|
36
51
|
**If ROADMAP.md missing but PROJECT.md exists:**
|
|
37
52
|
|
|
@@ -354,7 +369,6 @@ Ready to plan the next milestone.
|
|
|
354
369
|
- Phase complete but next phase not planned → offer `/ms:plan-phase [next]`
|
|
355
370
|
- All work complete → offer milestone completion
|
|
356
371
|
- Blockers present → highlight before offering to continue
|
|
357
|
-
- Handoff file exists → mention it, offer `/ms:resume-work`
|
|
358
372
|
</step>
|
|
359
373
|
|
|
360
374
|
</process>
|
|
@@ -73,12 +73,6 @@ None yet.
|
|
|
73
73
|
[Issues that affect future work]
|
|
74
74
|
|
|
75
75
|
None yet.
|
|
76
|
-
|
|
77
|
-
## Session Continuity
|
|
78
|
-
|
|
79
|
-
Last session: [YYYY-MM-DD HH:MM]
|
|
80
|
-
Stopped at: [Description of last completed action]
|
|
81
|
-
Resume file: [Path to .continue-here*.md if exists, otherwise "None"]
|
|
82
76
|
```
|
|
83
77
|
|
|
84
78
|
<purpose>
|
|
@@ -172,12 +166,6 @@ Updated after each plan completion.
|
|
|
172
166
|
- Prefix with originating phase
|
|
173
167
|
- Cleared when addressed
|
|
174
168
|
|
|
175
|
-
### Session Continuity
|
|
176
|
-
Enables instant resumption:
|
|
177
|
-
- When was last session
|
|
178
|
-
- What was last completed
|
|
179
|
-
- Is there a .continue-here file to resume from
|
|
180
|
-
|
|
181
169
|
</sections>
|
|
182
170
|
|
|
183
171
|
<size_constraint>
|
|
@@ -219,6 +207,5 @@ The goal is "read once, know where we are" — if it's too long, that fails.
|
|
|
219
207
|
- Current Position: Where we are now (phase, plan, status)
|
|
220
208
|
- Performance Metrics: Velocity tracking
|
|
221
209
|
- Accumulated Context: Recent decisions, pending todos, adhoc work, blockers
|
|
222
|
-
- Session Continuity: Resume information
|
|
223
210
|
|
|
224
211
|
</guidelines>
|
|
@@ -1455,7 +1455,6 @@ Update Session Continuity section in STATE.md to enable resumption in future ses
|
|
|
1455
1455
|
```markdown
|
|
1456
1456
|
Last session: [current date and time]
|
|
1457
1457
|
Stopped at: Completed {phase}-{plan}-PLAN.md
|
|
1458
|
-
Resume file: [path to .continue-here if exists, else "None"]
|
|
1459
1458
|
```
|
|
1460
1459
|
|
|
1461
1460
|
**Size constraint note:** Keep STATE.md under 150 lines total.
|
|
@@ -106,18 +106,6 @@ Wait for user decision.
|
|
|
106
106
|
|
|
107
107
|
</step>
|
|
108
108
|
|
|
109
|
-
<step name="cleanup_handoff">
|
|
110
|
-
|
|
111
|
-
Check for lingering handoffs:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
ls .planning/phases/XX-current/.continue-here*.md 2>/dev/null
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
If found, delete them — phase is complete, handoffs are stale.
|
|
118
|
-
|
|
119
|
-
</step>
|
|
120
|
-
|
|
121
109
|
<step name="update_roadmap">
|
|
122
110
|
|
|
123
111
|
Update the roadmap file:
|
|
@@ -379,14 +367,12 @@ Update Session Continuity section in STATE.md to reflect transition completion.
|
|
|
379
367
|
```markdown
|
|
380
368
|
Last session: [today]
|
|
381
369
|
Stopped at: Phase [X] complete, ready to plan Phase [X+1]
|
|
382
|
-
Resume file: None
|
|
383
370
|
```
|
|
384
371
|
|
|
385
372
|
**Step complete when:**
|
|
386
373
|
|
|
387
374
|
- [ ] Last session timestamp updated to current date and time
|
|
388
375
|
- [ ] Stopped at describes phase completion and next phase
|
|
389
|
-
- [ ] Resume file confirmed as None (transitions don't use resume files)
|
|
390
376
|
|
|
391
377
|
</step>
|
|
392
378
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|