monomind 1.6.7 → 1.6.9

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.
@@ -87,10 +87,18 @@ Spawn 3-5 `researcher` agents in parallel using the Agent tool (mesh topology).
87
87
  - The user's prompt: `$ARGUMENTS`
88
88
  - The `PROJECT_CONTEXT` string from Step 1
89
89
 
90
- Each agent should generate ideas as a JSON array. There is no hard cap -- generate as many or as few as the topic warrants:
90
+ Each agent should generate ideas as a JSON array. There is no hard cap generate as many or as few as the topic warrants. Ideas should span **two categories**:
91
+
92
+ 1. **Feature/capability ideas** — what to build, what problem it solves, why it matters.
93
+ 2. **Technical stack & baseline decisions** — foundational choices that must be made before implementation (e.g., "Use PostgreSQL vs SQLite for persistence", "Adopt event-driven architecture vs request-response", "Choose WebSocket vs SSE for real-time updates", "Define the API versioning strategy"). These are the "how" decisions that shape everything downstream.
94
+
91
95
  ```json
92
96
  [
93
- { "title": "Short idea title", "description": "2-3 sentence description of the idea, what it solves, and why it matters." }
97
+ {
98
+ "title": "Short idea title",
99
+ "description": "2-3 sentence description of the idea, what it solves, and why it matters.",
100
+ "category": "feature | technical-baseline"
101
+ }
94
102
  ]
95
103
  ```
96
104
 
@@ -101,6 +109,8 @@ After all agents complete:
101
109
  ```bash
102
110
  monotask card create $BOARD_ID $COL_NEW "<title>" --json
103
111
  monotask card comment add $BOARD_ID $CARD_ID "<description>"
112
+ monotask card tag add $BOARD_ID $CARD_ID "monomind-idea"
113
+ monotask card tag add $BOARD_ID $CARD_ID "<category>"
104
114
  ```
105
115
 
106
116
  If zero ideas were generated after deduplication, report "No ideas generated by the research swarm." and STOP.
@@ -202,28 +212,97 @@ Also move any `skipElaboration: true` ideas directly to `Elaborated`.
202
212
  - `Done`
203
213
  - Store column IDs (especially `COL_BACKLOG`).
204
214
 
205
- ### Decomposition
215
+ ### Decomposition into Professional Task Cards
216
+
206
217
  Spawn a single `Software Architect` agent via the Agent tool. Provide it with:
207
218
  - All ideas in the `Elaborated` column (titles, descriptions, and all comments)
208
219
  - The `PROJECT_CONTEXT`
209
220
 
210
221
  For each elaborated idea, the agent must:
211
- 1. Break it into 2-6 actionable subtasks. Each subtask should have a clear title, a 1-2 sentence description of what to implement, and the recommended **agent type** to assign for implementation (e.g., `backend-dev`, `Frontend Developer`, `coder`, `Security Engineer`). Pick the agent type from the available agents list that best matches the subtask's domain.
212
- 2. Create each subtask as a card in the `Backlog` column of the `monomind-task` board, including the agent type:
222
+
223
+ 1. **Analyze and decompose** into 2-6 subtasks. Each subtask must be a professional task card following this structure:
224
+
225
+ ```json
226
+ {
227
+ "title": "Action-oriented title (verb + noun + context)",
228
+ "description": "## What\nExact deliverable (new file, modified function, endpoint, etc.).\n\n## Why\nBusiness or technical motivation — what breaks without this?\n\n## Where\nFile paths, module boundaries, related components.\n\n## Patterns\nExisting conventions to follow (naming, error handling, test style).",
229
+ "definition_of_done": [
230
+ "Specific, binary, verifiable condition (include HTTP codes, error shapes, edge cases)",
231
+ "Quantified thresholds where applicable (rate limits, timeouts, sizes)"
232
+ ],
233
+ "testing_criteria": {
234
+ "unit_tests": ["function(input) → expected outcome"],
235
+ "integration_tests": ["endpoint + method → status + response shape"],
236
+ "edge_cases": ["boundary condition → expected behavior"]
237
+ },
238
+ "checklist": [
239
+ "Write failing test for [specific behavior]",
240
+ "Implement [function/class] in [file path]",
241
+ "Run tests — verify green",
242
+ "Commit: '[type]: [description]'"
243
+ ],
244
+ "agent_type": "best-fit agent from 230+ roster (e.g., backend-dev, Frontend Developer, Security Engineer)",
245
+ "priority": "critical | high | medium | low",
246
+ "effort": "1-10 (1=trivial, 10=full day)",
247
+ "dependencies": ["titles of prerequisite tasks, or empty"]
248
+ }
249
+ ```
250
+
251
+ **Task generation rules:**
252
+ - Tasks MUST be ordered so dependencies come first
253
+ - Each task: 5-30 minutes for a single agent
254
+ - Split anything larger
255
+ - Every task starts with writing a test (TDD)
256
+ - DOD items must be binary (pass/fail, not "looks good")
257
+ - Testing criteria must name specific functions, endpoints, inputs
258
+
259
+ 2. **Create each subtask** as a card in `Backlog` (has deps) or `Todo` (no deps):
213
260
  ```bash
214
- monotask card create $TASK_BOARD_ID $COL_BACKLOG "<subtask title>" --json
215
- monotask card comment add $TASK_BOARD_ID $SUBTASK_CARD_ID "<subtask description>"
216
- monotask card comment add $TASK_BOARD_ID $SUBTASK_CARD_ID "Assigned agent: <agent type>"
261
+ monotask card create $TASK_BOARD_ID $COLUMN_ID "<title>" --json
262
+ monotask card tag add $TASK_BOARD_ID $CARD_ID "monomind-idea"
217
263
  ```
218
- 3. Comment on the original idea card listing all subtask titles with their assigned agents:
264
+
265
+ 3. **Set description** with full context block:
219
266
  ```bash
220
- monotask card comment add $BOARD_ID $IDEA_CARD_ID "Subtasks created: <title> (agent: <type>), <title> (agent: <type>), ..."
267
+ monotask card set-description $TASK_BOARD_ID $CARD_ID "<description with What/Why/Where/Patterns>"
221
268
  ```
222
- 4. Move the idea card to `Tasked`:
269
+
270
+ 4. **Add DOD comment**:
271
+ ```bash
272
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "## Definition of Done\n- [ ] <condition 1>\n- [ ] <condition 2>\n..."
273
+ ```
274
+
275
+ 5. **Add testing criteria comment**:
223
276
  ```bash
224
- monotask card move $BOARD_ID $IDEA_CARD_ID $COL_TASKED --json
277
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "## Testing Criteria\n\n### Unit Tests\n- <test 1>\n\n### Integration Tests\n- <test 1>\n\n### Edge Cases\n- <case 1>"
225
278
  ```
226
279
 
280
+ 6. **Add agent assignment + metadata**:
281
+ ```bash
282
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Assigned agent: <agent_type>\nPriority: <priority>\nEffort: <effort>/10\nDependencies: <dep titles or none>"
283
+ ```
284
+
285
+ 7. **Set priority**: `monotask card set-priority $TASK_BOARD_ID $CARD_ID <1-4>`
286
+
287
+ 8. **Create checklist** (TDD implementation steps):
288
+ ```bash
289
+ monotask checklist add $TASK_BOARD_ID $CARD_ID "Implementation Steps" --json
290
+ ```
291
+ Then for each step:
292
+ ```bash
293
+ monotask checklist item-add $TASK_BOARD_ID $CARD_ID $CHECKLIST_ID "<step>"
294
+ ```
295
+
296
+ 9. **Comment on original idea card** listing all subtask titles with their assigned agents:
297
+ ```bash
298
+ monotask card comment add $BOARD_ID $IDEA_CARD_ID "Subtasks created:\n- <title> (agent: <type>, effort: <N>/10)\n- <title> (agent: <type>, effort: <N>/10)\n..."
299
+ ```
300
+
301
+ 10. **Move the idea card** to `Tasked`:
302
+ ```bash
303
+ monotask card move $BOARD_ID $IDEA_CARD_ID $COL_TASKED --json
304
+ ```
305
+
227
306
  **If the architect has doubts** about decomposing an idea (unclear scope, missing info), they should:
228
307
  - Add a comment with the question
229
308
  - Move the idea to `Iced` instead of `Tasked`
@@ -235,16 +314,17 @@ For each elaborated idea, the agent must:
235
314
  Output a summary table:
236
315
 
237
316
  ```
238
- | # | Idea | Status | Subtasks |
239
- |---|-----------------------------|----------|----------|
240
- | 1 | <title> | Tasked | 4 |
241
- | 2 | <title> | Iced | -- |
242
- | 3 | <title> | Rejected | -- |
317
+ | # | Idea | Category | Status | Subtasks | Total Effort | Agents |
318
+ |---|-----------------------------|--------------------|----- ----|----------|--------------|--------|
319
+ | 1 | <title> | feature | Tasked | 4 | 18/40 | coder, backend-dev, tester |
320
+ | 2 | <title> | technical-baseline | Iced | -- | -- | -- |
321
+ | 3 | <title> | feature | Rejected | -- | -- | -- |
243
322
  ```
244
323
 
245
324
  Then output:
246
325
  - Total ideas generated: N
247
- - Ideas tasked: N (with M total subtasks in Backlog)
326
+ - Ideas tasked: N (with M total subtasks)
327
+ - Total effort points: X
248
328
  - Ideas iced: N
249
329
  - Ideas rejected: N
250
330
  - Monotask space: `$REPO_NAME` (ID: `$SPACE_ID`)
@@ -0,0 +1,424 @@
1
+ ---
2
+ name: monomind-improve
3
+ description: "Monomind — Deeply analyze a project component, research improvements online, and create improvement tasks on monotask boards"
4
+ ---
5
+
6
+ If `$ARGUMENTS` is empty, output this and STOP:
7
+
8
+ > **Usage:** `/monomind:improve <component or concept>`
9
+ >
10
+ > Examples:
11
+ > - `/monomind:improve the authentication flow`
12
+ > - `/monomind:improve error handling across the codebase`
13
+ > - `/monomind:improve CLI startup performance`
14
+ > - `/monomind:improve the MCP server architecture`
15
+ >
16
+ > This command deeply analyzes the target component inside your project, researches improvement directions online, evaluates them, and decomposes the best ones into professional tasks on monotask boards. All cards are tagged `monomind-improve`.
17
+
18
+ Do NOT proceed further if no arguments were provided.
19
+
20
+ ---
21
+
22
+ ## Step 0: Check monotask CLI
23
+
24
+ Run:
25
+ ```bash
26
+ command -v monotask
27
+ ```
28
+
29
+ If `monotask` is NOT found, attempt to install:
30
+ ```bash
31
+ command -v cargo && cargo install monotask
32
+ ```
33
+
34
+ If `cargo` is also missing, output this and STOP:
35
+ > monotask requires Rust. Install Rust first:
36
+ > ```bash
37
+ > curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
38
+ > source "$HOME/.cargo/env"
39
+ > cargo install monotask
40
+ > ```
41
+
42
+ Verify monotask is now available before continuing.
43
+
44
+ ---
45
+
46
+ ## Step 1: Gather Project Context
47
+
48
+ Collect ALL of the following in parallel (skip any that error):
49
+
50
+ 1. **Repo name**: Run `git remote get-url origin`, extract the last path segment, strip `.git`. Fallback: `basename` of the current working directory. Store as `REPO_NAME`.
51
+
52
+ 2. **README**: Read `README.md` (first 200 lines). Skip if missing.
53
+
54
+ 3. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`. Extract name, description, and keywords/tags.
55
+
56
+ 4. **Knowledge graph**: Call `mcp__monomind__graphify_suggest` with the user's prompt (`$ARGUMENTS`). Skip if it errors or returns empty.
57
+
58
+ 5. **Memory search**: Call `mcp__monomind__memory_search` with the user's prompt (`$ARGUMENTS`). Use the top 5 results.
59
+
60
+ Bundle all gathered information into a single `PROJECT_CONTEXT` string for downstream agents.
61
+
62
+ ---
63
+
64
+ ## Step 2: Deep Component Analysis
65
+
66
+ This is what differentiates `/monomind:improve` from `/monomind:idea`. Before generating improvement ideas, we must deeply understand the current state of the target component.
67
+
68
+ Spawn 2 agents in parallel via the Agent tool:
69
+
70
+ ### Agent 1: `feature-dev:code-explorer`
71
+
72
+ Provide it with `$ARGUMENTS` and `PROJECT_CONTEXT`. It must:
73
+
74
+ 1. **Trace the component** — find all files, functions, classes, and modules related to the target. Use `mcp__monomind__graphify_query` for each key term found.
75
+ 2. **Map dependencies** — what does the component depend on? What depends on it? Use `mcp__monomind__graphify_shortest_path` for key relationships.
76
+ 3. **Identify pain points** — look for:
77
+ - Code smells (large files, deep nesting, god objects, duplicated logic)
78
+ - Missing tests or low coverage areas
79
+ - Performance bottlenecks (synchronous I/O, N+1 patterns, unnecessary allocations)
80
+ - Security gaps (unvalidated inputs, missing auth checks, exposed secrets)
81
+ - API inconsistencies (naming, error shapes, response formats)
82
+ - Outdated patterns (callbacks vs async/await, old library versions)
83
+ - Missing error handling or silent failures
84
+ 4. **Measure complexity** — count files, lines, dependencies, and circular references.
85
+
86
+ Return a structured analysis:
87
+ ```json
88
+ {
89
+ "component": "name",
90
+ "files": ["list of files touched"],
91
+ "total_lines": N,
92
+ "dependency_count": N,
93
+ "pain_points": [
94
+ { "type": "code-smell|perf|security|api|testing|pattern", "description": "...", "file": "path", "severity": "critical|high|medium|low" }
95
+ ],
96
+ "strengths": ["things that are already well done"],
97
+ "architecture_notes": "how it fits into the larger system"
98
+ }
99
+ ```
100
+
101
+ ### Agent 2: `researcher` (with WebSearch)
102
+
103
+ Provide it with `$ARGUMENTS` and `PROJECT_CONTEXT`. It must:
104
+
105
+ 1. **Search for best practices** related to the component's domain (e.g., "authentication best practices 2025", "CLI performance optimization techniques").
106
+ 2. **Find competitor/prior art** — how do similar tools/libraries solve this?
107
+ 3. **Search for common improvements** — what do blog posts, conference talks, and docs recommend?
108
+ 4. **Identify emerging patterns** — new libraries, frameworks, or techniques relevant to this area.
109
+
110
+ Return structured research:
111
+ ```json
112
+ {
113
+ "best_practices": [
114
+ { "title": "...", "description": "...", "source": "url or reference" }
115
+ ],
116
+ "prior_art": [
117
+ { "project": "name", "approach": "how they solve it", "takeaway": "what we can learn" }
118
+ ],
119
+ "emerging_patterns": [
120
+ { "pattern": "name", "description": "...", "relevance": "why it matters for us" }
121
+ ]
122
+ }
123
+ ```
124
+
125
+ After both agents complete, merge their outputs into `COMPONENT_ANALYSIS`.
126
+
127
+ ---
128
+
129
+ ## Step 3: Setup Monotask Space and Improve Board
130
+
131
+ ### Space
132
+ - Run `monotask space list` and check if a space named `$REPO_NAME` already exists.
133
+ - If not, create it: `monotask space create "$REPO_NAME"`.
134
+ - Store the `SPACE_ID`.
135
+
136
+ ### Improve Board
137
+ - List boards via `monotask board list --json`. For each board ID, run `monotask column list <BOARD_ID> --json` to find one whose title is `monomind-improve`. (There is no "board view" command -- column list reveals the board structure.)
138
+ - If the `monomind-improve` board does not exist:
139
+ 1. Create it: `monotask board create "monomind-improve" --json` — store the returned `BOARD_ID`.
140
+ 2. Add it to the space: `monotask space boards add $SPACE_ID $BOARD_ID`.
141
+ 3. Create these columns in order:
142
+ - `Discovered`
143
+ - `Evaluated`
144
+ - `Approved`
145
+ - `Tasked`
146
+ - `Deferred`
147
+ - `Rejected`
148
+ - Store all column IDs mapped by name.
149
+
150
+ ---
151
+
152
+ ## Step 4: Generate Improvement Ideas
153
+
154
+ Spawn a single `Software Architect` agent via the Agent tool. Provide it with:
155
+ - The user's prompt: `$ARGUMENTS`
156
+ - The full `COMPONENT_ANALYSIS` from Step 2
157
+ - The `PROJECT_CONTEXT` from Step 1
158
+
159
+ The agent must synthesize the code analysis and online research into concrete improvement ideas. For each idea, produce:
160
+
161
+ ```json
162
+ {
163
+ "title": "Short, action-oriented title",
164
+ "description": "2-3 sentences: what the improvement is, what problem it solves, and the expected benefit.",
165
+ "category": "performance | security | reliability | maintainability | dx | testing | architecture",
166
+ "evidence": "What from the analysis or research supports this (pain point ref, best practice ref, or prior art ref)",
167
+ "estimated_impact": "Concrete expected outcome (e.g., '50% faster CLI startup', 'eliminate 3 code smells', 'cover 5 untested edge cases')"
168
+ }
169
+ ```
170
+
171
+ **Idea generation rules:**
172
+ - Ideas must be grounded in the analysis — no generic "add more tests" without pointing to specific gaps
173
+ - Each idea must reference either a pain point from the code analysis or a best practice from the research
174
+ - Prefer high-impact, low-effort ideas first
175
+ - Include at least one idea from each applicable category (perf, security, testing, etc.)
176
+ - No duplicates — each idea must address a distinct improvement
177
+
178
+ For each idea, create a card in the `Discovered` column:
179
+ ```bash
180
+ monotask card create $BOARD_ID $COL_DISCOVERED "<title>" --json
181
+ monotask card comment add $BOARD_ID $CARD_ID "<description>"
182
+ monotask card comment add $BOARD_ID $CARD_ID "Category: <category>\nEvidence: <evidence>\nExpected impact: <estimated_impact>"
183
+ monotask card tag add $BOARD_ID $CARD_ID "monomind-improve"
184
+ ```
185
+
186
+ If zero ideas were generated, report "No improvement opportunities found for this component." and STOP.
187
+
188
+ ---
189
+
190
+ ## Step 5: Evaluate and Prioritize
191
+
192
+ Spawn a single `Product Manager` agent via the Agent tool. Provide it with:
193
+ - All improvement ideas (titles, descriptions, and all comments)
194
+ - The `COMPONENT_ANALYSIS`
195
+ - The `PROJECT_CONTEXT`
196
+
197
+ For EACH idea, the agent must return one of three verdicts, along with **impact** (0-10) and **effort** (0-10) scores:
198
+
199
+ | Verdict | Criteria |
200
+ |---------|----------|
201
+ | **approved** | High value, feasible, aligns with project direction. Include a `skipElaboration` boolean: `true` if straightforward, `false` if needs deeper investigation. |
202
+ | **deferred** | Good idea but wrong timing, blocked by something, or needs more research. Include the reason. |
203
+ | **rejected** | Low value, too risky, or out of scope. Include a 1-sentence reason. |
204
+
205
+ For each verdict, update the monotask board:
206
+
207
+ - **approved**: Move to `Evaluated`. Set impact and effort. Add value statement.
208
+ ```bash
209
+ monotask card move $BOARD_ID $CARD_ID $COL_EVALUATED --json
210
+ monotask card set-impact $BOARD_ID $CARD_ID <0-10>
211
+ monotask card set-effort $BOARD_ID $CARD_ID <0-10>
212
+ monotask card comment add $BOARD_ID $CARD_ID "Value: <value statement>"
213
+ ```
214
+ - **deferred**: Move to `Deferred`. Set impact and effort. Add reason.
215
+ ```bash
216
+ monotask card move $BOARD_ID $CARD_ID $COL_DEFERRED --json
217
+ monotask card set-impact $BOARD_ID $CARD_ID <0-10>
218
+ monotask card set-effort $BOARD_ID $CARD_ID <0-10>
219
+ monotask card comment add $BOARD_ID $CARD_ID "Deferred: <reason>"
220
+ ```
221
+ - **rejected**: Move to `Rejected`. Add reason.
222
+ ```bash
223
+ monotask card move $BOARD_ID $CARD_ID $COL_REJECTED --json
224
+ monotask card comment add $BOARD_ID $CARD_ID "Rejected: <reason>"
225
+ ```
226
+
227
+ If ALL ideas were deferred or rejected, output a summary table and STOP.
228
+
229
+ ---
230
+
231
+ ## Step 6: Elaborate Approved Improvements
232
+
233
+ Check if ANY approved ideas have `skipElaboration: false`.
234
+
235
+ **If ALL approved ideas have `skipElaboration: true`:**
236
+ - Move each directly from `Evaluated` to `Approved`:
237
+ ```bash
238
+ monotask card move $BOARD_ID $CARD_ID $COL_APPROVED --json
239
+ ```
240
+ - Skip spawning agents.
241
+
242
+ **Otherwise**, spawn two agents in parallel via the Agent tool:
243
+
244
+ 1. A `feature-dev:code-explorer` agent — traces implementation paths, identifies exactly which files/functions need to change, surfaces hidden constraints and breaking changes.
245
+ 2. A `researcher` agent (with WebSearch) — searches for implementation patterns, migration guides, and gotchas specific to each improvement.
246
+
247
+ After both complete, for each idea needing elaboration:
248
+ 1. Add findings as comments:
249
+ ```bash
250
+ monotask card comment add $BOARD_ID $CARD_ID "Implementation path: <files and functions to change>"
251
+ monotask card comment add $BOARD_ID $CARD_ID "Risks: <breaking changes, migration needs>"
252
+ monotask card comment add $BOARD_ID $CARD_ID "Research: <patterns and references found>"
253
+ ```
254
+ 2. If no blocking issues, move to `Approved`:
255
+ ```bash
256
+ monotask card move $BOARD_ID $CARD_ID $COL_APPROVED --json
257
+ ```
258
+ 3. If a blocking issue IS found, move to `Deferred`:
259
+ ```bash
260
+ monotask card move $BOARD_ID $CARD_ID $COL_DEFERRED --json
261
+ monotask card comment add $BOARD_ID $CARD_ID "Blocked: <issue>"
262
+ ```
263
+
264
+ Also move any `skipElaboration: true` ideas directly to `Approved`.
265
+
266
+ ---
267
+
268
+ ## Step 7: Task Decomposer — Break Improvements into Subtasks
269
+
270
+ ### Task Board Setup
271
+ - Check if a `monomind-task` board exists in the space (same lookup method as Step 3).
272
+ - If not, create it with these columns:
273
+ - `Backlog`
274
+ - `Todo`
275
+ - `In Progress`
276
+ - `Review`
277
+ - `Human in Loop`
278
+ - `Done`
279
+ - Store column IDs.
280
+
281
+ ### Decomposition into Professional Task Cards
282
+
283
+ Spawn a single `Software Architect` agent via the Agent tool. Provide it with:
284
+ - All ideas in the `Approved` column (titles, descriptions, and all comments including implementation paths and research)
285
+ - The `COMPONENT_ANALYSIS` from Step 2
286
+ - The `PROJECT_CONTEXT`
287
+
288
+ For each approved improvement, the agent must:
289
+
290
+ 1. **Analyze and decompose** into 2-6 subtasks. Each subtask must be a professional task card:
291
+
292
+ ```json
293
+ {
294
+ "title": "Action-oriented title (verb + noun + context)",
295
+ "description": "## What\nExact deliverable (new file, modified function, endpoint, etc.).\n\n## Why\nBusiness or technical motivation — what breaks without this?\n\n## Where\nFile paths, module boundaries, related components.\n\n## Patterns\nExisting conventions to follow (naming, error handling, test style).",
296
+ "definition_of_done": [
297
+ "Specific, binary, verifiable condition (include HTTP codes, error shapes, edge cases)",
298
+ "Quantified thresholds where applicable (rate limits, timeouts, sizes)"
299
+ ],
300
+ "testing_criteria": {
301
+ "unit_tests": ["function(input) → expected outcome"],
302
+ "integration_tests": ["endpoint + method → status + response shape"],
303
+ "edge_cases": ["boundary condition → expected behavior"]
304
+ },
305
+ "checklist": [
306
+ "Write failing test for [specific behavior]",
307
+ "Implement [function/class] in [file path]",
308
+ "Run tests — verify green",
309
+ "Commit: '[type]: [description]'"
310
+ ],
311
+ "agent_type": "best-fit agent from 230+ roster",
312
+ "priority": "critical | high | medium | low",
313
+ "effort": "1-10 (1=trivial, 10=full day)",
314
+ "dependencies": ["titles of prerequisite tasks, or empty"]
315
+ }
316
+ ```
317
+
318
+ **Task generation rules:**
319
+ - Tasks MUST be ordered so dependencies come first
320
+ - Each task: 5-30 minutes for a single agent
321
+ - Split anything larger
322
+ - Every task starts with writing a test (TDD)
323
+ - DOD items must be binary (pass/fail, not "looks good")
324
+ - Testing criteria must name specific functions, endpoints, inputs
325
+
326
+ 2. **Create each subtask** as a card in `Backlog` (has deps) or `Todo` (no deps):
327
+ ```bash
328
+ monotask card create $TASK_BOARD_ID $COLUMN_ID "<title>" --json
329
+ monotask card tag add $TASK_BOARD_ID $CARD_ID "monomind-improve"
330
+ ```
331
+
332
+ 3. **Set description** with full context block:
333
+ ```bash
334
+ monotask card set-description $TASK_BOARD_ID $CARD_ID "<description with What/Why/Where/Patterns>"
335
+ ```
336
+
337
+ 4. **Add DOD comment**:
338
+ ```bash
339
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "## Definition of Done\n- [ ] <condition 1>\n- [ ] <condition 2>\n..."
340
+ ```
341
+
342
+ 5. **Add testing criteria comment**:
343
+ ```bash
344
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "## Testing Criteria\n\n### Unit Tests\n- <test 1>\n\n### Integration Tests\n- <test 1>\n\n### Edge Cases\n- <case 1>"
345
+ ```
346
+
347
+ 6. **Add agent assignment + metadata**:
348
+ ```bash
349
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Assigned agent: <agent_type>\nPriority: <priority>\nEffort: <effort>/10\nDependencies: <dep titles or none>\nSource: monomind-improve"
350
+ ```
351
+
352
+ 7. **Set priority**: `monotask card set-priority $TASK_BOARD_ID $CARD_ID <1-4>`
353
+
354
+ 8. **Create checklist** (TDD implementation steps):
355
+ ```bash
356
+ monotask checklist add $TASK_BOARD_ID $CARD_ID "Implementation Steps" --json
357
+ ```
358
+ Then for each step:
359
+ ```bash
360
+ monotask checklist item-add $TASK_BOARD_ID $CARD_ID $CHECKLIST_ID "<step>"
361
+ ```
362
+
363
+ 9. **Comment on original improvement card** listing all subtask titles:
364
+ ```bash
365
+ monotask card comment add $BOARD_ID $IMPROVE_CARD_ID "Subtasks created:\n- <title> (agent: <type>, effort: <N>/10)\n- <title> (agent: <type>, effort: <N>/10)\n..."
366
+ ```
367
+
368
+ 10. **Move the improvement card** to `Tasked`:
369
+ ```bash
370
+ monotask card move $BOARD_ID $IMPROVE_CARD_ID $COL_TASKED --json
371
+ ```
372
+
373
+ **If the architect has doubts** about decomposing an improvement (unclear scope, missing info):
374
+ - Add a comment with the question
375
+ - Move the improvement to `Deferred` instead of `Tasked`
376
+
377
+ ---
378
+
379
+ ## Step 8: Final Summary
380
+
381
+ Output a component health report:
382
+
383
+ ```
384
+ ## Improvement Analysis: <component>
385
+
386
+ ### Component Health
387
+ - Files analyzed: N
388
+ - Pain points found: N (X critical, Y high, Z medium)
389
+ - Strengths identified: N
390
+
391
+ ### Improvement Pipeline
392
+ | # | Improvement | Category | Status | Impact | Effort | Subtasks |
393
+ |---|-----------------------------|----------------|----------|--------|--------|----------|
394
+ | 1 | <title> | performance | Tasked | 8 | 4 | 3 |
395
+ | 2 | <title> | security | Deferred | 7 | 8 | -- |
396
+ | 3 | <title> | testing | Rejected | -- | -- | -- |
397
+
398
+ ### Summary
399
+ - Improvements discovered: N
400
+ - Improvements tasked: N (with M total subtasks)
401
+ - Total effort points: X
402
+ - Improvements deferred: N
403
+ - Improvements rejected: N
404
+ ```
405
+
406
+ Output board references:
407
+ - Monotask space: `$REPO_NAME` (ID: `$SPACE_ID`)
408
+ - Improve board: `monomind-improve` (ID: `$BOARD_ID`)
409
+ - Task board: `monomind-task` (ID: `$TASK_BOARD_ID`)
410
+
411
+ ---
412
+
413
+ ## Step 9: Offer to Execute Tasks
414
+
415
+ If there are any tasked improvements (subtasks in Backlog/Todo), ask the user:
416
+
417
+ > **M subtasks are ready.** Want me to start executing them now?
418
+ >
419
+ > Say **yes** to launch `/monomind:do` — it will pick up tasks one by one, execute them with the assigned agent, review for bugs, and loop until the queue is empty.
420
+
421
+ If the user says yes, invoke:
422
+ ```
423
+ Skill("monomind-do", "--space $SPACE_ID --board $TASK_BOARD_ID")
424
+ ```
@@ -0,0 +1,269 @@
1
+ ---
2
+ name: monomind-createtask
3
+ description: Ingest a prompt, file, or folder — deeply analyze it, generate a professional implementation plan, and create self-contained task cards on monotask with DOD, testing criteria, and checklists
4
+ version: 1.0.0
5
+ triggers:
6
+ - /monomind:createtask
7
+ - create tasks from spec
8
+ - decompose into tasks
9
+ - turn this into tasks
10
+ - break this down into tasks
11
+ - create implementation tasks
12
+ ---
13
+
14
+ # /monomind:createtask — Spec-to-Tasks Pipeline
15
+
16
+ Transforms a prompt, file, or folder into professional, self-contained task cards on a monotask board. Each card carries enough context that a coder agent with zero prior knowledge can execute it.
17
+
18
+ ## Task Card Quality Standard
19
+
20
+ Every task card produced by this skill MUST meet this bar — no exceptions:
21
+
22
+ ### 1. Self-Contained Context
23
+ The card description alone must answer: What am I building? Why? Where does it fit? What patterns exist?
24
+
25
+ Include:
26
+ - **What**: Exact deliverable (new file, modified function, new endpoint, etc.)
27
+ - **Why**: Business or technical motivation — what breaks without this?
28
+ - **Where**: File paths, module boundaries, related components
29
+ - **Patterns**: Existing conventions to follow (naming, error handling, test style)
30
+ - **Data shapes**: Relevant types, interfaces, API contracts, DB schemas
31
+
32
+ ### 2. Definition of Done (DOD)
33
+ Concrete, binary conditions — not vague "it works" statements.
34
+
35
+ Bad DOD:
36
+ - "Authentication works"
37
+ - "Tests pass"
38
+ - "Error handling is complete"
39
+
40
+ Good DOD:
41
+ - "POST /auth/login returns 200 with JWT when credentials valid, 401 when invalid, 429 after 5 failed attempts within 15 minutes"
42
+ - "Unit tests cover: valid login, invalid password, expired account, rate limit hit, missing fields — all green"
43
+ - "Invalid email format returns 422 with `{ error: 'INVALID_EMAIL', field: 'email' }` shape"
44
+
45
+ Rules:
46
+ - Every DOD item must be verifiable by running code or reading output
47
+ - Include specific HTTP codes, error shapes, edge cases
48
+ - Quantify where possible (rate limits, timeouts, thresholds)
49
+
50
+ ### 3. Testing Criteria
51
+ Explicit test cases — not "write tests."
52
+
53
+ Each task must specify:
54
+ - **Unit tests**: What functions, what inputs, what assertions
55
+ - **Integration tests**: What endpoints, what sequences, what state transitions
56
+ - **Edge cases**: What breaks, what's empty, what's too large, what's concurrent
57
+
58
+ Format:
59
+ ```
60
+ ## Testing Criteria
61
+
62
+ ### Unit Tests
63
+ - `createUser({valid})` → returns user with generated ID and hashed password
64
+ - `createUser({duplicate_email})` → throws ConflictError with code DUPLICATE_EMAIL
65
+ - `createUser({missing_name})` → throws ValidationError listing missing fields
66
+
67
+ ### Integration Tests
68
+ - POST /users with valid body → 201, response matches UserSchema
69
+ - POST /users with duplicate email → 409, idempotent (no side effects)
70
+ - GET /users/:id after create → returns same user
71
+
72
+ ### Edge Cases
73
+ - Empty string fields → validation rejects before DB call
74
+ - 10,000 char name → truncated or rejected at boundary
75
+ - Concurrent duplicate creates → exactly one succeeds
76
+ ```
77
+
78
+ ### 4. Implementation Checklist
79
+ Ordered steps that a coder follows mechanically. Each step is one action (5 minutes max).
80
+
81
+ Rules:
82
+ - Start with the test (TDD: red → green → refactor)
83
+ - Include the exact file to create or modify
84
+ - Include the function signature or interface shape
85
+ - End with "run tests, verify green, commit"
86
+
87
+ ### 5. Dependencies and Ordering
88
+ - Explicit: "Blocked by: [Card Title]" or "No dependencies"
89
+ - Tasks ordered so foundations come first
90
+ - Parallel-safe tasks identified
91
+
92
+ ---
93
+
94
+ ## Pipeline Steps
95
+
96
+ ### Step 0: Verify monotask CLI
97
+ ```bash
98
+ command -v monotask || (command -v cargo && cargo install monotask)
99
+ ```
100
+ If neither exists, tell user to install Rust + monotask and STOP.
101
+
102
+ ### Step 1: Classify and Ingest Input
103
+
104
+ Parse `$ARGUMENTS`:
105
+ - `test -f` → file: read with Read tool
106
+ - `test -d` → folder: `find` up to 30 files, read each, concatenate with `--- FILE: <path> ---` separators
107
+ - Otherwise → prompt: store text directly
108
+
109
+ ### Step 2: Enrich with Project Context
110
+
111
+ Run ALL in parallel (skip errors):
112
+ 1. `mcp__monomind__graphify_suggest` with first 200 chars of input
113
+ 2. `mcp__monomind__graphify_query` for module/component names found in input (up to 5)
114
+ 3. `mcp__monomind__memory_search` with input summary
115
+ 4. Read `README.md` (first 200 lines)
116
+ 5. Read first found: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`
117
+ 6. Repo name from `git remote get-url origin` (strip path, strip `.git`)
118
+
119
+ Bundle everything into `FULL_CONTEXT`.
120
+
121
+ ### Step 3: Setup Monotask Space and Board
122
+
123
+ **Space**: Find or create space named `$REPO_NAME`.
124
+
125
+ **Board**: Find `monomind-task` board (identify by checking columns for `Todo`). If missing, create with columns:
126
+ - `Backlog` → `Todo` → `In Progress` → `Review` → `Human in Loop` → `Done`
127
+
128
+ ### Step 4: Deep Analysis
129
+
130
+ Spawn a `Software Architect` agent. Provide `FULL_CONTEXT` + `$ARGUMENTS`.
131
+
132
+ Required output:
133
+ ```json
134
+ {
135
+ "summary": "2-3 sentence overview",
136
+ "goals": ["high-level goals"],
137
+ "components": [
138
+ {
139
+ "name": "component name",
140
+ "description": "what it does",
141
+ "dependencies": ["other components"],
142
+ "files_likely_affected": ["paths from graphify or educated guesses"]
143
+ }
144
+ ],
145
+ "technical_constraints": ["stack requirements, limitations"],
146
+ "acceptance_criteria": ["testable conditions for when the whole thing is done"],
147
+ "risks": ["pitfalls, ambiguities, unknowns"]
148
+ }
149
+ ```
150
+
151
+ ### Step 5: Generate Professional Tasks
152
+
153
+ Spawn a `planner` agent. Provide analysis + `FULL_CONTEXT`.
154
+
155
+ For each task, produce:
156
+
157
+ ```json
158
+ {
159
+ "title": "Action-oriented title (verb + noun + context)",
160
+ "description": "## What\nExact deliverable.\n\n## Why\nMotivation.\n\n## Where\nFile paths, module boundaries.\n\n## Patterns\nExisting conventions to follow.",
161
+ "definition_of_done": [
162
+ "Specific, binary, verifiable condition 1",
163
+ "Specific, binary, verifiable condition 2"
164
+ ],
165
+ "testing_criteria": {
166
+ "unit_tests": ["function(input) → expected outcome"],
167
+ "integration_tests": ["endpoint + method → status + response shape"],
168
+ "edge_cases": ["boundary condition → expected behavior"]
169
+ },
170
+ "checklist": [
171
+ "Write failing test for [specific behavior]",
172
+ "Implement [function/class] in [file path]",
173
+ "Run tests — verify green",
174
+ "Commit: '[type]: [description]'"
175
+ ],
176
+ "agent_type": "coder | backend-dev | Frontend Developer | Security Engineer | etc.",
177
+ "priority": "critical | high | medium | low",
178
+ "effort": "1-10 (1=trivial, 10=full day)",
179
+ "dependencies": ["titles of prerequisite tasks, or empty"]
180
+ }
181
+ ```
182
+
183
+ **Task generation rules:**
184
+ - Tasks MUST be ordered so dependencies come first
185
+ - Each task: 5-30 minutes for a single agent
186
+ - Split anything larger
187
+ - Every task starts with writing a test (TDD)
188
+ - Agent type chosen from the 230+ available roster based on domain fit
189
+ - DOD items must be binary (pass/fail, not "looks good")
190
+ - Testing criteria must name specific functions, endpoints, inputs
191
+
192
+ ### Step 6: Create Cards on Monotask
193
+
194
+ For each task, in dependency order:
195
+
196
+ 1. **Create card** in `Todo` (no deps) or `Backlog` (has deps):
197
+ ```bash
198
+ monotask card create $BOARD_ID $COLUMN_ID "<title>" --json
199
+ ```
200
+
201
+ 2. **Set description** with full context block:
202
+ ```bash
203
+ monotask card set-description $BOARD_ID $CARD_ID "<description>"
204
+ ```
205
+
206
+ 3. **Add DOD comment**:
207
+ ```bash
208
+ monotask card comment add $BOARD_ID $CARD_ID "## Definition of Done\n- [ ] <condition 1>\n- [ ] <condition 2>\n..."
209
+ ```
210
+
211
+ 4. **Add testing criteria comment**:
212
+ ```bash
213
+ monotask card comment add $BOARD_ID $CARD_ID "## Testing Criteria\n\n### Unit Tests\n- <test 1>\n\n### Integration Tests\n- <test 1>\n\n### Edge Cases\n- <case 1>"
214
+ ```
215
+
216
+ 5. **Add agent assignment**:
217
+ ```bash
218
+ monotask card comment add $BOARD_ID $CARD_ID "Assigned agent: <agent_type>"
219
+ ```
220
+
221
+ 6. **Add dependencies** (if any):
222
+ ```bash
223
+ monotask card comment add $BOARD_ID $CARD_ID "Dependencies: <task title 1>, <task title 2>"
224
+ ```
225
+
226
+ 7. **Set priority**: `monotask card set-priority $BOARD_ID $CARD_ID <1-4>`
227
+
228
+ 8. **Create checklist**:
229
+ ```bash
230
+ monotask checklist add $BOARD_ID $CARD_ID "Implementation Steps" --json
231
+ ```
232
+ Then for each step:
233
+ ```bash
234
+ monotask checklist item-add $BOARD_ID $CARD_ID $CHECKLIST_ID "<step>"
235
+ ```
236
+
237
+ ### Step 7: Gap Analysis
238
+
239
+ Spawn a fresh `Software Architect` agent as critical reviewer. Provide analysis + all created tasks.
240
+
241
+ Must identify:
242
+ - **Missing pieces**: testing gaps, error handling holes, security oversights, missing migrations, documentation needs
243
+ - **Follow-ups**: natural extensions, performance optimizations, monitoring additions
244
+
245
+ Present as tables. Ask user which to add (numbers, `all`, or `none`).
246
+
247
+ Selected missing pieces → `Todo` column. Selected follow-ups → `Backlog` column.
248
+
249
+ ### Step 8: Summary
250
+
251
+ ```
252
+ ## Task Creation Complete
253
+
254
+ **Source:** <input>
255
+ **Space:** $REPO_NAME | **Board:** monomind-task
256
+
257
+ | # | Title | Agent | Priority | Effort | Column | Deps |
258
+ |---|-------|-------|----------|--------|--------|------|
259
+ | 1 | ... | ... | high | 3 | Todo | — |
260
+
261
+ **Total:** N tasks (X in Todo, Y in Backlog)
262
+ **Estimated effort:** Z points
263
+ ```
264
+
265
+ ### Step 9: Offer Execution
266
+
267
+ > **N tasks ready.** Start `/monomind:do` to execute them autonomously?
268
+
269
+ If yes: `Skill("monomind-do", "--space $SPACE_ID --board $BOARD_ID")`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monomind",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,6 +19,36 @@ function behavioralRules() {
19
19
  - ALWAYS read a file before editing it
20
20
  - NEVER commit secrets, credentials, or .env files`;
21
21
  }
22
+ function codingPrinciples() {
23
+ return `## Coding Principles
24
+
25
+ ### Think Before Coding
26
+ - State assumptions explicitly. If uncertain, ask.
27
+ - If multiple interpretations exist, present them — don't pick silently.
28
+ - If a simpler approach exists, say so. Push back when warranted.
29
+ - If something is unclear, stop. Name what's confusing. Ask.
30
+
31
+ ### Simplicity First
32
+ - No features beyond what was asked.
33
+ - No abstractions for single-use code.
34
+ - No "flexibility" or "configurability" that wasn't requested.
35
+ - No error handling for impossible scenarios.
36
+ - If you write 200 lines and it could be 50, rewrite it.
37
+
38
+ ### Surgical Changes
39
+ - Don't "improve" adjacent code, comments, or formatting.
40
+ - Don't refactor things that aren't broken.
41
+ - Match existing style, even if you'd do it differently.
42
+ - Remove imports/variables/functions that YOUR changes made unused.
43
+ - Don't remove pre-existing dead code unless asked.
44
+ - Every changed line should trace directly to the user's request.
45
+
46
+ ### Goal-Driven Execution
47
+ - Transform tasks into verifiable goals with success criteria.
48
+ - "Add validation" → "Write tests for invalid inputs, then make them pass"
49
+ - "Fix the bug" → "Write a test that reproduces it, then make it pass"
50
+ - For multi-step tasks, state a brief plan with verification steps.`;
51
+ }
22
52
  function fileOrganization() {
23
53
  return `## File Organization
24
54
 
@@ -376,7 +406,7 @@ npx monomind@latest daemon start
376
406
  npx monomind@latest doctor --fix
377
407
  \`\`\`
378
408
 
379
- > **Package name changed:** Use \`monomind@latest\` (not \`@monoes/cli@latest\` which is the old name and returns 404).
409
+ > **Package name changed:** Use \`monomind@latest\` (not \`@monomind/cli@latest\` which is the old name and returns 404).
380
410
 
381
411
  ## Claude Code vs CLI Tools
382
412
 
@@ -396,6 +426,7 @@ npx monomind@latest doctor --fix
396
426
  const TEMPLATE_SECTIONS = {
397
427
  minimal: [
398
428
  behavioralRules,
429
+ (_opts) => codingPrinciples(),
399
430
  fileOrganization,
400
431
  projectArchitecture,
401
432
  (_opts) => buildAndTest(),
@@ -409,6 +440,7 @@ const TEMPLATE_SECTIONS = {
409
440
  ],
410
441
  standard: [
411
442
  behavioralRules,
443
+ (_opts) => codingPrinciples(),
412
444
  fileOrganization,
413
445
  projectArchitecture,
414
446
  (_opts) => buildAndTest(),
@@ -425,6 +457,7 @@ const TEMPLATE_SECTIONS = {
425
457
  ],
426
458
  full: [
427
459
  behavioralRules,
460
+ (_opts) => codingPrinciples(),
428
461
  fileOrganization,
429
462
  projectArchitecture,
430
463
  (_opts) => buildAndTest(),
@@ -446,6 +479,7 @@ const TEMPLATE_SECTIONS = {
446
479
  ],
447
480
  security: [
448
481
  behavioralRules,
482
+ (_opts) => codingPrinciples(),
449
483
  fileOrganization,
450
484
  projectArchitecture,
451
485
  (_opts) => buildAndTest(),
@@ -462,6 +496,7 @@ const TEMPLATE_SECTIONS = {
462
496
  ],
463
497
  performance: [
464
498
  behavioralRules,
499
+ (_opts) => codingPrinciples(),
465
500
  fileOrganization,
466
501
  projectArchitecture,
467
502
  (_opts) => buildAndTest(),
@@ -480,6 +515,7 @@ const TEMPLATE_SECTIONS = {
480
515
  ],
481
516
  solo: [
482
517
  behavioralRules,
518
+ (_opts) => codingPrinciples(),
483
519
  fileOrganization,
484
520
  projectArchitecture,
485
521
  (_opts) => buildAndTest(),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoes/monomindcli",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",