ai-engineering-loop 1.14.0 → 1.16.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 (112) hide show
  1. package/.agents/{workflows/ai-engineering-loop.md → skills/ai-engineering-loop/SKILL.md} +9 -7
  2. package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-deliver.md +1 -0
  3. package/.agents/skills/ai-engineering-loop/references/loop-hosts.md +48 -0
  4. package/.agents/skills/ai-engineering-loop/references/loop-maker.md +13 -0
  5. package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-review.md +2 -0
  6. package/.claude/skills/ai-engineering-loop/SKILL.md +10 -11
  7. package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +1 -0
  8. package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +48 -0
  9. package/.claude/skills/ai-engineering-loop/references/loop-maker.md +6 -1
  10. package/.claude/skills/ai-engineering-loop/references/loop-review.md +2 -0
  11. package/CHANGELOG.md +83 -0
  12. package/README.md +54 -6
  13. package/adapters/README.md +22 -0
  14. package/adapters/dot/README.md +19 -9
  15. package/adapters/dot/gitlab.md +49 -0
  16. package/adapters/dot/mattermost.md +10 -0
  17. package/adapters/dot/skills/dot-dev-workflow/SKILL.md +27 -5
  18. package/adapters/dot/sonar.md +90 -0
  19. package/adapters/generate-adapter/SKILL.md +6 -5
  20. package/adapters/{dot → quality}/skills/task-impact-inquiry/SKILL.md +10 -7
  21. package/agents/instruction-only/AGENTS.md +24 -0
  22. package/bin/ai-engineering-loop.js +320 -34
  23. package/core/grill-policy.md +1 -1
  24. package/core/orchestration-model.md +11 -0
  25. package/core/runtime-safety.md +2 -1
  26. package/lib/adapter-check.js +102 -0
  27. package/lib/adapter-detect.js +125 -0
  28. package/lib/auto-update.js +3 -1
  29. package/lib/cli-args.js +11 -0
  30. package/lib/doctor.js +13 -17
  31. package/lib/gates.js +28 -1
  32. package/lib/generate-adapter.js +6 -30
  33. package/lib/host-skill-build.js +25 -15
  34. package/lib/hosts/agent-formats.js +135 -0
  35. package/lib/hosts/commands.js +126 -0
  36. package/lib/hosts/detect.js +56 -0
  37. package/lib/hosts/doctor.js +77 -0
  38. package/lib/hosts/redetect.js +60 -0
  39. package/lib/hosts/registry.js +298 -0
  40. package/lib/hosts/table.js +43 -0
  41. package/lib/orchestration.js +39 -6
  42. package/lib/run-abandon.js +116 -0
  43. package/lib/studio-server.js +1 -0
  44. package/lib/sync-hosts.js +156 -112
  45. package/package.json +2 -3
  46. package/schemas/report.schema.json +52 -5
  47. package/.agents/devil-advocate.md +0 -79
  48. package/.agents/judge.md +0 -58
  49. package/.claude/commands/ai-engineering-loop.md +0 -11
  50. package/.gemini/skills/ai-engineering-loop/SKILL.md +0 -61
  51. package/.gemini/skills/ai-engineering-loop/references/loop-maker.md +0 -8
  52. package/.gemini/skills/animate/RECIPES.md +0 -324
  53. package/.gemini/skills/animate/SKILL.md +0 -207
  54. package/.gemini/skills/animate-expo/RECIPES.md +0 -385
  55. package/.gemini/skills/animate-expo/SKILL.md +0 -263
  56. package/.gemini/skills/animation-vocabulary/SKILL.md +0 -181
  57. package/.gemini/skills/apple-design/SKILL.md +0 -290
  58. package/.gemini/skills/ask-sonner/API.md +0 -64
  59. package/.gemini/skills/ask-sonner/SKILL.md +0 -88
  60. package/.gemini/skills/backend-development/SKILL.md +0 -272
  61. package/.gemini/skills/backend-development/references/api-design-guidelines.md +0 -95
  62. package/.gemini/skills/backend-development/references/query-and-database-best-practices.md +0 -53
  63. package/.gemini/skills/backend-development/references/security-checklist.md +0 -60
  64. package/.gemini/skills/emil-design-eng/SKILL.md +0 -674
  65. package/.gemini/skills/find-animation-opportunities/SKILL.md +0 -140
  66. package/.gemini/skills/improve-animations/AUDIT.md +0 -115
  67. package/.gemini/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
  68. package/.gemini/skills/improve-animations/SKILL.md +0 -109
  69. package/.gemini/skills/mobile-native/SKILL.md +0 -311
  70. package/.gemini/skills/pick-ui-library/SKILL.md +0 -85
  71. package/.gemini/skills/prototype/PICKER.md +0 -197
  72. package/.gemini/skills/prototype/SKILL.md +0 -98
  73. package/.gemini/skills/review-animations/SKILL.md +0 -120
  74. package/.gemini/skills/review-animations/STANDARDS.md +0 -187
  75. package/.gemini/skills/write-swift/SKILL.md +0 -396
  76. package/.grok/commands/ai-engineering-loop.md +0 -11
  77. package/.grok/skills/ai-engineering-loop/SKILL.md +0 -62
  78. package/.grok/skills/ai-engineering-loop/references/loop-commands.md +0 -20
  79. package/.grok/skills/ai-engineering-loop/references/loop-deliver.md +0 -8
  80. package/.grok/skills/ai-engineering-loop/references/loop-goal.md +0 -10
  81. package/.grok/skills/ai-engineering-loop/references/loop-maker.md +0 -8
  82. package/.grok/skills/ai-engineering-loop/references/loop-review.md +0 -18
  83. package/.grok/skills/ai-engineering-loop/references/loop-risky.md +0 -9
  84. package/.grok/skills/ai-engineering-loop/references/loop-verify.md +0 -20
  85. package/.grok/skills/animate/RECIPES.md +0 -324
  86. package/.grok/skills/animate/SKILL.md +0 -207
  87. package/.grok/skills/animate-expo/RECIPES.md +0 -385
  88. package/.grok/skills/animate-expo/SKILL.md +0 -263
  89. package/.grok/skills/animation-vocabulary/SKILL.md +0 -181
  90. package/.grok/skills/apple-design/SKILL.md +0 -290
  91. package/.grok/skills/ask-sonner/API.md +0 -64
  92. package/.grok/skills/ask-sonner/SKILL.md +0 -88
  93. package/.grok/skills/backend-development/SKILL.md +0 -272
  94. package/.grok/skills/backend-development/references/api-design-guidelines.md +0 -95
  95. package/.grok/skills/backend-development/references/query-and-database-best-practices.md +0 -53
  96. package/.grok/skills/backend-development/references/security-checklist.md +0 -60
  97. package/.grok/skills/emil-design-eng/SKILL.md +0 -674
  98. package/.grok/skills/find-animation-opportunities/SKILL.md +0 -140
  99. package/.grok/skills/improve-animations/AUDIT.md +0 -115
  100. package/.grok/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
  101. package/.grok/skills/improve-animations/SKILL.md +0 -109
  102. package/.grok/skills/mobile-native/SKILL.md +0 -311
  103. package/.grok/skills/pick-ui-library/SKILL.md +0 -85
  104. package/.grok/skills/prototype/PICKER.md +0 -197
  105. package/.grok/skills/prototype/SKILL.md +0 -98
  106. package/.grok/skills/review-animations/SKILL.md +0 -120
  107. package/.grok/skills/review-animations/STANDARDS.md +0 -187
  108. package/.grok/skills/write-swift/SKILL.md +0 -396
  109. /package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-commands.md +0 -0
  110. /package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-goal.md +0 -0
  111. /package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-risky.md +0 -0
  112. /package/{.gemini → .agents}/skills/ai-engineering-loop/references/loop-verify.md +0 -0
@@ -1,18 +1,20 @@
1
1
  ---
2
2
  name: ai-engineering-loop
3
- description: Run the AI Engineering Loop on Antigravity (init, status, refresh, or full Maker then Devil's Advocate then Judge).
3
+ description: Use when the user runs /ai-engineering-loop, says "run the engineering loop" or "devil's advocate review", asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop.
4
4
  ---
5
5
  <!-- Generated from skill-src/ by npm run build:skills; do not edit. -->
6
6
 
7
- # AI Engineering Loop (Antigravity workflow)
7
+ # AI Engineering Loop
8
8
 
9
- Stage details: the `loop-*` references via `npx ai-engineering-loop docs <name>`, read only on entering that stage. Specs and references: `npx ai-engineering-loop docs <name> [--section <h>]`; never read whole spec directories.
9
+ Stage details: `references/loop-*.md` beside this file (also via `docs`), read only on entering that stage. Specs and references: `npx ai-engineering-loop docs <name> [--section <h>]`; never read whole spec directories.
10
10
 
11
11
  ## Host rules
12
12
 
13
- 1. If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` as siblings and wait for each; `general-purpose` only if rejected. Do not use `browser_subagent`.
13
+ Same skill on every host. Before the first DA or Judge spawn, read your host's section in `loop-hosts` (exact tool, allowed keys, fallbacks).
14
+ 1. Spawn `devil-advocate` then `judge` as fresh siblings with the host's own subagent tool, passing only keys its schema has; wait for each, never in the background or nested; `general-purpose` only if the named type is rejected. Never use a browser subagent as reviewer.
14
15
  2. No subagent tool: same budgets in this session as `CONTEXT_ISOLATION_ONLY`; never claim independent execution.
15
- 3. Models: the host catalog; never type a model name.
16
+ 3. A tool says "cannot determine the safety" or returns HTTP 400: stop that tool, do not retry, continue read-only, and tell the user (`loop-hosts`).
17
+ 4. Models: the host catalog (`/models`, `grok models`); never type a model name.
16
18
 
17
19
  ## Commands
18
20
 
@@ -41,7 +43,7 @@ Invariants (every tier):
41
43
 
42
44
  ## Report header
43
45
 
44
- When a child actually returned a result:
46
+ When a subagent actually returned its own result (Grok: its own `subagent_id`):
45
47
 
46
48
  ```
47
49
  Execution Mode: TRUE_INDEPENDENT_AGENT
@@ -50,7 +52,7 @@ Native Subagent Invocation: AVAILABLE
50
52
  Review Method: True Independent Agent
51
53
  ```
52
54
 
53
- When no subagent ran:
55
+ When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
54
56
 
55
57
  ```
56
58
  Execution Mode: CONTEXT_ISOLATION_ONLY
@@ -1,6 +1,7 @@
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.
@@ -0,0 +1,48 @@
1
+ # Host rules: subagent tools per host
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. 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.
8
+
9
+ ## Claude Code (and Kiro-backed strict proxies)
10
+
11
+ Strict proxies (including Kiro) return HTTP 400 `REQUEST_BODY_INVALID` on unknown keys:
12
+ 1. Use only tools that exist in this session. Spawn subagents with **Task** (or **Agent** if that is the only one), passing only `subagent_type`, `description`, `prompt`, and `run_in_background: false` only if the schema has it. Never invent other keys.
13
+ 2. `subagent_type: devil-advocate` / `judge`; `general-purpose` only if rejected. No Task/Agent tool: review in this session as `CONTEXT_ISOLATION_ONLY`.
14
+ 3. Bash or Write says "cannot determine the safety" or 400: stop that tool, do not retry, use Read/Grep/Glob, and tell the user to leave auto permission mode or add a permissions.allow rule, then start a new session.
15
+ 4. Models: `/models` when it exists; never type a model name.
16
+
17
+ ## Grok CLI
18
+
19
+ 1. `spawn_subagent` present and `GROK_SUBAGENTS` not `0`: review is **INVOCATION_AVAILABLE**; **PROVEN** only after a child returns its own `subagent_id`. Otherwise use `CONTEXT_ISOLATION_ONLY`, disclosed; never call it a subagent review.
20
+ 2. Siblings only (depth limit 1): `capability_mode: "execute"`, `background: false`, `isolation: none`, no `resume_from`. Forbidden `subagent_type` for DA/Judge: `caveman:cavecrew-reviewer`, `caveman:cavecrew-builder`, `caveman:cavecrew-investigator`, `explore`, `plan`. Unregistered: `general-purpose`, agent spec prepended, `description` prefixed `[devil-advocate]`/`[judge]`.
21
+ 3. Models: `grok models` (drop grok-imagine-* and video); never type a model name. Headless `grok -p` is `FRESH_PROCESS_AGENT` only once it prints a model response.
22
+ 4. Alias: `NATIVE_SUBAGENT` → `TRUE_INDEPENDENT_AGENT`.
23
+
24
+ ## Antigravity (IDE, 2.0, `agy` CLI)
25
+
26
+ 1. If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` (custom agents with `subagent: true`) as siblings, wait for each, never in the background; `general-purpose` only if the named type is rejected. Do not use `browser_subagent` (or the `browser` subagent).
27
+ 2. No subagent tool: run the same budgets in this session as `CONTEXT_ISOLATION_ONLY`; do not claim independent agent execution.
28
+ 3. Models: the host catalog (`/models` when it exists); never type a model name.
29
+
30
+ ## Gemini CLI
31
+
32
+ 1. Subagents `devil-advocate` and `judge` live in `~/.gemini/agents/` after `sync-hosts`; delegate to them by name when the session exposes them, one at a time, and wait.
33
+ 2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: `/model`; never type a model name.
34
+
35
+ ## Codex CLI
36
+
37
+ 1. Custom agents `devil-advocate` and `judge` live in `~/.codex/agents/*.toml` after `sync-hosts`; spawn them as sibling agents when the session has a spawn tool, and wait for each result.
38
+ 2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: the host catalog; never type a model name.
39
+
40
+ ## Cursor, GitHub Copilot, OpenCode, Factory Droid, Augment, Qwen Code, Kiro, Junie
41
+
42
+ 1. `sync-hosts` installs `devil-advocate` and `judge` in the host's own agent format. Delegate with the host's subagent tool by that name (Cursor subagents, Copilot custom agents, OpenCode `@devil-advocate`, Droid Task `subagent_type`, Auggie subagents, Qwen `/agents`, Kiro custom agents, Junie subagents), one at a time, and wait.
43
+ 2. No subagent tool, or the agent is missing: `CONTEXT_ISOLATION_ONLY`.
44
+
45
+ ## Other hosts (Windsurf/Devin, Amp, Zed, Goose, Cline, Roo, unknown)
46
+
47
+ 1. Use a native subagent only if it can run the DA or Judge prompt with a fresh context and return its own result; read-only research subagents qualify only for DA.
48
+ 2. Otherwise run DA and Judge in this session as `CONTEXT_ISOLATION_ONLY`, disclosed, with the same budgets.
@@ -0,0 +1,13 @@
1
+ # Stages 2-4: Maker
2
+
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, 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
+ - 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
+ - Bugs: red repro first. Features: one red test per AC row, then green.
7
+ - 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
+ - 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.
9
+
10
+ ## REPORT_ONLY report review (recipe `audit`)
11
+
12
+ - 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>"}`.
13
+ - 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`).
@@ -1,21 +1,20 @@
1
1
  ---
2
2
  name: ai-engineering-loop
3
- description: Use when the user runs /ai-engineering-loop, asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop on Claude Code.
4
- allowed-tools: "Read, Grep, Glob, Edit, Write, Task, Bash(npm run *), Bash(npm test *), Bash(npx *), Bash(git *)"
3
+ description: Use when the user runs /ai-engineering-loop, says "run the engineering loop" or "devil's advocate review", asks to init or refresh living project context, or wants the Maker / Devil's Advocate / Judge engineering loop.
5
4
  ---
6
5
  <!-- Generated from skill-src/ by npm run build:skills; do not edit. -->
7
6
 
8
- # AI Engineering Loop (Claude Code)
7
+ # AI Engineering Loop
9
8
 
10
- Stage details: `references/loop-*.md` beside this file, read only on entering that stage. Specs and references: `npx ai-engineering-loop docs <name> [--section <h>]`; never read whole spec directories.
9
+ Stage details: `references/loop-*.md` beside this file (also via `docs`), read only on entering that stage. Specs and references: `npx ai-engineering-loop docs <name> [--section <h>]`; never read whole spec directories.
11
10
 
12
11
  ## Host rules
13
12
 
14
- Strict proxies (including Kiro) return HTTP 400 `REQUEST_BODY_INVALID` on unknown keys:
15
- 1. Use only tools that exist in this session. Spawn subagents with **Task** (or **Agent** if that is the only one), passing only `subagent_type`, `description`, `prompt`, and `run_in_background: false` only if the schema has it. Never invent other keys.
16
- 2. `subagent_type: devil-advocate` / `judge`; `general-purpose` only if rejected. No Task/Agent tool: review in this session as `CONTEXT_ISOLATION_ONLY`.
17
- 3. Bash or Write says "cannot determine the safety" or 400: stop that tool, do not retry, use Read/Grep/Glob, and tell the user to leave auto permission mode or add a permissions.allow rule, then start a new session.
18
- 4. Models: `/models` when it exists; never type a model name.
13
+ Same skill on every host. Before the first DA or Judge spawn, read your host's section in `loop-hosts` (exact tool, allowed keys, fallbacks).
14
+ 1. Spawn `devil-advocate` then `judge` as fresh siblings with the host's own subagent tool, passing only keys its schema has; wait for each, never in the background or nested; `general-purpose` only if the named type is rejected. Never use a browser subagent as reviewer.
15
+ 2. No subagent tool: same budgets in this session as `CONTEXT_ISOLATION_ONLY`; never claim independent execution.
16
+ 3. A tool says "cannot determine the safety" or returns HTTP 400: stop that tool, do not retry, continue read-only, and tell the user (`loop-hosts`).
17
+ 4. Models: the host catalog (`/models`, `grok models`); never type a model name.
19
18
 
20
19
  ## Commands
21
20
 
@@ -44,7 +43,7 @@ Invariants (every tier):
44
43
 
45
44
  ## Report header
46
45
 
47
- When Task/Agent returned a child result:
46
+ When a subagent actually returned its own result (Grok: its own `subagent_id`):
48
47
 
49
48
  ```
50
49
  Execution Mode: TRUE_INDEPENDENT_AGENT
@@ -53,7 +52,7 @@ Native Subagent Invocation: AVAILABLE
53
52
  Review Method: True Independent Agent
54
53
  ```
55
54
 
56
- When no subagent ran:
55
+ When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
57
56
 
58
57
  ```
59
58
  Execution Mode: CONTEXT_ISOLATION_ONLY
@@ -1,6 +1,7 @@
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.
@@ -0,0 +1,48 @@
1
+ # Host rules: subagent tools per host
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. 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.
8
+
9
+ ## Claude Code (and Kiro-backed strict proxies)
10
+
11
+ Strict proxies (including Kiro) return HTTP 400 `REQUEST_BODY_INVALID` on unknown keys:
12
+ 1. Use only tools that exist in this session. Spawn subagents with **Task** (or **Agent** if that is the only one), passing only `subagent_type`, `description`, `prompt`, and `run_in_background: false` only if the schema has it. Never invent other keys.
13
+ 2. `subagent_type: devil-advocate` / `judge`; `general-purpose` only if rejected. No Task/Agent tool: review in this session as `CONTEXT_ISOLATION_ONLY`.
14
+ 3. Bash or Write says "cannot determine the safety" or 400: stop that tool, do not retry, use Read/Grep/Glob, and tell the user to leave auto permission mode or add a permissions.allow rule, then start a new session.
15
+ 4. Models: `/models` when it exists; never type a model name.
16
+
17
+ ## Grok CLI
18
+
19
+ 1. `spawn_subagent` present and `GROK_SUBAGENTS` not `0`: review is **INVOCATION_AVAILABLE**; **PROVEN** only after a child returns its own `subagent_id`. Otherwise use `CONTEXT_ISOLATION_ONLY`, disclosed; never call it a subagent review.
20
+ 2. Siblings only (depth limit 1): `capability_mode: "execute"`, `background: false`, `isolation: none`, no `resume_from`. Forbidden `subagent_type` for DA/Judge: `caveman:cavecrew-reviewer`, `caveman:cavecrew-builder`, `caveman:cavecrew-investigator`, `explore`, `plan`. Unregistered: `general-purpose`, agent spec prepended, `description` prefixed `[devil-advocate]`/`[judge]`.
21
+ 3. Models: `grok models` (drop grok-imagine-* and video); never type a model name. Headless `grok -p` is `FRESH_PROCESS_AGENT` only once it prints a model response.
22
+ 4. Alias: `NATIVE_SUBAGENT` → `TRUE_INDEPENDENT_AGENT`.
23
+
24
+ ## Antigravity (IDE, 2.0, `agy` CLI)
25
+
26
+ 1. If `invoke_subagent` (or Task) exists, spawn `devil-advocate` then `judge` (custom agents with `subagent: true`) as siblings, wait for each, never in the background; `general-purpose` only if the named type is rejected. Do not use `browser_subagent` (or the `browser` subagent).
27
+ 2. No subagent tool: run the same budgets in this session as `CONTEXT_ISOLATION_ONLY`; do not claim independent agent execution.
28
+ 3. Models: the host catalog (`/models` when it exists); never type a model name.
29
+
30
+ ## Gemini CLI
31
+
32
+ 1. Subagents `devil-advocate` and `judge` live in `~/.gemini/agents/` after `sync-hosts`; delegate to them by name when the session exposes them, one at a time, and wait.
33
+ 2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: `/model`; never type a model name.
34
+
35
+ ## Codex CLI
36
+
37
+ 1. Custom agents `devil-advocate` and `judge` live in `~/.codex/agents/*.toml` after `sync-hosts`; spawn them as sibling agents when the session has a spawn tool, and wait for each result.
38
+ 2. Otherwise `CONTEXT_ISOLATION_ONLY`. Models: the host catalog; never type a model name.
39
+
40
+ ## Cursor, GitHub Copilot, OpenCode, Factory Droid, Augment, Qwen Code, Kiro, Junie
41
+
42
+ 1. `sync-hosts` installs `devil-advocate` and `judge` in the host's own agent format. Delegate with the host's subagent tool by that name (Cursor subagents, Copilot custom agents, OpenCode `@devil-advocate`, Droid Task `subagent_type`, Auggie subagents, Qwen `/agents`, Kiro custom agents, Junie subagents), one at a time, and wait.
43
+ 2. No subagent tool, or the agent is missing: `CONTEXT_ISOLATION_ONLY`.
44
+
45
+ ## Other hosts (Windsurf/Devin, Amp, Zed, Goose, Cline, Roo, unknown)
46
+
47
+ 1. Use a native subagent only if it can run the DA or Judge prompt with a fresh context and return its own result; read-only research subagents qualify only for DA.
48
+ 2. Otherwise run DA and Judge in this session as `CONTEXT_ISOLATION_ONLY`, disclosed, with the same budgets.
@@ -1,8 +1,13 @@
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
6
  - Bugs: red repro first. Features: one red test per AC row, then green.
7
7
  - 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
8
  - 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.
9
+
10
+ ## REPORT_ONLY report review (recipe `audit`)
11
+
12
+ - 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>"}`.
13
+ - 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,89 @@ All notable changes to this project are documented here. Versions follow [Semant
6
6
 
7
7
  _No changes yet._
8
8
 
9
+ ## 1.16.0 - 2026-10-16
10
+
11
+ ### Host certification tiers and an instruction-only `AGENTS.md` digest (#60)
12
+
13
+ - **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`.
14
+ - **Added:** the README host table, `hosts list` and `hosts doctor` show the tier.
15
+ - **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`.
16
+
17
+ ### DOT Stage 8: Sonar quality gate and "Ready to review" card move (#65)
18
+
19
+ - **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.
20
+ - **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).
21
+ - **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.
22
+
23
+ ### `task-impact-inquiry` is adapter-neutral (#64)
24
+
25
+ - **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`).
26
+
27
+ ### Adapter checks in `doctor` and a `deliver` preflight (#63)
28
+
29
+ - **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.
30
+ - **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.
31
+
32
+ ### One adapter detector for `init`, `generate-adapter` and Studio (#62)
33
+
34
+ - **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.
35
+ - **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.
36
+ - **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.
37
+ - **Added:** `generate-adapter` prints the reason next to `recommended:`, Studio's bootstrap returns `adapters.reason`, and `init` records it in the context evidence.
38
+
39
+ ### Audit / REPORT_ONLY review policy and a non-contradictory header (#57)
40
+
41
+ - **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.
42
+ - **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`.
43
+ - **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.
44
+
45
+ ## 1.15.0 - 2026-10-11
46
+
47
+ ### Multi-agent hosts: `setup` suggests `auto` detection mode (#54 decision 4)
48
+
49
+ - **Changed:** interactive `setup` now asks "Sync agents you install later automatically? [Y/n] (recommended: Y = auto)"; pressing Enter picks `auto`. `setup --yes`, a missing TTY, CI, and scripts keep `manual` unless `--mode` is passed. Gemini CLI detection, Kiro/Junie read-only reviewers, and the deferred Cline reviewer are unchanged.
50
+
51
+ ### Multi-agent hosts, phase 4: new agents, `hosts doctor`, generated host table (#52)
52
+
53
+ - **Added:** agents installed after `setup` are detected again (stat only). With `hosts.mode: auto`, the background `update auto` of a global install enables and syncs them; a host you disabled stays disabled. With `manual` (default), `status` prints one short notice per new agent, at most once a day. Nothing is written or shown in CI, in `--json` output, or with `AEL_NO_AUTO_UPDATE=1`. `update auto --json` reports `hosts.added`.
54
+ - **Added:** `hosts doctor [--json]`: per enabled host, how many copies of the core skill it sees across the folders it scans, whether they are identical, and which AEL files still need a sync. Read-only; exits 1 when something needs attention.
55
+ - **Changed:** the README host table is generated from `lib/hosts/registry.js` (`npm run build:hosts-table`); `npm test` fails when it drifts.
56
+
57
+ ### Multi-agent hosts, phase 3: own-folder hosts (#51)
58
+
59
+ - **Added:** Cline (`~/.cline/skills`), Kiro (`~/.kiro/skills`), and Qwen Code (`~/.qwen/skills`) get their own byte-identical copy of the skill, because they do not read `~/.agents/skills/`.
60
+ - **Added:** Roo Code and JetBrains Junie, which the current docs show also read `~/.agents/skills/`, so they use the shared copy (the research report had marked this as inferred "no").
61
+ - **Added:** reviewer subagents for Kiro (`~/.kiro/agents/*.md`, `tools: [read]`), Qwen (`~/.qwen/agents/*.md`, `approvalMode: plan`), and Junie (`~/.junie/agents/*.md`, `tools: [Read, Grep]`). Cline and Roo get none (no documented file format), so the loop runs `CONTEXT_ISOLATION_ONLY` there.
62
+
63
+ ### Multi-agent hosts, phase 2: shared-folder hosts (#50)
64
+
65
+ - **Added:** OpenCode, Windsurf/Devin Desktop, Amp, Factory Droid, Augment (Auggie), Zed, and Goose to the host registry. All of them read the shared `~/.agents/skills/` folder, so they use the same single copy of the skill and never get a second one in their own folders.
66
+ - **Added:** reviewer subagents where the host supports file-based ones: OpenCode `~/.config/opencode/agents/*.md` (`mode: subagent`, edits denied), Factory `~/.factory/droids/*.md` (`tools: read-only`), and Augment `~/.augment/agents/*.md`. Amp (TypeScript plugins), Zed, Goose, and Windsurf have no file-based reviewer agent, so the loop runs DA and Judge as `CONTEXT_ISOLATION_ONLY` there.
67
+
68
+ ### Multi-agent hosts, phase 1: host registry, setup, and `hosts` (#49)
69
+
70
+ - **Added:** a data-driven host registry (`lib/hosts/registry.js`). Each entry holds detection signals, the skill folder (the shared `~/.agents/skills` or the host's own), the folders the host scans, the reviewer subagent format, official doc links, and a verification date. Tier 1 hosts: Claude Code, Codex CLI, Gemini CLI, Antigravity (IDE/2.0 and the `agy` CLI), Grok CLI, Cursor, and GitHub Copilot.
71
+ - **Added:** detection by config folder or by an executable on `PATH`. The binary is checked with `stat` only and never executed.
72
+ - **Added:** reviewer subagents in each host's own format, all from the same `agents/shared/*.body.md`: Codex `~/.codex/agents/*.toml` (read-only sandbox), Gemini CLI `~/.gemini/agents/*.md`, Cursor `~/.cursor/agents/*.md` (`readonly`), and Copilot `~/.copilot/agents/*.agent.md`.
73
+ - **Added:** `setup [--yes] [--hosts a,b] [--mode auto|manual] [--json]`, which runs once and asks before writing. Without a TTY it prints the plan and writes nothing unless `--yes` is passed. Also added: `hosts list [--json]`, `hosts enable <id...>`, and `hosts disable <id...>`. Disabling removes only manifest-tracked files that AEL wrote and you did not edit. The shared folder stays while any enabled host still reads it.
74
+ - **Added:** a first-run hint that replaces a `postinstall` hook. It appears on interactive stderr at most once a day until hosts are chosen, never in CI or `--json`, and can be silenced with `AEL_NO_SETUP_HINT=1`. The package still defines no install script.
75
+ - Until `setup` runs, `sync-hosts` and `update auto` write only to hosts whose config folder already exists, or that an earlier sync already installed. Hosts found only on `PATH` wait for `setup`.
76
+
77
+ ### Multi-agent hosts, phase 0: close the host gaps (#48)
78
+
79
+ - **Fixed:** the `ai-engineering-loop` skill now lands in the shared `~/.agents/skills/` folder, so Codex, Gemini CLI, and the other hosts that read it see the loop. Grok, Gemini CLI, and Codex installs trigger it.
80
+ - **Fixed:** Gemini CLI no longer gets Antigravity's `~/.gemini/config/skills/` path. Antigravity keeps `~/.gemini/config/skills/`, and its Devil's Advocate and Judge now install as `~/.gemini/config/agents/<name>.md` subagents (`subagent: true`) instead of `~/.agents/*.md`.
81
+ - **Changed:** one host-neutral `SKILL.md` (standard `name`/`description` frontmatter only) is generated for every host, byte-identical everywhere. Per-host spawn rules moved to `references/loop-hosts.md`. Grok no longer gets its own skill copies (it reads `~/.claude/skills` and `~/.agents/skills`), and the `user-invocable` overlay is gone (Grok's default is already `true`).
82
+ - **Removed:** `~/.agents/workflows/ai-engineering-loop.md`, `~/.agents/{devil-advocate,judge}.md`, and the `~/.claude/commands` and `~/.grok/commands` copies. The skill already provides `/ai-engineering-loop`. `sync-hosts` deletes these files where AEL wrote them, and keeps them if you edited them.
83
+ - **Note:** the Claude skill no longer pre-approves tools through `allowed-tools`, because other hosts (for example Copilot) treat that field as a permission grant. Claude Code may ask for permission a little more often.
84
+
85
+ ### `run --abandon` for stale runs (#46)
86
+
87
+ - **Added:** `run --abandon [--run <id>] --reason <text> --by <name> [--yes] [--json]`. It moves a run that will never finish to `CANCELLED`, records reason, actor, and time in the run's history ledger (recipe-bound runs also get a `RUN_CANCELLED` event), and releases `current.json` so `refresh --non-destructive` and `update auto` process the project again. Run data is kept. With `--run <id>` for a non-current run, the current pointer is left alone.
88
+ - ASSISTED runs ask for confirmation (or `--yes`). UNATTENDED runs are refused (exit 2) unless a human passes `--yes`. Finished runs and "no current run" exit 2. `--help` writes nothing, and unknown flags are rejected before any write.
89
+ - `status` (text and `--json` `activeRun`), `state`, and `projects list` point at `run --abandon` when the active run has not moved for 7 days or more. The "skipping refresh" message and the pending-projects update summary suggest it too.
90
+ - A pointer renamed by hand to `runs/current.stale-*.json` is simply ignored.
91
+
9
92
  ## 1.14.0 - 2026-10-10
10
93
 
11
94
  ### Auto-update and project registry (#37)
package/README.md CHANGED
@@ -89,6 +89,15 @@ npx ai-engineering-loop update rollback --yes
89
89
 
90
90
  Global installs apply patch and minor releases automatically. They then re-sync host skills and refresh every registered project, keeping your edits (new templates arrive as `*.ael-new`). Project installs only show a short notice (current -> latest, a few changelog highlights, the exact `npm`/`pnpm`/`yarn`/`bun` command, how to silence it), at most once a day per project, because AEL never edits your `package.json`. Projects from versions before hash tracking are overwritten on their first update, with the old files kept in `.ai-engineering-loop/.ael-backup/` and restored by `update rollback`. Major updates run `migrate --from <old>` after install. Opt out with `AEL_NO_AUTO_UPDATE=1`; CI is always off. There is no daemon, so other machines pick up an update the next time the CLI runs there.
91
91
 
92
+ Projects with an unfinished run are skipped until that run ends. If a run was simply left behind, close it (the run is kept, marked `CANCELLED`, and `current.json` is released):
93
+
94
+ ```bash
95
+ npx ai-engineering-loop run --abandon --reason "left behind after delivery" --by ega # asks to confirm; add --yes to skip
96
+ npx ai-engineering-loop run --abandon --run <run-id> --reason "superseded" --by ega --yes # a non-current run
97
+ ```
98
+
99
+ `status`, `state`, and `projects list` show this hint when an active run has not moved for 7 days. UNATTENDED runs need `--yes` from a human.
100
+
92
101
  When context packs exceed their budget, the CLI now reports the limit and a per-file size/token estimate so an agent can choose smaller files without trial and error. For a delivery gate blocked by a recipe approval node, inspect `node status --run <run-id>` and explicitly approve the READY prerequisite; the gate error points to the actionable command.
93
102
 
94
103
  ## Meet Workflow Studio
@@ -157,14 +166,53 @@ Under the hood, these moments use eight evidence-backed stages. The rigor is the
157
166
 
158
167
  AI Engineering Loop is designed to work with the tools developers already use:
159
168
 
160
- - **Claude Code**
161
- - **Grok CLI**
162
- - **Gemini / Antigravity**
163
- - Other agent hosts that can read project instructions and run local commands
169
+ <!-- hosts-table:start (generated from lib/hosts/registry.js; run npm run build:hosts-table) -->
170
+ | Host | id | Certification | Skill folder | Reviewer agents | Detected by |
171
+ |---|---|---|---|---|---|
172
+ | Claude Code | `claude` | experimental | `~/.claude/skills` | `~/.claude/agents` | `~/.claude`, `claude` |
173
+ | Codex CLI | `codex` | experimental | `~/.agents/skills` (shared) | `~/.codex/agents` | `~/.codex`, `codex` |
174
+ | Gemini CLI | `gemini` | experimental | `~/.agents/skills` (shared) | `~/.gemini/agents` | `~/.gemini`, `gemini` |
175
+ | Antigravity (IDE / 2.0) | `antigravity` | experimental | `~/.gemini/config/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity`, `antigravity` |
176
+ | Antigravity CLI (agy) | `antigravity-cli` | experimental | `~/.gemini/antigravity-cli/skills` | `~/.gemini/config/agents` | `~/.gemini/antigravity-cli`, `agy` |
177
+ | Grok CLI | `grok` | experimental | `~/.agents/skills` (shared) | `~/.grok/agents` | `~/.grok`, `grok` |
178
+ | Cursor (editor + CLI) | `cursor` | experimental | `~/.agents/skills` (shared) | `~/.cursor/agents` | `~/.cursor`, `cursor-agent`, `cursor` |
179
+ | GitHub Copilot (CLI / VS Code) | `copilot` | experimental | `~/.agents/skills` (shared) | `~/.copilot/agents` | `~/.copilot`, `copilot` |
180
+ | OpenCode | `opencode` | experimental | `~/.agents/skills` (shared) | `~/.config/opencode/agents` | `~/.config/opencode`, `opencode` |
181
+ | Windsurf / Devin Desktop | `windsurf` | instruction-only | `~/.agents/skills` (shared) | none (in-session review) | `~/.codeium/windsurf`, `~/.config/devin` |
182
+ | Amp | `amp` | instruction-only | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/amp`, `amp` |
183
+ | Factory Droid | `factory` | experimental | `~/.agents/skills` (shared) | `~/.factory/droids` | `~/.factory`, `droid` |
184
+ | Augment (Auggie) | `augment` | experimental | `~/.agents/skills` (shared) | `~/.augment/agents` | `~/.augment`, `auggie` |
185
+ | Zed | `zed` | instruction-only | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/zed`, `~/Library/Application Support/Zed`, `zed` |
186
+ | Goose | `goose` | instruction-only | `~/.agents/skills` (shared) | none (in-session review) | `~/.config/goose`, `goose` |
187
+ | Cline | `cline` | instruction-only | `~/.cline/skills` | none (in-session review) | `~/.cline`, `cline` |
188
+ | Roo Code | `roo` | instruction-only | `~/.agents/skills` (shared) | none (in-session review) | `~/.roo` |
189
+ | Kiro (IDE + CLI) | `kiro` | experimental | `~/.kiro/skills` | `~/.kiro/agents` | `~/.kiro`, `kiro-cli`, `kiro` |
190
+ | Qwen Code | `qwen` | experimental | `~/.qwen/skills` | `~/.qwen/agents` | `~/.qwen`, `qwen` |
191
+ | JetBrains Junie | `junie` | experimental | `~/.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
+ Not supported (no native skills): Aider, Continue.
196
+ <!-- hosts-table:end -->
197
+
198
+ Every host gets the **same** `ai-engineering-loop` skill (byte-identical, so an agent that scans several skill folders never sees two different versions). The few host-specific spawn rules live in its `references/loop-hosts.md`. Each host follows the same Goal, verification, review, and approval rules.
199
+
200
+ Install once, then let AEL find your agents:
201
+
202
+ ```bash
203
+ npm i -g ai-engineering-loop
204
+ ai-engineering-loop setup # detects agents (config folder or binary on PATH, never executed), asks, installs
205
+ ai-engineering-loop hosts list # what is detected / enabled, and where each host reads skills
206
+ ai-engineering-loop hosts doctor # per host: copies of the skill it sees, identical or not, files to sync
207
+ ai-engineering-loop hosts enable cursor copilot
208
+ ai-engineering-loop hosts disable codex # removes the files AEL wrote there (edited files are kept)
209
+ ```
210
+
211
+ There is no `postinstall` hook: npm 7+ hides its output, pnpm 10 and Bun block it, and `--ignore-scripts` skips it. Instead the first interactive command suggests `setup` (at most once a day; silence with `AEL_NO_SETUP_HINT=1`). `setup` without a terminal only prints the plan unless you pass `--yes`. Until you run `setup`, `sync-hosts` keeps the old behaviour: it writes only to hosts whose config folder already exists.
164
212
 
165
- The project includes ready-to-use skills and reviewer roles for supported hosts. Each host follows the same Goal, verification, review, and approval rules.
213
+ Agents you install later are noticed by `status` and the background `update auto` (stat only, cheap). With `auto` (the answer `setup` suggests when it asks; just press Enter), a global install enables and syncs them on its own; with `manual` (the default for `setup --yes` and any non-interactive run) you get one short notice per new agent, at most once a day. Nothing is written or shown in CI, in `--json` output, or with `AEL_NO_AUTO_UPDATE=1`.
166
214
 
167
- `sync-hosts` installs the **core** pack by default: the `ai-engineering-loop` skill, Devil's Advocate and Judge agents, commands, and the small helper skills the loop itself uses. Optional packs stay out of every session's skill index until you ask for them:
215
+ `sync-hosts` installs the **core** pack by default: the `ai-engineering-loop` skill, Devil's Advocate and Judge agents, and the small helper skills the loop itself uses. Optional packs stay out of every session's skill index until you ask for them:
168
216
 
169
217
  ```bash
170
218
  npx ai-engineering-loop sync-hosts --pack backend # framework-agnostic backend best practices
@@ -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/`, `~/.grok/skills/`, `~/.gemini/config/skills/`. 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. |