@multileaf/ai-workflow 0.8.0 → 0.10.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 (47) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +12 -1
  3. package/dist/blocking-reasons.d.ts +67 -0
  4. package/dist/blocking-reasons.js +181 -0
  5. package/dist/command-evidence.d.ts +32 -0
  6. package/dist/command-evidence.js +61 -0
  7. package/dist/heartbeat.d.ts +61 -0
  8. package/dist/heartbeat.js +158 -0
  9. package/dist/hook-installer.d.ts +30 -0
  10. package/dist/hook-installer.js +52 -0
  11. package/dist/human-approval.d.ts +16 -1
  12. package/dist/human-approval.js +69 -5
  13. package/dist/recommendations.js +16 -1
  14. package/dist/risk-assess.d.ts +50 -0
  15. package/dist/risk-assess.js +273 -0
  16. package/dist/usage-import.d.ts +51 -0
  17. package/dist/usage-import.js +190 -0
  18. package/dist/usage-sidecar.d.ts +6 -0
  19. package/dist/usage-sidecar.js +14 -1
  20. package/dist/workflow.js +448 -24
  21. package/docs/README.md +2 -0
  22. package/docs/architecture.md +50 -0
  23. package/docs/backlog.md +13 -0
  24. package/docs/continuation-inventory.md +21 -0
  25. package/docs/decision-model-evaluation.md +4 -0
  26. package/docs/opportunities/OPP-001-proportional-ceremony-light-lane.md +62 -0
  27. package/docs/opportunities/OPP-002-risk-assess-command.md +70 -0
  28. package/docs/opportunities/OPP-003-adversarial-review-package.md +63 -0
  29. package/docs/opportunities/OPP-004-exact-continuation-commands.md +59 -0
  30. package/docs/opportunities/OPP-005-friction-benchmark.md +62 -0
  31. package/docs/opportunities/OPP-006-emission-usability-test-policy.md +57 -0
  32. package/docs/opportunities/OPP-007-decision-findings-triage-scope-watch.md +54 -0
  33. package/docs/opportunities/OPP-008-embedding-covering-tests-judge-context.md +52 -0
  34. package/docs/opportunities/README.md +33 -0
  35. package/docs/product-requirements.md +3 -0
  36. package/docs/product-vision.md +1 -0
  37. package/docs/quality.md +10 -0
  38. package/docs/release-process.md +9 -1
  39. package/docs/semantic-mapping.md +4 -0
  40. package/docs/token-efficiency.md +53 -0
  41. package/package.json +1 -1
  42. package/resources/package.yaml +3 -0
  43. package/resources/skills/code-review.md +2 -0
  44. package/resources/skills/review-judge-a.md +24 -0
  45. package/resources/skills/review-judge-b.md +24 -0
  46. package/resources/skills/review-refuter.md +28 -0
  47. package/resources/skills/ticket.md +2 -0
@@ -0,0 +1,33 @@
1
+ # Workflow Proportionality Opportunities
2
+
3
+ Improvement opportunities derived from the analysis of Gentle-AI's ODD/RDD methodology (Organic Driven Development and Receipt-Driven Development), recorded in [ADR-001](../../.context/adrs/ADR-001-odd-rdd-proportionality-scope.md). Each document is self-contained: problem, source concept with references, proposal, affected areas, acceptance criteria, non-goals, and open questions — so any single opportunity can be picked up without reconstructing the original analysis.
4
+
5
+ The guiding principle: **ceremony should scale with the consequence of the change, not be constant.**
6
+
7
+ | ID | Opportunity | Priority | Depends on |
8
+ | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -------- | ------------------------------------- |
9
+ | [OPP-001](OPP-001-proportional-ceremony-light-lane.md) | Proportional ceremony — light lane for small, understood work | P2 | OPP-002 (advisory signal, optional) |
10
+ | [OPP-002](OPP-002-risk-assess-command.md) | `aiw risk assess` — content-based risk classification with exact next command | P2 | — |
11
+ | [OPP-003](OPP-003-adversarial-review-package.md) | Adversarial review package — blind judges and proof-carrying findings | P3 | — |
12
+ | [OPP-004](OPP-004-exact-continuation-commands.md) | Exact continuation commands — every block names a runnable way out | P1 | — |
13
+ | [OPP-005](OPP-005-friction-benchmark.md) | Friction benchmark — measure how users get stuck (in-band / out-of-band / dead-end) | P3 | OPP-004 |
14
+ | [OPP-006](OPP-006-emission-usability-test-policy.md) | Emission ≠ usability — test that named commands actually work | P2 | OPP-004 (shared contract) |
15
+ | [007-decision-findings-triage-scope-watch](OPP-007-decision-findings-triage-scope-watch.md) | Decision model — findings-evidence triage and lane scope-watch (advisory-only) | P3 | OPP-001, OPP-003 (integration points) |
16
+ | [008-embedding-covering-tests-judge-context](OPP-008-embedding-covering-tests-judge-context.md) | Embedding retrieval — covering-test detection and judge context scoping | P3 | OPP-002, OPP-003 (integration points) |
17
+
18
+ Suggested starting order: **OPP-004 → OPP-002 → OPP-006 → OPP-001 → OPP-005 → OPP-003** (smallest/least invasive first; OPP-004's reason codes feed OPP-005 and OPP-006).
19
+
20
+ OPP-007 and OPP-008 are **model-integration addenda**: deliberately left for after field exposure — their priority should be set by real usage pain, not speculation. All model features respect the spec's NFR contracts: deterministic floor first, models advisory-only, unconfigured = byte-identical offline behavior.
21
+
22
+ ## Planning
23
+
24
+ The implementation is planned as six waves in the project's own SDD format:
25
+
26
+ - Specification: [`.aiw/generated/specs/odd-rdd-proportionality.md`](../../.aiw/generated/specs/odd-rdd-proportionality.md) (requirements REQ-OPP-001…006 with Given/When/Then criteria)
27
+ - Implementation plan: [`.aiw/generated/plans/odd-rdd-proportionality.md`](../../.aiw/generated/plans/odd-rdd-proportionality.md) (TASK-001…010 with code, tests, validation, and evidence per task)
28
+
29
+ ## Source material
30
+
31
+ - Gentle-AI repository: `Gentleman-Programming/gentle-ai` (v4, ODD mandatory protocol)
32
+ - Key upstream docs: `docs/usage.md` (ODD protocol), `docs/review-integration.md` (RDD contract, `review assess`, stop reason codes, refuter probe), `docs/architecture/organic-rdd.md` (atomic review lifecycle), `docs/architecture/the-organic-rdd-story.md` (audit lessons, benchmark), `docs/review-authority-threat-model.md`
33
+ - What was deliberately **not** adopted and why: see ADR-001, Decision B
@@ -31,6 +31,9 @@
31
31
  - The product must support brainstorming, specification, design, planning, implementation, and verification stages.
32
32
  - Requirements, decisions, tasks, code changes, tests, and evidence must be traceable.
33
33
  - A task must not be considered complete without configured validation evidence.
34
+ - Ceremony must scale with the consequence of the change: `aiw risk assess` classifies changes by content (read-only, deterministic); small, understood work may run in a human-chosen light lane that records evidence and rationale instead of durable artifacts, and escalates explicitly on scope growth.
35
+ - Every blocking CLI exit must name a stable reason code and an exact runnable continuation, or state explicitly that no automatic continuation exists.
36
+ - When the adversarial review skills are installed, review findings must carry proof: severe findings without a reproducing command or self-proving citations degrade to advisory, and only corroborated severe findings may block.
34
37
 
35
38
  ### Portability
36
39
 
@@ -17,6 +17,7 @@ AI coding tools often depend on implicit prompts, fragmented configuration, repe
17
17
  5. Project artifacts are English by default.
18
18
  6. Context is loaded just in time to control token cost.
19
19
  7. Unsafe capabilities require explicit permission.
20
+ 8. Ceremony scales with the consequence of the change — a documentation edit gets zero ceremony; two lines of authentication code get full review.
20
21
 
21
22
  ## Product outcomes
22
23
 
package/docs/quality.md CHANGED
@@ -19,6 +19,16 @@ Red → Green → Refactor → Verify
19
19
 
20
20
  No feature is complete without tests for its happy path, invalid input, conflicts, and safe failure behavior.
21
21
 
22
+ ## Emission is not usability
23
+
24
+ A test that verifies a message was emitted does not verify it is usable. Any user-facing message, gate output, skill instruction, or generated prompt that names an `aiw` command must be covered by a test that executes that command in the state the message describes and asserts it resolves or advances that state. Emission-only assertions are insufficient for messages that name commands.
25
+
26
+ `src/command-evidence.ts` extracts command mentions from shipped artifacts; a ratchet test in `src/command-evidence.test.ts` executes every command named by the generated skills and the READMEs and fails when a named command is not real. Blocking continuations follow the stronger rule from [OPP-004](opportunities/OPP-004-exact-continuation-commands.md): a message may name a command only when running that command resolves the block it was printed for — verified by executing the printed continuation.
27
+
28
+ ## Friction budget
29
+
30
+ `scripts/friction-bench.mjs` drives packaged-CLI journeys (happy paths and adversarial states) and classifies every non-success exit as in-band (the printed continuation, executed, resolves or advances the block), out-of-band (guidance without the typed reason contract), or dead end (the printed continuation fails and names no way out). The budget is **zero dead ends**; CI fails on any. Out-of-band is the honest baseline to shrink over time. Runs are deterministic; the release gate re-verifies the budget and determinism via `scripts/friction-bench.node-test.mjs`.
31
+
22
32
  ## Completion validation
23
33
 
24
34
  A feature is complete only when all affected layers are validated: domain, module integration, CLI or adapter integration, generated artifacts, end-to-end behavior, documentation, traceability, and security. Domain tests alone are insufficient for changes that affect external behavior or generated project state.
@@ -2,6 +2,14 @@
2
2
 
3
3
  AI Workflow releases are reproducible, evidence-backed, and published only from a clean protected branch.
4
4
 
5
+ ## How a release ships
6
+
7
+ 1. A contributor opens a pull request with the changes, the version bump in `package.json`, and the dated `CHANGELOG.md` entry, and requests review.
8
+ 2. A maintainer reviews and merges the pull request into `main`.
9
+ 3. The `Auto-tag releases` workflow notices that the merged version has no `v<version>` tag yet, creates the tag on the merge commit, and the `Release` workflow takes over: it validates the tagged source and publishes with npm trusted publishing and provenance.
10
+
11
+ No manual tagging and no environment approvals: merging an reviewed pull request with a version bump is the entire release action. Merges that do not bump the version are ignored by the auto-tag workflow.
12
+
5
13
  ## Preconditions
6
14
 
7
15
  - The release version follows Semantic Versioning and matches the intended Git tag.
@@ -24,7 +32,7 @@ Install the exact candidate tarball in a new temporary project and exercise at l
24
32
 
25
33
  ## Publication
26
34
 
27
- After human review of the package contents and legal license, create and push a signed version tag. The release workflow validates the exact tagged source and publishes with npm trusted publishing and provenance:
35
+ After human review of the pull request, the auto-tag workflow creates the version tag on the merge commit (the manual equivalent, if ever needed, is `git tag v<version> && git push origin v<version>`). The release workflow validates the exact tagged source and publishes with npm trusted publishing and provenance:
28
36
 
29
37
  ```bash
30
38
  git tag -s v0.1.0 -m "AI Workflow v0.1.0"
@@ -66,3 +66,7 @@ When semantic mapping is enabled and a valid index built with the active model e
66
66
  3. Everything else is excluded, so measured token usage decreases while inferred-fact evidence still points at real scoped files.
67
67
 
68
68
  Without semantic mapping (or when the index is missing, built with another model, or the embedding model is unavailable), the interpreter keeps the previous deterministic alphabetical scoping and scans make no network request for scoping purposes.
69
+
70
+ ## Planned integration (OPP-008)
71
+
72
+ The next planned retrieval consumers follow the same contracts: covering-test detection for `aiw risk assess` (a semantic hit prevents a false `untested_regression` flag; absence fails safe toward `high`) and judge context scoping for the adversarial review skills (bounded retrieved chunks labeled as context aids). Deterministic fallbacks are unchanged; unconfigured behavior is byte-identical. See [OPP-008](opportunities/OPP-008-embedding-covering-tests-judge-context.md).
@@ -83,6 +83,59 @@ Every entry carries `measured` or `estimated`, and aggregates propagate the labe
83
83
 
84
84
  `aiw scan` auto-records sidecar entries for interpreter and embedding usage with their real measurement label, so the ledger fills without manual effort.
85
85
 
86
+ ### Importing harness session logs
87
+
88
+ `aiw usage-sidecar import` turns local harness session logs into measured entries — the same lifecycle coverage as the manual `record`, without friction. Formats were validated against real logs:
89
+
90
+ ```bash
91
+ aiw usage-sidecar import --from=claude-code # ~/.claude/projects/<this-project>
92
+ aiw usage-sidecar import --from=codex # ~/.codex/sessions (sessions scoped by cwd)
93
+ aiw usage-sidecar import --from=gemini # ~/.gemini/antigravity-cli/brain transcripts
94
+ ```
95
+
96
+ - **Claude Code**: per-message usage with all four tiers (including cache), model and CLI version, deduplicated by message id.
97
+ - **Codex**: `token_usage_record` entries; cached input is separated from fresh; sessions are scoped to this project via `session_meta.cwd`.
98
+ - **Gemini**: planner responses with input/cache-read/output. Transcripts do not record a working directory, so Gemini imports cannot be scoped per project (the command says so).
99
+
100
+ Import is idempotent: every event derives a stable identity (`import.<source>.<hash>`) and already-present events are skipped, so reruns never double-count. Entries land with label `measured` and full harness attribution. Cursor and GitHub Copilot remain outside this coverage: they do not expose per-request usage to the user, so for them the estimate stays the ceiling.
101
+
102
+ ## Session heartbeat (cache-TTL management)
103
+
104
+ Provider prompt caches expire on a TTL (typically 5 minutes); the cost lands when a session is resumed after expiry, because the next request rebuilds the whole prefix at full input price. Keeping a cache alive with provider pings has its own economics and AIW is not in the call path — but the gap can be measured for free on every event:
105
+
106
+ ```bash
107
+ aiw hooks install --target=claude-code # wires Stop + UserPromptSubmit to `aiw heartbeat`
108
+ aiw heartbeat --session=<id> # what the hooks call; also accepts hook JSON on stdin
109
+ ```
110
+
111
+ Each beat measures the gap since the previous one and decides:
112
+
113
+ - gap < warn (default 4 min): active session, nothing to do;
114
+ - warn ≤ gap < TTL: the cache is still warm (this request just read it at cache price) — a compact checkpoint is saved now, so an idle past the TTL resumes cheap;
115
+ - gap ≥ TTL: the cache expired and this request paid the rebuild — a compact checkpoint is saved so the _next_ gap hurts an order of magnitude less.
116
+
117
+ No timers and no keep-alive pings: the decision always happens on the next beat, which costs nothing locally. The guarantee is that a session never pays the full-price prefix rebuild twice in a row on the same context. Thresholds are configurable (`--warn=seconds --ttl=seconds`), state lives in `.aiw/heartbeats.yml`, and every action writes an inspectable checkpoint under `.aiw/checkpoints/`. Hook installers are project-scoped, merge without touching foreign hook entries, and are idempotent; Codex (`notify`) and Gemini (`hooks.json`) adapters follow the same command.
118
+
119
+ ## Harness support matrix
120
+
121
+ AI Workflow's core — the SDD workflow, quality and cost gates, token ledger, cost attribution, task-lifecycle usage, and routing — is harness-agnostic and behaves identically everywhere. What varies per harness is the edge: measured log import and live beats. The matrix declares exactly what is and is not available, because silent degradation is worse than an explicit limitation.
122
+
123
+ | Capability | Pi | Claude Code | Codex | Gemini | Cursor | Copilot CLI |
124
+ | ----------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------ | ------------------------------------ | ----------------------------------- | -------------------------- | -------------------------- |
125
+ | Neutral core (gates, ledger, reports, routing) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
126
+ | Manual usage recording (`usage-sidecar record`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
127
+ | Measured log import | ✅ all four tiers + provider per message, project-scoped | ✅ all four tiers + model | ✅ four tiers, project-scoped by cwd | ✅ three tiers, no project scoping | ⚠️ local database, fragile | ❌ estimate is the ceiling |
128
+ | Live beats (heartbeat) | ✅✅ extensions run in-process (event handlers, commands, tools) | ✅ hooks (Stop, UserPromptSubmit, …) | ⚠️ `notify` per turn | ✅ hooks (Pre/PostInvocation, Stop) | ⚠️ limited | ❌ |
129
+ | Multi-provider sessions | ✅ provider recorded per message | — | — | — | — | — |
130
+
131
+ **Recommendation: use [Pi](https://pi.dev) for the best experience.** It is the only harness where every capability is native: per-message usage with all four billing tiers _and_ the provider, sessions grouped by project, compaction recorded with token counts, and an in-process extension API rich enough that AI Workflow can eventually run inside the harness itself. Claude Code is the strongest alternative; Codex and Gemini cover measurement fully with partial beat granularity. Where a capability is missing, AI Workflow degrades honestly: manual recording with `estimated` labels, and explicit errors instead of silent gaps.
132
+
133
+ Notes:
134
+
135
+ - Codex beats fire per turn (`notify`), not per event — enough for gap detection, coarser than Claude Code or Pi.
136
+ - Gemini transcripts do not record a working directory, so their imports cover all sessions on the machine.
137
+ - Cursor and Copilot do not expose per-request usage to the user; for them the estimate stays the ceiling, and every number derived from their sessions carries the `estimated` label.
138
+
86
139
  ## Cost per verified requirement
87
140
 
88
141
  `aiw cost-report` joins the usage sidecar with the traceability graph to produce the outcome-denominated cost metric — tokens per verified requirement, where verified means the graph links the requirement to evidence:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multileaf/ai-workflow",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Portable spec-driven development workflow for AI coding agents",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -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).