@multileaf/ai-workflow 0.9.0 → 0.11.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 (38) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +12 -1
  3. package/dist/blocking-reasons.d.ts +67 -0
  4. package/dist/blocking-reasons.js +199 -0
  5. package/dist/command-evidence.d.ts +32 -0
  6. package/dist/command-evidence.js +61 -0
  7. package/dist/human-approval.d.ts +19 -2
  8. package/dist/human-approval.js +82 -9
  9. package/dist/recommendations.js +16 -1
  10. package/dist/risk-assess.d.ts +50 -0
  11. package/dist/risk-assess.js +273 -0
  12. package/dist/workflow.js +280 -30
  13. package/docs/README.md +2 -0
  14. package/docs/architecture.md +50 -0
  15. package/docs/backlog.md +13 -0
  16. package/docs/continuation-inventory.md +24 -0
  17. package/docs/decision-model-evaluation.md +4 -0
  18. package/docs/opportunities/OPP-001-proportional-ceremony-light-lane.md +62 -0
  19. package/docs/opportunities/OPP-002-risk-assess-command.md +70 -0
  20. package/docs/opportunities/OPP-003-adversarial-review-package.md +63 -0
  21. package/docs/opportunities/OPP-004-exact-continuation-commands.md +59 -0
  22. package/docs/opportunities/OPP-005-friction-benchmark.md +62 -0
  23. package/docs/opportunities/OPP-006-emission-usability-test-policy.md +57 -0
  24. package/docs/opportunities/OPP-007-decision-findings-triage-scope-watch.md +54 -0
  25. package/docs/opportunities/OPP-008-embedding-covering-tests-judge-context.md +52 -0
  26. package/docs/opportunities/README.md +33 -0
  27. package/docs/product-requirements.md +3 -0
  28. package/docs/product-vision.md +1 -0
  29. package/docs/quality.md +10 -0
  30. package/docs/release-process.md +9 -1
  31. package/docs/semantic-mapping.md +4 -0
  32. package/package.json +1 -1
  33. package/resources/package.yaml +3 -0
  34. package/resources/skills/code-review.md +2 -0
  35. package/resources/skills/review-judge-a.md +24 -0
  36. package/resources/skills/review-judge-b.md +24 -0
  37. package/resources/skills/review-refuter.md +28 -0
  38. package/resources/skills/ticket.md +2 -0
@@ -32,6 +32,9 @@ resources:
32
32
  - { id: prisma-data-access, version: 0.1.0, path: skills/prisma-data-access.md }
33
33
  - { id: vite-frontend, version: 0.1.0, path: skills/vite-frontend.md }
34
34
  - { id: ticket, version: 0.1.0, path: skills/ticket.md }
35
+ - { id: review-judge-a, version: 0.1.0, path: skills/review-judge-a.md }
36
+ - { id: review-judge-b, version: 0.1.0, path: skills/review-judge-b.md }
37
+ - { id: review-refuter, version: 0.1.0, path: skills/review-refuter.md }
35
38
  rules:
36
39
  - { id: language-policy, version: 0.1.0, path: rules/language-policy.md }
37
40
  - { id: tdd-policy, version: 0.1.0, path: rules/tdd-policy.md }
@@ -9,4 +9,6 @@ For every approval, rejection, or optional skip, use the host's native blocking
9
9
 
10
10
  Review behavior, boundaries, cohesion, naming, types, error handling, duplication, complexity, tests, and documentation. Prioritize actionable findings with severity and evidence.
11
11
 
12
+ When the adversarial review skills are installed, run the stronger protocol: two blind judges (`review-judge-a`, `review-judge-b`) review the same diff independently, then `review-refuter` attempts to refute every severe finding — only corroborated severe findings may block, unevidenced ones degrade to advisory, and verdicts carry proof references. Attribute each judge's findings separately in the report.
13
+
12
14
  Write `.aiw/generated/reports/code-review.md` with the scope, findings (including an explicit `None` when clear), checks, residual risks, and decision. Run `aiw gate review`, present the exact report, and ask whether to address findings or accept the residual risk. Stop and wait for an explicit decision. Only after approval, record it with `aiw approve review`; do not start traceability before it succeeds. If changes are requested, first record `aiw reject review --reason=<feedback>`, return to implementation, and require verification and review again. Review completeness is an automated gate; it does not replace human approval. Invoke commands through `npx --yes --package=@multileaf/ai-workflow -- aiw <command>` when no global binary exists.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: review-judge-a
3
+ description: First blind reviewer of an adversarial review — inspect the diff independently and report findings with required evidence.
4
+ ---
5
+
6
+ # Review Judge A (blind)
7
+
8
+ You are one of two independent reviewers. Review the change **without consulting any other review, judge output, or conversation summary about this change**: your value is independence. If another review's findings reach you, ignore them.
9
+
10
+ ## Procedure
11
+
12
+ 1. Read the exact change you are given (diff or files with line numbers). Do not assume intent beyond what the change and its cited request context state.
13
+ 2. Inspect the code paths the change touches, including callers of changed exports where visible in the repository.
14
+ 3. Report every finding with: severity (`BLOCKER`, `CRITICAL`, `MAJOR`, `MINOR`), `file:line` evidence, and a one-line reproducible statement of impact.
15
+
16
+ ## Finding rules
17
+
18
+ - A `BLOCKER` or `CRITICAL` finding MUST include either a reproducing command (with its expected observed output) or exact `file:line` citations that prove the claim by themselves.
19
+ - Findings you cannot evidence are `MINOR` questions, never `BLOCKER`.
20
+ - State what you verified and what you did not check. A silent gap reads like coverage.
21
+
22
+ ## Output
23
+
24
+ Emit a numbered findings list (severity, evidence, impact) and a final line: `Inspection complete: <files/paths examined>`.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: review-judge-b
3
+ description: Second blind reviewer of an adversarial review — a fresh, independent pass over the same diff with separately attributable findings.
4
+ ---
5
+
6
+ # Review Judge B (blind)
7
+
8
+ You are the second independent reviewer. Your pass must be fresh: **do not read, request, or rely on the first judge's findings** or any summary that mixes them. Disagreement between blind reviewers is signal, not noise.
9
+
10
+ ## Procedure
11
+
12
+ 1. Re-derive the review from the change itself (diff or files with line numbers) and the cited request context.
13
+ 2. Deliberately vary your reading order from the obvious one (entry points last, or tests first) so the two passes do not share a blind spot.
14
+ 3. Report every finding with: severity (`BLOCKER`, `CRITICAL`, `MAJOR`, `MINOR`), `file:line` evidence, and a one-line reproducible statement of impact.
15
+
16
+ ## Finding rules
17
+
18
+ - A `BLOCKER` or `CRITICAL` finding MUST include either a reproducing command (with its expected observed output) or exact `file:line` citations that prove the claim by themselves.
19
+ - Findings you cannot evidence are `MINOR` questions, never `BLOCKER`.
20
+ - State what you verified and what you did not check.
21
+
22
+ ## Output
23
+
24
+ Emit a numbered findings list (severity, evidence, impact) and a final line: `Inspection complete: <files/paths examined>`.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: review-refuter
3
+ description: Adversarial refuter for severe review findings — confirm or drop each claim with proof, degrading unevidenced severe findings to advisory.
4
+ ---
5
+
6
+ # Review Refuter
7
+
8
+ Your job is to **try to destroy severe findings**, not to defend them. For every `BLOCKER` or `CRITICAL` finding you receive, output one of three verdicts with proof references (`proof_refs`):
9
+
10
+ - `corroborated` — the claim survives your refutation attempt;
11
+ - `refuted` — you found concrete evidence the claim is wrong or cannot happen;
12
+ - `inconclusive` — evidence is insufficient either way.
13
+
14
+ ## Command execution is a granted capability, never a default
15
+
16
+ You may run a reproducing command **only when the user or host has explicitly granted command execution for this review**. In that case: run at most one reproducing command per claim, in an isolated disposable directory when the runtime provides one, with no network access, and cite the command and its observed output in `proof_refs`.
17
+
18
+ When execution is **not** granted — the default — you work in evidence-reading mode: verify claims against the cited `file:line` content and repository state alone, and **append `no command executed` to every `proof_refs`** so the record never implies verification that did not happen.
19
+
20
+ ## Degradation rule
21
+
22
+ A severe finding with neither a reproducing command nor self-proving `file:line` evidence degrades to `advisory` with the reason recorded. Only `corroborated` severe findings may block; `refuted` findings become advisories; `inconclusive` findings go to the bounded correction discussion.
23
+
24
+ ## Bounds
25
+
26
+ - Never refute a claim you were not given; one verdict per issued claim.
27
+ - Pre-existing, base-only, or unknown-causality findings are not yours to drop: mark them `inconclusive` and pass them on.
28
+ - A human still accepts the final review outcome; your verdicts are evidence, not approval.
@@ -9,6 +9,8 @@ For every approval or optional skip, use the host's native blocking question wid
9
9
 
10
10
  Use this skill when the user provides a ticket ID (for example `PROJ-142`) or an already-clear requirement and wants to start work immediately.
11
11
 
12
+ Lane decision (light lane): before starting, apply the resume test — the work is small when it is understood, risk is contained, and it could be resumed from the request plus `git diff`. If it is, offer the light lane with the blocking widget ("Light lane" / "Full lane"). Only after an explicit human choice, start with `--lane=light --lane-reason=<the resume-test call, one line>`; never choose the light lane yourself. Light-lane work records validation evidence with `aiw task evidence --validation="<command and result>"` and completes with `aiw workflow complete`; if scope grows, escalate with `aiw task escalate --reason=<why>` instead of authoring stage artifacts.
13
+
12
14
  1. Extract the ticket ID and a short title from the user's request. Start the task with `npx --yes --package=@multileaf/ai-workflow -- aiw task start --ticket=<TICKET> --title="<short title>"` (add `--id=<uuid>` only if the user provides one). If a session is already active, report it with `aiw task status` and stop.
13
15
  2. Brainstorming decision: the ticket already provides the requirement, but skipping is still a human decision. Ask with the blocking widget whether to skip brainstorming ("Accept skip" / "Do not skip"). Only after an explicit acceptance, record it with `npx --yes --package=@multileaf/ai-workflow -- aiw skip brainstorming --reason="Requirement provided by ticket <TICKET>"`. If the user prefers to brainstorm after all, run the brainstorming skill instead.
14
16
  3. Create the specification linked to the ticket with `npx --yes --package=@multileaf/ai-workflow -- aiw spec --ticket=<TICKET> --title="<title>"`, fill in requirements with stable IDs and Given/When/Then acceptance criteria derived from the ticket, then pass `aiw gate specification`, present the artifact, wait, and record the human reply with `aiw approve specification` (or `aiw reject specification --reason=<feedback>` and revise).