mandrel 1.82.0 → 1.83.0

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 (45) hide show
  1. package/.agents/README.md +41 -0
  2. package/.agents/docs/SDLC.md +4 -2
  3. package/.agents/docs/agentrc-reference.json +10 -2
  4. package/.agents/docs/execution-reference.md +52 -0
  5. package/.agents/instructions.md +76 -38
  6. package/.agents/schemas/agentrc.schema.json +31 -3
  7. package/.agents/schemas/qa-ledger.schema.json +2 -2
  8. package/.agents/scripts/epic-deliver-prepare.js +41 -1
  9. package/.agents/scripts/lib/config/explain.js +4 -1
  10. package/.agents/scripts/lib/config-settings-schema.js +25 -1
  11. package/.agents/scripts/lib/epic-body-sections.js +88 -0
  12. package/.agents/scripts/lib/findings/promote-finding.js +3 -3
  13. package/.agents/scripts/lib/findings/severity.js +5 -6
  14. package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +65 -2
  15. package/.agents/scripts/lib/orchestration/context-hydration-engine.js +96 -11
  16. package/.agents/scripts/lib/orchestration/doc-reader.js +29 -0
  17. package/.agents/scripts/lib/orchestration/docs-digest.js +134 -0
  18. package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/refresh-commit.js +15 -1
  19. package/.agents/scripts/lib/qa/console-allowlist.js +5 -4
  20. package/.agents/scripts/lib/qa/resolve-qa-contract.js +144 -8
  21. package/.agents/skills/core/epic-plan-consolidate/SKILL.md +7 -5
  22. package/.agents/skills/core/epic-plan-consolidate/examples.md +51 -0
  23. package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +4 -22
  24. package/.agents/skills/core/epic-plan-decompose-author/examples.md +47 -0
  25. package/.agents/skills/core/epic-plan-premortem/SKILL.md +9 -8
  26. package/.agents/skills/core/epic-plan-premortem/examples.md +53 -0
  27. package/.agents/skills/core/epic-plan-spec-author/SKILL.md +21 -81
  28. package/.agents/skills/core/epic-plan-spec-author/examples.md +91 -0
  29. package/.agents/skills/skills.index.json +3 -3
  30. package/.agents/skills/stack/qa/qa-explore-driving/SKILL.md +52 -38
  31. package/.agents/workflows/helpers/deliver-epic-reference.md +514 -0
  32. package/.agents/workflows/helpers/deliver-epic.md +164 -469
  33. package/.agents/workflows/helpers/epic-deliver-story.md +35 -11
  34. package/.agents/workflows/helpers/plan-epic-reference.md +136 -0
  35. package/.agents/workflows/helpers/plan-epic.md +56 -186
  36. package/.agents/workflows/helpers/plan-story.md +31 -61
  37. package/.agents/workflows/helpers/qa-run-scenario.md +194 -0
  38. package/.agents/workflows/helpers/scope-triage-gate.md +97 -0
  39. package/.agents/workflows/helpers/single-story-deliver-reference.md +423 -0
  40. package/.agents/workflows/helpers/single-story-deliver.md +128 -392
  41. package/.agents/workflows/qa-explore.md +63 -32
  42. package/.agents/workflows/qa-run.md +293 -130
  43. package/docs/CHANGELOG.md +14 -0
  44. package/package.json +1 -1
  45. package/.agents/schemas/qa-finding.schema.json +0 -133
@@ -59,13 +59,17 @@ skill. It is the conventions reference this procedure depends on for the
59
59
  browser MCP, starting at a root and reaching each surface only via UI
60
60
  affordances — never URL-jump to a deep link. Browser instrumentation lives in
61
61
  [`core/browser-testing-with-devtools`](../skills/core/browser-testing-with-devtools/SKILL.md).
62
- - **Static driving (the documented interim).** When a live runtime is not
63
- reachable, walk the surface from source, route definitions, and rendered
64
- markup — chosen explicitly at Plan time, never as a silent fallback.
65
- - **Authenticated driving depends on consumer persona-seeding infrastructure
66
- this framework does not deliver.** Without it, drive only the unauthenticated
67
- surface or fall back to static, never enter real credentials, and record the
68
- gap.
62
+ - **Static driving (the documented interim).** When **no seam resolves** for the
63
+ target environment, walk the surface from source, route definitions, and
64
+ rendered markup — chosen explicitly at Plan time, never as a silent fallback.
65
+ - **Authenticated driving follows the per-environment seam.** When the resolved
66
+ target environment carries a `signInSeam` a dev `url` seam or a `skill` seam
67
+ with `credentialRef`-indirected sign-in drive the authenticated surface via
68
+ that seam, including authenticated deployed hosts. Real credentials are never
69
+ typed inline: the seam consumes a persona **name** (`url`) or a stored
70
+ `credentialRef` (`skill`), and every evidence string passes through mandatory
71
+ redaction. Static is the interim **only** where the target environment
72
+ resolves no seam.
69
73
  - **Broken navigation is a finding, not a workaround.** A missing affordance, a
70
74
  nav 404, or a guard redirect loop is recorded and you move on — you do not
71
75
  route around it with a direct URL.
@@ -160,31 +164,54 @@ before touching the surface.
160
164
  1. Re-read the `qa-engineer` persona and the
161
165
  [`stack/qa/qa-explore-driving`](../skills/stack/qa/qa-explore-driving/SKILL.md)
162
166
  skill, and resolve the `qa` contract and session (above).
163
- 2. **Choose the driving method explicitly** for the named `surface`:
164
- - **Drive (default):** the live runtime is reachable, so the agent will
165
- drive it through the browser MCP, navigation-first (start at a root, reach
166
- the surface via UI affordances, never URL-jump).
167
- - **Static (documented interim):** the live runtime is *not* reachable —
168
- most commonly because authenticated driving needs consumer persona-seeding
169
- infrastructure that does not exist — so the agent will walk the surface
170
- from source, routes, and rendered markup. This is a deliberate Plan-time
171
- decision with a recorded reason, never a silent fallback when the browser
172
- MCP hiccups.
173
-
174
- Record the chosen method and reason on the ledger (e.g.
175
- `method: static, reason: no reachable authenticated runtime`).
176
- 3. Draft an **exploration plan** for the named `surface`:
167
+ 2. **Resolve the target environment** via
168
+ [`resolveQaEnvironment`](../scripts/lib/qa/resolve-qa-contract.js). The
169
+ contract's `environments` map keys each deployment target (`local`, a
170
+ staging host, an authenticated deployed host) to its `baseUrl`, `signInSeam`,
171
+ and resolved `allowWrites`:
172
+
173
+ ```js
174
+ import { resolveQaEnvironment } from '../scripts/lib/qa/resolve-qa-contract.js';
175
+ // `target` is an environment name or a raw URL; omit for the default.
176
+ const environment = resolveQaEnvironment(contract, target);
177
+ // → { name, baseUrl, signInSeam, allowWrites }
178
+ ```
179
+
180
+ When the operator's `surface` does not pin an unambiguous target and the
181
+ contract declares more than one environment, **prompt** the operator to name
182
+ the environment (or accept the `defaultEnvironment`) — never silently pick
183
+ one. The resolver throws loudly (naming the known environments) on an unknown
184
+ name or an unmatched URL; surface that verbatim and stop. Record the resolved
185
+ **environment name** on the ledger alongside the driving method.
186
+ 3. **Choose the driving method explicitly** for the named `surface` on the
187
+ resolved environment:
188
+ - **Drive (default):** a seam resolves for the target environment, so the
189
+ agent will drive it through the browser MCP, navigation-first (start at a
190
+ root, reach the surface via UI affordances, never URL-jump). Drive is
191
+ available for **any** environment whose `signInSeam` resolves — including
192
+ authenticated deployed hosts reached via a `skill` seam.
193
+ - **Static (documented interim):** **no seam resolves** for the target
194
+ environment, so the agent will walk the surface from source, routes, and
195
+ rendered markup. This is a deliberate Plan-time decision with a recorded
196
+ reason, never a silent fallback when the browser MCP hiccups.
197
+
198
+ Record the resolved environment name, the chosen method, and the reason on
199
+ the ledger (e.g.
200
+ `environment: staging, method: drive, seam: skill` or
201
+ `environment: preview, method: static, reason: no seam resolves`).
202
+ 4. Draft an **exploration plan** for the named `surface`:
203
+ - the resolved target environment (name + `baseUrl`),
177
204
  - the sub-surfaces / flows / states the agent intends to drive,
178
205
  - the classes of signal it is hunting (product bug, environment-setup,
179
206
  tooling-dx, test-gap, enhancement — the
180
207
  [ledger `class` enum](../schemas/qa-ledger.schema.json)),
181
208
  - the chosen driving method and its rationale,
182
209
  - any rolling backlog (`untriaged`) carried forward from a resumed session.
183
- 4. Present the plan, the chosen driving method, and the resolved `ledgerPath`
184
- (under `temp/qa/`) to the operator.
185
- 5. **Gate:** ask the operator to confirm the plan and the driving method (or
186
- amend the surface/scope/method). Do **not** proceed to Capture until they
187
- confirm.
210
+ 5. Present the plan, the resolved target environment, the chosen driving
211
+ method, and the resolved `ledgerPath` (under `temp/qa/`) to the operator.
212
+ 6. **Gate:** ask the operator to confirm the plan, the target environment, and
213
+ the driving method (or amend the surface/scope/environment/method). Do
214
+ **not** proceed to Capture until they confirm.
188
215
 
189
216
  ---
190
217
 
@@ -212,10 +239,12 @@ observations. **This phase is strictly read-only.**
212
239
  MCP — start at a root, click the affordances a real user would, and observe
213
240
  the rendered state, console, and network signal. Never URL-jump to establish
214
241
  a starting state; a broken affordance, nav 404, or guard redirect loop is
215
- itself a **finding**, not a workaround. Never enter real credentials to reach
216
- an authenticated surface and never fabricate a session drive only the
217
- unauthenticated surface (or capture the authenticated surface statically) and
218
- record the persona-seeding gap.
242
+ itself a **finding**, not a workaround. To reach an authenticated surface,
243
+ sign in through the resolved environment's `signInSeam`a dev `url` seam
244
+ (substitute the persona name into the template) or a `skill` seam (invoke the
245
+ named sign-in skill, which reads a stored `credentialRef`). Never type real
246
+ credentials inline and never fabricate a session; the seam is the only path
247
+ to a logged-in surface, and all captured evidence is redacted (§ 1 below).
219
248
  - **Static (documented interim):** walk the surface from source, route
220
249
  definitions, and rendered markup. Treat its coverage as partial and say so in
221
250
  the ledger — a static pass does not close the same coverage a driven pass
@@ -368,8 +397,10 @@ deferred rolling backlog that a resumed session will pick up.
368
397
  [`stack/qa/qa-explore-driving`](../skills/stack/qa/qa-explore-driving/SKILL.md).
369
398
  - **Capture is read-only.** The only Capture write is appending ledger lines
370
399
  under `temp/qa/`. No source edits, no ticket mutations, no product writes,
371
- no destructive form submissions. Never enter real credentials or fabricate a
372
- session; record the persona-seeding gap instead.
400
+ no destructive form submissions. Never type real credentials inline or
401
+ fabricate a session; reach an authenticated surface only through the resolved
402
+ environment's `signInSeam`, and where no seam resolves, record the gap and
403
+ fall back to static.
373
404
  - **Broken navigation is a finding, not a workaround.** Never URL-jump around a
374
405
  missing affordance, a nav 404, or a guard redirect loop — record it and move
375
406
  on.