mindsystem-cc 3.1.0 → 3.2.1

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 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;2;47;167;160m'; // #2FA7A0
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,195 @@
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
+ Conversational interface to Linear for fast issue management. Primary use case: user describes work → ask high-impact questions → create ticket immediately.
13
+
14
+ **Speed over polish.** Get tickets into Linear quickly. Don't over-engineer descriptions or explore solutions.
15
+
16
+ **No codebase exploration unless explicitly requested.** Work from user's description only. Do NOT launch agents, explore files, or analyze code unless the user explicitly asks for it.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @~/.claude/mindsystem/scripts/ms-linear-wrapper.sh
21
+ </execution_context>
22
+
23
+ <cli_reference>
24
+ **CLI location:** `~/.claude/mindsystem/scripts/ms-linear-wrapper.sh`
25
+
26
+ **Commands:**
27
+ | Command | Usage | Purpose |
28
+ |---------|-------|---------|
29
+ | `create` | `create "<title>" [-d desc] [-p priority] [-e estimate] [--parent ID] [--project name] [--no-project]` | Create issue |
30
+ | `update` | `update <ID> [-t title] [-d desc] [-p priority]` | Update fields |
31
+ | `done` | `done <ID>` | Mark completed |
32
+ | `state` | `state <ID> "<name>"` | Change state |
33
+ | `break` | `break <ID> --issues '[{...}]' [--project name] [--no-project]` | Create sub-issues |
34
+ | `get` | `get <ID>` | Fetch details |
35
+ | `states` | `states` | List workflow states |
36
+ | `projects` | `projects` | List available projects |
37
+
38
+ **Priority values:** 0=None, 1=Urgent, 2=High, 3=Normal, 4=Low
39
+
40
+ **T-shirt to estimate mapping:**
41
+ - XS → 1, S → 2, M → 3, L → 5, XL → 8
42
+
43
+ **Project handling:**
44
+ - `--project "Name"` — Assign to project by name (overrides config default)
45
+ - `--no-project` — Don't assign to any project
46
+ - If neither specified, uses `projectId` from `.linear.json` if present
47
+ </cli_reference>
48
+
49
+ <config_format>
50
+ `.linear.json` in project root:
51
+
52
+ ```json
53
+ {
54
+ "teamId": "uuid-of-linear-team",
55
+ "projectId": "uuid-of-linear-project (optional)",
56
+ "defaultPriority": 3,
57
+ "defaultLabels": []
58
+ }
59
+ ```
60
+
61
+ - `teamId` — Required. Your Linear team UUID.
62
+ - `projectId` — Optional. Default project for new issues. Can be overridden with `--project` or `--no-project`.
63
+ </config_format>
64
+
65
+ <process>
66
+
67
+ <step name="parse_intent">
68
+ **Parse the command to determine intent:**
69
+
70
+ | Pattern | Intent | Action |
71
+ |---------|--------|--------|
72
+ | `done <ID>` | Mark complete | Execute `done` directly |
73
+ | `state <ID> "<name>"` | Change state | Execute `state` directly |
74
+ | `get <ID>` | Fetch details | Execute `get` directly |
75
+ | `states` | List states | Execute `states` directly |
76
+ | `projects` | List projects | Execute `projects` directly |
77
+ | `update <ID> <text>` | Update issue | Execute `update` with parsed fields |
78
+ | `break <ID>` + user provides sub-issues | Break into sub-issues | Execute `break` with user's list |
79
+ | `<ID> <description>` | Create sub-issue | Go to create flow with parent |
80
+ | `<description>` | Create issue | Go to create flow |
81
+ | (empty) | No input | Ask what they want to do |
82
+
83
+ Issue ID pattern: 2-4 uppercase letters followed by hyphen and numbers (e.g., `ABC-123`, `PROJ-42`).
84
+ </step>
85
+
86
+ <step name="direct_commands">
87
+ **For direct commands (done, state, get, states, projects, update):**
88
+
89
+ Execute CLI and format output.
90
+
91
+ ```bash
92
+ ~/.claude/mindsystem/scripts/ms-linear-wrapper.sh [command] [args] --json-pretty
93
+ ```
94
+
95
+ Parse JSON response and present result:
96
+ - Success: Show identifier, title, new state, and URL
97
+ - For `projects`: List projects grouped by team
98
+ - Error: Show error message and suggestions
99
+ </step>
100
+
101
+ <step name="create_flow">
102
+ **For create/sub-issue — FAST PATH:**
103
+
104
+ 1. **Parse input for hints:**
105
+ - Title from first sentence or quoted text
106
+ - Priority hints: "urgent", "high priority", "low priority", "blocker"
107
+ - Estimate hints: "XS", "S", "M", "L", "XL", "small", "medium", "large"
108
+ - Parent ID if pattern `<ID> <description>`
109
+ - Project hints: "in [Project]", "for [Project]", "(project: [Name])", "[Project] project"
110
+
111
+ 2. **Infer priority and estimate** from the description:
112
+ - Bug fixes, blockers → High/Urgent
113
+ - Small tweaks, copy changes → Low priority, XS/S estimate
114
+ - New features → Normal priority, M estimate
115
+ - Large features, refactors → Normal priority, L/XL estimate
116
+
117
+ 3. **Ask UP TO 4 questions in ONE AskUserQuestion call:**
118
+
119
+ Combine these into a single batch:
120
+
121
+ **Confirmation question:** Show inferred priority/estimate, ask to confirm or adjust
122
+
123
+ **High-impact domain questions (pick 1-3 most relevant):**
124
+ - Scope clarification: "Should this [specific behavior] or [alternative]?"
125
+ - Edge cases: "What should happen when [edge case]?"
126
+ - Acceptance criteria: "What's the minimum for this to be done?"
127
+ - Context: "Is this related to [existing feature/area]?"
128
+
129
+ Skip questions with obvious answers from description. If description is very clear, may only need confirmation.
130
+
131
+ If project not specified and multiple projects exist, include project selection.
132
+
133
+ 4. **Create immediately after answers:**
134
+
135
+ ```bash
136
+ ~/.claude/mindsystem/scripts/ms-linear-wrapper.sh create "[title]" \
137
+ -d "[description with user's answers incorporated]" -p [priority] -e [estimate] \
138
+ [--parent ID] [--project "Name"] [--no-project] --json-pretty
139
+ ```
140
+
141
+ 5. **Format result:**
142
+
143
+ ```
144
+ Created: **[identifier]** — [title]
145
+ Project: [project name]
146
+ [url]
147
+ ```
148
+ </step>
149
+
150
+ <step name="break_flow">
151
+ **For breaking down issues:**
152
+
153
+ User provides the sub-issues in conversation. Do NOT propose or generate sub-issues.
154
+
155
+ 1. **Get sub-issue list from user** (they specify titles/estimates in their message)
156
+
157
+ 2. **Build JSON and execute:**
158
+
159
+ ```bash
160
+ ~/.claude/mindsystem/scripts/ms-linear-wrapper.sh break [ID] \
161
+ --issues '[{"title":"...","estimate":3},{"title":"...","estimate":2}]' --json-pretty
162
+ ```
163
+
164
+ 3. **Format result:**
165
+
166
+ ```
167
+ Created N sub-issues under [parent-identifier]:
168
+ - **[ID-1]** — [title 1]
169
+ - **[ID-2]** — [title 2]
170
+ ```
171
+ </step>
172
+
173
+ <step name="error_handling">
174
+ **Handle errors gracefully:**
175
+
176
+ - **MISSING_API_KEY:** Explain how to set LINEAR_API_KEY
177
+ - **MISSING_CONFIG:** Explain how to create .linear.json
178
+ - **ISSUE_NOT_FOUND:** Suggest checking the identifier
179
+ - **STATE_NOT_FOUND:** List available states from `states` command
180
+ - **PROJECT_NOT_FOUND:** List available projects from `projects` command
181
+
182
+ Always parse JSON error response and present human-friendly message with suggestions.
183
+ </step>
184
+
185
+ </process>
186
+
187
+ <success_criteria>
188
+ - [ ] Intent correctly parsed from input
189
+ - [ ] Direct commands execute immediately without questions
190
+ - [ ] Create flow asks max 4 questions in ONE AskUserQuestion call
191
+ - [ ] No codebase exploration unless user explicitly requests it
192
+ - [ ] Issue created immediately after user answers questions
193
+ - [ ] CLI output parsed and formatted for readability
194
+ - [ ] Errors handled with helpful suggestions
195
+ </success_criteria>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindsystem-cc",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.",
5
5
  "bin": {
6
6
  "mindsystem-cc": "bin/install.js"
@@ -0,0 +1,3 @@
1
+ """ms-linear CLI tool for Linear integration."""
2
+
3
+ __version__ = "1.0.0"
@@ -0,0 +1,6 @@
1
+ """Entry point for python -m ms_linear."""
2
+
3
+ from ms_linear.cli import app
4
+
5
+ if __name__ == "__main__":
6
+ app()