@yemi33/minions 0.1.2379 → 0.1.2380

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.
Files changed (96) hide show
  1. package/bin/minions.js +19 -9
  2. package/dashboard/js/refresh.js +2 -3
  3. package/dashboard/js/render-prd.js +1 -1
  4. package/dashboard/js/render-work-items.js +13 -6
  5. package/dashboard.js +393 -721
  6. package/docs/architecture-review-2026-07-09.md +2 -4
  7. package/docs/auto-discovery.md +36 -49
  8. package/docs/blog-first-successful-dispatch.md +1 -1
  9. package/docs/branch-derivation.md +2 -2
  10. package/docs/command-center.md +1 -1
  11. package/docs/completion-reports.md +14 -4
  12. package/docs/constellation-bridge.md +59 -10
  13. package/docs/constellation-style-telemetry.md +6 -6
  14. package/docs/cooldown-merge-semantics.md +4 -0
  15. package/docs/copilot-cli-schema.md +3 -3
  16. package/docs/cross-repo-plans.md +17 -17
  17. package/docs/deprecated.json +2 -2
  18. package/docs/design-state-storage.md +1 -1
  19. package/docs/documentation-audit-2026-07-09.md +2 -2
  20. package/docs/engine-restart.md +20 -8
  21. package/docs/harness-mode.md +1 -1
  22. package/docs/managed-spawn.md +4 -4
  23. package/docs/onboarding.md +1 -2
  24. package/docs/pr-comment-followup.md +3 -3
  25. package/docs/pr-review-fix-loop.md +1 -1
  26. package/docs/proposals/repo-pool-for-live-checkout.md +1 -2
  27. package/docs/qa-runbook-lifecycle.md +4 -4
  28. package/docs/qa-runbooks.md +2 -2
  29. package/docs/rfc-completion-json.md +4 -1
  30. package/docs/runtime-adapters.md +1 -1
  31. package/docs/self-improvement.md +4 -5
  32. package/docs/shared-lifecycle-module-map.md +3 -1
  33. package/docs/slim-ux/architecture-suggestions.md +5 -6
  34. package/docs/slim-ux/concepts.md +23 -25
  35. package/docs/watches.md +7 -7
  36. package/docs/workspace-manifests.md +1 -1
  37. package/docs/worktree-lifecycle.md +1 -1
  38. package/engine/abandoned-pr-reconciliation.js +4 -5
  39. package/engine/ado-status.js +5 -5
  40. package/engine/ado.js +20 -25
  41. package/engine/agent-worker-pool.js +58 -1
  42. package/engine/bridge.js +260 -5
  43. package/engine/cleanup.js +48 -131
  44. package/engine/cli.js +125 -83
  45. package/engine/cooldown.js +9 -16
  46. package/engine/db/index.js +22 -9
  47. package/engine/db/migrations/009-qa.js +1 -1
  48. package/engine/db/migrations/020-qa-session-scopes.js +23 -0
  49. package/engine/db/migrations/021-archived-work-items.js +72 -0
  50. package/engine/db/migrations/022-global-cc-session.js +31 -0
  51. package/engine/db/migrations/023-engine-state.js +30 -0
  52. package/engine/db/migrations/024-prd-ghost-collisions.js +53 -0
  53. package/engine/db/migrations/025-malformed-work-item-phantoms.js +33 -0
  54. package/engine/dispatch-store.js +2 -7
  55. package/engine/dispatch.js +34 -41
  56. package/engine/github.js +20 -27
  57. package/engine/lifecycle.js +221 -283
  58. package/engine/llm.js +1 -1
  59. package/engine/logs-store.js +2 -2
  60. package/engine/managed-spawn.js +2 -23
  61. package/engine/meeting.js +6 -6
  62. package/engine/metrics-store.js +2 -2
  63. package/engine/note-link-backfill.js +6 -11
  64. package/engine/pipeline.js +18 -36
  65. package/engine/playbook.js +1 -1
  66. package/engine/prd-store.js +73 -54
  67. package/engine/preflight.js +2 -5
  68. package/engine/projects.js +15 -62
  69. package/engine/pull-requests-store.js +0 -17
  70. package/engine/qa-runbooks.js +2 -2
  71. package/engine/qa-runs.js +1 -8
  72. package/engine/qa-sessions.js +41 -64
  73. package/engine/queries.js +120 -219
  74. package/engine/routing.js +3 -5
  75. package/engine/scheduler.js +0 -4
  76. package/engine/shared-branch-pr-reconcile.js +2 -3
  77. package/engine/shared.js +132 -637
  78. package/engine/small-state-store.js +89 -10
  79. package/engine/state-operations.js +16 -4
  80. package/engine/stdio-timestamps.js +1 -1
  81. package/engine/timeout.js +5 -12
  82. package/engine/watch-actions.js +20 -22
  83. package/engine/watches-store.js +1 -1
  84. package/engine/watches.js +6 -10
  85. package/engine/work-item-validation.js +52 -0
  86. package/engine/work-items-store.js +127 -29
  87. package/engine/worktree-gc.js +2 -2
  88. package/engine/worktree-pool.js +8 -18
  89. package/engine.js +147 -343
  90. package/minions.js +2 -2
  91. package/package.json +1 -1
  92. package/playbooks/plan-to-prd.md +2 -2
  93. package/playbooks/shared-rules.md +3 -3
  94. package/playbooks/templates/followup-dispatch.md +1 -1
  95. package/playbooks/verify.md +1 -1
  96. package/prompts/cc-system.md +2 -2
package/minions.js CHANGED
@@ -162,7 +162,7 @@ async function addProject(targetDir) {
162
162
  process.exit(1);
163
163
  }
164
164
 
165
- shared.ensureProjectStateFiles(projectEntry);
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.ensureProjectStateFiles(projectEntry);
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.2379",
3
+ "version": "0.1.2380",
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"
@@ -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 `work-items.json`. 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.
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 `work-items.json` and an item with an unrecognized project will not materialize. Example:
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
- Find the PR in `projects/<project-name>/pull-requests.json` by `prNumber`. Key fields:
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
- Find the PR in `projects/<project-name>/pull-requests.json` by `prNumber`. Key fields:
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 pull-requests.json
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 `work-items.json` (mismatch between what
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
 
@@ -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
- Track each E2E PR in the project's `.minions/pull-requests.json` if it is not already tracked.
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
 
@@ -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, pull-requests.json, routing.md, charters, skills, playbooks, project repos.
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}}/`. Key paths: `config.json` (config), `routing.md` (dispatch rules), `projects/{name}/work-items.json` & `pull-requests.json` (per-project), `agents/{id}/` (charters, output), `plans/` & `prd/` (plans), `knowledge/` (KB), `notes/inbox/` (inbox), `engine/dispatch.json` (queue), `playbooks/` (templates). Use tools to read specifics.
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