@yemi33/minions 0.1.2082 → 0.1.2084
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/qa.js +41 -2
- package/dashboard/js/settings.js +56 -56
- package/dashboard/js/state.js +1 -1
- package/dashboard/pages/qa.html +3 -2
- package/dashboard.js +27 -6
- package/docs/README.md +4 -1
- package/docs/command-center.md +30 -1
- package/docs/constants.md +32 -0
- package/docs/design-state-storage.md +3 -1
- package/docs/keep-processes.md +47 -0
- package/docs/qa-runbook-lifecycle.md +21 -1
- package/engine/features.js +7 -2
- package/engine/playbook.js +8 -0
- package/engine/qa-sessions.js +316 -42
- package/engine.js +17 -0
- package/package.json +1 -1
- package/playbooks/qa-session-setup.md +32 -0
- package/prompts/cc-system.md +14 -6
|
@@ -24,9 +24,41 @@ A user asked Minions to QA the following target and flows:
|
|
|
24
24
|
- **Runner hint (optional explicit runner):** `{{runner_hint}}`
|
|
25
25
|
- **Capture:** `{{capture}}`
|
|
26
26
|
- **Mode:** `{{session_mode}}`
|
|
27
|
+
- **Role (multi-project fan-out):** `{{role}}` *(empty = single-project session, behave as if `primary`)*
|
|
28
|
+
- **Primary project (multi-project fan-out):** `{{primary_project}}`
|
|
29
|
+
- **Co-services JSON (multi-project fan-out):** `{{co_services_json}}`
|
|
27
30
|
|
|
28
31
|
{{additional_context}}
|
|
29
32
|
|
|
33
|
+
## Multi-project fan-out (W-mpq6xqzj000606d0)
|
|
34
|
+
|
|
35
|
+
When the user picks **multiple projects** from the QA Session form, the engine
|
|
36
|
+
queues one SETUP work item **per project** in parallel. Each WI sees the same
|
|
37
|
+
target/flows/managed_spawn_name, but with a different `{{role}}` value:
|
|
38
|
+
|
|
39
|
+
- **`{{role}} == "primary"`** *(or empty for single-project sessions)*: you are
|
|
40
|
+
the orchestrator. You own the canonical `{{managed_spawn_name}}` (no suffix)
|
|
41
|
+
and your work item's wiPath is the one that gets the DRAFT phase queued
|
|
42
|
+
on it once **all** SETUP WIs succeed. If `{{co_services_json}}` is non-empty
|
|
43
|
+
(e.g. `["api","worker"]`), the DRAFT and EXECUTE agents will poll each of
|
|
44
|
+
those co-services' managed-spawn health (name = `{{managed_spawn_name}}-<project>`)
|
|
45
|
+
via `/api/managed-processes/by-name` before treating the system as ready.
|
|
46
|
+
- **`{{role}} == "co-service"`**: you are a supporting service (DB, API,
|
|
47
|
+
worker, etc.). Your managed-spawn `name` MUST be `{{managed_spawn_name}}-<your-project>`
|
|
48
|
+
(the engine appends `-<project>` automatically when computing the spec name).
|
|
49
|
+
You do **not** write tests, do not queue DRAFT — just stand up your service,
|
|
50
|
+
declare its healthcheck, and exit clean. The primary's DRAFT/EXECUTE will
|
|
51
|
+
reach you over the network (use a deterministic port; document it in
|
|
52
|
+
`managed-spawn.json` `ports[]`).
|
|
53
|
+
|
|
54
|
+
Any co-service SETUP that fails (sidecar invalid, healthcheck miss, build
|
|
55
|
+
error) **fails the entire session** with `failure_class: 'qa-session-setup-failed'`
|
|
56
|
+
and a per-project error JSON in `session.error`. The primary's WI does NOT
|
|
57
|
+
get the DRAFT phase queued in that case.
|
|
58
|
+
|
|
59
|
+
For single-project sessions (`{{co_services_json}}` empty or `[]`), ignore
|
|
60
|
+
this section — the original single-WI flow applies unchanged.
|
|
61
|
+
|
|
30
62
|
## What "qa-session-setup" means
|
|
31
63
|
|
|
32
64
|
A `qa-session-setup` task is the **first** of three chained work items the
|
package/prompts/cc-system.md
CHANGED
|
@@ -186,25 +186,33 @@ When the user describes a UI/E2E flow they want validated against a *live, runni
|
|
|
186
186
|
- `mode` — `"confirm"` (default — pauses at `awaiting-approval` so the user can review the drafted test before EXECUTE fires) or `"auto"` (chains straight from DRAFT to EXECUTE). Pick `"confirm"` unless the user said "just run it" / "no review needed" / "auto".
|
|
187
187
|
- `capture` — optional `{ video?: bool, screenshots?: bool, logs?: bool }`. Default is everything false. Set what the user asked for.
|
|
188
188
|
- `runner` — optional kebab-case name to force a specific runner (`"playwright"`, `"maestro"`, or a plugin). Omit to let the engine auto-detect (Maestro wins when the project has `.maestro/`; Playwright is the safe default).
|
|
189
|
-
- `project` — REQUIRED when multiple projects are configured (mirrors `/api/work-items`). Omit for the central path.
|
|
189
|
+
- `project` — REQUIRED (legacy single-project form) when multiple projects are configured (mirrors `/api/work-items`). Omit for the central path. **Multi-project form (W-mpq6xqzj000606d0):** pass `projects: string[]` (≤5) instead of `project` to QA across multiple services in parallel. The first entry is the **primary** (owns DRAFT/EXECUTE and the canonical managed-spawn name); the rest are **co-services** (each gets a SETUP work item that stands up its dev-up command, named `qa-session-<id>-<project>`). All co-services must pass first-healthcheck before DRAFT fires; any failure fails the whole session. Use this when the user says "QA the api+worker against PR #X" or "smoke test the full stack on `develop`".
|
|
190
190
|
|
|
191
|
-
**Worked example — PR target, confirm mode (default):**
|
|
191
|
+
**Worked example — PR target, confirm mode (default), single project:**
|
|
192
192
|
```
|
|
193
193
|
curl -s -X POST http://localhost:{{dashboard_port}}/api/qa/session \
|
|
194
194
|
-H 'Content-Type: application/json' \
|
|
195
195
|
-H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
196
|
-
-d '{"target":{"kind":"pr","prId":"github:yemi33/MyApp#1234"},"flowsRaw":"Open the homepage, click Login, enter test@example.com / hunter2, and verify the dashboard renders with the user'\''s name in the header.","mode":"confirm","capture":{"screenshots":true,"logs":true},"
|
|
196
|
+
-d '{"target":{"kind":"pr","prId":"github:yemi33/MyApp#1234"},"flowsRaw":"Open the homepage, click Login, enter test@example.com / hunter2, and verify the dashboard renders with the user'\''s name in the header.","mode":"confirm","capture":{"screenshots":true,"logs":true},"projects":["MyApp"]}'
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
**Worked example — current worktree, auto mode, video capture:**
|
|
199
|
+
**Worked example — current worktree, auto mode, video capture, single project:**
|
|
200
200
|
```
|
|
201
201
|
curl -s -X POST http://localhost:{{dashboard_port}}/api/qa/session \
|
|
202
202
|
-H 'Content-Type: application/json' \
|
|
203
203
|
-H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
204
|
-
-d '{"target":{"kind":"current"},"flowsRaw":"Add three items to the cart, go to checkout, complete the payment form with the Stripe test card, and verify the success page.","mode":"auto","capture":{"video":true,"screenshots":true},"
|
|
204
|
+
-d '{"target":{"kind":"current"},"flowsRaw":"Add three items to the cart, go to checkout, complete the payment form with the Stripe test card, and verify the success page.","mode":"auto","capture":{"video":true,"screenshots":true},"projects":["MyApp"]}'
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
**
|
|
207
|
+
**Worked example — multi-project fan-out (primary + 2 co-services):**
|
|
208
|
+
```
|
|
209
|
+
curl -s -X POST http://localhost:{{dashboard_port}}/api/qa/session \
|
|
210
|
+
-H 'Content-Type: application/json' \
|
|
211
|
+
-H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
212
|
+
-d '{"target":{"kind":"branch","branch":"develop"},"flowsRaw":"Place an order on the storefront and verify it shows up in the admin panel within 5 seconds.","mode":"confirm","capture":{"video":true,"logs":true},"projects":["storefront","api","worker"]}'
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Response:** `{ sessionId, state: "spawning", setupWorkItemId, managedSpawnName, projects? }`. `setupWorkItemId` is the **primary's** WI id; `projects` is the canonical array (single-project sessions omit it). Tell the user the session id so they can watch it at `/qa` and steer it via the `/approve` (run the drafted test), `/edit` (re-draft with feedback), `/dismiss` (accept the draft without running), `/cancel` (give up), or `/kill` (cancel + tear down the managed-spawn) endpoints listed in `GET /api/routes`.
|
|
208
216
|
|
|
209
217
|
**Do not also dispatch a `/api/work-items` `implement` or `test` for the same QA request.** The QA Session pipeline owns its own SETUP → DRAFT → EXECUTE work items end-to-end; firing a parallel work-item is the same double-dispatch class that the "Never both" rule above forbids. If the user asks for both a QA pass AND a code change, do them as two separate, sequential calls — QA Session for the behavioural check, work-item for the fix.
|
|
210
218
|
|