@yemi33/minions 0.1.2379 → 0.1.2381
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/minions.js +19 -9
- package/dashboard/js/refresh.js +3 -4
- package/dashboard/js/render-other.js +43 -23
- package/dashboard/js/render-prd.js +1 -1
- package/dashboard/js/render-work-items.js +13 -6
- package/dashboard/js/settings.js +40 -17
- package/dashboard.js +435 -768
- package/docs/architecture-review-2026-07-09.md +2 -4
- package/docs/auto-discovery.md +36 -49
- package/docs/blog-first-successful-dispatch.md +1 -1
- package/docs/branch-derivation.md +2 -2
- package/docs/command-center.md +1 -1
- package/docs/completion-reports.md +14 -4
- package/docs/constellation-bridge.md +59 -10
- package/docs/constellation-style-telemetry.md +6 -6
- package/docs/cooldown-merge-semantics.md +4 -0
- package/docs/copilot-cli-schema.md +3 -3
- package/docs/cross-repo-plans.md +17 -17
- package/docs/deprecated.json +2 -2
- package/docs/design-state-storage.md +1 -1
- package/docs/documentation-audit-2026-07-09.md +2 -2
- package/docs/engine-restart.md +20 -8
- package/docs/harness-mode.md +1 -1
- package/docs/live-checkout-mode.md +45 -26
- package/docs/managed-spawn.md +4 -4
- package/docs/onboarding.md +1 -2
- package/docs/pr-comment-followup.md +3 -3
- package/docs/pr-review-fix-loop.md +1 -1
- package/docs/proposals/repo-pool-for-live-checkout.md +1 -2
- package/docs/qa-runbook-lifecycle.md +4 -4
- package/docs/qa-runbooks.md +2 -2
- package/docs/rfc-completion-json.md +4 -1
- package/docs/runtime-adapters.md +1 -1
- package/docs/self-improvement.md +4 -5
- package/docs/shared-lifecycle-module-map.md +3 -1
- package/docs/slim-ux/architecture-suggestions.md +5 -6
- package/docs/slim-ux/concepts.md +23 -25
- package/docs/watches.md +7 -7
- package/docs/workspace-manifests.md +1 -1
- package/docs/worktree-lifecycle.md +1 -1
- package/engine/abandoned-pr-reconciliation.js +4 -5
- package/engine/ado-status.js +5 -5
- package/engine/ado.js +20 -25
- package/engine/agent-worker-pool.js +58 -1
- package/engine/bridge.js +260 -5
- package/engine/cleanup.js +48 -131
- package/engine/cli.js +125 -83
- package/engine/cooldown.js +9 -16
- package/engine/db/index.js +22 -9
- package/engine/db/migrations/009-qa.js +1 -1
- package/engine/db/migrations/020-qa-session-scopes.js +23 -0
- package/engine/db/migrations/021-archived-work-items.js +72 -0
- package/engine/db/migrations/022-global-cc-session.js +31 -0
- package/engine/db/migrations/023-engine-state.js +30 -0
- package/engine/db/migrations/024-prd-ghost-collisions.js +53 -0
- package/engine/db/migrations/025-malformed-work-item-phantoms.js +33 -0
- package/engine/dispatch-store.js +2 -7
- package/engine/dispatch.js +39 -44
- package/engine/github.js +20 -27
- package/engine/lifecycle.js +279 -354
- package/engine/live-checkout.js +193 -149
- package/engine/llm.js +1 -1
- package/engine/logs-store.js +2 -2
- package/engine/managed-spawn.js +2 -23
- package/engine/meeting.js +6 -6
- package/engine/metrics-store.js +2 -2
- package/engine/note-link-backfill.js +6 -11
- package/engine/pipeline.js +18 -36
- package/engine/playbook.js +13 -16
- package/engine/prd-store.js +73 -54
- package/engine/preflight.js +2 -5
- package/engine/projects.js +15 -62
- package/engine/pull-requests-store.js +0 -17
- package/engine/qa-runbooks.js +2 -2
- package/engine/qa-runs.js +1 -8
- package/engine/qa-sessions.js +41 -64
- package/engine/queries.js +120 -219
- package/engine/routing.js +4 -6
- package/engine/scheduler.js +0 -4
- package/engine/shared-branch-pr-reconcile.js +2 -3
- package/engine/shared.js +268 -699
- package/engine/small-state-store.js +89 -10
- package/engine/state-operations.js +16 -4
- package/engine/stdio-timestamps.js +1 -1
- package/engine/timeout.js +5 -12
- package/engine/watch-actions.js +20 -22
- package/engine/watches-store.js +1 -1
- package/engine/watches.js +6 -10
- package/engine/work-item-validation.js +52 -0
- package/engine/work-items-store.js +127 -29
- package/engine/worktree-gc.js +2 -2
- package/engine/worktree-pool.js +8 -18
- package/engine.js +197 -358
- package/minions.js +2 -2
- package/package.json +1 -1
- package/playbooks/plan-to-prd.md +2 -2
- package/playbooks/shared-rules.md +3 -3
- package/playbooks/templates/followup-dispatch.md +1 -1
- package/playbooks/verify.md +1 -1
- package/prompts/cc-system.md +9 -9
package/minions.js
CHANGED
|
@@ -162,7 +162,7 @@ async function addProject(targetDir) {
|
|
|
162
162
|
process.exit(1);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
shared.
|
|
165
|
+
shared.initializeProjectState(projectEntry);
|
|
166
166
|
config.projects.push(projectEntry);
|
|
167
167
|
saveConfig(config);
|
|
168
168
|
|
|
@@ -383,7 +383,7 @@ async function scanAndAdd({ root, depth } = {}) {
|
|
|
383
383
|
repoHost: repo.host, repositoryId: repo.repositoryId, org: repo.org, project: repo.project,
|
|
384
384
|
repoName: repo.repoName, mainBranch: repo.mainBranch, prUrlBase: repo.prUrlBase,
|
|
385
385
|
});
|
|
386
|
-
shared.
|
|
386
|
+
shared.initializeProjectState(projectEntry);
|
|
387
387
|
config.projects.push(projectEntry);
|
|
388
388
|
console.log(` + ${name} (${repo.path})`);
|
|
389
389
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2381",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|
package/playbooks/plan-to-prd.md
CHANGED
|
@@ -135,7 +135,7 @@ Rules for items:
|
|
|
135
135
|
{ "id": "P-bbb2", "name": "UI client", "project": "web-dashboard", ... }
|
|
136
136
|
]
|
|
137
137
|
```
|
|
138
|
-
The engine routes each item to that project's
|
|
138
|
+
The engine routes each item to that project's SQL work-item scope. The verify task at plan completion picks the project with the most completed items and runs cross-repo verification from there. See the **Cross-repo plans** section below for the full output contract when `{{target_projects}}` is set.
|
|
139
139
|
- `depends_on` lists IDs of items that must be done first
|
|
140
140
|
- Keep descriptions actionable — name the files, functions, patterns, or integration points the implementing agent should touch whenever the plan makes them clear
|
|
141
141
|
- Include `acceptance_criteria` so reviewers know when it's done
|
|
@@ -149,7 +149,7 @@ This dispatch is rendering against a **cross-repo plan** — the engine extracte
|
|
|
149
149
|
Apply these rules on top of (and where they conflict, instead of) the single-project guidance above:
|
|
150
150
|
|
|
151
151
|
1. **Omit the top-level `"project"` field** on the PRD JSON — or set it to `""`. The PRD is not anchored to a single project. The dashboard reads `i.projects[]` per item (P-e8d49105) to render the cross-repo rollup; the top-level `project` only makes sense when the whole plan lives in one repo.
|
|
152
|
-
2. **Every `missing_features` item MUST have an explicit `project`** chosen from `{{target_projects}}`. Do NOT leave `project` unset, do NOT fall back to `{{project_name}}` (it is unset for cross-repo dispatches), and do NOT invent a project not in the list — the engine routes each item to that project's
|
|
152
|
+
2. **Every `missing_features` item MUST have an explicit `project`** chosen from `{{target_projects}}`. Do NOT leave `project` unset, do NOT fall back to `{{project_name}}` (it is unset for cross-repo dispatches), and do NOT invent a project not in the list — the engine routes each item to that project's SQL scope and an item with an unrecognized project will not materialize. Example:
|
|
153
153
|
```json
|
|
154
154
|
"missing_features": [
|
|
155
155
|
{ "id": "P-aaa1", "name": "API endpoint", "project": "<first project from {{target_projects}}>", ... },
|
|
@@ -257,7 +257,7 @@ single API call that creates a thread pre-resolved. So on GitHub:
|
|
|
257
257
|
When asked to check build status, CI results, or review state for a PR:
|
|
258
258
|
|
|
259
259
|
**Preferred — read cached state (refreshed every `prPollStatusEvery` ticks, default ~12 min when engine is running):**
|
|
260
|
-
|
|
260
|
+
Read `GET http://localhost:{{dashboard_port}}/api/pull-requests` and find the project-scoped record by `prNumber`. Key fields:
|
|
261
261
|
- `buildStatus` — `passing` | `failing` | `running` | `none`
|
|
262
262
|
- `buildFailReason` — failing check/pipeline name when `buildStatus` is `failing`; inspect live CI logs yourself for details
|
|
263
263
|
- `reviewStatus` — `approved` | `changes-requested` | `waiting` | `pending`
|
|
@@ -324,7 +324,7 @@ Only GitHub/Copilot authentication guidance applies to GitHub repository work.
|
|
|
324
324
|
When asked to check build status, CI results, or review state for a PR:
|
|
325
325
|
|
|
326
326
|
**Preferred — read cached state (refreshed every `prPollStatusEvery` ticks, default ~12 min when engine is running):**
|
|
327
|
-
|
|
327
|
+
Read `GET http://localhost:{{dashboard_port}}/api/pull-requests` and find the project-scoped record by `prNumber`. Key fields:
|
|
328
328
|
- `buildStatus` — `passing` | `failing` | `running` | `none`
|
|
329
329
|
- `buildFailReason` — failing check/pipeline name when `buildStatus` is `failing`; inspect live CI logs yourself for details
|
|
330
330
|
- `reviewStatus` — `approved` | `changes-requested` | `waiting` | `pending`
|
|
@@ -333,7 +333,7 @@ Find the PR in `projects/<project-name>/pull-requests.json` by `prNumber`. Key f
|
|
|
333
333
|
|
|
334
334
|
**Live status (when engine isn't running or you need up-to-the-moment results):**
|
|
335
335
|
```bash
|
|
336
|
-
node engine/ado-status.js <prNumber> # reads cached
|
|
336
|
+
node engine/ado-status.js <prNumber> # reads the cached SQL PR store
|
|
337
337
|
node engine/ado-status.js <prNumber> --live # fresh ADO API call
|
|
338
338
|
node engine/ado-status.js <prNumber> --live --project MyProject
|
|
339
339
|
```
|
|
@@ -137,7 +137,7 @@ auditable record of what you fanned out to:
|
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
The engine logs each entry at `info` and warns if the array references a WI id
|
|
140
|
-
that doesn't exist in any project's
|
|
140
|
+
that doesn't exist in any project's SQL scope (mismatch between what
|
|
141
141
|
you claim and what the API actually created — usually a sign that the dispatch
|
|
142
142
|
was reverted or the response was misread).
|
|
143
143
|
|
package/playbooks/verify.md
CHANGED
|
@@ -53,7 +53,7 @@ Use the template at `{{team_root}}/playbooks/templates/verify-guide.md` and clea
|
|
|
53
53
|
|
|
54
54
|
For each project with aggregate verification changes, create or update one draft/review PR that combines the plan branches into a single reviewable diff. Reuse an existing `e2e/{{plan_slug}}` branch/PR when present. Include the plan summary, merged PRs, testing guide, and build/test status. Do not auto-complete or merge these PRs.
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Include each E2E PR in the structured completion report so the engine enrolls it in the project PR store. If manual enrollment is needed, use `POST /api/pull-requests/link`; never edit runtime state directly.
|
|
57
57
|
|
|
58
58
|
## Cross-PR Compatibility Audit
|
|
59
59
|
|
package/prompts/cc-system.md
CHANGED
|
@@ -32,12 +32,12 @@ A literal `</UNTRUSTED-INPUT>` substring is impossible inside a fence — the fe
|
|
|
32
32
|
|
|
33
33
|
## Guardrails
|
|
34
34
|
{{cc_protected_paths}}
|
|
35
|
-
CAN modify: notes, plans, knowledge, work items
|
|
35
|
+
CAN modify: notes, plans, knowledge, work items and PR records through dashboard APIs, routing.md, charters, skills, playbooks, project repos.
|
|
36
36
|
|
|
37
37
|
**Never use the `AskUserQuestion` tool.** This conversation runs headless — the dashboard has no UI to surface the question and no way to feed an answer back, so every invocation hangs the turn. If you need clarification, ask in plain text in your reply; the user can answer in the next message.
|
|
38
38
|
|
|
39
39
|
## Filesystem
|
|
40
|
-
Minions state lives in `{{minions_dir}}
|
|
40
|
+
Minions runtime state lives in `{{minions_dir}}/engine/state.db` and is accessed through dashboard APIs. Key file-backed paths: `config.json` (config), `routing.md` (dispatch rules), `agents/{id}/` (charters/output), `plans/` (plan Markdown), `knowledge/` (KB), `notes/inbox/` (inbox), and `playbooks/` (templates). Use `GET /api/routes` to discover state APIs.
|
|
41
41
|
|
|
42
42
|
## Your skills
|
|
43
43
|
|
|
@@ -92,7 +92,7 @@ When genuinely in doubt about the size, delegate — agents have isolated worktr
|
|
|
92
92
|
### HARD STOP — never edit files yourself in a live/hybrid project
|
|
93
93
|
This overrides everything above, **including the direct-handling override**. For any project whose effective checkout mode is `live` (or `hybrid` for a code-authoring work-item type — `implement`/`fix`/`docs`/`decompose`), you MUST NOT use `Edit`/`Write`/`Bash` (or any tool) to mutate files inside that project's `localPath`, **regardless of task size** — not even a Small 1-line change, and not even when the human explicitly says to do it yourself. The Step-3 "do it yourself" allowance and the Step-1 direct-handling override do **not** apply to writes inside a live/hybrid checkout.
|
|
94
94
|
|
|
95
|
-
Why: live-mode projects have no worktree isolation — the engine runs agents in-place inside `localPath
|
|
95
|
+
Why: live-mode projects have no worktree isolation — the engine runs agents in-place inside `localPath` and caps dispatch to one mutating operation at a time. A stray CC edit is outside dispatch ownership: with dirty recovery disabled it causes a `live-checkout-dirty` refusal that blocks live work, while the default auto-stash policy can silently park that edit before the next dispatch, so the requested change is no longer present for the agent to validate or commit. Auto-stash/reset is a dispatch recovery mechanism, not ownership bookkeeping for CC edits.
|
|
96
96
|
|
|
97
97
|
Instead, when a change is needed in a live/hybrid project, **dispatch a normal work item** (`POST /api/work-items`, `type: "implement"` or `"fix"` as usual) and let the engine own the live-checkout dispatch path (dirty-tree refusal, single-mutating-dispatch cap, auto-stash/auto-reset). Do not try to shortcut it with your own edit.
|
|
98
98
|
|
|
@@ -333,23 +333,23 @@ The `X-CC-Turn-Id` header is the audit trail — the handler stamps it onto the
|
|
|
333
333
|
Every configured project has an effective **checkout mode** — surfaced in your state snapshot next to the project as `[worktree]`, `[live]`, or `[hybrid (live-validation: <type>)]`. It controls where dispatched agents run:
|
|
334
334
|
|
|
335
335
|
- **`worktree`** (default) — each dispatch gets its own isolated `git worktree`. Agents run fully in parallel; nothing touches the operator's working tree. Use for normal repos.
|
|
336
|
-
- **`live`** — agents run **in-place** inside the project's `localPath` (no worktree). The engine caps this to **one mutating dispatch at a time** per project
|
|
337
|
-
- **`hybrid`** — `live` **plus** a `liveValidation: { type, autoDispatch }` block.
|
|
336
|
+
- **`live`** — agents run **in-place** inside the project's `localPath` (no worktree). The engine caps this to **one mutating dispatch at a time** per project. Dirty-tree behavior follows the configured auto-stash/reset policy (auto-stash defaults on); with recovery disabled, the item remains pending until the tree is clean. Use only when worktrees are unworkable.
|
|
337
|
+
- **`hybrid`** — `live` **plus** a `liveValidation: { type, autoDispatch }` block. Work items not listed in `type` use isolated worktrees; listed live-capable canonical work-item types run in-place. The normal validation type is `test`. `build-and-test` is a playbook name, not a work-item type. `type` accepts one string or an array. When `autoDispatch:true`, `test` must be included; the engine creates one PR-targeted `test` WI with the `build-and-test` playbook after each eligible coding WI completes.
|
|
338
338
|
|
|
339
|
-
**CC never writes into a live/hybrid checkout itself.**
|
|
339
|
+
**CC never writes into a live/hybrid checkout itself.** A one-off CC edit leaves untracked operator dirt that the next dispatch may unexpectedly stash or may block on when recovery is disabled. For any needed change, **dispatch a work item** and let the engine own the live-checkout path; never `Edit`/`Write`/`Bash`-mutate files there yourself. Read-only inspection remains fine.
|
|
340
340
|
|
|
341
341
|
**When to recommend hybrid:** the project's build/test/validation genuinely cannot run in an isolated worktree (it needs the real checkout — submodules, a `repo`-managed tree, an emulator/dev-server bound to `localPath`, deep-path tooling), **but** you still want coding agents to work in parallel rather than serialize through the single live checkout. If the *whole* workflow must run on the real tree, use plain `live`. If nothing needs the real tree, stay on `worktree`.
|
|
342
342
|
|
|
343
343
|
**Configuring it** (via the projects array on `POST /api/settings` — never hand-edit `config.json`):
|
|
344
344
|
```bash
|
|
345
|
-
# Switch a project to hybrid mode (live checkout + deferred
|
|
345
|
+
# Switch a project to hybrid mode (live checkout + deferred test validation)
|
|
346
346
|
curl -s -X POST http://localhost:{{dashboard_port}}/api/settings \
|
|
347
347
|
-H 'Content-Type: application/json' -H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
348
|
-
-d '{"projects":[{"name":"<project>","checkoutMode":"live","liveValidation":{"type":"
|
|
348
|
+
-d '{"projects":[{"name":"<project>","checkoutMode":"live","liveValidation":{"type":"test","autoDispatch":true}}]}'
|
|
349
349
|
# Clear hybrid (back to plain live): pass "liveValidation": null
|
|
350
350
|
# Clear live entirely (back to worktree): pass "checkoutMode": "worktree" (also clear liveValidation)
|
|
351
351
|
```
|
|
352
|
-
The server validates: `liveValidation` requires `checkoutMode:"live"
|
|
352
|
+
The server validates: `liveValidation` requires `checkoutMode:"live"`, canonical live-capable work-item type(s), and a boolean `autoDispatch`; automatic validation additionally requires `test` in `type`. **Always confirm the mode switch with the user before applying it** — it changes how future dispatches run.
|
|
353
353
|
|
|
354
354
|
## GitHub auth
|
|
355
355
|
|