@yemi33/minions 0.1.2390 → 0.1.2392
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/dashboard/js/refresh.js +1 -1
- package/dashboard/js/render-work-items.js +4 -9
- package/dashboard/js/settings.js +46 -10
- package/docs/deprecated.json +6 -6
- package/docs/slim-ux/concepts.md +739 -586
- package/package.json +1 -1
package/docs/slim-ux/concepts.md
CHANGED
|
@@ -1,448 +1,507 @@
|
|
|
1
1
|
# Minions Concept Dictionary
|
|
2
2
|
|
|
3
3
|
> Plain-English definitions for every first-class noun in the Minions system. This is the team's
|
|
4
|
-
> shared language before we redesign the UI; it is intentionally factual
|
|
4
|
+
> shared language before we redesign the UI; it is intentionally factual -- design opinions live in
|
|
5
5
|
> [`architecture-suggestions.md`](./architecture-suggestions.md).
|
|
6
6
|
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
7
|
+
> Backing claims use stable `path#symbol` references instead of exact source-line anchors. Search
|
|
8
|
+
> for the named symbol when the implementation moves.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
## How the system fits together (one paragraph)
|
|
13
13
|
|
|
14
|
-
A **human**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
and **Pipelines** are the three ways things happen without a human typing.
|
|
14
|
+
A **human** asks the **Command Center** to inspect or change the system. CC uses the dashboard's
|
|
15
|
+
existing `/api/*` routes, most often to create a **Work Item**, **Plan**, **Note**, **Schedule**, or
|
|
16
|
+
**Watch**. On its default 10-second tick, the **Engine** considers the pending **Dispatch Queue**,
|
|
17
|
+
consults **Routing**, selects an **Agent**, and invokes the configured runtime adapter (Claude,
|
|
18
|
+
Copilot, or Codex). The agent receives its **Charter**, the work-type **Playbook**, project
|
|
19
|
+
instructions, and bounded team memory, then does the work -- often opening a **Pull Request**.
|
|
20
|
+
Before exit it writes a trusted **Completion** JSON report; lifecycle code uses that report to
|
|
21
|
+
finish the Work Item and attach durable artifacts. **Watches**, **Schedules**, and **Pipelines**
|
|
22
|
+
provide persistent automation without a new human chat turn.
|
|
24
23
|
|
|
25
24
|
---
|
|
26
25
|
|
|
27
26
|
## 1. Command Center (CC)
|
|
28
27
|
|
|
29
|
-
**What it is.** The
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
**What it is.** The conversational control surface on the dashboard home page. CC runs through the
|
|
29
|
+
runtime adapter selected by `resolveCcCli`, with a system prompt that describes the live API. It can
|
|
30
|
+
answer questions and use direct localhost `/api/*` calls to change Minions state.
|
|
31
|
+
|
|
32
|
+
CC actions are direct API writes correlated to the current turn through `X-CC-Turn-Id`; the
|
|
33
|
+
dashboard then builds synthetic action results for the UI.
|
|
33
34
|
|
|
34
35
|
**Where it lives.**
|
|
36
|
+
|
|
35
37
|
- System prompt: `prompts/cc-system.md`
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
**Backing
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
56
|
-
| POST | `/api/command-center
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
- Session records: `engine/state.db` table `cc_sessions`
|
|
39
|
+
- Shared invocation path: `dashboard.js#ccCall` and `engine/llm.js#callLLM`
|
|
40
|
+
- Runtime selection: `engine/shared.js#resolveCcCli` and `engine/runtimes/index.js#resolveRuntime`
|
|
41
|
+
|
|
42
|
+
**Backing symbols.**
|
|
43
|
+
|
|
44
|
+
- Request handlers: `dashboard.js#handleCommandCenter` and
|
|
45
|
+
`dashboard.js#handleCommandCenterStream`
|
|
46
|
+
- Turn/action correlation: `dashboard.js#_ccTurnCreations` and
|
|
47
|
+
`dashboard.js#_buildSyntheticActionResultsForTurn`
|
|
48
|
+
- Session persistence: `engine/small-state-store.js` CC-session helpers
|
|
49
|
+
- Per-response tool-turn cap: `engine/shared.js#ENGINE_DEFAULTS.ccMaxTurns` (default 50)
|
|
50
|
+
|
|
51
|
+
**Existing dashboard.** `dashboard/pages/home.html` contains the classic CC surface; the Slim home
|
|
52
|
+
surface uses the same server handlers and sessions.
|
|
53
|
+
|
|
54
|
+
**Endpoints.**
|
|
55
|
+
|
|
56
|
+
| Method | Path | Purpose |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| POST | `/api/command-center` | Non-streaming CC turn |
|
|
59
|
+
| POST | `/api/command-center/stream` | SSE-streaming CC turn |
|
|
60
|
+
| POST | `/api/command-center/triage` | Isolated, watch-driven headless turn |
|
|
61
|
+
| POST | `/api/command-center/new-session` | Clear the active CC session |
|
|
62
|
+
| POST | `/api/command-center/abort` | Abort an in-flight turn |
|
|
63
|
+
| GET | `/api/cc-sessions` | List per-tab session metadata |
|
|
64
|
+
| POST | `/api/cc-sessions/warm` | Pre-warm a compatible worker pool |
|
|
65
|
+
| DELETE | `/api/cc-sessions/:id` | Delete a tab's persisted session |
|
|
66
|
+
|
|
67
|
+
**Relationships.** CC is a human-facing client of the same APIs used by the rest of the dashboard.
|
|
68
|
+
It creates and updates other concepts; it is not a second state store or a privileged orchestration
|
|
69
|
+
path.
|
|
63
70
|
|
|
64
71
|
---
|
|
65
72
|
|
|
66
73
|
## 2. Work Item
|
|
67
74
|
|
|
68
|
-
**What it is.** A unit of work the engine can dispatch to an agent.
|
|
69
|
-
(`implement`, `fix`, `review`,
|
|
70
|
-
|
|
75
|
+
**What it is.** A unit of work the engine can dispatch to an agent. It has a title, canonical work
|
|
76
|
+
type (`implement`, `fix`, `review`, and so on), priority, optional project and agent hints,
|
|
77
|
+
dependencies, and lifecycle state.
|
|
71
78
|
|
|
72
79
|
**Where it lives.**
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
pending
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- `GET
|
|
96
|
-
- `
|
|
97
|
-
- `POST /api/work-items
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
80
|
+
|
|
81
|
+
- Durable records: `engine/state.db` table `work_items`
|
|
82
|
+
- In-flight execution records: `engine/state.db` table `dispatches`
|
|
83
|
+
- Read/write facade: `engine/work-items-store.js`
|
|
84
|
+
|
|
85
|
+
**Backing symbols.**
|
|
86
|
+
|
|
87
|
+
- Statuses: `engine/shared.js#WI_STATUS`
|
|
88
|
+
- Work types: `engine/shared.js#WORK_TYPE`
|
|
89
|
+
- Queue admission: `engine/dispatch.js#addToDispatch`
|
|
90
|
+
- Lifecycle updates: `engine/lifecycle.js#updateWorkItemStatus`
|
|
91
|
+
- Completion predicate: `engine/lifecycle.js#isItemCompleted`
|
|
92
|
+
|
|
93
|
+
The common path is `pending` (or `queued`) -> `dispatched` -> `done` or `failed`. `paused`,
|
|
94
|
+
`decomposed`, and `cancelled` are also canonical states. Failures can retry up to
|
|
95
|
+
`ENGINE_DEFAULTS.maxRetries`, with per-agent reassignment governed separately.
|
|
96
|
+
|
|
97
|
+
**Existing dashboard.** `dashboard/pages/work.html` is the classic Work Items screen. Slim embeds
|
|
98
|
+
that same screen for queued-work details rather than maintaining a second renderer.
|
|
99
|
+
|
|
100
|
+
**Endpoints.**
|
|
101
|
+
|
|
102
|
+
- `GET /api/work-items` -- list enriched, size-bounded records
|
|
103
|
+
- `GET /api/work-items/<id>` -- fetch one full record for detail/edit
|
|
104
|
+
- `POST /api/work-items` -- create
|
|
105
|
+
- `POST /api/work-items/update` -- edit
|
|
106
|
+
- `POST /api/work-items/retry` -- return a failed/dispatched item to pending
|
|
107
|
+
- `POST /api/work-items/cancel` and `/delete` -- stop and remove/cancel
|
|
108
|
+
- `POST /api/work-items/archive` and `GET /api/work-items/archive`
|
|
109
|
+
- `POST /api/work-items/reopen`
|
|
110
|
+
- `POST /api/work-items/feedback`
|
|
111
|
+
|
|
112
|
+
**Relationships.** A Work Item is the durable intent carried by a **Dispatch**. It may point to a
|
|
113
|
+
**Project**, depend on other Work Items, be materialized from a **PRD Item**, and acquire one or more
|
|
114
|
+
associated **Pull Request** records over its lifecycle.
|
|
102
115
|
|
|
103
116
|
---
|
|
104
117
|
|
|
105
118
|
## 3. Plan
|
|
106
119
|
|
|
107
|
-
**What it is.** A
|
|
108
|
-
flow is:
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
**What it is.** A human-readable Markdown proposal that is approved before execution. The normal
|
|
121
|
+
flow is:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Plan Markdown -> plan-to-prd Work Item -> PRD rows -> Work Items -> verify Work Item(s)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The `plan-to-prd` agent writes `agents/<id>/prd-result.json`. On successful completion,
|
|
128
|
+
`engine/lifecycle.js` validates that sidecar against the expected plan and imports it into the SQL
|
|
129
|
+
PRD store before the plan-to-PRD Work Item can finish.
|
|
111
130
|
|
|
112
131
|
**Where it lives.**
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
`
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- `
|
|
145
|
-
- `POST /api/plans/
|
|
146
|
-
- `POST /api/plans/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
- `POST /api/plans/delete` (6959)
|
|
152
|
-
- `POST /api/plans/archive` (6960) — manual archive
|
|
153
|
-
- `POST /api/plans/unarchive` (6961)
|
|
154
|
-
- `POST /api/plans/revise` (6962)
|
|
155
|
-
- `POST /api/plans/discuss` (6963)
|
|
156
|
-
- `POST /api/plans/create` (7055)
|
|
157
|
-
|
|
158
|
-
**Relationships.** Plan ↔ **PRD** ↔ **Work Items** is a one-to-one-to-many chain. **Pipelines**
|
|
159
|
-
can include `plan` stages. **Verification** is owned by the plan: when all work items finish, a
|
|
160
|
-
verify Work Item auto-spawns.
|
|
132
|
+
|
|
133
|
+
- Live source documents: `plans/*.md`
|
|
134
|
+
- Archived source documents: `plans/archive/*.md`
|
|
135
|
+
- Executable lifecycle/status: the corresponding SQL-backed **PRD**
|
|
136
|
+
|
|
137
|
+
Executable lifecycle state is SQL-backed. Manual archive moves the Markdown source to
|
|
138
|
+
`plans/archive/` and marks the authoritative PRD archived in place.
|
|
139
|
+
|
|
140
|
+
**Backing symbols.**
|
|
141
|
+
|
|
142
|
+
- Plan statuses: `engine/shared.js#PLAN_STATUS`
|
|
143
|
+
- Atomic conversion enqueue: `engine/shared.js#queuePlanToPrd`
|
|
144
|
+
- Completion gate: `engine/lifecycle.js#checkPlanCompletion`
|
|
145
|
+
- Manual archive: `engine/lifecycle.js#archivePlan`
|
|
146
|
+
- Plan worktree cleanup: `engine/lifecycle.js#cleanupPlanWorktrees`
|
|
147
|
+
- PRD sidecar import: `engine/lifecycle.js#runPostCompletionHooks`
|
|
148
|
+
|
|
149
|
+
**Existing dashboard.** `dashboard/pages/plans.html` owns the classic Plans and PRD tabs and all
|
|
150
|
+
lifecycle actions.
|
|
151
|
+
|
|
152
|
+
**Slim dashboard.** The Plans cockpit tile lazily gets its active count from `GET /api/plans`
|
|
153
|
+
through `dashboard/slim/js/plans.js#loadPlansCounts`. Opening the tile embeds the literal classic
|
|
154
|
+
`/plans?embed=1` screen via `dashboard/slim/js/modals-tiles.js#renderPlansBody`; Slim does not carry
|
|
155
|
+
a parallel Plans/PRD renderer.
|
|
156
|
+
|
|
157
|
+
**Endpoints.**
|
|
158
|
+
|
|
159
|
+
- `GET /api/plans` -- list Markdown plans plus SQL-backed PRD summaries
|
|
160
|
+
- `POST /api/plans/create`
|
|
161
|
+
- `POST /api/plans/approve`, `/execute`, `/pause`, `/reject`, `/revise`
|
|
162
|
+
- `POST /api/plans/regenerate`
|
|
163
|
+
- `POST /api/plans/trigger-verify`
|
|
164
|
+
- `POST /api/plans/archive`, `/unarchive`, `/delete`
|
|
165
|
+
- `POST /api/plans/discuss`
|
|
166
|
+
|
|
167
|
+
**Relationships.** A Plan has one executable PRD and many materialized Work Items. A cross-repo
|
|
168
|
+
plan can fan items into multiple projects and create one verify Work Item per touched project.
|
|
169
|
+
Archiving remains an explicit human action after verification.
|
|
161
170
|
|
|
162
171
|
---
|
|
163
172
|
|
|
164
173
|
## 4. PRD (Product Requirements Document)
|
|
165
174
|
|
|
166
|
-
**What it is.** The structured
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
**What it is.** The structured, machine-executable representation of a Plan. Its full document
|
|
176
|
+
shape remains JSON-compatible, but the authoritative records are SQL rows: a parent in `prds` and
|
|
177
|
+
children in `prd_items`. The compatibility filename still ends in `.json`; it is an identifier,
|
|
178
|
+
not a live file under `prd/`.
|
|
169
179
|
|
|
170
|
-
|
|
171
|
-
|
|
180
|
+
The current document shape uses `missing_features[]`. Each feature can carry acceptance criteria,
|
|
181
|
+
complexity, dependencies, project, type, and a status of `missing`, `updated`, or `done`.
|
|
172
182
|
|
|
173
|
-
**
|
|
174
|
-
- Status constants: `engine/shared.js` line 1370 (`PRD_ITEM_STATUS`, `PRD_MATERIALIZABLE`).
|
|
175
|
-
- Sync from Work Items: `syncPrdItemStatus`, `reconcilePrdStatuses` (`engine/lifecycle.js`
|
|
176
|
-
lines 564, 597).
|
|
177
|
-
- Plan-to-PRD agent: `playbooks/plan-to-prd.md`, dispatched via `queuePlanToPrd`.
|
|
178
|
-
- PRD dir: `engine/pipeline.js` line 24 (`PRD_DIR`).
|
|
183
|
+
**Where it lives.**
|
|
179
184
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
`
|
|
185
|
+
- Parent records: `engine/state.db` table `prds`
|
|
186
|
+
- Item records: `engine/state.db` table `prd_items`
|
|
187
|
+
- Verify-PR links: `engine/state.db` table `prd_verify_prs`
|
|
188
|
+
- Read/write facade: `engine/prd-store.js`
|
|
183
189
|
|
|
184
|
-
|
|
185
|
-
**PRD** tab rendered by `dashboard/slim/js/plans.js`, mirroring the classic PRD view: it lists
|
|
186
|
-
materialized PRDs with their work items, the verify task, and linked PRs. Reads use the **existing**
|
|
187
|
-
`GET /api/prd`, `GET /api/plans` (the `.json` entries, for per-PRD lifecycle status), and
|
|
188
|
-
`GET /api/work-items` (the verify row) — no new routes. See **§3 Plan → Slim dashboard** for the
|
|
189
|
-
shared tile/modal, lazy-count source, and `slim-ux`-only gating (no new `engine.*` flag).
|
|
190
|
+
Archived PRDs remain in SQL. Current manual archive sets the PRD's archive metadata in place.
|
|
190
191
|
|
|
191
|
-
**
|
|
192
|
-
|
|
193
|
-
- `
|
|
194
|
-
- `
|
|
192
|
+
**Backing symbols.**
|
|
193
|
+
|
|
194
|
+
- Item statuses: `engine/shared.js#PRD_ITEM_STATUS`
|
|
195
|
+
- Materializable statuses: `engine/shared.js#PRD_MATERIALIZABLE`
|
|
196
|
+
- SQL writes and item upserts: `engine/prd-store.js#writePrd` and `#_upsertPrd`
|
|
197
|
+
- Reads: `engine/prd-store.js#readPrd` and `#listPrdRows`
|
|
198
|
+
- Work Item -> PRD status sync: `engine/lifecycle.js#syncPrdItemStatus`
|
|
199
|
+
- Reconciliation sweep: `engine/lifecycle.js#reconcilePrdStatuses`
|
|
200
|
+
- Stable Work Item join: `work_items.prd_item_id -> prd_items.id`
|
|
201
|
+
|
|
202
|
+
**Existing dashboard.** `dashboard/pages/plans.html` renders the PRD graph/list. The Slim Plans tile
|
|
203
|
+
embeds the same screen.
|
|
204
|
+
|
|
205
|
+
**Endpoints.**
|
|
195
206
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
207
|
+
- `GET /api/prd` -- SQL-derived progress, Work Item, and PR state
|
|
208
|
+
- `POST /api/prd-items` -- add an item
|
|
209
|
+
- `POST /api/prd-items/update` -- edit an item
|
|
210
|
+
- `POST /api/prd-items/remove` -- remove an item and cancel its materialized Work Item
|
|
211
|
+
|
|
212
|
+
**Relationships.** PRD is the bridge between a human Plan and executable Work Items. Its parent row,
|
|
213
|
+
item rows, Work Item foreign keys, and verify PR associations form one SQL-backed lifecycle.
|
|
199
214
|
|
|
200
215
|
---
|
|
201
216
|
|
|
202
217
|
## 5. Note
|
|
203
218
|
|
|
204
|
-
**What it is.** A small
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
**What it is.** A small Markdown artifact written by a human, agent, or engine process to capture
|
|
220
|
+
an outcome, warning, or reusable finding. A Note is raw input; consolidation decides whether its
|
|
221
|
+
information belongs in team `notes.md`, the Knowledge Base, or both.
|
|
222
|
+
|
|
223
|
+
**Where it lives.**
|
|
207
224
|
|
|
208
|
-
|
|
209
|
-
|
|
225
|
+
- New notes: `notes/inbox/*.md`
|
|
226
|
+
- Processed source artifacts: `notes/archive/*.md`
|
|
227
|
+
- Consolidated team digest: `notes.md`
|
|
228
|
+
- Classified durable knowledge: `knowledge/<category>/*.md`
|
|
210
229
|
|
|
211
|
-
**Backing
|
|
212
|
-
- Inbox writer: `writeToInbox` — `engine/shared.js` line 648 (re-exported line 2959).
|
|
213
|
-
- ID parser: `parseNoteId` (same module).
|
|
214
|
-
- Consolidation orchestration: `engine/consolidation.js`
|
|
215
|
-
- `consolidateInbox` line 24
|
|
216
|
-
- `consolidateWithLLM` line 116
|
|
217
|
-
- `classifyToKnowledgeBase` line 389
|
|
218
|
-
- `archiveInboxFiles` line 444.
|
|
230
|
+
**Backing symbols.**
|
|
219
231
|
|
|
220
|
-
|
|
221
|
-
|
|
232
|
+
- Writer and ID parser: `engine/shared.js#writeToInbox` and `#parseNoteId`
|
|
233
|
+
- Consolidation entry point: `engine/consolidation.js#consolidateInbox`
|
|
234
|
+
- LLM merge: `engine/consolidation.js#consolidateWithLLM`
|
|
235
|
+
- Classification: `engine/consolidation.js#classifyToKnowledgeBase`
|
|
236
|
+
- Source archival: `engine/consolidation.js#archiveInboxFiles`
|
|
222
237
|
|
|
223
|
-
**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
- `POST /api/notes-save` (6948) — save edited `notes.md`
|
|
238
|
+
**Existing dashboard.** `dashboard/pages/inbox.html` surfaces Notes, the inbox, and KB controls.
|
|
239
|
+
|
|
240
|
+
**Endpoints.**
|
|
227
241
|
|
|
228
|
-
|
|
229
|
-
`notes
|
|
230
|
-
|
|
242
|
+
- `POST /api/notes`
|
|
243
|
+
- `GET /api/notes-full`
|
|
244
|
+
- `POST /api/notes-save`
|
|
245
|
+
|
|
246
|
+
**Relationships.** Notes enter the **Notes Inbox**, are consolidated into team memory, and can
|
|
247
|
+
produce **Knowledge Base** entries. Successful agent tasks write the requested findings note;
|
|
248
|
+
failed or partial tasks do not create a success artifact.
|
|
231
249
|
|
|
232
250
|
---
|
|
233
251
|
|
|
234
252
|
## 6. Knowledge Base (KB)
|
|
235
253
|
|
|
236
|
-
**What it is.** The team's long-term memory.
|
|
237
|
-
|
|
254
|
+
**What it is.** The team's categorized long-term memory. The five canonical categories in
|
|
255
|
+
`KB_CATEGORIES` are `architecture`, `conventions`, `project-notes`, `build-reports`, and `reviews`.
|
|
256
|
+
The consolidation pipeline can also use supporting categories such as `general`, while personal
|
|
257
|
+
agent memory is kept separately under `knowledge/agents/`.
|
|
238
258
|
|
|
239
259
|
**Where it lives.**
|
|
240
|
-
- `notes/archive/architecture/*.md`
|
|
241
|
-
- `notes/archive/conventions/*.md`
|
|
242
|
-
- `notes/archive/project-notes/*.md`
|
|
243
|
-
- `notes/archive/build-reports/*.md`
|
|
244
|
-
- `notes/archive/reviews/*.md`
|
|
245
260
|
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
|
|
250
|
-
|
|
261
|
+
- Shared entries: `knowledge/<category>/*.md`
|
|
262
|
+
- Per-agent memory: `knowledge/agents/<agent-id>.md`
|
|
263
|
+
- Sweep recovery archive: `knowledge/_swept/`
|
|
264
|
+
|
|
265
|
+
**Backing symbols.**
|
|
266
|
+
|
|
267
|
+
- Canonical categories: `engine/shared.js#KB_CATEGORIES`
|
|
268
|
+
- Query/read layer: `engine/queries.js#KNOWLEDGE_DIR` and KB readers
|
|
269
|
+
- Classification: `engine/consolidation.js#classifyToKnowledgeBase`
|
|
270
|
+
- Compaction and TTL sweep: `engine/kb-sweep.js`
|
|
271
|
+
|
|
272
|
+
**Existing dashboard.** `dashboard/pages/inbox.html` contains the KB browser and sweep controls.
|
|
251
273
|
|
|
252
|
-
**
|
|
274
|
+
**Endpoints.**
|
|
253
275
|
|
|
254
|
-
|
|
255
|
-
- `
|
|
256
|
-
- `POST /api/knowledge`
|
|
257
|
-
- `
|
|
258
|
-
- `GET /api/knowledge/sweep/status` (7164) — poll sweep
|
|
276
|
+
- `GET /api/knowledge`
|
|
277
|
+
- `POST /api/knowledge`
|
|
278
|
+
- `POST /api/knowledge/sweep`
|
|
279
|
+
- `GET /api/knowledge/sweep/status`
|
|
259
280
|
|
|
260
|
-
**Relationships.**
|
|
261
|
-
|
|
281
|
+
**Relationships.** KB entries feed bounded memory retrieval for agent prompts. An entry may be
|
|
282
|
+
pinned, but **Pinned Context** is a separate prompt layer and storage surface rather than a subset
|
|
283
|
+
of the KB.
|
|
262
284
|
|
|
263
285
|
---
|
|
264
286
|
|
|
265
287
|
## 7. Pinned Context (`pinned.md`)
|
|
266
288
|
|
|
267
|
-
**What it is.** Critical context
|
|
268
|
-
|
|
289
|
+
**What it is.** Critical human-curated context that is always included in agent prompt context.
|
|
290
|
+
Pinned content is intentionally small and high priority.
|
|
291
|
+
|
|
292
|
+
**Where it lives.**
|
|
269
293
|
|
|
270
|
-
|
|
271
|
-
|
|
294
|
+
- Content: `<MINIONS_DIR>/pinned.md`
|
|
295
|
+
- KB pin index: `<MINIONS_DIR>/engine/kb-pins.json`
|
|
272
296
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
- Parser: `parsePinnedEntries` (referenced at line 6893).
|
|
276
|
-
- Slow-state cache invalidation explicitly on edits (`includeSlow: true`, line 6905).
|
|
297
|
+
The Markdown content and KB pin index serve different purposes: `pinned.md` is the global prompt
|
|
298
|
+
layer, while `kb-pins.json` protects selected KB entries from sweep removal.
|
|
277
299
|
|
|
278
|
-
**
|
|
279
|
-
buttons appear in the KB browser.
|
|
300
|
+
**Backing symbols.**
|
|
280
301
|
|
|
281
|
-
|
|
282
|
-
- `
|
|
283
|
-
-
|
|
284
|
-
- `
|
|
302
|
+
- Pin-index path: `engine/shared.js#PINNED_ITEMS_PATH`
|
|
303
|
+
- Pin-index reader: `engine/shared.js#getPinnedItems`
|
|
304
|
+
- Markdown parser: `dashboard.js#parsePinnedEntries`
|
|
305
|
+
- Prompt injection and untrusted-input fencing: `engine/playbook.js`
|
|
285
306
|
|
|
286
|
-
**
|
|
287
|
-
|
|
307
|
+
**Existing dashboard.** The home and Knowledge surfaces expose pinned context and pin/unpin
|
|
308
|
+
controls.
|
|
309
|
+
|
|
310
|
+
**Endpoints.**
|
|
311
|
+
|
|
312
|
+
- `GET /api/pinned`
|
|
313
|
+
- `POST /api/pinned`
|
|
314
|
+
- `POST /api/pinned/update`
|
|
315
|
+
- `POST /api/pinned/remove`
|
|
316
|
+
|
|
317
|
+
**Relationships.** Pinned Context is independent of **Routing** and **Charters** but appears in the
|
|
318
|
+
same final prompt context. Because every dispatch sees it, stale or oversized content has
|
|
319
|
+
fleet-wide impact.
|
|
288
320
|
|
|
289
321
|
---
|
|
290
322
|
|
|
291
323
|
## 8. Notes Inbox
|
|
292
324
|
|
|
293
|
-
**What it is.** The
|
|
294
|
-
|
|
295
|
-
`notes.md` or promoted into the **KB** on a schedule.
|
|
325
|
+
**What it is.** The staging area for raw notes before consolidation. Files can come from humans,
|
|
326
|
+
agents, and engine alerts.
|
|
296
327
|
|
|
297
|
-
**Where it lives.**
|
|
298
|
-
`<agent>-<work-item-id>-<date>-<time>.md
|
|
328
|
+
**Where it lives.** `<MINIONS_DIR>/notes/inbox/*.md`. Agent findings conventionally use
|
|
329
|
+
`<agent>-<work-item-id>-<date>-<time>.md` plus YAML frontmatter containing `id`, `agent`, and
|
|
330
|
+
`date`.
|
|
299
331
|
|
|
300
|
-
**Backing
|
|
301
|
-
- Inbox dir constant: `INBOX_DIR` in `engine/queries.js` (used at line 526).
|
|
302
|
-
- Consolidation tick path: `engine/consolidation.js` `consolidateInbox` line 24.
|
|
303
|
-
- Promote / delete API handlers: `handleInboxPersist`, `handleInboxPromoteKb`,
|
|
304
|
-
`handleInboxOpen`, `handleInboxDelete`.
|
|
332
|
+
**Backing symbols.**
|
|
305
333
|
|
|
306
|
-
|
|
307
|
-
|
|
334
|
+
- Directory: `engine/queries.js#INBOX_DIR`
|
|
335
|
+
- Writer: `engine/shared.js#writeToInbox`
|
|
336
|
+
- Consolidation: `engine/consolidation.js#consolidateInbox`
|
|
337
|
+
- Manual handlers: `dashboard.js#handleInboxPersist`, `#handleInboxPromoteKb`,
|
|
338
|
+
`#handleInboxOpen`, and `#handleInboxDelete`
|
|
308
339
|
|
|
309
|
-
**
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
- `POST /api/inbox/delete` (7175)
|
|
340
|
+
**Existing dashboard.** `dashboard/pages/inbox.html` lists pending notes and manual disposition
|
|
341
|
+
actions.
|
|
342
|
+
|
|
343
|
+
**Endpoints.**
|
|
314
344
|
|
|
315
|
-
|
|
316
|
-
|
|
345
|
+
- `POST /api/inbox/persist`
|
|
346
|
+
- `POST /api/inbox/promote-kb`
|
|
347
|
+
- `POST /api/inbox/open`
|
|
348
|
+
- `POST /api/inbox/delete`
|
|
349
|
+
|
|
350
|
+
**Relationships.** Inbox is the boundary between raw **Notes** and durable `notes.md` / **KB**
|
|
351
|
+
memory. Consolidation archives processed source files so the original evidence remains
|
|
352
|
+
recoverable.
|
|
317
353
|
|
|
318
354
|
---
|
|
319
355
|
|
|
320
356
|
## 9. Schedule (cron)
|
|
321
357
|
|
|
322
|
-
**What it is.** A recurring trigger that creates a Work Item
|
|
323
|
-
|
|
324
|
-
|
|
358
|
+
**What it is.** A recurring trigger that creates a Work Item when a three-field cron expression
|
|
359
|
+
(`minute hour day-of-week`) matches. Schedule-time template variables are resolved before the Work
|
|
360
|
+
Item enters the queue, including nested string fields.
|
|
325
361
|
|
|
326
362
|
**Where it lives.**
|
|
327
|
-
|
|
328
|
-
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
- Variable
|
|
336
|
-
|
|
337
|
-
- Work
|
|
338
|
-
-
|
|
339
|
-
|
|
340
|
-
**Existing dashboard.** `dashboard/pages/schedule.html`
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
**Endpoints
|
|
344
|
-
|
|
345
|
-
- `
|
|
346
|
-
- `POST /api/schedules
|
|
347
|
-
- `POST /api/schedules/
|
|
348
|
-
- `POST /api/schedules/
|
|
349
|
-
- `POST /api/schedules/
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
363
|
+
|
|
364
|
+
- Definitions: `config.json` under `schedules[]`
|
|
365
|
+
- Run history: `engine/state.db` table `schedule_runs`
|
|
366
|
+
|
|
367
|
+
**Backing symbols.**
|
|
368
|
+
|
|
369
|
+
- Cron parsing: `engine/scheduler.js#parseCronField` and `#parseCronExpr`
|
|
370
|
+
- Match decision: `engine/scheduler.js#shouldRunNow`
|
|
371
|
+
- Variable map: `engine/scheduler.js#buildScheduleTemplateVars`
|
|
372
|
+
- Recursive substitution: `engine/scheduler.js#applyScheduleTemplateVarsRecursive`
|
|
373
|
+
- Work Item factory: `engine/scheduler.js#createScheduledWorkItem`
|
|
374
|
+
- Discovery: `engine/scheduler.js#discoverScheduledWork`
|
|
375
|
+
|
|
376
|
+
**Existing dashboard.** `dashboard/pages/schedule.html` provides definition CRUD, run-now, and
|
|
377
|
+
natural-language-to-cron assistance.
|
|
378
|
+
|
|
379
|
+
**Endpoints.**
|
|
380
|
+
|
|
381
|
+
- `GET /api/schedules`
|
|
382
|
+
- `POST /api/schedules`
|
|
383
|
+
- `POST /api/schedules/update`
|
|
384
|
+
- `POST /api/schedules/delete`
|
|
385
|
+
- `POST /api/schedules/run-now`
|
|
386
|
+
- `POST /api/schedules/parse-natural`
|
|
387
|
+
|
|
388
|
+
**Relationships.** A Schedule is time-driven and emits **Work Items**. A **Watch** is state-driven
|
|
389
|
+
and can run a broader action registry.
|
|
353
390
|
|
|
354
391
|
---
|
|
355
392
|
|
|
356
393
|
## 10. Watch
|
|
357
394
|
|
|
358
|
-
**What it is.** A persistent monitor
|
|
359
|
-
|
|
360
|
-
event-driven, schedules are time-driven.
|
|
395
|
+
**What it is.** A persistent monitor that evaluates a registered target type and condition, then
|
|
396
|
+
notifies or runs a configured follow-up action. The eight built-in target types are:
|
|
361
397
|
|
|
362
|
-
|
|
398
|
+
`pr`, `work-item`, `meeting`, `plan`, `schedule`, `pipeline`, `dispatch`, and `agent`.
|
|
363
399
|
|
|
364
|
-
|
|
365
|
-
- Status constants: `engine/shared.js` line 1380 (`WATCH_STATUS`).
|
|
366
|
-
- Condition constants: `WATCH_CONDITION` (same file, near 1380); fire-once set
|
|
367
|
-
`WATCH_ABSOLUTE_CONDITIONS`.
|
|
368
|
-
- CRUD: `engine/watches.js` `createWatch` line 44, `updateWatch` line 88, `deleteWatch`
|
|
369
|
-
line 116.
|
|
370
|
-
- Tick path: `evaluateWatch` line 138, `checkWatches` line 214 (runs every 3 ticks).
|
|
371
|
-
- State diff store: `_captureState` line 297 (`_lastState` per watch).
|
|
400
|
+
Additional target types can be loaded from `<MINIONS_DIR>/watches.d/*.js`.
|
|
372
401
|
|
|
373
|
-
**
|
|
402
|
+
**Where it lives.** `engine/state.db` table `watches`.
|
|
374
403
|
|
|
375
|
-
**
|
|
376
|
-
- `GET /api/watches` (7207)
|
|
377
|
-
- `POST /api/watches` (7208) — create
|
|
378
|
-
- `POST /api/watches/update` (7209) — pause / resume / modify
|
|
379
|
-
- `POST /api/watches/delete` (7210)
|
|
404
|
+
**Backing symbols.**
|
|
380
405
|
|
|
381
|
-
|
|
382
|
-
|
|
406
|
+
- Statuses and built-in target names: `engine/shared.js#WATCH_STATUS` and
|
|
407
|
+
`#WATCH_TARGET_TYPE`
|
|
408
|
+
- Conditions: `engine/shared.js#WATCH_CONDITION`
|
|
409
|
+
- Fire-once fallback set: `engine/shared.js#WATCH_ABSOLUTE_CONDITIONS`
|
|
410
|
+
- Target registry: `engine/watches.js#TARGET_TYPES` and `#registerTargetType`
|
|
411
|
+
- CRUD: `engine/watches.js#createWatch`, `#updateWatch`, and `#deleteWatch`
|
|
412
|
+
- Evaluation: `engine/watches.js#evaluateWatch` and `#checkWatches`
|
|
413
|
+
- Plugin loader: `engine/watches.js#_loadPluginTargetTypes`
|
|
414
|
+
- Follow-up action registry: `engine/watch-actions.js`
|
|
415
|
+
|
|
416
|
+
The engine schedules `checkWatches` every `ENGINE_DEFAULTS.watchPollEvery` ticks. The default is 18
|
|
417
|
+
ticks, approximately three minutes at the default 10-second engine tick. Each watch can impose a
|
|
418
|
+
longer minimum `interval`.
|
|
419
|
+
|
|
420
|
+
**Existing dashboard.** `dashboard/pages/watches.html` lists watches and gets live target/action
|
|
421
|
+
registries from the server.
|
|
422
|
+
|
|
423
|
+
**Endpoints.**
|
|
424
|
+
|
|
425
|
+
- `GET /api/watches`
|
|
426
|
+
- `GET /api/watches/target-types`
|
|
427
|
+
- `GET /api/watches/action-types`
|
|
428
|
+
- `POST /api/watches`
|
|
429
|
+
- `POST /api/watches/update`
|
|
430
|
+
- `POST /api/watches/delete`
|
|
431
|
+
|
|
432
|
+
**Relationships.** A Watch can write an inbox notification or run actions such as
|
|
433
|
+
`dispatch-work-item`, `run-skill`, `webhook`, `minions-api`, `cc-triage`,
|
|
434
|
+
`cancel-work-item`, `trigger-pipeline`, `archive-plan`, and `resume-plan`.
|
|
383
435
|
|
|
384
436
|
---
|
|
385
437
|
|
|
386
438
|
## 11. Pipeline
|
|
387
439
|
|
|
388
|
-
**What it is.** A multi-stage workflow
|
|
389
|
-
`
|
|
390
|
-
|
|
440
|
+
**What it is.** A reusable multi-stage workflow with dependency tracking. Shipped stage types are
|
|
441
|
+
`task`, `meeting`, `plan`, `api`, `merge-prs`, `schedule`, `wait`, `parallel`, and `condition`.
|
|
442
|
+
Pipelines can be triggered manually or through automation such as a schedule or watch action.
|
|
391
443
|
|
|
392
444
|
**Where it lives.**
|
|
393
|
-
|
|
394
|
-
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
state.
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
- `
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
445
|
+
|
|
446
|
+
- Definitions: `pipelines/*.json`
|
|
447
|
+
- Run state: `engine/state.db` table `pipeline_runs`
|
|
448
|
+
|
|
449
|
+
Definitions intentionally remain file-backed; run history is SQL-backed.
|
|
450
|
+
|
|
451
|
+
**Backing symbols.**
|
|
452
|
+
|
|
453
|
+
- Definition directory and CRUD: `engine/pipeline.js#PIPELINES_DIR`, `#getPipelines`,
|
|
454
|
+
`#getPipeline`, `#savePipeline`, and `#deletePipeline`
|
|
455
|
+
- Stage/status enums: `engine/shared.js#STAGE_TYPE` and `#PIPELINE_STATUS`
|
|
456
|
+
- Run reads: `engine/pipeline.js#getPipelineRuns` ->
|
|
457
|
+
`engine/small-state-store.js#readPipelineRuns`
|
|
458
|
+
- Run mutations: `engine/shared.js#mutatePipelineRuns`
|
|
459
|
+
- Lifecycle: `engine/pipeline.js#startRun`, `#updateRunStage`, `#upsertRunStage`, and
|
|
460
|
+
`#completeRun`
|
|
461
|
+
|
|
462
|
+
**Existing dashboard.** `dashboard/pages/pipelines.html` provides definition editing, triggering,
|
|
463
|
+
run history, and wait-stage continuation.
|
|
464
|
+
|
|
465
|
+
**Endpoints.**
|
|
466
|
+
|
|
467
|
+
- `GET /api/pipelines`
|
|
468
|
+
- `POST /api/pipelines`
|
|
469
|
+
- `POST /api/pipelines/update`
|
|
470
|
+
- `POST /api/pipelines/delete`
|
|
471
|
+
- `POST /api/pipelines/trigger`
|
|
472
|
+
- `POST /api/pipelines/continue`
|
|
473
|
+
- `POST /api/pipelines/abort`
|
|
474
|
+
- `POST /api/pipelines/retrigger`
|
|
475
|
+
|
|
476
|
+
**Relationships.** A Pipeline composes Work Items, Meetings, Plans, API calls, and control-flow
|
|
477
|
+
stages. It is unrelated to a GitHub Actions or Azure DevOps build pipeline despite the shared word.
|
|
419
478
|
|
|
420
479
|
---
|
|
421
480
|
|
|
422
481
|
## 12. Dispatch
|
|
423
482
|
|
|
424
|
-
**What it is.**
|
|
425
|
-
|
|
426
|
-
process exits.
|
|
483
|
+
**What it is.** One execution attempt for a Work Item. A dispatch records the selected agent,
|
|
484
|
+
runtime, prompt sidecar, process/session metadata, worktree, branch/PR locks, and result.
|
|
427
485
|
|
|
428
|
-
**Where it lives.**
|
|
486
|
+
**Where it lives.** `engine/state.db` table `dispatches`.
|
|
429
487
|
|
|
430
|
-
**Backing
|
|
431
|
-
- `mutateDispatch`: `engine/dispatch.js` line 60 (the only safe RMW path).
|
|
432
|
-
- `addToDispatch`: line 128.
|
|
433
|
-
- `findActivePrOrBranchLock`: line 112 (dedupe).
|
|
434
|
-
- `completeDispatch`: line 327.
|
|
435
|
-
- `cancelPendingDispatchesForPr`: line 550.
|
|
436
|
-
- Result codes: `engine/shared.js` line 1433 (`DISPATCH_RESULT`).
|
|
488
|
+
**Backing symbols.**
|
|
437
489
|
|
|
438
|
-
|
|
439
|
-
Queue
|
|
490
|
+
- Transactional mutation: `engine/dispatch.js#mutateDispatch`
|
|
491
|
+
- Queue insertion and dedupe: `engine/dispatch.js#addToDispatch`
|
|
492
|
+
- PR/branch lock detection: `engine/dispatch.js#findActivePrOrBranchLock`
|
|
493
|
+
- Completion: `engine/dispatch.js#completeDispatch`
|
|
494
|
+
- Result enum: `engine/shared.js#DISPATCH_RESULT`
|
|
495
|
+
- Store implementation: `engine/dispatch-store.js`
|
|
440
496
|
|
|
441
|
-
**
|
|
442
|
-
|
|
497
|
+
**Existing dashboard.** `dashboard/pages/engine.html` shows dispatch history and logs; home/work
|
|
498
|
+
surfaces show active execution context.
|
|
443
499
|
|
|
444
|
-
**
|
|
445
|
-
|
|
500
|
+
**Endpoints.** Dispatch is mostly a side effect of Work Item creation and engine discovery. Its
|
|
501
|
+
read shape appears through `/api/status`, `/api/agents`, and Work Item APIs.
|
|
502
|
+
|
|
503
|
+
**Relationships.** A Dispatch combines one Work Item, one Agent, one selected runtime, and one
|
|
504
|
+
execution workspace. A **Completion** report is its trusted exit contract.
|
|
446
505
|
|
|
447
506
|
---
|
|
448
507
|
|
|
@@ -450,393 +509,487 @@ tick. Read shape via `/api/status` (line 6838).
|
|
|
450
509
|
|
|
451
510
|
**What it is.** The sectioned view reconstructed from SQL dispatch rows:
|
|
452
511
|
|
|
453
|
-
- `pending[]`
|
|
454
|
-
- `active[]`
|
|
455
|
-
- `completed[]`
|
|
512
|
+
- `pending[]` -- admitted work waiting on capacity, dependencies, cooldowns, or an agent
|
|
513
|
+
- `active[]` -- currently executing dispatches
|
|
514
|
+
- `completed[]` -- terminal attempts retained for audit/cleanup
|
|
515
|
+
- `review[]` -- candidates rejected by the optional pre-dispatch acceptance gate
|
|
456
516
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
first), retry on failure up to `ENGINE_DEFAULTS.maxRetries`.
|
|
517
|
+
**Where it lives.** `engine/state.db` table `dispatches`, reconstructed by
|
|
518
|
+
`engine/dispatch-store.js#readDispatchSectioned`.
|
|
460
519
|
|
|
461
|
-
**
|
|
520
|
+
**Backing symbols.**
|
|
462
521
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
522
|
+
- Dashboard/query view: `engine/queries.js#getDispatchQueue`
|
|
523
|
+
- Queue mutation: `engine/dispatch.js#mutateDispatch`
|
|
524
|
+
- Acceptance-review routing: `engine/dispatch.js#_routeToReviewQueue`
|
|
525
|
+
- Concurrency default: `engine/shared.js#ENGINE_DEFAULTS.maxConcurrent` (default 5)
|
|
466
526
|
|
|
467
|
-
|
|
468
|
-
|
|
527
|
+
The queue enforces Work Item and dispatch-key dedupe, fix-target and branch locks, dependency
|
|
528
|
+
readiness, concurrency, retry policy, and budget/cooldown gates.
|
|
469
529
|
|
|
470
|
-
**
|
|
530
|
+
**Existing dashboard.** Home, Work Items, and Engine screens expose different projections of the
|
|
531
|
+
same SQL-backed queue.
|
|
471
532
|
|
|
472
|
-
**Relationships.** Queue
|
|
533
|
+
**Relationships.** Queue contains **Dispatches**; each Dispatch attempts a **Work Item**. Pending
|
|
534
|
+
reasons explain why intent has not yet become an active process.
|
|
473
535
|
|
|
474
536
|
---
|
|
475
537
|
|
|
476
538
|
## 14. Completion
|
|
477
539
|
|
|
478
|
-
**What it is.** The
|
|
479
|
-
the
|
|
480
|
-
|
|
481
|
-
|
|
540
|
+
**What it is.** The JSON report an agent writes to the exact path supplied in
|
|
541
|
+
`MINIONS_COMPLETION_REPORT`. It is the sole structured completion source. A zero process exit code
|
|
542
|
+
is only a transport signal; mutating work without a valid required report fails with
|
|
543
|
+
`completion-report-missing`.
|
|
544
|
+
|
|
545
|
+
Each spawn also receives `MINIONS_COMPLETION_NONCE`. The agent copies it verbatim into the report;
|
|
546
|
+
a mismatch invalidates every reported signal and fails the dispatch as
|
|
547
|
+
`completion-nonce-mismatch`.
|
|
482
548
|
|
|
483
549
|
**Where it lives.**
|
|
484
|
-
- File path: `engine/completions/<dispatchId>.json` (built by `dispatchCompletionReportPath`,
|
|
485
|
-
`engine/shared.js` line 351).
|
|
486
|
-
- Field constants: `COMPLETION_FIELDS` (`engine/shared.js` line 1474–1475).
|
|
487
550
|
|
|
488
|
-
|
|
489
|
-
|
|
551
|
+
- `<MINIONS_DIR>/engine/completions/<dispatch-id>.json`
|
|
552
|
+
- Canonical schema: [`docs/completion-reports.md`](../completion-reports.md)
|
|
490
553
|
|
|
491
|
-
**
|
|
492
|
-
expanded; `home.html` "Recent Completions" widget.
|
|
554
|
+
**Backing symbols.**
|
|
493
555
|
|
|
494
|
-
|
|
556
|
+
- Path builder: `engine/shared.js#dispatchCompletionReportPath`
|
|
557
|
+
- Recognized core fields: `engine/shared.js#COMPLETION_FIELDS`
|
|
558
|
+
- File parsing: `engine/lifecycle.js#parseCompletionReportFile`
|
|
559
|
+
- Required-report gate: `engine/lifecycle.js#requiredCompletionReportFailure`
|
|
560
|
+
- Dispatch terminalization: `engine/dispatch.js#completeDispatch`
|
|
495
561
|
|
|
496
|
-
|
|
497
|
-
|
|
562
|
+
Core fields include `status`, `summary`, `files_changed`, `tests`, `pr`, `not_changed`,
|
|
563
|
+
`failure_class`, `retryable`, `needs_rerun`, `verdict`, `artifacts`, `nonce`, and
|
|
564
|
+
`securityFlags`. The canonical schema documents additional optional fields and exact semantics.
|
|
565
|
+
|
|
566
|
+
**Existing dashboard.** Work Item detail and recent-completion surfaces display the persisted
|
|
567
|
+
summary, artifacts, tests, PR, and failure metadata.
|
|
568
|
+
|
|
569
|
+
**Relationships.** Completion turns a process exit into a trustworthy lifecycle decision. It can
|
|
570
|
+
attach a PR, publish artifacts, request a retry/rerun, carry a review verdict, flag prompt
|
|
571
|
+
injection, and invalidate superseded Work Items.
|
|
498
572
|
|
|
499
573
|
---
|
|
500
574
|
|
|
501
|
-
## 15. Pull Request (as tracked in
|
|
575
|
+
## 15. Pull Request (as tracked in Minions)
|
|
502
576
|
|
|
503
|
-
**What it is.** A project-scoped
|
|
504
|
-
|
|
505
|
-
|
|
577
|
+
**What it is.** A project-scoped SQL record that mirrors the useful state of an external GitHub or
|
|
578
|
+
Azure DevOps PR: host identity, source branch, lifecycle status, build state, human feedback,
|
|
579
|
+
review verdict, and Minions linkage. It is not the host PR itself.
|
|
506
580
|
|
|
507
|
-
**Where it lives.**
|
|
581
|
+
**Where it lives.**
|
|
508
582
|
|
|
509
|
-
|
|
510
|
-
-
|
|
511
|
-
|
|
512
|
-
- GitHub poller: `engine/github.js`.
|
|
513
|
-
- ADO poller: `engine/ado.js`.
|
|
514
|
-
- Parallel comment poller for human comments only (filters bots).
|
|
515
|
-
- Sync from agent output: `syncPrsFromOutput` (`engine/lifecycle.js` line 644).
|
|
516
|
-
- PR-attachment requirement check: `isPrAttachmentRequired` (line 875).
|
|
583
|
+
- PR records: `engine/state.db` table `pull_requests`
|
|
584
|
+
- Cross-record links: `engine/state.db` table `pr_links`
|
|
585
|
+
- Store facade: `engine/pull-requests-store.js`
|
|
517
586
|
|
|
518
|
-
**
|
|
587
|
+
**Backing symbols.**
|
|
519
588
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
- `
|
|
589
|
+
- Statuses and polling eligibility: `engine/shared.js#PR_STATUS` and
|
|
590
|
+
`#PR_POLLABLE_STATUSES`
|
|
591
|
+
- GitHub integration: `engine/github.js`
|
|
592
|
+
- Azure DevOps integration: `engine/ado.js`
|
|
593
|
+
- Agent-output/report sync: `engine/lifecycle.js#syncPrsFromOutput`
|
|
594
|
+
- Required-attachment gate: `engine/lifecycle.js#isPrAttachmentRequired`
|
|
523
595
|
|
|
524
|
-
**
|
|
525
|
-
|
|
526
|
-
|
|
596
|
+
**Existing dashboard.** `dashboard/pages/prs.html` is the classic PR screen; Slim embeds that same
|
|
597
|
+
screen for PR details.
|
|
598
|
+
|
|
599
|
+
**Endpoints.**
|
|
600
|
+
|
|
601
|
+
- `GET /api/pull-requests`
|
|
602
|
+
- `POST /api/pull-requests/link`
|
|
603
|
+
- `POST /api/pull-requests/observe`
|
|
604
|
+
- `POST /api/pull-requests/delete`
|
|
605
|
+
- Targeted resume/clear endpoints under `/api/pull-requests/clear-*`
|
|
606
|
+
|
|
607
|
+
**Relationships.** An implementation Work Item commonly creates the first PR association. Review,
|
|
608
|
+
fix, test, and follow-up Work Items can all attach to the same PR, and multiple Watches can observe
|
|
609
|
+
it independently.
|
|
527
610
|
|
|
528
611
|
---
|
|
529
612
|
|
|
530
613
|
## 16. Agent / Minion / Team Member
|
|
531
614
|
|
|
532
|
-
**What it is.** A named role with a charter,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
615
|
+
**What it is.** A named role with a charter, descriptive `expertise` tags, runtime/model
|
|
616
|
+
configuration, and execution metrics. "Minion", "Team Member", and "Agent" refer to the same
|
|
617
|
+
concept in different UI/code contexts.
|
|
618
|
+
|
|
619
|
+
`expertise` is not the executable **Skill** system. It appears in the identity prompt and provides
|
|
620
|
+
a soft preference to `pickReReviewAgentHints` for reviewer selection; it is not a hard routing
|
|
621
|
+
constraint. The legacy config key `skills` is accepted only as a compatibility fallback.
|
|
536
622
|
|
|
537
623
|
**Where it lives.**
|
|
538
|
-
- Default roster: `engine/shared.js` line 1486 (`DEFAULT_AGENTS`).
|
|
539
|
-
- Charter: `agents/<id>/charter.md` — read by `getAgentCharter` (`engine/queries.js` line 505).
|
|
540
|
-
- Per-agent config (cli, model, budget, skills): `config.json` `agents.<id>`.
|
|
541
|
-
- Metrics: `engine/state.db` `metrics` (per-agent token / cost / quality / runtime).
|
|
542
624
|
|
|
543
|
-
|
|
544
|
-
-
|
|
545
|
-
-
|
|
546
|
-
-
|
|
547
|
-
|
|
625
|
+
- Default roster: `engine/shared.js#DEFAULT_AGENTS`
|
|
626
|
+
- Per-agent config: `config.json` under `agents.<id>`
|
|
627
|
+
- Charter: `agents/<id>/charter.md`
|
|
628
|
+
- Metrics and dispatch history: SQL-backed runtime state
|
|
629
|
+
|
|
630
|
+
**Backing symbols.**
|
|
548
631
|
|
|
549
|
-
|
|
632
|
+
- Roster/status projection: `engine/queries.js#getAgents`
|
|
633
|
+
- Detail projection: `engine/queries.js#getAgentDetail`
|
|
634
|
+
- Identity/charter prompt: `engine/playbook.js#buildSystemPrompt`
|
|
635
|
+
- Soft re-review preference: `engine/lifecycle.js#pickReReviewAgentHints`
|
|
636
|
+
- Runtime selection: `engine/shared.js#resolveAgentCli`
|
|
637
|
+
- Bundled adapters: `engine/runtimes/index.js` (`claude`, `copilot`, `codex`)
|
|
638
|
+
|
|
639
|
+
**Existing dashboard.** Agent cards and detail views show status, runtime/model, charter, output,
|
|
640
|
+
inbox, and recent dispatches.
|
|
550
641
|
|
|
551
642
|
**Endpoints.**
|
|
552
|
-
- `POST /api/agent-kill/:id` (line 3847)
|
|
553
|
-
- `GET /api/agent/:id/live-stream` (SSE — search for `/live-stream`)
|
|
554
|
-
- `GET /api/agent-detail/:id` (line 6686)
|
|
555
643
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
644
|
+
- `GET /api/agents`
|
|
645
|
+
- `GET /api/agent/:id`
|
|
646
|
+
- `POST /api/agent/:id/kill`
|
|
647
|
+
- `GET /api/agent/:id/live-stream`
|
|
648
|
+
- `GET /api/agent/:id/live` and `/live-output`
|
|
649
|
+
- `GET /api/agent/:id/output`
|
|
650
|
+
- `POST /api/agents/steer`
|
|
651
|
+
- `POST /api/agents/cancel`
|
|
652
|
+
- `POST /api/agents/charter`
|
|
653
|
+
|
|
654
|
+
**Relationships.** Routing and optional hints choose an Agent for a Work Item. The selected runtime
|
|
655
|
+
adapter determines CLI behavior; the Charter and expertise tags shape identity; executable Skills
|
|
656
|
+
remain runtime/harness assets.
|
|
559
657
|
|
|
560
658
|
---
|
|
561
659
|
|
|
562
660
|
## 17. Project
|
|
563
661
|
|
|
564
|
-
**What it is.** A repository
|
|
565
|
-
|
|
662
|
+
**What it is.** A repository Minions knows how to operate on. A project definition carries its
|
|
663
|
+
name, local operator checkout, repository identity/host, main branch, checkout mode, and enabled
|
|
664
|
+
work sources.
|
|
566
665
|
|
|
567
666
|
**Where it lives.**
|
|
568
|
-
|
|
569
|
-
-
|
|
570
|
-
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
667
|
+
|
|
668
|
+
- Definitions: `config.json` under `projects[]`
|
|
669
|
+
- Runtime records: project-scoped rows in `engine/state.db`
|
|
670
|
+
- Project definitions/artifacts: `projects/<name>/`
|
|
671
|
+
- Removal archive: `projects/.archived/<name>-YYYYMMDD/`
|
|
672
|
+
|
|
673
|
+
**Backing symbols.**
|
|
674
|
+
|
|
675
|
+
- Config projection: `engine/shared.js#getProjects`
|
|
676
|
+
- Scope helpers: `engine/shared.js#stateScope`, `#readWorkItems`, and
|
|
677
|
+
`#readPullRequests`
|
|
678
|
+
- Checkout mode: `engine/shared.js#resolveCheckoutMode`
|
|
679
|
+
- Canonical removal: `engine/projects.js#removeProject`
|
|
680
|
+
|
|
681
|
+
`checkoutMode: "worktree"` is the default isolated execution model.
|
|
682
|
+
`checkoutMode: "live"` opts a project into guarded in-place execution.
|
|
683
|
+
|
|
684
|
+
**Existing dashboard.** `dashboard/pages/settings.html` owns project onboarding and removal.
|
|
685
|
+
|
|
686
|
+
**Endpoints.**
|
|
687
|
+
|
|
688
|
+
- `POST /api/projects/browse`
|
|
689
|
+
- `POST /api/projects/scan`
|
|
690
|
+
- `POST /api/projects/confirm-token`
|
|
691
|
+
- `POST /api/projects/add`
|
|
692
|
+
- `POST /api/projects/remove`
|
|
693
|
+
|
|
694
|
+
**Relationships.** Projects scope Work Items, PRs, worktrees, and project-targeted automation.
|
|
695
|
+
Project removal is a coordinated lifecycle operation, never a direct `config.json` edit.
|
|
591
696
|
|
|
592
697
|
---
|
|
593
698
|
|
|
594
699
|
## 18. Skill
|
|
595
700
|
|
|
596
|
-
**What it is.**
|
|
597
|
-
|
|
598
|
-
`scope: project` (PR
|
|
599
|
-
` ```skill ` fenced blocks.
|
|
701
|
+
**What it is.** An executable prompt/workflow asset stored as `SKILL.md`. Agents can emit a
|
|
702
|
+
fenced `skill` artifact with `scope: minions` (personal runtime-native installation) or
|
|
703
|
+
`scope: project` (queued for a PR into the project-native skill root).
|
|
600
704
|
|
|
601
|
-
|
|
602
|
-
- User skills: `~/.claude/skills/`, `~/.copilot/skills/`, etc. (runtime-specific).
|
|
603
|
-
- Project skills: `<project>/.claude/skills/`, `<project>/.github/skills/`.
|
|
604
|
-
- Frontmatter parser: `parseSkillFrontmatter` (`engine/shared.js`, exported line 14 of
|
|
605
|
-
`engine/queries.js`).
|
|
705
|
+
This concept is distinct from `agents.<id>.expertise`, which is descriptive agent metadata.
|
|
606
706
|
|
|
607
|
-
**
|
|
608
|
-
- Discovery: `engine/queries.js` `collectSkillFiles` line 789, `getSkills` line 891,
|
|
609
|
-
`getSkillIndex` line 916.
|
|
610
|
-
- Per-runtime roots: adapter `getSkillRoots()` / `getSkillWriteTargets()` (engine/runtimes/).
|
|
707
|
+
**Where it lives.** Runtime adapters own discovery and write targets:
|
|
611
708
|
|
|
612
|
-
|
|
709
|
+
- Claude: personal `.claude/skills`, project `.claude/skills`
|
|
710
|
+
- Copilot: personal `.copilot/skills`, project `.github/skills`
|
|
711
|
+
- Codex: personal and project `.agents/skills`
|
|
712
|
+
- Portable discovery: `.agents/skills` is visible across bundled adapters
|
|
613
713
|
|
|
614
|
-
|
|
615
|
-
|
|
714
|
+
Adapters may discover additional compatible roots without changing orchestration code.
|
|
715
|
+
|
|
716
|
+
**Backing symbols.**
|
|
616
717
|
|
|
617
|
-
|
|
618
|
-
|
|
718
|
+
- Frontmatter parser: `engine/shared.js#parseSkillFrontmatter`
|
|
719
|
+
- Discovery: `engine/queries.js#collectSkillFiles`
|
|
720
|
+
- Dashboard projections: `engine/queries.js#getSkills` and `#getSkillIndex`
|
|
721
|
+
- Extraction: `engine/lifecycle.js#extractSkillsFromOutput`
|
|
722
|
+
- Adapter contract: `getSkillRoots()` and `getSkillWriteTargets()` in
|
|
723
|
+
`engine/runtimes/{claude,copilot,codex}.js`
|
|
724
|
+
|
|
725
|
+
**Existing dashboard.** `dashboard/pages/tools.html` contains the skill browser.
|
|
726
|
+
|
|
727
|
+
**Endpoints.** `GET /api/skill` reads a selected skill; the broader index is included in dashboard
|
|
728
|
+
status data.
|
|
729
|
+
|
|
730
|
+
**Relationships.** Skills are runtime/harness assets that an Agent can invoke. The runtime adapter
|
|
731
|
+
owns their paths, while Minions lifecycle code owns extraction and project-scope PR dispatch.
|
|
619
732
|
|
|
620
733
|
---
|
|
621
734
|
|
|
622
735
|
## 19. MCP Server
|
|
623
736
|
|
|
624
|
-
**What it is.** A Model Context Protocol server the
|
|
625
|
-
|
|
626
|
-
|
|
737
|
+
**What it is.** A Model Context Protocol tool server discovered by the selected CLI runtime. MCP
|
|
738
|
+
configuration is runtime-native; repository/user harness files are not merged into Minions
|
|
739
|
+
`config.json`.
|
|
627
740
|
|
|
628
741
|
**Where it lives.**
|
|
629
|
-
- Configuration: `config.json` `mcpServers: { … }`.
|
|
630
|
-
- Aggregator: `getMcpServers` in `dashboard.js` line 759 (also re-reads runtime-specific
|
|
631
|
-
configs at lines 750–787, e.g. `~/.copilot/mcp-config.json`, `~/.claude/mcp-config.json`).
|
|
632
742
|
|
|
633
|
-
|
|
634
|
-
-
|
|
635
|
-
-
|
|
636
|
-
-
|
|
637
|
-
|
|
743
|
+
- Claude user registrations: `~/.claude.json` (`mcpServers`)
|
|
744
|
+
- Copilot user registrations: `~/.copilot/mcp-config.json`
|
|
745
|
+
- Workspace registrations surfaced by the dashboard: `<project>/.mcp.json`
|
|
746
|
+
- Other runtime-native locations: owned by the corresponding CLI/adapter contract
|
|
747
|
+
|
|
748
|
+
**Backing symbols.**
|
|
638
749
|
|
|
639
|
-
|
|
750
|
+
- Dashboard inventory: `dashboard.js#getMcpServers`
|
|
751
|
+
- Watched config paths: `engine/queries.js` slow-state dependency collector
|
|
752
|
+
- Runtime preparation/discovery: `engine/runtimes/*`
|
|
753
|
+
- Copilot built-in suppression: `engine.copilotDisableBuiltinMcps`
|
|
640
754
|
|
|
641
|
-
|
|
642
|
-
|
|
755
|
+
The dashboard reads configuration files to inventory registrations; it does not claim live
|
|
756
|
+
connection health. Agent spawning relies on native runtime discovery from the assigned working
|
|
757
|
+
directory rather than copying repository harness configuration into Minions settings.
|
|
643
758
|
|
|
644
|
-
**
|
|
645
|
-
|
|
759
|
+
**Existing dashboard.** `dashboard/pages/tools.html` lists discovered MCP registrations.
|
|
760
|
+
|
|
761
|
+
**Endpoints.** MCP inventory appears in `/api/status`; there is no dedicated MCP CRUD API.
|
|
762
|
+
|
|
763
|
+
**Relationships.** MCP servers provide tools. **Skills** provide reusable prompt workflows. Both
|
|
764
|
+
are runtime-visible assets, but they have separate discovery and execution contracts.
|
|
646
765
|
|
|
647
766
|
---
|
|
648
767
|
|
|
649
768
|
## 20. Engine
|
|
650
769
|
|
|
651
|
-
**What it is.** The
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
(`paused | running | stopping`).
|
|
770
|
+
**What it is.** The orchestration daemon. Its default tick is 10 seconds. Tick phases handle
|
|
771
|
+
timeouts/steering, inbox consolidation, cleanup, watch evaluation, PR polling/reconciliation,
|
|
772
|
+
dispatch, work discovery, snapshots, and diagnostics.
|
|
655
773
|
|
|
656
774
|
**Where it lives.**
|
|
657
|
-
- Process: `engine.js` (root).
|
|
658
|
-
- State: `engine/state.db` (logs, metrics, queues, watches, schedules, PRDs) plus
|
|
659
|
-
`engine/control.json` for process coordination.
|
|
660
775
|
|
|
661
|
-
|
|
662
|
-
-
|
|
663
|
-
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
776
|
+
- Process entry: `engine.js`
|
|
777
|
+
- Authoritative runtime state: `engine/state.db`
|
|
778
|
+
- Process coordination: `engine/control.json`, PID/stop-intent files, and bounded sidecars
|
|
779
|
+
|
|
780
|
+
**Backing symbols.**
|
|
781
|
+
|
|
782
|
+
- Tick: `engine.js#tick` / `#tickInner`
|
|
783
|
+
- Defaults: `engine/shared.js#ENGINE_DEFAULTS`
|
|
784
|
+
- Watch cadence: `ENGINE_DEFAULTS.watchPollEvery` (18 ticks by default)
|
|
785
|
+
- Cold-process reattachment: `engine/cli.js` startup reattachment path
|
|
786
|
+
- Stale-orphan grace: `engine/timeout.js` with `ENGINE_DEFAULTS.heartbeatTimeout`
|
|
787
|
+
|
|
788
|
+
Tracked live agents are not killed merely for output silence. Cold agents can be reattached after
|
|
789
|
+
an engine restart through persisted PID/session data and `agents/<id>/live-output.log`; pooled ACP
|
|
790
|
+
leases intentionally follow a different lifecycle.
|
|
668
791
|
|
|
669
|
-
**Existing dashboard.** `dashboard/pages/engine.html`
|
|
792
|
+
**Existing dashboard.** `dashboard/pages/engine.html` exposes engine state, dispatch history, logs,
|
|
793
|
+
and controls.
|
|
670
794
|
|
|
671
795
|
**Endpoints.**
|
|
672
|
-
- `POST /api/engine/wakeup` (7406) — set `_wakeupAt` so the tick fires now.
|
|
673
|
-
- `POST /api/engine/restart` (7410) — graceful restart.
|
|
674
|
-
- `GET /api/status` (6838), `/api/health` (6844), `/api/status-stream` (6839, SSE).
|
|
675
796
|
|
|
676
|
-
|
|
797
|
+
- `GET /api/status`
|
|
798
|
+
- `GET /api/status-stream`
|
|
799
|
+
- `GET /api/health`
|
|
800
|
+
- `POST /api/engine/wakeup`
|
|
801
|
+
- `POST /api/engine/restart`
|
|
802
|
+
- PR polling/auto-fix controls under `/api/engine/*`
|
|
803
|
+
|
|
804
|
+
**Relationships.** Engine is the coordinator over every other concept. SQLite stores durable
|
|
805
|
+
runtime records; files remain for definitions, human documents, caches, artifacts, and process
|
|
806
|
+
coordination.
|
|
677
807
|
|
|
678
808
|
---
|
|
679
809
|
|
|
680
810
|
## 21. Settings
|
|
681
811
|
|
|
682
|
-
**What it is.** `config.json
|
|
683
|
-
|
|
812
|
+
**What it is.** Minions configuration stored in `config.json`: projects, agents, engine defaults,
|
|
813
|
+
schedules, features, and runtime selection/options.
|
|
814
|
+
|
|
815
|
+
Repository and user harness settings are not merged into this object. Files such as runtime-native
|
|
816
|
+
MCP/skill configuration remain owned and discovered by the selected CLI.
|
|
817
|
+
|
|
818
|
+
**Where it lives.**
|
|
819
|
+
|
|
820
|
+
- Minions settings: `<MINIONS_DIR>/config.json`
|
|
821
|
+
- Routing table: `<MINIONS_DIR>/routing.md` (separate, intentionally file-backed)
|
|
822
|
+
- Runtime-native harness configuration: runtime-owned user/repository paths
|
|
823
|
+
|
|
824
|
+
**Backing symbols.**
|
|
684
825
|
|
|
685
|
-
|
|
826
|
+
- Loader: `engine/queries.js#getConfig`
|
|
827
|
+
- Defaults: `engine/shared.js#ENGINE_DEFAULTS`
|
|
828
|
+
- Settings handlers: `dashboard.js#handleSettingsRead`, `#handleSettingsUpdate`,
|
|
829
|
+
`#handleSettingsReset`, and `#handleSettingsRouting`
|
|
686
830
|
|
|
687
|
-
**
|
|
688
|
-
- Loader: `engine/queries.js` `getConfig` (around line 86–166, includes migrations like
|
|
689
|
-
`applyLegacyCcModelMigration`).
|
|
690
|
-
- Defaults: `engine/shared.js` line 860 (`ENGINE_DEFAULTS`).
|
|
691
|
-
- Routing knob: `routing.md` (separate file).
|
|
831
|
+
**Existing dashboard.** `dashboard/pages/settings.html` is the canonical settings surface.
|
|
692
832
|
|
|
693
|
-
**
|
|
694
|
-
agents, runtimes.
|
|
833
|
+
**Endpoints.**
|
|
695
834
|
|
|
696
|
-
|
|
697
|
-
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
- `POST /api/settings/reset` — restore defaults.
|
|
701
|
-
- `POST /api/settings/routing` — read `routing.md`.
|
|
835
|
+
- `GET /api/settings`
|
|
836
|
+
- `POST /api/settings`
|
|
837
|
+
- `POST /api/settings/reset`
|
|
838
|
+
- `POST /api/settings/routing`
|
|
702
839
|
|
|
703
|
-
**Relationships.**
|
|
704
|
-
|
|
705
|
-
|
|
840
|
+
**Relationships.** Fleet defaults live under `engine.*`; agent overrides live under
|
|
841
|
+
`agents.<id>.*`; project behavior lives under `projects[]`. Agent and Command Center runtime/model
|
|
842
|
+
resolution are intentionally independent.
|
|
706
843
|
|
|
707
844
|
---
|
|
708
845
|
|
|
709
846
|
## 22. Feature Flag
|
|
710
847
|
|
|
711
|
-
**What it is.** A temporary gate registered in `engine/features.js`.
|
|
712
|
-
|
|
713
|
-
|
|
848
|
+
**What it is.** A temporary product/UX gate registered in `engine/features.js`. Resolution order
|
|
849
|
+
is environment override (`MINIONS_FEATURE_<ID>`) -> `config.features[id]` -> registry default.
|
|
850
|
+
Unknown flag IDs fail loudly.
|
|
714
851
|
|
|
715
|
-
|
|
852
|
+
Feature flags are not a substitute for permanent `engine.*` configuration. The `slim-ux` flag gates
|
|
853
|
+
the redesigned dashboard.
|
|
716
854
|
|
|
717
|
-
**
|
|
718
|
-
- Registry: `FEATURES` (top of `engine/features.js`).
|
|
719
|
-
- Resolver: `isFeatureOn(id, config)`.
|
|
720
|
-
- Env override: any `MINIONS_FEATURE_*` translates id `slim-ux` ↔ `MINIONS_FEATURE_SLIM_UX`.
|
|
855
|
+
**Where it lives.** `engine/features.js#FEATURES`.
|
|
721
856
|
|
|
722
|
-
**
|
|
723
|
-
Slim UX also has its own minimal flags-only settings dialog (`dashboard/slim.html` line ~445).
|
|
857
|
+
**Backing symbols.**
|
|
724
858
|
|
|
725
|
-
|
|
726
|
-
- `
|
|
727
|
-
- `
|
|
859
|
+
- Resolver: `engine/features.js#isFeatureOn`
|
|
860
|
+
- Listing: `engine/features.js#listFeatures`
|
|
861
|
+
- Registry check: `engine/features.js#hasFeature`
|
|
728
862
|
|
|
729
|
-
**
|
|
730
|
-
|
|
731
|
-
|
|
863
|
+
**Existing dashboard.** Settings exposes registered experimental flags and their current values.
|
|
864
|
+
|
|
865
|
+
**Endpoints.**
|
|
866
|
+
|
|
867
|
+
- `GET /api/features`
|
|
868
|
+
- `POST /api/features/toggle`
|
|
869
|
+
|
|
870
|
+
**Relationships.** A flag gates code/UI behavior until rollout is complete. Registry metadata
|
|
871
|
+
includes defaults and expiry dates so stale experiments are visible to operators.
|
|
732
872
|
|
|
733
873
|
---
|
|
734
874
|
|
|
735
875
|
## 23. Routing (`routing.md`)
|
|
736
876
|
|
|
737
|
-
**What it is.** A
|
|
738
|
-
|
|
877
|
+
**What it is.** A global Markdown table mapping work types to preferred and fallback agents. The
|
|
878
|
+
engine reads it through an mtime-based cache during agent resolution.
|
|
739
879
|
|
|
740
|
-
**Where it lives.**
|
|
880
|
+
**Where it lives.** `<MINIONS_DIR>/routing.md`.
|
|
741
881
|
|
|
742
|
-
**
|
|
743
|
-
|
|
744
|
-
- Path constant: line 15.
|
|
745
|
-
- Cache: line 59 (`_routingCache`).
|
|
746
|
-
- Re-export: line 301.
|
|
882
|
+
There is no project-local routing override. Project-local **playbook** overrides exist, but routing
|
|
883
|
+
uses the single global `ROUTING_PATH`.
|
|
747
884
|
|
|
748
|
-
**
|
|
749
|
-
modal).
|
|
885
|
+
**Backing symbols.**
|
|
750
886
|
|
|
751
|
-
|
|
752
|
-
- `
|
|
887
|
+
- Path and reader: `engine/routing.js#ROUTING_PATH` and `#getRouting`
|
|
888
|
+
- Parser: `engine/routing.js#parseRoutingTable`
|
|
889
|
+
- Cache: `engine/routing.js#getRoutingTableCached`
|
|
890
|
+
- Work-type lookup: `engine/routing.js#routeForWorkType`
|
|
891
|
+
- Final resolution: `engine/routing.js#resolveAgent`
|
|
892
|
+
|
|
893
|
+
**Existing dashboard.** Settings exposes the routing table editor.
|
|
753
894
|
|
|
754
|
-
**
|
|
755
|
-
|
|
756
|
-
|
|
895
|
+
**Endpoints.** `POST /api/settings/routing` updates `routing.md`; `GET /api/settings` includes the
|
|
896
|
+
current routing content.
|
|
897
|
+
|
|
898
|
+
**Relationships.** Routing supplies preferred/fallback candidates for a Work Item type. Explicit
|
|
899
|
+
hard pins, author routing, availability, budget, retry reassignment, and temporary-agent policy
|
|
900
|
+
still participate in final selection.
|
|
757
901
|
|
|
758
902
|
---
|
|
759
903
|
|
|
760
904
|
## 24. Charter (Agent Charter)
|
|
761
905
|
|
|
762
|
-
**What it is.** A
|
|
763
|
-
|
|
906
|
+
**What it is.** A Markdown file describing one Agent's role, voice, expertise boundary, and rules
|
|
907
|
+
of engagement. It is loaded into that Agent's system prompt for each dispatch.
|
|
908
|
+
|
|
909
|
+
**Where it lives.** `agents/<id>/charter.md`.
|
|
910
|
+
|
|
911
|
+
**Backing symbols.**
|
|
764
912
|
|
|
765
|
-
|
|
766
|
-
`
|
|
913
|
+
- Prompt loading/injection: `engine/playbook.js#buildSystemPrompt`
|
|
914
|
+
- Dashboard detail read: `engine/queries.js#getAgentDetail`
|
|
915
|
+
- Dashboard write handler: the `/api/agents/charter` route in `dashboard.js`
|
|
767
916
|
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
- Injection into prompt: `engine/playbook.js` line 517 (`prompt += '## Your Charter\n\n' +
|
|
771
|
-
charter`).
|
|
917
|
+
The prompt and detail surfaces each read the charter at their respective system-prompt/detail
|
|
918
|
+
boundaries.
|
|
772
919
|
|
|
773
|
-
**Existing dashboard.** Agent detail
|
|
920
|
+
**Existing dashboard.** Agent detail shows the charter; Settings can edit agent identity metadata.
|
|
921
|
+
|
|
922
|
+
**Endpoints.**
|
|
774
923
|
|
|
775
|
-
|
|
924
|
+
- `GET /api/agent/:id` -- detail including charter
|
|
925
|
+
- `POST /api/agents/charter` -- save charter content
|
|
776
926
|
|
|
777
|
-
**Relationships.** Charter
|
|
778
|
-
|
|
927
|
+
**Relationships.** A Charter is one-to-one with an Agent. It is identity/context, whereas a Skill
|
|
928
|
+
is a reusable executable workflow.
|
|
779
929
|
|
|
780
930
|
---
|
|
781
931
|
|
|
782
932
|
## 25. Meeting
|
|
783
933
|
|
|
784
|
-
**What it is.** A multi-agent debate workflow
|
|
785
|
-
Participants
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
**Where it lives.** `meetings/*.json` (definitions + transcripts). Per-agent artifact notes
|
|
789
|
-
land in `notes/inbox/`.
|
|
790
|
-
|
|
791
|
-
**Backing classes / functions.**
|
|
792
|
-
- Dirs / status: `engine/meeting.js`
|
|
793
|
-
- lines 21–24 (`MEETINGS_DIR`, `MEETING_NOTE_ARTIFACT_ROOT`, `TERMINAL_MEETING_STATUSES`,
|
|
794
|
-
`ROUND_STATUS_BY_NAME`).
|
|
795
|
-
- line 29 (`ROUND_NUMBER_BY_NAME`).
|
|
796
|
-
- Round bookkeeping: `roundKeyFor` line 40, `getRoundFailures` line 46, `hasRoundFailure`
|
|
797
|
-
line 59, `hasRoundSuccess` line 63, `hasRoundTerminalOutcome` line 69,
|
|
798
|
-
`allParticipantsFinishedRound` line 73.
|
|
799
|
-
- Advance / fail handling: `advanceMeetingIfRoundComplete` line 93,
|
|
800
|
-
`buildFailedMeetingConclusion` line 87.
|
|
801
|
-
- Empty-output detection: `EMPTY_OUTPUT_PATTERNS` line 15, `isEmptyMeetingContent` line 124.
|
|
802
|
-
|
|
803
|
-
**Existing dashboard.** `dashboard/pages/meetings.html` — meeting browser, round status, notes.
|
|
804
|
-
|
|
805
|
-
**Endpoints (`dashboard.js`).**
|
|
806
|
-
- `POST /api/meetings` (7322) — create
|
|
807
|
-
- `GET /api/meetings` (7337)
|
|
808
|
-
- `POST /api/meetings/note` (7349)
|
|
809
|
-
- `POST /api/meetings/advance` (7359)
|
|
810
|
-
- `POST /api/meetings/end` (7369)
|
|
811
|
-
- `POST /api/meetings/archive` (7378)
|
|
812
|
-
- `POST /api/meetings/unarchive` (7387)
|
|
813
|
-
- `POST /api/meetings/delete` (7396)
|
|
814
|
-
|
|
815
|
-
**Relationships.** Meeting → emits Notes into the inbox. Each meeting round dispatches one Work
|
|
816
|
-
Item per participant. Pipelines may include `meeting` stages.
|
|
934
|
+
**What it is.** A multi-agent debate workflow with three rounds: investigate, debate, and conclude.
|
|
935
|
+
Participants produce round artifacts; the meeting advances when the current round reaches terminal
|
|
936
|
+
outcomes or the operator explicitly intervenes.
|
|
817
937
|
|
|
818
|
-
|
|
938
|
+
**Where it lives.**
|
|
819
939
|
|
|
820
|
-
|
|
940
|
+
- Meeting definitions/state/transcript: `meetings/<id>.json`
|
|
941
|
+
- Participant note artifacts: `notes/inbox/`
|
|
821
942
|
|
|
822
|
-
|
|
823
|
-
Human ──► Command Center ──► [Work Item | Plan | Note | Schedule | Watch | Pinned | Knowledge]
|
|
824
|
-
│
|
|
825
|
-
└─► Dispatch Queue ──► Dispatch ──► Agent (CLI)
|
|
826
|
-
│
|
|
827
|
-
├─► Pull Request (synced from output)
|
|
828
|
-
├─► Completion (JSON report)
|
|
829
|
-
└─► Notes Inbox ──► Consolidation ──► KB / notes.md
|
|
830
|
-
│
|
|
831
|
-
└─► Pinned (manual subset)
|
|
943
|
+
**Backing symbols.**
|
|
832
944
|
|
|
833
|
-
|
|
945
|
+
- Paths/status maps: `engine/meeting.js#MEETINGS_DIR`,
|
|
946
|
+
`#MEETING_NOTE_ARTIFACT_ROOT`, `#ROUND_STATUS_BY_NAME`, and
|
|
947
|
+
`#ROUND_NUMBER_BY_NAME`
|
|
948
|
+
- Round outcome helpers: `#getRoundFailures` and `#allParticipantsFinishedRound`
|
|
949
|
+
- Advancement: `#advanceMeetingIfRoundComplete`
|
|
950
|
+
- Empty-output guard: `#EMPTY_OUTPUT_PATTERNS` and `#isEmptyMeetingContent`
|
|
834
951
|
|
|
835
|
-
|
|
952
|
+
**Existing dashboard.** `dashboard/pages/meetings.html` shows meetings, rounds, participant
|
|
953
|
+
artifacts, and controls.
|
|
836
954
|
|
|
837
|
-
|
|
838
|
-
|
|
955
|
+
**Endpoints.**
|
|
956
|
+
|
|
957
|
+
- `POST /api/meetings`
|
|
958
|
+
- `GET /api/meetings`
|
|
959
|
+
- `POST /api/meetings/note`
|
|
960
|
+
- `POST /api/meetings/advance`
|
|
961
|
+
- `POST /api/meetings/end`
|
|
962
|
+
- `POST /api/meetings/archive`
|
|
963
|
+
- `POST /api/meetings/unarchive`
|
|
964
|
+
- `POST /api/meetings/delete`
|
|
965
|
+
|
|
966
|
+
**Relationships.** A Meeting dispatches one participant Work Item per round, writes durable Notes,
|
|
967
|
+
and can itself be a Pipeline stage.
|
|
968
|
+
|
|
969
|
+
---
|
|
970
|
+
|
|
971
|
+
## Cross-cutting relationship cheatsheet
|
|
839
972
|
|
|
840
|
-
|
|
841
|
-
|
|
973
|
+
```
|
|
974
|
+
Human ---> Command Center ---> dashboard /api/* ---> [Work Item | Plan | Note | Schedule | Watch]
|
|
975
|
+
|
|
|
976
|
+
+--> Dispatch Queue ---> Dispatch ---> Agent
|
|
977
|
+
|
|
|
978
|
+
+--> Pull Request
|
|
979
|
+
+--> Completion JSON
|
|
980
|
+
+--> Notes Inbox
|
|
981
|
+
|
|
|
982
|
+
+--> notes.md
|
|
983
|
+
+--> Knowledge Base
|
|
984
|
+
|
|
985
|
+
Plan Markdown ---> plan-to-prd sidecar ---> SQL PRD + PRD Items ---> Work Items ---> Verify
|
|
986
|
+
|
|
987
|
+
Pipeline definition ---> SQL pipeline run ---> stages (task / meeting / plan / API / control flow)
|
|
988
|
+
|
|
989
|
+
Schedule (time) ---> Work Item
|
|
990
|
+
Watch (state) ---> notification or registered follow-up action
|
|
991
|
+
|
|
992
|
+
Engine reads: config.json, routing.md, definitions, human docs, engine/state.db
|
|
993
|
+
Runtime reads: runtime-native harness assets from the assigned working directory
|
|
994
|
+
Engine writes: engine/state.db, control/process sidecars, artifacts, and requested human docs
|
|
842
995
|
```
|