ai-engineering-loop 1.15.0 → 1.17.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 (61) hide show
  1. package/.agents/skills/ai-engineering-loop/SKILL.md +1 -1
  2. package/.agents/skills/ai-engineering-loop/references/loop-deliver.md +3 -1
  3. package/.agents/skills/ai-engineering-loop/references/loop-goal.md +1 -0
  4. package/.agents/skills/ai-engineering-loop/references/loop-hosts.md +5 -1
  5. package/.agents/skills/ai-engineering-loop/references/loop-maker.md +7 -1
  6. package/.agents/skills/ai-engineering-loop/references/loop-review.md +2 -0
  7. package/.claude/skills/ai-engineering-loop/SKILL.md +1 -1
  8. package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +3 -1
  9. package/.claude/skills/ai-engineering-loop/references/loop-goal.md +1 -0
  10. package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +5 -1
  11. package/.claude/skills/ai-engineering-loop/references/loop-maker.md +7 -1
  12. package/.claude/skills/ai-engineering-loop/references/loop-review.md +2 -0
  13. package/CHANGELOG.md +68 -0
  14. package/README.md +26 -22
  15. package/adapters/README.md +22 -0
  16. package/adapters/dot/README.md +19 -9
  17. package/adapters/dot/gitlab.md +55 -0
  18. package/adapters/dot/mattermost.md +10 -0
  19. package/adapters/dot/skills/dot-dev-workflow/SKILL.md +27 -5
  20. package/adapters/dot/sonar.md +90 -0
  21. package/adapters/generate-adapter/SKILL.md +6 -5
  22. package/adapters/github/pull-request.md +5 -0
  23. package/adapters/gitlab/merge-request.md +5 -0
  24. package/adapters/{dot → quality}/skills/task-impact-inquiry/SKILL.md +12 -7
  25. package/agents/instruction-only/AGENTS.md +24 -0
  26. package/bin/ai-engineering-loop.js +318 -27
  27. package/core/blast-radius-map.md +37 -0
  28. package/core/grill-policy.md +1 -1
  29. package/core/learnings.md +24 -0
  30. package/core/orchestration-model.md +11 -0
  31. package/core/pr-receipt.md +35 -0
  32. package/core/runtime-safety.md +24 -0
  33. package/lib/adapter-check.js +102 -0
  34. package/lib/adapter-detect.js +125 -0
  35. package/lib/cli-args.js +5 -1
  36. package/lib/doctor.js +14 -4
  37. package/lib/gates.js +67 -1
  38. package/lib/generate-adapter.js +6 -30
  39. package/lib/guard-hooks.js +115 -0
  40. package/lib/guard.js +336 -0
  41. package/lib/host-skill-build.js +10 -0
  42. package/lib/hosts/commands.js +5 -4
  43. package/lib/hosts/doctor.js +4 -3
  44. package/lib/hosts/registry.js +69 -23
  45. package/lib/hosts/table.js +15 -5
  46. package/lib/impact-map.js +501 -0
  47. package/lib/learn.js +303 -0
  48. package/lib/orchestration.js +39 -6
  49. package/lib/receipt.js +362 -0
  50. package/lib/safe-context.js +14 -0
  51. package/lib/smart-context.js +21 -0
  52. package/lib/studio-server.js +1 -0
  53. package/lib/sync-hosts.js +2 -1
  54. package/package.json +1 -1
  55. package/schemas/delivery.schema.json +11 -1
  56. package/schemas/finding-ledger.schema.json +2 -1
  57. package/schemas/goal-contract.schema.json +9 -0
  58. package/schemas/impact-map.schema.json +78 -0
  59. package/schemas/learnings.schema.json +47 -0
  60. package/schemas/receipt.schema.json +102 -0
  61. package/schemas/report.schema.json +52 -5
@@ -52,7 +52,7 @@ Native Subagent Invocation: AVAILABLE
52
52
  Review Method: True Independent Agent
53
53
  ```
54
54
 
55
- When no subagent ran:
55
+ When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
56
56
 
57
57
  ```
58
58
  Execution Mode: CONTEXT_ISOLATION_ONLY
@@ -1,8 +1,10 @@
1
1
  # Stage 8: Delivery
2
2
 
3
3
  - After Judge PASS, run the `after_pass` hook, then the Stage 8 adapter from `.ai-engineering-loop/adapter.md`.
4
+ - Before any push, run `npx ai-engineering-loop doctor`: `✗ adapter-*` (unknown `adapter_type`, missing spec) must be fixed; `! adapter-*` (gh/glab not logged in, configured type differs from the detected one) needs a human look. `deliver` repeats this check: UNATTENDED stops before writing, ASSISTED only warns.
4
5
  - The PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Disclose any `budget record --unavailable`.
5
6
  - Preview remote payloads; never include context packs, usage ledgers, raw logs, or credentials.
6
7
  - ASSISTED: wait for explicit human approval and never infer it. Then one call: `npx ai-engineering-loop deliver --run <runId> --destination <where> --summary <text> --approve --by <name>` (approves READY approval nodes, writes `RUN_DIR/delivery.json` with `humanApproved: true`, runs `gate delivery`). Without `--approve` it refuses in ASSISTED.
7
8
  - Long form: `node status --run <runId>`, `node approve delivery-approval --yes --by <name> --run <runId>` for each READY approval node, write `RUN_DIR/delivery.json`, then `gate delivery`. If the gate says a node is not READY, follow its prerequisite hint; never bypass approval.
8
- - Only the delivery gate completes the run.
9
+ - Commit before `deliver` (its receipt binds `HEAD`; screenshots: `--evidence AC-N=<https-url>`). Paste `RUN_DIR/receipt.md` into the PR/MR Receipt section unchanged; ❌ stays ❌ (`docs pr-receipt`).
10
+ - Only the delivery gate completes the run. Then run `learn` so the next Run's packs carry its lessons.
@@ -6,5 +6,6 @@
6
6
  - AC is a failure table: each row has a statement, required evidence, and failure cases. Do not freeze sunny-path-only. T0 may use 1-3 rows that still list failure cases.
7
7
  - Emit `npx ai-engineering-loop activity goal-drafting --run <runId> --message <summary>`, write the contract JSON to a repository-local temporary file, then `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` so Studio shows the exact draft.
8
8
  - Wait for the explicit human freeze, then `npx ai-engineering-loop goal freeze --latest --run <runId> --by human` (or `--revision <r> --hash <h>`). T0 may write `RUN_DIR/goal-contract.json` and run `gate goal` directly.
9
+ - The freeze writes a DRAFT blast-radius map: `impact show --run <runId>`. ASSISTED: the human confirms or edits it (`impact confirm --by <name> [--allow <glob>] [--remove <path>]`); copy/CSS/comment-only goals: `impact skip --by <name> --reason <text>` (`docs blast-radius-map`).
9
10
  - Do not edit production code until the Goal gate passes.
10
11
  - After the freeze, work from the frozen contract (`goal show --run <runId>`), not the drafting chat; compact the conversation there if the host supports it.
@@ -1,6 +1,10 @@
1
1
  # Host rules: subagent tools per host
2
2
 
3
- Read only your host's section, before the first Devil's Advocate (DA) or Judge spawn. Every host shares the loop, budgets, and gates; only the spawn mechanics differ. Modes: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
3
+ Read only your host's section, before the first Devil's Advocate (DA) or Judge spawn. Every host shares the loop, budgets, and gates; only the spawn mechanics differ. REPORT_ONLY (`audit`) uses the same spawn tool for one `devil-advocate` report review (`loop-maker`); never report CONTEXT_ISOLATION_ONLY next to an AVAILABLE subagent tool without a reason. Modes: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
4
+
5
+ ## Certification tiers
6
+
7
+ `hosts list` and `hosts doctor` show each host's tier (`lib/hosts/registry.js`). **full**: a real `default` recipe run with reviewer subagents and every gate is recorded (`certifiedBy`: recipe, AEL version, date). **experimental**: reviewer subagents install, no recorded run; follow your section below and report the mode you actually got. **instruction-only**: no subagents; run DA and Judge in-session as `CONTEXT_ISOLATION_ONLY`. The compact rules for these hosts: `npx ai-engineering-loop docs AGENTS` (≤2 KB). No host is `full` until such a run is recorded.
4
8
 
5
9
  ## Claude Code (and Kiro-backed strict proxies)
6
10
 
@@ -1,8 +1,14 @@
1
1
  # Stages 2-4: Maker
2
2
 
3
3
  - T1/T2: read `docs tdd-policy` before Maker. Use `npx ai-engineering-loop context query <term>` and `context related <file>` before opening broad source files.
4
- - Branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json` with summary and recommendations, run `gate report`, and stop. ASSISTED: the parent (or intern) is Maker; delivery later needs human approval. UNATTENDED: `sandbox create --run <runId>`, Maker works only in the returned worktreePath, never the parent checkout, then `sandbox capture --run <runId>`.
4
+ - Branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json` with summary and recommendations, then the report review below, run `gate report`, and stop. ASSISTED: the parent (or intern) is Maker; delivery later needs human approval. UNATTENDED: `sandbox create --run <runId>`, Maker works only in the returned worktreePath, never the parent checkout, then `sandbox capture --run <runId>`.
5
5
  - Maker intern: read `maker_intern` from workflow.md (missing or `none` = parent is Maker). Confirm it through the host model catalog; otherwise the parent is Maker and you report INVOCATION_UNAVAILABLE. The intern cannot skip later gates or spawn DA/Judge.
6
+ - Guardrails: Claude Code enforces them after `hooks install`. Elsewhere, before an out-of-scope edit or a destructive command (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`, `git clean -fd`) run `guard check --tool edit --path <file>` or `--tool bash --command "<cmd>"`: `warn` = ask the human, `block` = do not run it.
6
7
  - Bugs: red repro first. Features: one red test per AC row, then green.
7
8
  - After package and manifest edits are stable, run `npx ai-engineering-loop refresh` once (drift during red-green is expected; do not refresh per test cycle).
8
9
  - ASSISTED: `npx ai-engineering-loop gate maker --from-git` writes the exact working-tree diff (tracked and new files, excluding `.ai-engineering-loop/`) to `RUN_DIR/diff.patch` and gates it; or write that file yourself and run `gate maker`. UNATTENDED: `sandbox capture` writes it, then `gate maker`. The gate can raise the tier from the diff.
10
+
11
+ ## REPORT_ONLY report review (recipe `audit`)
12
+
13
+ - Host has a subagent tool (`loop-hosts`): spawn ONE fresh `devil-advocate` sibling with report.json and the evidence paths it cites; it challenges unsupported or wrong findings with the usual DA budget. No Judge, no iteration loop: fold accepted findings once, drop rejected ones with evidence. Record `"review": {"executionMode": "TRUE_INDEPENDENT_AGENT", "nativeSubagent": "AVAILABLE", "reviewer": "devil-advocate", "childId": "<its own id>"}`.
14
+ - No subagent tool, or the spawn failed: do the same challenge in this session and record `"executionMode": "CONTEXT_ISOLATION_ONLY"` with `"reason"` (required by `gate report` when `nativeSubagent` is `AVAILABLE`). The header shows `Execution Mode: CONTEXT_ISOLATION_ONLY (reason: <why>)`.
@@ -1,5 +1,7 @@
1
1
  # Stages 6-7: Devil's Advocate and Judge
2
2
 
3
+ REPORT_ONLY runs skip these stages; their single report review is in `loop-maker`.
4
+
3
5
  ## Devil's Advocate (T1, T2)
4
6
 
5
7
  - `npx ai-engineering-loop review-pack --run <runId> --json` returns the DA pack path, fast-path, escalation floor, and tier. Keep the lean path when eligible; add `context devil-advocate <files...>` only for files whose hunks are insufficient. The DA reads that pack or `RUN_DIR/diff.patch` (do not also write `tasks/current.diff`).
@@ -52,7 +52,7 @@ Native Subagent Invocation: AVAILABLE
52
52
  Review Method: True Independent Agent
53
53
  ```
54
54
 
55
- When no subagent ran:
55
+ When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
56
56
 
57
57
  ```
58
58
  Execution Mode: CONTEXT_ISOLATION_ONLY
@@ -1,8 +1,10 @@
1
1
  # Stage 8: Delivery
2
2
 
3
3
  - After Judge PASS, run the `after_pass` hook, then the Stage 8 adapter from `.ai-engineering-loop/adapter.md`.
4
+ - Before any push, run `npx ai-engineering-loop doctor`: `✗ adapter-*` (unknown `adapter_type`, missing spec) must be fixed; `! adapter-*` (gh/glab not logged in, configured type differs from the detected one) needs a human look. `deliver` repeats this check: UNATTENDED stops before writing, ASSISTED only warns.
4
5
  - The PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Disclose any `budget record --unavailable`.
5
6
  - Preview remote payloads; never include context packs, usage ledgers, raw logs, or credentials.
6
7
  - ASSISTED: wait for explicit human approval and never infer it. Then one call: `npx ai-engineering-loop deliver --run <runId> --destination <where> --summary <text> --approve --by <name>` (approves READY approval nodes, writes `RUN_DIR/delivery.json` with `humanApproved: true`, runs `gate delivery`). Without `--approve` it refuses in ASSISTED.
7
8
  - Long form: `node status --run <runId>`, `node approve delivery-approval --yes --by <name> --run <runId>` for each READY approval node, write `RUN_DIR/delivery.json`, then `gate delivery`. If the gate says a node is not READY, follow its prerequisite hint; never bypass approval.
8
- - Only the delivery gate completes the run.
9
+ - Commit before `deliver` (its receipt binds `HEAD`; screenshots: `--evidence AC-N=<https-url>`). Paste `RUN_DIR/receipt.md` into the PR/MR Receipt section unchanged; ❌ stays ❌ (`docs pr-receipt`).
10
+ - Only the delivery gate completes the run. Then run `learn` so the next Run's packs carry its lessons.
@@ -6,5 +6,6 @@
6
6
  - AC is a failure table: each row has a statement, required evidence, and failure cases. Do not freeze sunny-path-only. T0 may use 1-3 rows that still list failure cases.
7
7
  - Emit `npx ai-engineering-loop activity goal-drafting --run <runId> --message <summary>`, write the contract JSON to a repository-local temporary file, then `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` so Studio shows the exact draft.
8
8
  - Wait for the explicit human freeze, then `npx ai-engineering-loop goal freeze --latest --run <runId> --by human` (or `--revision <r> --hash <h>`). T0 may write `RUN_DIR/goal-contract.json` and run `gate goal` directly.
9
+ - The freeze writes a DRAFT blast-radius map: `impact show --run <runId>`. ASSISTED: the human confirms or edits it (`impact confirm --by <name> [--allow <glob>] [--remove <path>]`); copy/CSS/comment-only goals: `impact skip --by <name> --reason <text>` (`docs blast-radius-map`).
9
10
  - Do not edit production code until the Goal gate passes.
10
11
  - After the freeze, work from the frozen contract (`goal show --run <runId>`), not the drafting chat; compact the conversation there if the host supports it.
@@ -1,6 +1,10 @@
1
1
  # Host rules: subagent tools per host
2
2
 
3
- Read only your host's section, before the first Devil's Advocate (DA) or Judge spawn. Every host shares the loop, budgets, and gates; only the spawn mechanics differ. Modes: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
3
+ Read only your host's section, before the first Devil's Advocate (DA) or Judge spawn. Every host shares the loop, budgets, and gates; only the spawn mechanics differ. REPORT_ONLY (`audit`) uses the same spawn tool for one `devil-advocate` report review (`loop-maker`); never report CONTEXT_ISOLATION_ONLY next to an AVAILABLE subagent tool without a reason. Modes: `TRUE_INDEPENDENT_AGENT`, `ISOLATED_AGENT_INSTANCE`, `FRESH_PROCESS_AGENT`, `CONTEXT_ISOLATION_ONLY`, `UNAVAILABLE`.
4
+
5
+ ## Certification tiers
6
+
7
+ `hosts list` and `hosts doctor` show each host's tier (`lib/hosts/registry.js`). **full**: a real `default` recipe run with reviewer subagents and every gate is recorded (`certifiedBy`: recipe, AEL version, date). **experimental**: reviewer subagents install, no recorded run; follow your section below and report the mode you actually got. **instruction-only**: no subagents; run DA and Judge in-session as `CONTEXT_ISOLATION_ONLY`. The compact rules for these hosts: `npx ai-engineering-loop docs AGENTS` (≤2 KB). No host is `full` until such a run is recorded.
4
8
 
5
9
  ## Claude Code (and Kiro-backed strict proxies)
6
10
 
@@ -1,8 +1,14 @@
1
1
  # Stages 2-4: Maker
2
2
 
3
3
  - T1/T2: read `docs tdd-policy` before Maker. Use `npx ai-engineering-loop context query <term>` and `context related <file>` before opening broad source files.
4
- - Branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json` with summary and recommendations, run `gate report`, and stop. ASSISTED: the parent (or intern) is Maker; delivery later needs human approval. UNATTENDED: `sandbox create --run <runId>`, Maker works only in the returned worktreePath, never the parent checkout, then `sandbox capture --run <runId>`.
4
+ - Branch on mode. REPORT_ONLY: never edit repository files; write `RUN_DIR/report.json` with summary and recommendations, then the report review below, run `gate report`, and stop. ASSISTED: the parent (or intern) is Maker; delivery later needs human approval. UNATTENDED: `sandbox create --run <runId>`, Maker works only in the returned worktreePath, never the parent checkout, then `sandbox capture --run <runId>`.
5
5
  - Maker intern: read `maker_intern` from workflow.md (missing or `none` = parent is Maker). Confirm it through the host model catalog; otherwise the parent is Maker and you report INVOCATION_UNAVAILABLE. The intern cannot skip later gates or spawn DA/Judge.
6
+ - Guardrails: Claude Code enforces them after `hooks install`. Elsewhere, before an out-of-scope edit or a destructive command (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`, `git clean -fd`) run `guard check --tool edit --path <file>` or `--tool bash --command "<cmd>"`: `warn` = ask the human, `block` = do not run it.
6
7
  - Bugs: red repro first. Features: one red test per AC row, then green.
7
8
  - After package and manifest edits are stable, run `npx ai-engineering-loop refresh` once (drift during red-green is expected; do not refresh per test cycle).
8
9
  - ASSISTED: `npx ai-engineering-loop gate maker --from-git` writes the exact working-tree diff (tracked and new files, excluding `.ai-engineering-loop/`) to `RUN_DIR/diff.patch` and gates it; or write that file yourself and run `gate maker`. UNATTENDED: `sandbox capture` writes it, then `gate maker`. The gate can raise the tier from the diff.
10
+
11
+ ## REPORT_ONLY report review (recipe `audit`)
12
+
13
+ - Host has a subagent tool (`loop-hosts`): spawn ONE fresh `devil-advocate` sibling with report.json and the evidence paths it cites; it challenges unsupported or wrong findings with the usual DA budget. No Judge, no iteration loop: fold accepted findings once, drop rejected ones with evidence. Record `"review": {"executionMode": "TRUE_INDEPENDENT_AGENT", "nativeSubagent": "AVAILABLE", "reviewer": "devil-advocate", "childId": "<its own id>"}`.
14
+ - No subagent tool, or the spawn failed: do the same challenge in this session and record `"executionMode": "CONTEXT_ISOLATION_ONLY"` with `"reason"` (required by `gate report` when `nativeSubagent` is `AVAILABLE`). The header shows `Execution Mode: CONTEXT_ISOLATION_ONLY (reason: <why>)`.
@@ -1,5 +1,7 @@
1
1
  # Stages 6-7: Devil's Advocate and Judge
2
2
 
3
+ REPORT_ONLY runs skip these stages; their single report review is in `loop-maker`.
4
+
3
5
  ## Devil's Advocate (T1, T2)
4
6
 
5
7
  - `npx ai-engineering-loop review-pack --run <runId> --json` returns the DA pack path, fast-path, escalation floor, and tier. Keep the lean path when eligible; add `context devil-advocate <files...>` only for files whose hunks are insufficient. The DA reads that pack or `RUN_DIR/diff.patch` (do not also write `tasks/current.diff`).
package/CHANGELOG.md CHANGED
@@ -6,6 +6,74 @@ All notable changes to this project are documented here. Versions follow [Semant
6
6
 
7
7
  _No changes yet._
8
8
 
9
+ ## 1.17.0 - 2026-10-17
10
+
11
+ ### `ael learn`: past Runs become project learnings for context packs (#61)
12
+
13
+ - **Added:** `learn [--dry-run] [--prune] [--max-age-runs <n>]` (`lib/learn.js`, `schemas/learnings.schema.json`). It reads every Run's `findings.json`, keeps only VALID findings that were not rejected (drift findings from #71 are skipped), clusters them per axis by word overlap, and writes deterministic, deduped `.ai-engineering-loop/learnings.json` and `learnings.md` with occurrence counts and source `runIds`. Text is redacted with the `safe-context` secret and home-path filters.
14
+ - **Added:** `--prune` suppresses lessons whose files are gone or that have not recurred in the newest N Runs (default 20); an entry with `supersededBy` is suppressed on the next run. A suppressed lesson returns only when it recurs in a newer Run.
15
+ - **Added:** Maker and Devil's Advocate context packs (`context maker|devil-advocate`, `review-pack`) include up to 5 relevant `learnings` within 10% of the stage token budget, counted in `estimatedTokens`; Judge packs get none.
16
+ - **Docs:** `core/learnings.md` (`docs learnings`); the Stage 8 reference runs `learn` after delivery.
17
+
18
+ ### Proof-carrying PR receipt: `receipt.json` and `verify-receipt` (#70)
19
+
20
+ - **Added:** `schemas/receipt.schema.json` and `lib/receipt.js`. `deliver` (incl. `--approve`) writes `RUN_DIR/receipt.json` and `receipt.md` as its last step: the frozen Goal with its hashes, every AC with its evidence (claimed-vs-reality row, verification commands with output sha256, hosted links), the finding-ledger summary and Judge verdict, impact drift and guard counts, base/head SHA, the sha256 of every referenced artifact, and an overall digest. An AC without evidence is an explicit ❌ (`MISSING`), never dropped.
21
+ - **Added:** `deliver --host <id> --model <id> --head <sha> --evidence AC-N=<https-url>`. Evidence links must be `http(s)` without credentials; the receipt carries no secrets or local absolute paths.
22
+ - **Changed:** `delivery.json` stores `receipt: { path, digest }` (`schemas/delivery.schema.json`).
23
+ - **Added:** `verify-receipt [--run <id> | <receipt.json>] [--head <sha>]` re-hashes the artifacts and Goal, checks every AC has evidence, the verdict is PASS with no blocking finding, and the head SHA matches; exit 1 on any mismatch.
24
+ - **Changed:** the GitHub, GitLab and DOT MR templates have a Receipt section; the Stage 8 reference says to paste `receipt.md` unchanged. Spec: `core/pr-receipt.md` (`docs pr-receipt`).
25
+
26
+ ### Hook-enforced runtime guardrails: scope freeze and destructive commands (#59)
27
+
28
+ - **Added:** optional `scope: { allowedPaths, deniedPaths }` (repository-relative globs) in the Goal contract, frozen with the Goal and validated by the Goal gate. Absent = no path enforcement.
29
+ - **Added:** `guard check --tool edit|bash` returns `allow | warn | block` with rule ids and reasons. Edits are checked against the Goal scope plus the confirmed impact map (#71) and `deniedPaths`; Bash is checked for `rm -rf`, `DROP TABLE`/`TRUNCATE`, `git push --force`, `git reset --hard` and `git clean -fd`. ASSISTED warns, UNATTENDED and REPORT_ONLY block (exit 2). Every warn/block is written to `RUN_DIR/guard-events.json`, and `gate` prints the counts (`guard` in `--json`).
30
+ - **Added:** `hooks install | uninstall | status` writes an idempotent Claude Code `PreToolUse` hook to the project's `.claude/settings.json` (`guard check --hook claude` answers `deny` / `ask`). Other hooks in the file are kept.
31
+ - **Added:** the host registry marks guardrails as **enforced** (native hooks: Claude Code) or **advisory**; shown in `hosts list`, `hosts doctor` and the README host table.
32
+ - **Docs:** `core/runtime-safety.md` "Runtime guardrails"; the Maker reference tells advisory hosts to call `guard check` themselves.
33
+
34
+ ### Blast-radius impact map before Stage 3 (#71)
35
+
36
+ - **Added:** `schemas/impact-map.schema.json` and `lib/impact-map.js`. Freezing the Goal (`goal freeze` or `gate goal`) writes a DRAFT `RUN_DIR/impact-map.json` listing files, modules, endpoints, DB tables/migrations and tests, each with a confidence and a reason. It is a deterministic scan of the repository index against keywords from the frozen Goal (English and Indonesian filler words dropped), so it works on every adapter. `gate maker` writes it too if it is still missing.
37
+ - **Added:** `impact map | show | confirm | skip | drift`. `confirm --by <name>` (with optional `--allow <glob>` / `--remove <path>`) locks the map and writes `scope.allowedPaths`, the Run's allowed scope. `skip --reason <text>` records why a trivial goal (copy, CSS, comments) has no map.
38
+ - **Added:** after the verification gate the CLI writes `impact-drift.json` (changed files vs the map). `verify` and `review-pack` print out-of-map files, the diff-hunk pack carries `impactDrift`, and the review gate adds one `LOW` finding per out-of-map file to `findings.json` (`source: "impact-map"`). Drift warns; it does not block.
39
+ - **Docs:** `core/blast-radius-map.md` (`docs blast-radius-map`); the Stage 1 reference and `task-impact-inquiry` point at the map.
40
+
41
+ ## 1.16.0 - 2026-10-16
42
+
43
+ ### Host certification tiers and an instruction-only `AGENTS.md` digest (#60)
44
+
45
+ - **Changed (breaking):** the numeric `tier` in `lib/hosts/registry.js` is replaced by `certification: full | experimental | instruction-only` plus `certifiedBy`. **full** requires a recorded real `default` recipe run with reviewer subagents and every gate (`certifiedBy: { recipe, aelVersion, date }`), and the registry test enforces it. No run is recorded yet, so no host is `full`. The 14 hosts with file-based reviewer agents are `experimental`, and the 6 without (Windsurf/Devin, Amp, Zed, Goose, Cline, Roo) are `instruction-only`. `hosts list --json` returns `certification` instead of `tier`.
46
+ - **Added:** the README host table, `hosts list` and `hosts doctor` show the tier.
47
+ - **Added:** a compact digest for instruction-only hosts, generated from `skill-src/ai-engineering-loop/digest.md` to `agents/instruction-only/AGENTS.md` (at most 2 KB; the build fails above that, and `check:skills` catches drift). Read it with `npx ai-engineering-loop docs AGENTS`. Documented in `references/loop-hosts.md`.
48
+
49
+ ### DOT Stage 8: Sonar quality gate and "Ready to review" card move (#65)
50
+
51
+ - **Added:** `adapters/dot/sonar.md`. After the MR, wait for the pipeline and read the Sonar quality gate from the pipeline's Sonar job or the Sonar MR comment (`glab` only, no tokens). It prints a `Sonar Gate` report. `FAIL` loops back to a fix on the same MR. A project without Sonar is `SKIPPED`, never PASS.
52
+ - **Added:** `adapters/dot/gitlab.md` Step 4 moves the issue card to the "Ready to review" board list after a Sonar PASS/SKIPPED gate and the printed Coreview triage. It only swaps board-list labels, is idempotent, and skips cleanly when no card or list exists (`board_ready_label` in `adapter.md` overrides the label).
53
+ - **Changed:** DOT Stage 8 order is now issue → MR → pipeline + Sonar gate → Coreview triage → card to "Ready to review" → Mattermost (`adapters/dot/README.md`, `mattermost.md` preconditions, `dot-dev-workflow` Stages 8a–8e). A Sonar `FAIL` blocks both the card move and the notification.
54
+
55
+ ### `task-impact-inquiry` is adapter-neutral (#64)
56
+
57
+ - **Changed:** the skill moved from `adapters/dot/skills/` to `adapters/quality/skills/task-impact-inquiry/` (still installed by default, not part of the opt-in `quality` pack). Its triggers are now English plus Indonesian, and the DOT-only process references (`dot-dev-workflow`, BullMQ) were replaced with neutral wording. `sync-hosts` installs global skill folders that every project shares, so gating on one project's `adapter_type` could not be correct; neutral content was the safe option. On `adapter_type: dot` the blast-radius grill stays mandatory (`core/grill-policy.md`, `adapters/dot/README.md`).
58
+
59
+ ### Adapter checks in `doctor` and a `deliver` preflight (#63)
60
+
61
+ - **Added:** `doctor` run inside an initialized project now checks the adapter: unknown `adapter_type` (error, with a "did you mean" suggestion), a missing spec (error), `gh`/`glab` missing or not logged in for the chosen type (warning; `dot` checks the DOT host), a missing `adapter.md` (warning), and a configured type that differs from the shared detector (warning). Warnings print with `!` and do not make doctor fail. Doctor on the package itself is unchanged.
62
+ - **Added:** `deliver` runs the same checks before it approves or writes anything. UNATTENDED fails with `ADAPTER_PREFLIGHT_FAILED` on any problem except the detector mismatch; ASSISTED prints warnings and continues.
63
+
64
+ ### One adapter detector for `init`, `generate-adapter` and Studio (#62)
65
+
66
+ - **Fixed:** `generate-adapter` and Studio recommended `gitlab` for a DOT GitLab remote while `init` chose `dot`, so accepting their recommendation silently dropped the DOT pipeline. All three now call `lib/adapter-detect.js` and agree.
67
+ - **Changed:** the remote host now wins over CI files. A GitHub remote without `.github/workflows/` is `github` (was `standard`); CI files only decide when the remote host is unknown or missing.
68
+ - **Changed:** the `origin` remote is read (fallback: the first remote) instead of the first `url =` line in `.git/config`, so submodule URLs and `upstream` no longer win. Linked worktrees (`.git` is a file) are detected.
69
+ - **Added:** `generate-adapter` prints the reason next to `recommended:`, Studio's bootstrap returns `adapters.reason`, and `init` records it in the context evidence.
70
+
71
+ ### Audit / REPORT_ONLY review policy and a non-contradictory header (#57)
72
+
73
+ - **Fixed:** the execution header could say `Execution Mode: CONTEXT_ISOLATION_ONLY` next to `Native Subagent Invocation: AVAILABLE` with no explanation, for example on recipe `audit` runs in Antigravity. Now the mode line carries the reason: `CONTEXT_ISOLATION_ONLY (reason: <why>)`. The independent and no-subagent headers are unchanged.
74
+ - **Changed:** recipe `audit` (REPORT_ONLY) used to skip review entirely, because only Maker runs reach DA and Judge. When the host can invoke a subagent, one fresh `devil-advocate` sibling now challenges `report.json` before `gate report` (no Judge, no iteration loop). Otherwise the same check runs in-session with a reason. The policy is documented in `references/loop-maker.md`, `loop-hosts.md`, `loop-review.md`, and `core/orchestration-model.md`.
75
+ - **Added:** an optional `review` block in `report.json`. `gate report` validates it: an independent mode needs `reviewer: devil-advocate` plus the reviewer's own `childId`, and `CONTEXT_ISOLATION_ONLY` with `nativeSubagent: AVAILABLE` needs `reason`. Reports without the block stay valid.
76
+
9
77
  ## 1.15.0 - 2026-10-11
10
78
 
11
79
  ### Multi-agent hosts: `setup` suggests `auto` detection mode (#54 decision 4)
package/README.md CHANGED
@@ -167,28 +167,32 @@ Under the hood, these moments use eight evidence-backed stages. The rigor is the
167
167
  AI Engineering Loop is designed to work with the tools developers already use:
168
168
 
169
169
  <!-- hosts-table:start (generated from lib/hosts/registry.js; run npm run build:hosts-table) -->
170
- | Host | id | Skill folder | Reviewer agents | Detected by |
171
- |---|---|---|---|---|
172
- | Claude Code | `claude` | `~/.claude/skills` | `~/.claude/agents` | `~/.claude`, `claude` |
173
- | Codex CLI | `codex` | `~/.agents/skills` (shared) | `~/.codex/agents` | `~/.codex`, `codex` |
174
- | Gemini CLI | `gemini` | `~/.agents/skills` (shared) | `~/.gemini/agents` | `~/.gemini`, `gemini` |
175
- | Antigravity (IDE / 2.0) | `antigravity` | `~/.gemini/config/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity`, `antigravity` |
176
- | Antigravity CLI (agy) | `antigravity-cli` | `~/.gemini/antigravity-cli/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity-cli`, `agy` |
177
- | Grok CLI | `grok` | `~/.agents/skills` (shared) | `~/.grok/agents` | `~/.grok`, `grok` |
178
- | Cursor (editor + CLI) | `cursor` | `~/.agents/skills` (shared) | `~/.cursor/agents` | `~/.cursor`, `cursor-agent`, `cursor` |
179
- | GitHub Copilot (CLI / VS Code) | `copilot` | `~/.agents/skills` (shared) | `~/.copilot/agents` | `~/.copilot`, `copilot` |
180
- | OpenCode | `opencode` | `~/.agents/skills` (shared) | `~/.config/opencode/agents` | `~/.config/opencode`, `opencode` |
181
- | Windsurf / Devin Desktop | `windsurf` | `~/.agents/skills` (shared) | none (in-session review) | `~/.codeium/windsurf`, `~/.config/devin` |
182
- | Amp | `amp` | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/amp`, `amp` |
183
- | Factory Droid | `factory` | `~/.agents/skills` (shared) | `~/.factory/droids` | `~/.factory`, `droid` |
184
- | Augment (Auggie) | `augment` | `~/.agents/skills` (shared) | `~/.augment/agents` | `~/.augment`, `auggie` |
185
- | Zed | `zed` | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/zed`, `~/Library/Application Support/Zed`, `zed` |
186
- | Goose | `goose` | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/goose`, `goose` |
187
- | Cline | `cline` | `~/.cline/skills` | none (in-session review) | `~/.cline`, `cline` |
188
- | Roo Code | `roo` | `~/.agents/skills` (shared) | none (in-session review) | `~/.roo` |
189
- | Kiro (IDE + CLI) | `kiro` | `~/.kiro/skills` | `~/.kiro/agents` | `~/.kiro`, `kiro-cli`, `kiro` |
190
- | Qwen Code | `qwen` | `~/.qwen/skills` | `~/.qwen/agents` | `~/.qwen`, `qwen` |
191
- | JetBrains Junie | `junie` | `~/.agents/skills` (shared) | `~/.junie/agents` | `~/.junie`, `junie` |
170
+ | Host | id | Certification | Guardrails | Skill folder | Reviewer agents | Detected by |
171
+ |---|---|---|---|---|---|---|
172
+ | Claude Code | `claude` | experimental | enforced | `~/.claude/skills` | `~/.claude/agents` | `~/.claude`, `claude` |
173
+ | Codex CLI | `codex` | experimental | advisory | `~/.agents/skills` (shared) | `~/.codex/agents` | `~/.codex`, `codex` |
174
+ | Gemini CLI | `gemini` | experimental | advisory | `~/.agents/skills` (shared) | `~/.gemini/agents` | `~/.gemini`, `gemini` |
175
+ | Antigravity (IDE / 2.0) | `antigravity` | experimental | advisory | `~/.gemini/config/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity`, `antigravity` |
176
+ | Antigravity CLI (agy) | `antigravity-cli` | experimental | advisory | `~/.gemini/antigravity-cli/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity-cli`, `agy` |
177
+ | Grok CLI | `grok` | experimental | advisory | `~/.agents/skills` (shared) | `~/.grok/agents` | `~/.grok`, `grok` |
178
+ | Cursor (editor + CLI) | `cursor` | experimental | advisory | `~/.agents/skills` (shared) | `~/.cursor/agents` | `~/.cursor`, `cursor-agent`, `cursor` |
179
+ | GitHub Copilot (CLI / VS Code) | `copilot` | experimental | advisory | `~/.agents/skills` (shared) | `~/.copilot/agents` | `~/.copilot`, `copilot` |
180
+ | OpenCode | `opencode` | experimental | advisory | `~/.agents/skills` (shared) | `~/.config/opencode/agents` | `~/.config/opencode`, `opencode` |
181
+ | Windsurf / Devin Desktop | `windsurf` | instruction-only | advisory | `~/.agents/skills` (shared) | none (in-session review) | `~/.codeium/windsurf`, `~/.config/devin` |
182
+ | Amp | `amp` | instruction-only | advisory | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/amp`, `amp` |
183
+ | Factory Droid | `factory` | experimental | advisory | `~/.agents/skills` (shared) | `~/.factory/droids` | `~/.factory`, `droid` |
184
+ | Augment (Auggie) | `augment` | experimental | advisory | `~/.agents/skills` (shared) | `~/.augment/agents` | `~/.augment`, `auggie` |
185
+ | Zed | `zed` | instruction-only | advisory | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/zed`, `~/Library/Application Support/Zed`, `zed` |
186
+ | Goose | `goose` | instruction-only | advisory | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/goose`, `goose` |
187
+ | Cline | `cline` | instruction-only | advisory | `~/.cline/skills` | none (in-session review) | `~/.cline`, `cline` |
188
+ | Roo Code | `roo` | instruction-only | advisory | `~/.agents/skills` (shared) | none (in-session review) | `~/.roo` |
189
+ | Kiro (IDE + CLI) | `kiro` | experimental | advisory | `~/.kiro/skills` | `~/.kiro/agents` | `~/.kiro`, `kiro-cli`, `kiro` |
190
+ | Qwen Code | `qwen` | experimental | advisory | `~/.qwen/skills` | `~/.qwen/agents` | `~/.qwen`, `qwen` |
191
+ | JetBrains Junie | `junie` | experimental | advisory | `~/.agents/skills` (shared) | `~/.junie/agents` | `~/.junie`, `junie` |
192
+
193
+ Certification: **full** = a real `default` recipe run with reviewer subagents and every gate is recorded for this host; **experimental** = reviewer subagents install, no recorded run; **instruction-only** = no subagents, review runs in-session (`CONTEXT_ISOLATION_ONLY`; compact digest: `npx ai-engineering-loop docs AGENTS`).
194
+
195
+ Guardrails: **enforced** = `npx ai-engineering-loop hooks install` adds native pre-tool hooks that check scope and destructive commands; **advisory** = the host has no hook API, so the guardrail is the loop instructions only.
192
196
 
193
197
  Not supported (no native skills): Aider, Continue.
194
198
  <!-- hosts-table:end -->
@@ -13,6 +13,28 @@ An adapter is not a second engineering OS. It runs **after Judge `PASS`**. It mu
13
13
  | **`gitlab`** | GitLab.com or self-hosted GitLab (not DOT) | [`gitlab/`](gitlab/) |
14
14
  | **`dot`** | DOT delivery (GitLab + multi-branch + Coreview + Mattermost) | [`dot/`](dot/) |
15
15
 
16
+ `init`, `generate-adapter` and Studio share one detector (`lib/adapter-detect.js`):
17
+
18
+ 1. The `origin` remote host (or the first remote; worktrees work): the DOT GitLab host → `dot`, `github.com` → `github`, other GitLab hosts → `gitlab`.
19
+ 2. If the remote says nothing: `.github/workflows/` → `github`, `.gitlab-ci.yml` → `gitlab`.
20
+ 3. Otherwise `standard`.
21
+
22
+ Each prints the reason it chose a type.
23
+
24
+ ## Check
25
+
26
+ `npx ai-engineering-loop doctor` in a project checks the adapter:
27
+
28
+ | Check | Level | Meaning |
29
+ |---|---|---|
30
+ | `adapter-type` | error | `adapter_type` is not `standard`, `github`, `gitlab`, `dot` or `custom` (suggests the nearest) |
31
+ | `adapter-spec` | error | `adapters/<type>/README.md` (or `.ai-engineering-loop/adapter/delivery.md` for `custom`) is missing |
32
+ | `adapter-auth` | warn | `github` needs `gh auth status`; `gitlab` needs `glab auth status`; `dot` needs `glab auth status --hostname <DOT host>` |
33
+ | `adapter-detected` | warn | configured type differs from the detector |
34
+ | `adapter-config` | warn | no `.ai-engineering-loop/adapter.md` |
35
+
36
+ `deliver` runs the same checks first. UNATTENDED stops on any of them except `adapter-detected`, before writing anything. ASSISTED prints them and continues.
37
+
16
38
  Pick one with `npx ai-engineering-loop generate-adapter`. The agent **asks** (grill). Do not copy a neighbour's adapter.
17
39
 
18
40
  Custom tools (Linear, Slack, Bitbucket): still start from `standard`, then name those tools in `.ai-engineering-loop/adapter.md`. Do not put secrets in the file.
@@ -16,18 +16,24 @@ flowchart TD
16
16
  PASS --> Issue[1. GitLab Issue Card via glab]
17
17
  Issue --> BaseMR[2. One Merge Request via glab]
18
18
  BaseMR --> AskPropagate{User named extra envs this turn?}
19
- AskPropagate -->|No| CoreviewTriage[3. External @coreview-bot Review Triage]
19
+ AskPropagate -->|No| Gate[3. Pipeline + Sonar quality gate]
20
20
  AskPropagate -->|Yes| MultiBranch[Optional cherry-pick staging / develop]
21
- MultiBranch --> CoreviewTriage
22
- CoreviewTriage --> MattermostDispatch[4. Mattermost Markdown Notification via MCP]
21
+ MultiBranch --> Gate
22
+ Gate -->|FAIL| Fix[Fix on the same MR, push]
23
+ Fix --> Gate
24
+ Gate -->|PASS or SKIPPED| CoreviewTriage[4. External @coreview-bot Review Triage]
25
+ CoreviewTriage --> Ready[5. Move card to Ready to review]
26
+ Ready --> MattermostDispatch[6. Mattermost Markdown Notification via MCP]
23
27
  end
24
28
  ```
25
29
 
30
+ **Stage 8 order:** issue → MR → pipeline + Sonar gate → Coreview triage → card to "Ready to review" → Mattermost. A Sonar `FAIL` blocks the card move and the notification until a new pipeline passes.
31
+
26
32
  ---
27
33
 
28
34
  ## 2. Adapter Modules
29
35
 
30
- The DOT adapter is organized into four dedicated specification modules:
36
+ The DOT adapter is organized into five specification modules:
31
37
 
32
38
  1. **[GitLab Integration (`gitlab.md`)](gitlab.md)**:
33
39
  - CLI automation with `glab`.
@@ -38,11 +44,15 @@ The DOT adapter is organized into four dedicated specification modules:
38
44
  - Related `feat/…` or `fix/…`: stay. One MR. Do not open three MRs.
39
45
  - Base: `origin/develop` when develop is in use (default branch is `develop`), including when HEAD is `main`. HEAD being `main` does not override an in-use `develop` default. `origin/main` only when develop is unused leftover (default branch is `main` / `master`). Do not force leftover develop.
40
46
  - Cherry-pick extra envs only if the user named them this turn. Chat `setuju` is not propagate.
41
- 3. **[Coreview External Reviewer Triage (`coreview.md`)](coreview.md)**:
47
+ 3. **[Pipeline and Sonar Quality Gate (`sonar.md`)](sonar.md)**:
48
+ - Wait for the MR pipeline, read the Sonar quality gate from the pipeline job or the MR comment (`glab` only).
49
+ - `FAIL` loops back to a fix on the same MR; it blocks the card move and Mattermost. No Sonar → `SKIPPED`, never a silent PASS.
50
+ 4. **[Coreview External Reviewer Triage (`coreview.md`)](coreview.md)**:
42
51
  - Ingestion of `@coreview-bot` automated PR comments.
43
52
  - Mandatory Phase 8 Triage reporting gate before Mattermost dispatch.
44
53
  - Rigorous evaluation of bot suggestions into `VALID` (fix on the same topic MR; do not cherry-pick unless the user named extra envs this turn) vs `HALU` (false positive pushback) using principles from `gitlab-mr-feedback` and `receiving-code-review`.
45
- 4. **[Mattermost Notifications (`mattermost.md`)](mattermost.md)**:
54
+ - After triage: move the issue card to **"Ready to review"** (`gitlab.md` Step 4; idempotent, skips when no card is linked).
55
+ 5. **[Mattermost Notifications (`mattermost.md`)](mattermost.md)**:
46
56
  - Repository-to-channel resolution using persistent configuration.
47
57
  - MCP `mattermost_send_message` dispatch with mandatory `from: "AI Agent"` attribution.
48
58
  - Environment-tagged Markdown blocks (`[MR DEV]`, `[MR STAGING]`, `[MR MAIN]`) formatted with strict **`no-ai-slop`** human-written standards.
@@ -51,16 +61,16 @@ The DOT adapter is organized into four dedicated specification modules:
51
61
 
52
62
  ## 3. Official DOT Engineering Skills Integration
53
63
 
54
- This adapter composes the DOT skill suite. `task-impact-inquiry` ships in this package (`adapters/dot/skills/task-impact-inquiry/`) and `sync-hosts` upserts it to Claude, Grok, and Gemini. Other DOT skills (router, workflow) still update-if-exists only.
64
+ This adapter composes the DOT skill suite. `task-impact-inquiry` is adapter-neutral and ships in `adapters/quality/skills/task-impact-inquiry/`; `sync-hosts` upserts it to every enabled host. On DOT repos it is mandatory in Stage 1. Other DOT skills (router, workflow) still update-if-exists only.
55
65
 
56
- On a DOT repo (`adapter_type: dot`), **run `ai-engineering-loop`**, not the old 9-phase `dot-dev-workflow`, as the engineering OS. Stage 1 grill **includes** `task-impact-inquiry`. Do not run a second interview. After Judge `PASS`, Stage 8 is `dot-dev-workflow` delivery (GitLab, cherry-pick, Coreview, Mattermost). Canonical copies: `adapters/dot/skills/`. See `core/grill-policy.md`.
66
+ On a DOT repo (`adapter_type: dot`), **run `ai-engineering-loop`**, not the old 9-phase `dot-dev-workflow`, as the engineering OS. Stage 1 grill **includes** `task-impact-inquiry`. Do not run a second interview. After Judge `PASS`, Stage 8 is `dot-dev-workflow` delivery (GitLab, cherry-pick, Coreview, Mattermost). Canonical DOT copies: `adapters/dot/skills/` (`task-impact-inquiry`: `adapters/quality/skills/`). See `core/grill-policy.md`.
57
67
 
58
68
  | Skill | Primary Role & Governance |
59
69
  | :--- | :--- |
60
70
  | **`ai-engineering-loop`** | Engineering OS (Stages 0-7). Use this for DOT bugfix/feature/refactor. |
61
71
  | **`dot-dev-workflow`** | Stage 8 delivery only after Judge PASS. Not a parallel engineering loop. |
62
72
  | **`dot-dev-skill-router`** | Routes commit-bound DOT work to `ai-engineering-loop`, then Stage 8. |
63
- | **`task-impact-inquiry`** | Business blast radius (lifecycle sketch, four pillars, ASCII picture). Canonical: `adapters/dot/skills/task-impact-inquiry/`. Host copies: `~/.claude/skills/`, `~/.agents/skills/` (Codex, Gemini CLI, Grok, and other shared-folder hosts), `~/.gemini/config/skills/` (Antigravity). Fills Stage 1 grill; impact-only stops after the matrix. Not a parallel OS. |
73
+ | **`task-impact-inquiry`** | Business blast radius (lifecycle sketch, four pillars, ASCII picture). Canonical: `adapters/quality/skills/task-impact-inquiry/` (adapter-neutral, EN + ID triggers). Host copies: `~/.claude/skills/`, `~/.agents/skills/` (Codex, Gemini CLI, Grok, and other shared-folder hosts), `~/.gemini/config/skills/` (Antigravity). Fills Stage 1 grill; impact-only stops after the matrix. Not a parallel OS. |
64
74
  | **`backend-development`** | Framework-agnostic backend guidelines (clean naming, database queries, security, error handling). |
65
75
  | **`backend-safety-guardrails`** | 6 architectural backend safety invariants (queue bypass, BigInt, status recalculation loops). |
66
76
  | **`devils-advocate`** | Legacy DOT pre-commit skill. On AEL, Stages 6-7 are package Devil's Advocate + Judge. Do not re-run this skill after Judge PASS. |
@@ -20,6 +20,9 @@ flowchart TD
20
20
 
21
21
  PushBranch --> CreateMR[Create Merge Request via glab]
22
22
  CreateMR --> CaptureMR[Capture MR URL & ID for Multi-Branch / Bot Triage]
23
+ CaptureMR --> Gate[Pipeline + Sonar gate: sonar.md]
24
+ Gate --> Triage[Coreview triage: coreview.md]
25
+ Triage --> Ready[Move card to Ready to review: Step 4]
23
26
  ```
24
27
 
25
28
  ---
@@ -120,6 +123,9 @@ glab mr create \
120
123
  ```
121
124
 
122
125
  #### Standardized MR Description Template:
126
+
127
+ The **Receipt** section is `RUN_DIR/receipt.md` written by `deliver` (commit first so it binds `HEAD`; screenshots as hosted links via `--evidence AC-N=<https-url>`). Paste it unchanged; a ❌ line stays ❌. Check: `npx ai-engineering-loop verify-receipt --run <runId> --head <mr-head-sha>`.
128
+
123
129
  ```markdown
124
130
  ## Issue
125
131
  <GitLab Issue URL>
@@ -147,6 +153,55 @@ glab mr create \
147
153
  ## Screenshot / Video
148
154
  <!-- Attach screenshots, terminal test logs, or UI captures if available -->
149
155
 
156
+ ## Receipt
157
+ <paste RUN_DIR/receipt.md from `deliver` here: one ✅/❌ line per AC with its evidence>
158
+
150
159
  ## Note for Deployment
151
160
  - No manual database migrations required. (or specify migration command if applicable)
152
161
  ```
162
+
163
+ ---
164
+
165
+ ## 6. Step 4: Move the Card to "Ready to review"
166
+
167
+ Run this only when all three hold:
168
+
169
+ 1. The MR pipeline passed and the Sonar gate is PASS or SKIPPED ([`sonar.md`](sonar.md)).
170
+ 2. The Coreview triage report is printed ([`coreview.md`](coreview.md)).
171
+ 3. An issue is linked to this MR (Step 2).
172
+
173
+ If the Sonar gate is FAIL, stop here. Do not move the card, and do not notify.
174
+
175
+ ### A. No card linked: skip cleanly
176
+
177
+ If Step 2 found no issue and none was created (for example, the tracker is not this repo and the user did not name one), print `Card: none linked (skipped)` and continue to Mattermost. Do not create an issue just to move it.
178
+
179
+ ### B. Read the board lists and the card's current labels
180
+
181
+ GitLab board columns are labels. Find the label of the "Ready to review" list and of every other list:
182
+
183
+ ```bash
184
+ glab api "projects/:fullpath/boards" # lists[].label.name per board
185
+ glab api "projects/:fullpath/issues/<issue-iid>" # labels[] on the card
186
+ ```
187
+
188
+ The target label is the list label whose name equals `Ready to review` (case-insensitive). If `.ai-engineering-loop/adapter.md` names `board_ready_label`, use that instead. No such list on any board: print `Card: no "Ready to review" list (skipped)` and continue.
189
+
190
+ ### C. Move it (idempotent)
191
+
192
+ - The card already has the target label and no other list label: print `Card: already in Ready to review` and do nothing.
193
+ - Otherwise add the target label and remove only the **other board-list labels** currently on the card. Leave every non-list label alone.
194
+
195
+ ```bash
196
+ glab issue update <issue-iid> --repo <repo> \
197
+ --label "Ready to review" \
198
+ --unlabel "<other list label currently on the card>"
199
+ ```
200
+
201
+ Re-read the issue and print:
202
+
203
+ ```text
204
+ Card: #<issue-iid> -> Ready to review (removed: <labels or none>)
205
+ ```
206
+
207
+ Running Step 4 twice must not change anything the second time.
@@ -8,6 +8,16 @@ This gives QA, product, and reviewers visibility when the delivery pipeline fini
8
8
 
9
9
  ---
10
10
 
11
+ ## 2. Preconditions (gate)
12
+
13
+ Send only after all of these are printed in the conversation:
14
+
15
+ 1. Sonar Gate report with `Quality gate: PASS` or `SKIPPED` ([`sonar.md`](sonar.md)). On `FAIL`, do not send.
16
+ 2. Phase 8 Triage report ([`coreview.md`](coreview.md)).
17
+ 3. Card line from [`gitlab.md`](gitlab.md) Step 4 (`-> Ready to review`, `already in Ready to review`, or `skipped`).
18
+
19
+ ---
20
+
11
21
  ## 2. Channel Resolution & Dispatch Flow
12
22
 
13
23
  ```text
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dot-dev-workflow
3
- description: DOT Stage 8 delivery after AI Engineering Loop Judge PASS. GitLab issue/MR, one topic-branch MR (extra env cherry-pick only if named this turn), Coreview triage, Mattermost. Not a substitute for ai-engineering-loop.
3
+ description: DOT Stage 8 delivery after AI Engineering Loop Judge PASS. GitLab issue/MR, one topic-branch MR (extra env cherry-pick only if named this turn), pipeline + Sonar gate, Coreview triage, card to Ready to review, Mattermost. Not a substitute for ai-engineering-loop.
4
4
  ---
5
5
 
6
6
  # DOT Delivery Workflow (Stage 8)
@@ -22,7 +22,7 @@ If `ai-engineering-loop` is missing on this host, say so and stop. Do not silent
22
22
  | Phase 2 impact inquiry | AEL Stage 1 grill + `task-impact-inquiry` |
23
23
  | Phase 3-5 code / tests / tsc | AEL Stages 4-5 (`policies/tdd-policy.md`, `.ai-engineering-loop/verification.md`) |
24
24
  | Phase 6 `devils-advocate` | AEL Stages 6-7 (Finding Ledger + Judge PASS/ITERATE/ESCALATE) |
25
- | Phase 7-9 glab / Coreview / Mattermost | **This skill** (AEL Stage 8). Prefer `adapters/dot/` in the AEL package when present. |
25
+ | Phase 7-9 glab / Sonar / Coreview / board / Mattermost | **This skill** (AEL Stage 8). Prefer `adapters/dot/` in the AEL package when present. |
26
26
 
27
27
  `git commit`, `git push`, and `glab mr create` are forbidden until Judge `PASS`.
28
28
 
@@ -63,7 +63,23 @@ git commit -m "<type>(<scope>): <summary>"
63
63
 
64
64
  ---
65
65
 
66
- ## Stage 8b — Coreview and MR discussions
66
+ ## Stage 8b — Pipeline and Sonar gate
67
+
68
+ Follow `adapters/dot/sonar.md` when present. Wait for the MR pipeline, then read the Sonar quality gate from the pipeline's Sonar job (`glab ci trace <job-id>`) or the Sonar MR comment (`glab mr view <id> --comments`). Print:
69
+
70
+ ```text
71
+ Sonar Gate
72
+ MR: !<id>
73
+ Pipeline: #<id> <passed|failed>
74
+ Quality gate: <PASS | FAIL | SKIPPED>
75
+ Action: <none | fix>
76
+ ```
77
+
78
+ FAIL: fix on the same topic MR, re-verify, push, wait for the new pipeline. While FAIL, do not move the card and do not send Mattermost. No Sonar on the project is `SKIPPED`, never PASS. Use `glab` only; no tokens in prompts.
79
+
80
+ ---
81
+
82
+ ## Stage 8c — Coreview and MR discussions
67
83
 
68
84
  Follow `adapters/dot/coreview.md` when present, plus `gitlab-mr-feedback` and `receiving-code-review`.
69
85
 
@@ -91,9 +107,15 @@ glab api "projects/:fullpath/merge_requests/<mr-id>/discussions/<discussion_id>/
91
107
 
92
108
  ---
93
109
 
94
- ## Stage 8c — Mattermost (`no-ai-slop`)
110
+ ## Stage 8d — Card to "Ready to review"
111
+
112
+ Follow `adapters/dot/gitlab.md` Step 4 when present. Only after Sonar PASS/SKIPPED and the printed triage. No linked card: print `Card: none linked (skipped)`. Otherwise add the `Ready to review` list label and remove only other board-list labels (`glab issue update <iid> --label "Ready to review" --unlabel "<old list label>"`). Already there: change nothing.
113
+
114
+ ---
115
+
116
+ ## Stage 8e — Mattermost (`no-ai-slop`)
95
117
 
96
- Follow `adapters/dot/mattermost.md` when present.
118
+ Follow `adapters/dot/mattermost.md` when present. Send only after the Sonar Gate (PASS/SKIPPED), triage, and card lines are printed.
97
119
 
98
120
  1. Resolve channel and PIC from `~/.gemini/config/mattermost-channel-mapping.json`. If PIC is missing, ask the user and save it.
99
121
  2. Send via MCP `mattermost_send_message` with `from: "AI Agent"`. Use the Mattermost CLI only if MCP fails. Do not send twice.