@yemi33/minions 0.1.2071 → 0.1.2073
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 +358 -0
- package/dashboard/js/state.js +2 -1
- package/dashboard/pages/qa.html +72 -0
- package/dashboard/styles.css +102 -0
- package/dashboard.js +410 -6
- package/docs/README.md +1 -0
- package/docs/auto-discovery.md +2 -1
- package/docs/kb-sweep.md +8 -0
- package/docs/qa-runbook-lifecycle.md +232 -0
- package/engine/cleanup.js +4 -1
- package/engine/comment-classifier.js +8 -1
- package/engine/cooldown.js +6 -2
- package/engine/db/migrations/007-watches.js +95 -0
- package/engine/gh-comment.js +74 -3
- package/engine/lifecycle.js +100 -0
- package/engine/metrics-store.js +0 -0
- package/engine/pipeline.js +9 -1
- package/engine/playbook.js +39 -0
- package/engine/pull-requests-store.js +30 -22
- package/engine/qa-runners/maestro.js +152 -0
- package/engine/qa-runners/playwright.js +149 -0
- package/engine/qa-runners.js +323 -0
- package/engine/qa-sessions.js +1008 -0
- package/engine/shared.js +109 -13
- package/engine/watches-store.js +259 -0
- package/engine/watches.js +12 -16
- package/engine/work-items-store.js +33 -35
- package/engine.js +140 -0
- package/package.json +1 -1
- package/playbooks/qa-session-draft.md +158 -0
- package/playbooks/qa-session-execute.md +165 -0
- package/playbooks/qa-session-setup.md +154 -0
- package/prompts/cc-system.md +43 -0
- package/routing.md +3 -0
package/prompts/cc-system.md
CHANGED
|
@@ -152,6 +152,49 @@ curl -s http://localhost:{{dashboard_port}}/api/work-items
|
|
|
152
152
|
curl -s http://localhost:{{dashboard_port}}/api/status
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
+
## QA Sessions — natural-language → POST /api/qa/session
|
|
156
|
+
|
|
157
|
+
When the user describes a UI/E2E flow they want validated against a *live, running* app instance — "QA the login flow on PR #1234", "smoke test the homepage", "test the checkout flow on the `develop` branch", "validate the signup journey on my current worktree", etc. — dispatch a QA Session via `POST /api/qa/session` instead of opening an `implement` or `test` work item. The session pipeline boots the dev-up command as a managed-spawn, drafts a runner-native test (Playwright or Maestro) from the natural-language flows, then executes it against the live target and captures the requested artifacts.
|
|
158
|
+
|
|
159
|
+
**When to use this endpoint:**
|
|
160
|
+
|
|
161
|
+
- The user wants a behavioural / end-to-end check ("does the login form actually work", "make sure the cart adds items"). Use `/api/qa/session`.
|
|
162
|
+
- The user wants a code change, unit/integration tests in the repo, or an investigation. Keep using `/api/work-items` with `type: "fix"`, `"implement"`, `"test"`, `"explore"`.
|
|
163
|
+
- The user explicitly says "QA …", "smoke test …", "test the … flow", "validate the … journey", or names a concrete UI walkthrough against a live app. Use `/api/qa/session`.
|
|
164
|
+
|
|
165
|
+
**Body shape (mirrors `engine/qa-sessions.js#validateSpec`):**
|
|
166
|
+
|
|
167
|
+
- `target` — REQUIRED object describing what to QA against. `target.kind` is one of:
|
|
168
|
+
- `pr` — needs `target.prId` (e.g. `"github:yemi33/minions#2911"` or `"ado:office/iss/constellation#5215493"`).
|
|
169
|
+
- `branch` — needs `target.branch` (e.g. `"develop"`).
|
|
170
|
+
- `commit` — needs `target.sha` (full 40-char SHA).
|
|
171
|
+
- `current` — uses the user's current worktree. `target.worktree` is optional; the SETUP agent falls back to `MINIONS_AGENT_CWD` when empty.
|
|
172
|
+
- `flowsRaw` — REQUIRED natural-language description of the steps to test (≤4000 chars). Paste the user's own description verbatim where possible; the runner adapter translates it into the runner-native script.
|
|
173
|
+
- `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".
|
|
174
|
+
- `capture` — optional `{ video?: bool, screenshots?: bool, logs?: bool }`. Default is everything false. Set what the user asked for.
|
|
175
|
+
- `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).
|
|
176
|
+
- `project` — REQUIRED when multiple projects are configured (mirrors `/api/work-items`). Omit for the central path.
|
|
177
|
+
|
|
178
|
+
**Worked example — PR target, confirm mode (default):**
|
|
179
|
+
```
|
|
180
|
+
curl -s -X POST http://localhost:{{dashboard_port}}/api/qa/session \
|
|
181
|
+
-H 'Content-Type: application/json' \
|
|
182
|
+
-H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
183
|
+
-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},"project":"MyApp"}'
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Worked example — current worktree, auto mode, video capture:**
|
|
187
|
+
```
|
|
188
|
+
curl -s -X POST http://localhost:{{dashboard_port}}/api/qa/session \
|
|
189
|
+
-H 'Content-Type: application/json' \
|
|
190
|
+
-H 'X-CC-Turn-Id: {{cc_turn_id}}' \
|
|
191
|
+
-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},"project":"MyApp"}'
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Response:** `{ sessionId, state: "spawning", setupWorkItemId, managedSpawnName }`. 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`.
|
|
195
|
+
|
|
196
|
+
**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.
|
|
197
|
+
|
|
155
198
|
**Required fields per endpoint** — the server returns `{ error: "..." }` if missing. Common cases:
|
|
156
199
|
- `POST /api/work-items`: `title` REQUIRED. `description` recommended. `project` REQUIRED when multiple projects are configured (server returns the list of known names if you guess wrong). `type` defaults to `implement`; valid values: `fix`, `implement`, `implement:large`, `setup`, `explore`, `ask`, `review`, `test`, `verify`. Agent hint via `agent` (string) or `agents` (array).
|
|
157
200
|
- Exempt from the `project` requirement (these run rootless or via central paths): `ask`, `explore`, `plan`, `plan-to-prd`, `meeting`. (`docs` is intentionally NOT exempt — it's write-capable and lands in `WORKTREE_REQUIRING_TYPES`, so it needs a real project worktree. For minions-repo docs work, pass `project: "minions"` explicitly.) `setup` is also in the project-required set — it operates inside a real project worktree but produces no PR. Every other type needs a project worktree, so the server rejects project-less creates with `400 { error, knownProjects }` when ≠1 project is configured.
|
package/routing.md
CHANGED
|
@@ -22,6 +22,9 @@ How the engine decides who handles what. Parsed by engine.js — keep the table
|
|
|
22
22
|
| docs | lambert | _any_ |
|
|
23
23
|
| setup | dallas | _any_ |
|
|
24
24
|
| qa-validate | dallas | ralph |
|
|
25
|
+
| qa-session-setup | dallas | ralph |
|
|
26
|
+
| qa-session-draft | dallas | ralph |
|
|
27
|
+
| qa-session-execute | dallas | ralph |
|
|
25
28
|
|
|
26
29
|
Notes:
|
|
27
30
|
- `_author_` means route to the PR author
|