@monoes/monomindcli 1.6.8 → 1.7.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/.claude/commands/monomind-createtask.md +73 -111
- package/.claude/commands/monomind-do.md +227 -115
- package/.claude/commands/monomind-idea.md +46 -109
- package/.claude/commands/monomind-improve.md +352 -0
- package/.claude/helpers/graphify-freshen.cjs +12 -97
- package/.claude/helpers/hook-handler.cjs +16 -0
- package/.claude/helpers/statusline.cjs +89 -65
- package/.claude/skills/monomind-task-engine/SKILL.md +358 -0
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +72 -10
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +152 -24
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/shared-instructions-generator.d.ts +38 -0
- package/dist/src/init/shared-instructions-generator.d.ts.map +1 -0
- package/dist/src/init/shared-instructions-generator.js +571 -0
- package/dist/src/init/shared-instructions-generator.js.map +1 -0
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/mcp-tools/graphify-tools.d.ts +4 -4
- package/dist/src/mcp-tools/graphify-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/graphify-tools.js +84 -60
- package/dist/src/mcp-tools/graphify-tools.js.map +1 -1
- package/dist/src/ui/dashboard.html +219 -45
- package/dist/src/ui/server.mjs +201 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: monomind-do
|
|
3
|
-
description: "Monomind —
|
|
3
|
+
description: "Monomind — Execute tasks from monomind-task board with parallel, minimal, or sequential agent modes, smart context group routing, and review cycles"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Argument Parsing
|
|
@@ -10,6 +10,8 @@ Parse `$ARGUMENTS` for the following flags (in any order):
|
|
|
10
10
|
- `--space <SPACE_ID>` — use this space directly (skip space discovery)
|
|
11
11
|
- `--board <BOARD_ID>` — use this task board directly (skip board discovery)
|
|
12
12
|
- `--filter <text>` — only process tasks whose title contains this text (case-insensitive)
|
|
13
|
+
- `--mode <parallel|minimal|sequential>` — execution mode (default: ask user)
|
|
14
|
+
- `--max-agents <N>` — cap total agent spawns per run (default: 20). Prevents runaway costs on large boards.
|
|
13
15
|
|
|
14
16
|
If `$ARGUMENTS` contains none of these flags, treat the entire string as a filter (legacy mode).
|
|
15
17
|
|
|
@@ -41,7 +43,7 @@ If `cargo` is also missing, output this and STOP:
|
|
|
41
43
|
|
|
42
44
|
## Step 1: Find the Task Board
|
|
43
45
|
|
|
44
|
-
**If `--space` and `--board` were provided:** Skip discovery. Use the provided `SPACE_ID` and `TASK_BOARD_ID` directly. Jump to
|
|
46
|
+
**If `--space` and `--board` were provided:** Skip discovery. Use the provided `SPACE_ID` and `TASK_BOARD_ID` directly. Jump to column discovery.
|
|
45
47
|
|
|
46
48
|
**Otherwise, discover them:**
|
|
47
49
|
|
|
@@ -55,9 +57,73 @@ If `cargo` is also missing, output this and STOP:
|
|
|
55
57
|
|
|
56
58
|
---
|
|
57
59
|
|
|
58
|
-
## Step
|
|
60
|
+
## Step 2: Scan All Tasks and Build Execution Plan
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
### 2a: Load all pending tasks
|
|
63
|
+
|
|
64
|
+
List cards in `Todo` and `Backlog`:
|
|
65
|
+
```bash
|
|
66
|
+
monotask card list $TASK_BOARD_ID $COL_TODO --json
|
|
67
|
+
monotask card list $TASK_BOARD_ID $COL_BACKLOG --json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If `--filter` was set, filter by title match.
|
|
71
|
+
|
|
72
|
+
If no cards found, output:
|
|
73
|
+
```
|
|
74
|
+
[monomind:do] No tasks in Todo or Backlog. Queue empty.
|
|
75
|
+
```
|
|
76
|
+
Remove any loop state files and STOP.
|
|
77
|
+
|
|
78
|
+
### 2b: Read task metadata
|
|
79
|
+
|
|
80
|
+
For each card, read its comments to extract:
|
|
81
|
+
- **Assigned agent type** (from "Assigned agent:" comment)
|
|
82
|
+
- **Context group** (from "Context group:" comment)
|
|
83
|
+
- **Prerequisites** (from "Prerequisites:" comment)
|
|
84
|
+
- **Parallel safe** (from "Parallel safe:" comment, default `true`)
|
|
85
|
+
|
|
86
|
+
### 2c: Build context groups
|
|
87
|
+
|
|
88
|
+
Group tasks by their `context_group` value:
|
|
89
|
+
- Tasks with the same context group form a **chain** — they run sequentially on the same agent
|
|
90
|
+
- Tasks with `context_group: independent` or no group are **independent** — they can run on any agent
|
|
91
|
+
- Within a chain, order by prerequisites (prerequisite first)
|
|
92
|
+
|
|
93
|
+
### 2d: Check session memory for execution strategy
|
|
94
|
+
|
|
95
|
+
Call `mcp__monomind__memory_search` with `"task-strategy:<REPO_NAME>"`. If a recent strategy exists, use its `recommended_execution_mode` as the default.
|
|
96
|
+
|
|
97
|
+
### 2e: Choose execution mode
|
|
98
|
+
|
|
99
|
+
**If `--mode` was provided:** Use that mode.
|
|
100
|
+
|
|
101
|
+
**If session memory has a recommendation:** Present it as default.
|
|
102
|
+
|
|
103
|
+
**Otherwise, ask the user:**
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
[monomind:do] Found N tasks: X in context groups, Y independent.
|
|
107
|
+
|
|
108
|
+
Context groups:
|
|
109
|
+
- <group-1>: 3 tasks (agent: backend-dev, sequential)
|
|
110
|
+
- <group-2>: 2 tasks (agent: Frontend Developer, sequential)
|
|
111
|
+
- independent: 4 tasks (mixed agents, parallelizable)
|
|
112
|
+
|
|
113
|
+
How do you want to execute?
|
|
114
|
+
|
|
115
|
+
1. **Parallel** — Spawn one agent per context group + one per independent task. (~N agents, fastest)
|
|
116
|
+
2. **Minimal** — One agent per context group + one shared agent for all independents. (~M agents, balanced)
|
|
117
|
+
3. **Sequential** — One agent processes everything in order. (1 agent, cheapest)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Store chosen mode as `EXEC_MODE`.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Step 3: Initialize Loop State
|
|
125
|
+
|
|
126
|
+
Generate a loop ID and write the initial state file:
|
|
61
127
|
```bash
|
|
62
128
|
mkdir -p .monomind/loops
|
|
63
129
|
export DO_LOOP_ID="do-$(date +%s%3N)"
|
|
@@ -66,7 +132,8 @@ cat > ".monomind/loops/${DO_LOOP_ID}.json" << EOF
|
|
|
66
132
|
"id": "${DO_LOOP_ID}",
|
|
67
133
|
"type": "do",
|
|
68
134
|
"prompt": "/monomind:do $ARGUMENTS",
|
|
69
|
-
"
|
|
135
|
+
"mode": "${EXEC_MODE}",
|
|
136
|
+
"currentTask": "starting...",
|
|
70
137
|
"spaceId": "${SPACE_ID:-}",
|
|
71
138
|
"boardId": "${TASK_BOARD_ID:-}",
|
|
72
139
|
"filter": "${FILTER:-}",
|
|
@@ -78,142 +145,168 @@ cat > ".monomind/loops/${DO_LOOP_ID}.json" << EOF
|
|
|
78
145
|
EOF
|
|
79
146
|
```
|
|
80
147
|
|
|
81
|
-
|
|
148
|
+
Check if a stop was requested:
|
|
82
149
|
```bash
|
|
83
150
|
[ -f ".monomind/loops/${DO_LOOP_ID}.stop" ] && echo "DO_STOP_REQUESTED=true"
|
|
84
151
|
```
|
|
85
152
|
If `DO_STOP_REQUESTED=true`, output `[monomind:do] Stop requested via dashboard. Halting.`, remove state files, and STOP.
|
|
86
153
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
1. List cards in `Todo` first (prioritized), then `Backlog`:
|
|
90
|
-
```bash
|
|
91
|
-
monotask card list $TASK_BOARD_ID $COL_TODO --json
|
|
92
|
-
monotask card list $TASK_BOARD_ID $COL_BACKLOG --json
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
2. If `$ARGUMENTS` was provided, filter by title match.
|
|
154
|
+
---
|
|
96
155
|
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
[monomind:do] No tasks in Todo or Backlog. Checking again in 2 minutes...
|
|
100
|
-
```
|
|
101
|
-
Update loop state before scheduling:
|
|
102
|
-
```bash
|
|
103
|
-
NEXT_AT=$(( $(date +%s%3N) + 120000 ))
|
|
104
|
-
cat > ".monomind/loops/${DO_LOOP_ID}.json" << EOF
|
|
105
|
-
{"id":"${DO_LOOP_ID}","type":"do","prompt":"/monomind:do $ARGUMENTS","currentTask":"queue empty — waiting","spaceId":"${SPACE_ID:-}","boardId":"${TASK_BOARD_ID:-}","filter":"${FILTER:-}","startedAt":$(cat .monomind/loops/${DO_LOOP_ID}.json 2>/dev/null | python3 -c "import sys,json;print(json.load(sys.stdin).get('startedAt',0))" 2>/dev/null || date +%s%3N),"lastRunAt":$(date +%s%3N),"nextRunAt":${NEXT_AT},"status":"waiting"}
|
|
106
|
-
EOF
|
|
107
|
-
```
|
|
108
|
-
Then use `ScheduleWakeup` with `delaySeconds: 120` and prompt `/monomind:do --space $SPACE_ID --board $TASK_BOARD_ID` (plus `--filter` if one was set) to check again. STOP this iteration.
|
|
156
|
+
## Step 4: Execute Based on Mode
|
|
109
157
|
|
|
110
|
-
|
|
158
|
+
### Agent Budget Guard
|
|
111
159
|
|
|
112
|
-
|
|
160
|
+
Before spawning, count total agents needed:
|
|
161
|
+
- **Parallel**: one per context group + one per independent task
|
|
162
|
+
- **Minimal**: one per context group + one shared
|
|
163
|
+
- **Sequential**: one
|
|
113
164
|
|
|
114
|
-
|
|
165
|
+
If total exceeds `--max-agents` (default: 20), downgrade mode automatically:
|
|
166
|
+
- Parallel → Minimal (if still over budget → Sequential)
|
|
167
|
+
- Output: `[monomind:do] Agent budget exceeded (N > max-agents). Downgrading to <mode>.`
|
|
115
168
|
|
|
116
|
-
|
|
169
|
+
Track `AGENTS_SPAWNED` counter. If it hits the limit mid-run (e.g., during review cycles), stop spawning and queue remaining work for the next cycle.
|
|
117
170
|
|
|
118
|
-
|
|
171
|
+
### Mode: Parallel
|
|
119
172
|
|
|
120
|
-
|
|
121
|
-
- Task description (first comment)
|
|
122
|
-
- **Assigned agent type** — look for a comment starting with "Assigned agent:" and extract the type
|
|
123
|
-
- Additional context, edge cases, technical notes
|
|
173
|
+
Spawn ALL agents in ONE message using the Agent tool:
|
|
124
174
|
|
|
125
|
-
|
|
175
|
+
**For each context group chain:**
|
|
176
|
+
- Spawn ONE agent of the chain's recommended type
|
|
177
|
+
- Provide it with ALL tasks in the chain, in prerequisite order
|
|
178
|
+
- The agent executes them sequentially, committing after each
|
|
179
|
+
- Agent prompt includes: full task context for ALL tasks in the chain, project context, instruction to execute in order
|
|
126
180
|
|
|
127
|
-
|
|
181
|
+
**For each independent task:**
|
|
182
|
+
- Spawn ONE agent of the task's assigned type
|
|
183
|
+
- Provide it with that single task's context
|
|
184
|
+
- The agent executes and commits
|
|
128
185
|
|
|
129
|
-
|
|
186
|
+
All agents run concurrently via `run_in_background: true`.
|
|
130
187
|
|
|
131
|
-
|
|
188
|
+
**Agent prompt template for chain execution:**
|
|
189
|
+
```
|
|
190
|
+
You have N tasks to execute in order. Complete each one before moving to the next.
|
|
191
|
+
Tasks share context — knowledge from earlier tasks applies to later ones.
|
|
192
|
+
|
|
193
|
+
TASK 1 of N: <title>
|
|
194
|
+
<full task context, checklist, acceptance criteria>
|
|
195
|
+
|
|
196
|
+
TASK 2 of N: <title>
|
|
197
|
+
<full task context, checklist, acceptance criteria>
|
|
198
|
+
...
|
|
199
|
+
|
|
200
|
+
For each task:
|
|
201
|
+
1. Implement the changes following the checklist
|
|
202
|
+
2. Write/update tests
|
|
203
|
+
3. Verify tests pass
|
|
204
|
+
4. Commit with descriptive message
|
|
205
|
+
5. Write a HANDOFF CONTEXT section (3-5 lines): what files changed, what decisions were made, what the next task needs to know
|
|
206
|
+
6. Report: DONE | DONE_WITH_CONCERNS | BLOCKED (with details)
|
|
207
|
+
|
|
208
|
+
IMPORTANT — Handoff Context:
|
|
209
|
+
After completing each task in the chain, write a brief ## Handoff Context block:
|
|
210
|
+
- Files created/modified (with paths)
|
|
211
|
+
- Key decisions made (naming, patterns chosen, trade-offs)
|
|
212
|
+
- State the next task inherits (new types, config values, API shapes)
|
|
213
|
+
This ensures continuity even if context is compressed between tasks.
|
|
214
|
+
|
|
215
|
+
If you are BLOCKED on any task, STOP the entire chain. Do not attempt subsequent tasks.
|
|
216
|
+
Report which task is blocked and list the remaining unstarted tasks.
|
|
217
|
+
```
|
|
132
218
|
|
|
133
|
-
|
|
219
|
+
**Agent prompt template for independent tasks:**
|
|
220
|
+
```
|
|
221
|
+
Execute this single task:
|
|
134
222
|
|
|
135
|
-
|
|
223
|
+
TASK: <title>
|
|
224
|
+
<full task context, checklist, acceptance criteria>
|
|
136
225
|
|
|
137
|
-
|
|
226
|
+
1. Implement the changes following the checklist
|
|
227
|
+
2. Write/update tests
|
|
228
|
+
3. Verify tests pass
|
|
229
|
+
4. Commit with descriptive message
|
|
230
|
+
5. Report: DONE | DONE_WITH_CONCERNS | BLOCKED (with details)
|
|
231
|
+
```
|
|
138
232
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
233
|
+
Move all cards to `In Progress` before spawning agents:
|
|
234
|
+
```bash
|
|
235
|
+
monotask card move $TASK_BOARD_ID $CARD_ID $COL_IN_PROGRESS --json
|
|
236
|
+
```
|
|
143
237
|
|
|
144
|
-
|
|
238
|
+
### Mode: Minimal
|
|
145
239
|
|
|
146
|
-
|
|
240
|
+
Same as parallel, but:
|
|
241
|
+
- One agent per context group chain (same as parallel)
|
|
242
|
+
- ONE shared agent for ALL independent tasks (executes them sequentially)
|
|
243
|
+
- Total agents = number of context groups + 1
|
|
147
244
|
|
|
148
|
-
|
|
245
|
+
### Mode: Sequential
|
|
149
246
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
247
|
+
Spawn ONE agent with ALL tasks (all chains flattened into prerequisite order, then independents):
|
|
248
|
+
- The single agent receives every task
|
|
249
|
+
- Executes them in order, committing after each
|
|
250
|
+
- Maximum context preservation, minimum cost
|
|
154
251
|
|
|
155
252
|
---
|
|
156
253
|
|
|
157
|
-
## Step
|
|
254
|
+
## Step 5: Gather Project Context (for agent prompts)
|
|
158
255
|
|
|
159
|
-
|
|
256
|
+
Collect in parallel (skip any that error):
|
|
160
257
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- Effort score is 0-4
|
|
258
|
+
1. **README**: Read `README.md` (first 200 lines).
|
|
259
|
+
2. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`.
|
|
260
|
+
3. **Memory search**: Call `mcp__monomind__memory_search` with the first task's title.
|
|
261
|
+
4. **Knowledge graph**: Call `mcp__monomind__graphify_suggest` with the first task's title.
|
|
166
262
|
|
|
167
|
-
|
|
168
|
-
- Task touches 3+ files or multiple modules
|
|
169
|
-
- Has subtasks or long checklist (4+ items)
|
|
170
|
-
- Involves cross-cutting concerns (API + DB + tests + docs)
|
|
171
|
-
- Effort score is 5-10
|
|
263
|
+
Bundle into `PROJECT_CONTEXT` and include in every agent prompt.
|
|
172
264
|
|
|
173
|
-
|
|
265
|
+
---
|
|
174
266
|
|
|
175
|
-
|
|
267
|
+
## Step 6: Read Full Task Context (for each task)
|
|
176
268
|
|
|
177
|
-
|
|
178
|
-
- Full `TASK_CONTEXT` and `PROJECT_CONTEXT`
|
|
179
|
-
- The checklist items as step-by-step guide
|
|
180
|
-
- Instructions to commit changes with a descriptive message
|
|
269
|
+
For each task being assigned to an agent, gather:
|
|
181
270
|
|
|
182
|
-
|
|
271
|
+
1. **Card details**: Run `monotask card view $TASK_BOARD_ID $CARD_ID` to get title, description, impact, effort, priority.
|
|
183
272
|
|
|
184
|
-
|
|
273
|
+
2. **Comments**: Run `monotask card comment list $TASK_BOARD_ID $CARD_ID --json`. Parse for:
|
|
274
|
+
- Task description and context
|
|
275
|
+
- Assigned agent type
|
|
276
|
+
- Context group and prerequisites
|
|
277
|
+
- Acceptance criteria
|
|
278
|
+
- Additional notes
|
|
185
279
|
|
|
186
|
-
|
|
187
|
-
- **coordinator** — plans and delegates subtasks
|
|
188
|
-
- **assigned agent type** (from card) — primary implementer
|
|
189
|
-
- **tester** — writes and runs tests for the changes
|
|
190
|
-
- Additional agents as needed based on task domain (e.g., `backend-dev` + `Frontend Developer` for full-stack work)
|
|
280
|
+
3. **Checklist**: Run `monotask card checklist list $TASK_BOARD_ID $CARD_ID --json`. If a checklist exists, include as step-by-step guide.
|
|
191
281
|
|
|
192
|
-
|
|
282
|
+
Bundle into `TASK_CONTEXT` for that task.
|
|
193
283
|
|
|
194
|
-
|
|
284
|
+
---
|
|
195
285
|
|
|
196
|
-
|
|
197
|
-
- Implement the task as described
|
|
198
|
-
- Follow the checklist if one exists
|
|
199
|
-
- Write or update tests for all changes
|
|
200
|
-
- Commit changes with descriptive messages
|
|
201
|
-
- Report back with one of:
|
|
202
|
-
- **DONE**: Task completed. Include summary of changes and list of files modified.
|
|
203
|
-
- **DONE_WITH_CONCERNS**: Task completed with concerns. Include concerns.
|
|
204
|
-
- **BLOCKED**: Cannot complete. Include the specific question or blocker.
|
|
286
|
+
## Step 7: Handle Agent Results
|
|
205
287
|
|
|
206
|
-
|
|
288
|
+
After each agent completes (or all agents in parallel mode), process results:
|
|
207
289
|
|
|
208
|
-
|
|
290
|
+
### For each completed task:
|
|
209
291
|
|
|
210
|
-
|
|
292
|
+
**If DONE or DONE_WITH_CONCERNS:**
|
|
293
|
+
- Proceed to review cycle (Step 8)
|
|
211
294
|
|
|
212
|
-
|
|
213
|
-
1.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
295
|
+
**If BLOCKED:**
|
|
296
|
+
1. Add the blocking question as a comment:
|
|
297
|
+
```bash
|
|
298
|
+
monotask card comment add $TASK_BOARD_ID $CARD_ID "Blocked: <question or issue>"
|
|
299
|
+
```
|
|
300
|
+
2. Move card to `Human in Loop`:
|
|
301
|
+
```bash
|
|
302
|
+
monotask card move $TASK_BOARD_ID $CARD_ID $COL_HUMAN_IN_LOOP --json
|
|
303
|
+
```
|
|
304
|
+
3. **Chain failure propagation**: If this task belongs to a context group chain, ALL remaining tasks in that chain are now blocked. For each subsequent task in the chain:
|
|
305
|
+
```bash
|
|
306
|
+
monotask card move $TASK_BOARD_ID $DEPENDENT_CARD_ID $COL_BACKLOG --json
|
|
307
|
+
monotask card comment add $TASK_BOARD_ID $DEPENDENT_CARD_ID "Chain paused: prerequisite '<blocked task title>' is blocked. Reason: <blocker summary>"
|
|
308
|
+
```
|
|
309
|
+
Do NOT attempt to execute remaining chain tasks — they depend on the blocked task's output and context.
|
|
217
310
|
|
|
218
311
|
---
|
|
219
312
|
|
|
@@ -257,38 +350,38 @@ Proceed to Step 9.
|
|
|
257
350
|
### If APPROVED (from review cycle):
|
|
258
351
|
1. Add a comment summarizing the changes and review outcome:
|
|
259
352
|
```bash
|
|
260
|
-
monotask card comment add $TASK_BOARD_ID $
|
|
353
|
+
monotask card comment add $TASK_BOARD_ID $CARD_ID "Completed and reviewed: <summary>"
|
|
261
354
|
```
|
|
262
355
|
2. If there's a checklist, mark completed items:
|
|
263
356
|
```bash
|
|
264
|
-
monotask card checklist check $TASK_BOARD_ID $
|
|
357
|
+
monotask card checklist check $TASK_BOARD_ID $CARD_ID <ITEM_ID>
|
|
265
358
|
```
|
|
266
359
|
3. If DONE_WITH_CONCERNS, add concerns:
|
|
267
360
|
```bash
|
|
268
|
-
monotask card comment add $TASK_BOARD_ID $
|
|
361
|
+
monotask card comment add $TASK_BOARD_ID $CARD_ID "Concerns: <concerns>"
|
|
269
362
|
```
|
|
270
363
|
4. Move card to `Review`:
|
|
271
364
|
```bash
|
|
272
|
-
monotask card move $TASK_BOARD_ID $
|
|
365
|
+
monotask card move $TASK_BOARD_ID $CARD_ID $COL_REVIEW --json
|
|
273
366
|
```
|
|
274
|
-
|
|
275
|
-
### If BLOCKED (from execution):
|
|
276
|
-
1. Add the blocking question:
|
|
367
|
+
5. **Unblock dependents**: If this task was a prerequisite for other tasks, move those from `Backlog` to `Todo`:
|
|
277
368
|
```bash
|
|
278
|
-
monotask card
|
|
279
|
-
```
|
|
280
|
-
2. Move card to `Human in Loop`:
|
|
281
|
-
```bash
|
|
282
|
-
monotask card move $TASK_BOARD_ID $CURRENT_CARD_ID $COL_HUMAN_IN_LOOP --json
|
|
369
|
+
monotask card move $TASK_BOARD_ID $DEPENDENT_CARD_ID $COL_TODO --json
|
|
283
370
|
```
|
|
284
371
|
|
|
285
372
|
---
|
|
286
373
|
|
|
287
374
|
## Step 10: Summary and Next Cycle
|
|
288
375
|
|
|
289
|
-
Output a
|
|
376
|
+
Output a status summary:
|
|
290
377
|
```
|
|
291
|
-
[monomind:do]
|
|
378
|
+
[monomind:do] Execution complete (mode: <parallel|minimal|sequential>)
|
|
379
|
+
|
|
380
|
+
| Task | Status | Agent | Review |
|
|
381
|
+
|-------------------------------|----------------|-------------|------------|
|
|
382
|
+
| <title> | Review | backend-dev | approved |
|
|
383
|
+
| <title> | Review | coder | approved |
|
|
384
|
+
| <title> | Human in Loop | coder | blocked |
|
|
292
385
|
```
|
|
293
386
|
|
|
294
387
|
Then check for remaining tasks:
|
|
@@ -297,18 +390,37 @@ monotask card list $TASK_BOARD_ID $COL_TODO --json
|
|
|
297
390
|
monotask card list $TASK_BOARD_ID $COL_BACKLOG --json
|
|
298
391
|
```
|
|
299
392
|
|
|
300
|
-
If tasks remain, output:
|
|
393
|
+
If tasks remain (including newly unblocked ones), output:
|
|
301
394
|
```
|
|
302
|
-
[monomind:do] Remaining: N in Todo, M in Backlog.
|
|
395
|
+
[monomind:do] Remaining: N in Todo, M in Backlog. Processing next batch in 2 minutes...
|
|
303
396
|
```
|
|
304
397
|
|
|
305
|
-
|
|
398
|
+
Update loop state and use `ScheduleWakeup` with `delaySeconds: 120` and prompt `/monomind:do --space $SPACE_ID --board $TASK_BOARD_ID --mode $EXEC_MODE` (plus `--filter` if one was set).
|
|
306
399
|
|
|
307
400
|
If no tasks remain, output:
|
|
308
401
|
```
|
|
309
402
|
[monomind:do] All tasks processed. Queue empty.
|
|
310
403
|
```
|
|
311
404
|
|
|
405
|
+
### Store execution outcome in session memory
|
|
406
|
+
|
|
407
|
+
Call `mcp__monomind__memory_store` with:
|
|
408
|
+
```json
|
|
409
|
+
{
|
|
410
|
+
"key": "execution-outcome:<REPO_NAME>:<timestamp>",
|
|
411
|
+
"content": {
|
|
412
|
+
"mode": "<EXEC_MODE>",
|
|
413
|
+
"tasks_completed": N,
|
|
414
|
+
"tasks_blocked": M,
|
|
415
|
+
"agents_spawned": K,
|
|
416
|
+
"review_cycles": L,
|
|
417
|
+
"outcome": "success | partial | blocked",
|
|
418
|
+
"lessons": ["any patterns observed — e.g. 'context groups worked well', 'task X was too large']"
|
|
419
|
+
},
|
|
420
|
+
"tags": ["execution-outcome", "monomind-do"]
|
|
421
|
+
}
|
|
422
|
+
```
|
|
423
|
+
|
|
312
424
|
Remove the loop state file:
|
|
313
425
|
```bash
|
|
314
426
|
rm -f ".monomind/loops/${DO_LOOP_ID}.json" ".monomind/loops/${DO_LOOP_ID}.stop"
|