mindsystem-cc 3.1.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/bin/install.js +2 -2
- package/commands/ms/linear.md +231 -0
- 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/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';
|
|
@@ -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/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|