ai-engineering-loop 2.1.0 → 2.3.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.
- package/.agents/skills/ai-engineering-loop/SKILL.md +4 -4
- package/.agents/skills/ai-engineering-loop/references/loop-deliver.md +2 -2
- package/.agents/skills/ai-engineering-loop/references/loop-goal.md +3 -3
- package/.agents/skills/ai-engineering-loop/references/loop-maker.md +1 -0
- package/.agents/skills/ai-engineering-loop/references/loop-review.md +3 -4
- package/.agents/skills/ai-engineering-loop/references/loop-verify.md +3 -3
- package/.claude/agents/judge.md +5 -2
- package/.grok/agents/judge.md +5 -2
- package/CHANGELOG.md +46 -0
- package/agents/maker.md +1 -1
- package/agents/shared/judge.body.md +5 -2
- package/bin/ai-engineering-loop.js +303 -77
- package/core/definition-of-done.md +2 -2
- package/core/escalation-policy.md +1 -1
- package/core/goal-contract.md +1 -1
- package/core/iteration-policy.md +2 -1
- package/core/judge-policy.md +10 -4
- package/core/local-workflow-studio.md +12 -7
- package/core/orchestration-model.md +8 -7
- package/core/repo-config-schema.md +2 -2
- package/core/runtime-safety.md +3 -3
- package/lib/auto-update.js +8 -14
- package/lib/claimed-vs-reality.js +2 -2
- package/lib/cli-args.js +3 -1
- package/lib/docs.js +1 -1
- package/lib/doctor.js +0 -6
- package/lib/escalation.js +1 -1
- package/lib/fsutil.js +88 -0
- package/lib/gates.js +69 -27
- package/lib/generate-workflow.js +0 -29
- package/lib/goal-runtime.js +3 -2
- package/lib/guard-hooks.js +26 -7
- package/lib/guard.js +100 -10
- package/lib/hosts/doctor.js +1 -5
- package/lib/impact-map.js +4 -9
- package/lib/jsonl-ledger.js +104 -0
- package/lib/learn.js +4 -9
- package/lib/loop-groups.js +0 -25
- package/lib/migrations.js +1 -5
- package/lib/no-progress.js +119 -0
- package/lib/node-evidence.js +873 -0
- package/lib/orchestration.js +5 -361
- package/lib/personal-workflow.js +1 -1
- package/lib/quick.js +152 -0
- package/lib/receipt.js +1 -5
- package/lib/recipe-builder.js +3 -35
- package/lib/recipe-graph.js +2 -63
- package/lib/recipe.js +2 -4
- package/lib/review-ingest.js +116 -0
- package/lib/run-abandon.js +2 -1
- package/lib/run-checkout.js +8 -13
- package/lib/run-compaction.js +4 -12
- package/lib/run-interactions.js +16 -71
- package/lib/run-lifecycle.js +25 -77
- package/lib/run-state.js +68 -17
- package/lib/run-watcher.js +11 -14
- package/lib/runtime-files.js +45 -1
- package/lib/safe-context.js +17 -6
- package/lib/sandbox.js +2 -1
- package/lib/smart-context.js +3 -13
- package/lib/spawn-command.js +94 -0
- package/lib/studio-layout.js +2 -8
- package/lib/studio-runtime.js +2 -1
- package/lib/studio-server.js +25 -5
- package/lib/tier.js +36 -10
- package/lib/user-state.js +2 -17
- package/lib/verification-lanes.js +115 -0
- package/lib/verification-recorder.js +110 -22
- package/lib/workflow-runtime.js +7 -4
- package/package.json +1 -2
- package/policies/review-budget.md +1 -1
- package/studio/app.js +734 -132
- package/studio/index.html +13 -4
- package/studio/styles.css +75 -20
- package/.claude/skills/ai-engineering-loop/SKILL.md +0 -62
- package/.claude/skills/ai-engineering-loop/references/loop-commands.md +0 -24
- package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +0 -10
- package/.claude/skills/ai-engineering-loop/references/loop-goal.md +0 -11
- package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +0 -48
- package/.claude/skills/ai-engineering-loop/references/loop-maker.md +0 -14
- package/.claude/skills/ai-engineering-loop/references/loop-review.md +0 -20
- package/.claude/skills/ai-engineering-loop/references/loop-risky.md +0 -9
- package/.claude/skills/ai-engineering-loop/references/loop-verify.md +0 -20
- package/.claude/skills/animate/RECIPES.md +0 -324
- package/.claude/skills/animate/SKILL.md +0 -207
- package/.claude/skills/animate-expo/RECIPES.md +0 -385
- package/.claude/skills/animate-expo/SKILL.md +0 -263
- package/.claude/skills/animation-vocabulary/SKILL.md +0 -181
- package/.claude/skills/apple-design/SKILL.md +0 -290
- package/.claude/skills/ask-sonner/API.md +0 -64
- package/.claude/skills/ask-sonner/SKILL.md +0 -88
- package/.claude/skills/backend-development/SKILL.md +0 -272
- package/.claude/skills/backend-development/references/api-design-guidelines.md +0 -95
- package/.claude/skills/backend-development/references/query-and-database-best-practices.md +0 -53
- package/.claude/skills/backend-development/references/security-checklist.md +0 -60
- package/.claude/skills/emil-design-eng/SKILL.md +0 -674
- package/.claude/skills/find-animation-opportunities/SKILL.md +0 -140
- package/.claude/skills/improve-animations/AUDIT.md +0 -115
- package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
- package/.claude/skills/improve-animations/SKILL.md +0 -109
- package/.claude/skills/mobile-native/SKILL.md +0 -311
- package/.claude/skills/pick-ui-library/SKILL.md +0 -85
- package/.claude/skills/prototype/PICKER.md +0 -197
- package/.claude/skills/prototype/SKILL.md +0 -98
- package/.claude/skills/review-animations/SKILL.md +0 -120
- package/.claude/skills/review-animations/STANDARDS.md +0 -187
- package/.claude/skills/write-swift/SKILL.md +0 -396
- package/lib/intern-catalog.js +0 -53
package/studio/index.html
CHANGED
|
@@ -25,10 +25,16 @@
|
|
|
25
25
|
<span id="live-connection-message"></span>
|
|
26
26
|
<button id="retry-live-connection" type="button">Retry now</button>
|
|
27
27
|
</div>
|
|
28
|
-
<div class="pending-banner" hidden></div>
|
|
29
28
|
<ol id="stage-rail" class="stage-rail" aria-label="Run stages"></ol>
|
|
30
|
-
<div class="
|
|
31
|
-
<
|
|
29
|
+
<div id="question-banner" class="pending-banner question-banner" hidden></div>
|
|
30
|
+
<div class="live-columns">
|
|
31
|
+
<section id="live-current" class="current-step" aria-label="Current step"></section>
|
|
32
|
+
<div id="live-meta" class="live-meta" aria-label="Compliance and budget"></div>
|
|
33
|
+
</div>
|
|
34
|
+
<section class="live-timeline">
|
|
35
|
+
<h2 class="live-card-title">Timeline</h2>
|
|
36
|
+
<ol id="run-journey" class="run-journey" aria-label="Run progress"></ol>
|
|
37
|
+
</section>
|
|
32
38
|
</section>
|
|
33
39
|
<section id="runs-view" class="runs-view" hidden>
|
|
34
40
|
<label class="run-search"><span>Search runs</span><input id="run-search" type="search" placeholder="Name, task…" autocomplete="off"></label>
|
|
@@ -126,8 +132,11 @@
|
|
|
126
132
|
<div><dt>Arrow keys</dt><dd>Move between nodes</dd></div>
|
|
127
133
|
<div><dt>Enter</dt><dd>Open the selected node</dd></div>
|
|
128
134
|
<div><dt>Esc</dt><dd>Close the panel or clear the selection</dd></div>
|
|
135
|
+
<div><dt>Two-finger scroll</dt><dd>Pan the canvas</dd></div>
|
|
136
|
+
<div><dt>Pinch</dt><dd>Zoom around the cursor</dd></div>
|
|
137
|
+
<div><dt>Drag empty canvas</dt><dd>Pan</dd></div>
|
|
138
|
+
<div><dt>Shift + drag</dt><dd>Marquee select</dd></div>
|
|
129
139
|
<div><dt>Space + drag</dt><dd>Pan</dd></div>
|
|
130
|
-
<div><dt>Wheel / pinch</dt><dd>Zoom</dd></div>
|
|
131
140
|
<div><dt>⌘Z / ⇧⌘Z</dt><dd>Undo and redo wiring</dd></div>
|
|
132
141
|
<div><dt>Delete</dt><dd>Remove the selected connection</dd></div>
|
|
133
142
|
<div><dt>?</dt><dd>Show or hide these shortcuts</dd></div>
|
package/studio/styles.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
:root{color-scheme:dark;--bg:#18181b;--canvas:#202024;--panel:#242428;--raised:#2c2c31;--line:#3a3a40;--muted:#9a9aa4;--text:#f3f3f5;--accent:#28ad00;--accent-hover:#218f00;--accent-soft:#153c0d;--ok:#48c78e;--danger:#ef6262;--warning:#e4a853}
|
|
2
2
|
*{box-sizing:border-box}
|
|
3
|
-
|
|
3
|
+
html{overscroll-behavior:none}
|
|
4
|
+
body{margin:0;background:var(--bg);color:var(--text);font:13px Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden;overscroll-behavior:none}
|
|
4
5
|
button,select,input,textarea{font:inherit;color:inherit}
|
|
5
6
|
button{border:1px solid var(--line);border-radius:6px;background:var(--raised);padding:8px 12px;cursor:pointer}button:hover{background:#35353b}button:disabled{opacity:.35;cursor:not-allowed}
|
|
6
7
|
.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:650}.primary:hover{background:var(--accent-hover)}
|
|
@@ -11,7 +12,7 @@ button{border:1px solid var(--line);border-radius:6px;background:var(--raised);p
|
|
|
11
12
|
.run-summary{margin:auto;color:var(--muted);font-size:12px}.secure{color:var(--ok);font-size:11px}
|
|
12
13
|
.more-menu{position:relative}.more-menu summary{list-style:none;padding:8px 10px;border-radius:6px;cursor:pointer;font-weight:700}.more-menu summary:hover{background:var(--raised)}
|
|
13
14
|
.more-menu>div{position:absolute;right:0;top:40px;width:210px;padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 16px 40px #0008}.more-menu button{display:block;width:100%;border:0;text-align:left;background:transparent}
|
|
14
|
-
main{height:calc(100vh - 56px);position:relative}.canvas{position:absolute;inset:0;overflow:hidden;outline:none;background-color:var(--canvas);background-image:radial-gradient(#45454c 1px,transparent 1px);background-size:24px 24px;cursor:grab;touch-action:none}.canvas:active{cursor:grabbing}.canvas.drop-ready{box-shadow:inset 0 0 0 2px var(--accent)}
|
|
15
|
+
main{height:calc(100vh - 56px);position:relative}.canvas{position:absolute;inset:0;overflow:hidden;outline:none;overscroll-behavior:none;background-color:var(--canvas);background-image:radial-gradient(#45454c 1px,transparent 1px);background-size:24px 24px;cursor:grab;touch-action:none}.canvas:active{cursor:grabbing}.canvas.drop-ready{box-shadow:inset 0 0 0 2px var(--accent)}
|
|
15
16
|
.rail{position:absolute;z-index:20;inset:0 auto 0 0;width:56px;padding:12px 8px;border-right:1px solid var(--line);background:#1d1d20;display:flex;flex-direction:column;align-items:center;gap:10px}.rail button{width:40px;height:40px;padding:0;font-size:18px;display:grid;place-items:center}.rail button>span{display:grid;place-items:center;width:100%;height:100%;flex:none}.rail .add-node{border:0;border-radius:50%;background:var(--accent);color:#fff;font-size:26px}.rail>span{flex:1}.rail output{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:0;background:var(--muted)}.rail output.valid{background:var(--ok)}.rail output.invalid{background:var(--danger)}
|
|
16
17
|
.library,.inspector,.execution-panel{position:absolute;z-index:25;background:var(--panel);border:1px solid var(--line);box-shadow:0 16px 50px #0008}
|
|
17
18
|
.library{left:66px;top:10px;bottom:10px;width:300px;border-radius:10px;transform:translateX(-380px);transition:transform .18s ease;overflow:auto}.library.open{transform:translateX(0)}
|
|
@@ -60,16 +61,50 @@ dialog{border:1px solid #505057;border-radius:4px;background:var(--panel);color:
|
|
|
60
61
|
|
|
61
62
|
.watched-root{max-width:28vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font:11px ui-monospace,monospace}
|
|
62
63
|
.live-mode{flex:none;padding:3px 8px;border:1px solid var(--line);border-radius:999px;color:#91dc7c;font:10px ui-monospace,monospace;letter-spacing:.04em}
|
|
63
|
-
.live-view{position:absolute;inset:0;padding:28px 34px;overflow:auto;background:var(--canvas)}
|
|
64
|
+
.live-view{position:absolute;inset:0;padding:28px 34px;overflow:auto;overscroll-behavior:contain;background:var(--canvas)}
|
|
64
65
|
.live-view[hidden],.runs-view[hidden],.canvas[hidden]{display:none}
|
|
65
|
-
.stage-rail{display:
|
|
66
|
-
.stage-rail
|
|
67
|
-
.stage-rail li
|
|
68
|
-
.
|
|
69
|
-
.
|
|
70
|
-
.
|
|
71
|
-
.
|
|
66
|
+
.stage-rail{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0 0 16px;padding:18px 8px 8px;list-style:none;position:relative}
|
|
67
|
+
.stage-rail::before{content:"";position:absolute;left:8%;right:8%;top:26px;height:4px;border-radius:4px;background:#343a35}
|
|
68
|
+
.stage-rail li{position:relative;z-index:1;margin:0;padding:0;border:0;background:transparent;color:var(--text);text-align:center;text-transform:uppercase;letter-spacing:.06em;font:11px ui-monospace,monospace}
|
|
69
|
+
.stage-rail li::before{content:"";display:block;width:16px;height:16px;margin:0 auto 10px;border:3px solid #3b433d;border-radius:50%;background:#1c211d}
|
|
70
|
+
.stage-rail li strong,.stage-rail li span{display:block}
|
|
71
|
+
.stage-rail li span{margin-top:2px;color:#6c746e;letter-spacing:0;text-transform:none;font-family:inherit}
|
|
72
|
+
.stage-rail li.passed::before{border-color:#28ad00;background:#28ad00}
|
|
73
|
+
.stage-rail li.active{color:#eef1ee}
|
|
74
|
+
.stage-rail li.active::before{border-color:#28ad00;background:#1c211d;box-shadow:0 0 0 6px #28ad0029}
|
|
75
|
+
.stage-rail li.failed::before{border-color:var(--danger);background:#3a2222}
|
|
76
|
+
.stage-rail li.pending{color:#6c746e}
|
|
77
|
+
.live-columns{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(260px,.9fr);gap:16px;align-items:start}
|
|
78
|
+
.live-meta{display:flex;flex-direction:column;gap:16px;margin:0}
|
|
79
|
+
.chip-row{display:flex;flex-wrap:wrap;gap:8px}
|
|
80
|
+
.live-meta .chip,.current-step .chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--line);border-radius:999px;background:#1d211f}
|
|
81
|
+
.live-meta .chip span,.current-step .chip span{color:#6c746e;font:10px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase}
|
|
82
|
+
.live-meta .chip strong,.current-step .chip strong{color:var(--text);font-size:12px;font-weight:650}
|
|
83
|
+
.compliance-card,.events-card,.current-step,.live-timeline{border:1px solid #2c312d;border-radius:12px;background:#1b1f1d;padding:16px}
|
|
84
|
+
.current-step{border-left:4px solid #83db69}
|
|
85
|
+
.live-timeline{margin-top:16px}
|
|
86
|
+
.live-card-title{margin:0 0 12px;color:#6c746e;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
|
|
87
|
+
.current-head{display:flex;gap:12px;align-items:center}
|
|
88
|
+
.current-head h2{margin:0;font-size:19px}
|
|
89
|
+
.current-head p{margin:3px 0 0;color:#9aa39c}
|
|
90
|
+
.current-activity{margin:14px 0}
|
|
91
|
+
.current-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
|
|
92
|
+
.current-next{margin:12px 0 0;color:#6c746e}
|
|
93
|
+
.budget-row{display:flex;align-items:center;gap:10px;margin-top:14px;color:#6c746e}
|
|
94
|
+
.budget-row .meter{flex:1;margin:0}
|
|
95
|
+
.event-row,.step-group li{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:baseline;margin:0;padding:6px 0}
|
|
96
|
+
.event-row .who,.step-group h3{font-weight:650}
|
|
97
|
+
.step-group h3{margin:0 0 4px}
|
|
98
|
+
.timeline-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
|
|
99
|
+
.step-group ul{list-style:none;margin:0;padding:0}
|
|
100
|
+
.pending-banner,.question-banner{display:flex;flex-direction:column;gap:8px;margin:0 0 16px;padding:12px 14px;border:1px solid #2f5a22;border-left:5px solid #83db69;border-radius:12px;background:#1a2418}
|
|
101
|
+
.pending-banner[hidden],.question-banner[hidden]{display:none}
|
|
102
|
+
.answer-form{display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:100%}
|
|
103
|
+
.answer-form p{flex:1;min-width:200px;margin:0}
|
|
104
|
+
.answer-form textarea{flex:1;min-width:180px;min-height:40px;padding:8px;border:1px solid #2c312d;border-radius:8px;background:#141615}
|
|
105
|
+
.run-journey{list-style:none;margin:0;padding:0}
|
|
72
106
|
.run-journey li.event{color:var(--muted);font:11px ui-monospace,monospace}
|
|
107
|
+
@media(max-width:900px){.live-columns,.timeline-columns{grid-template-columns:1fr}.stage-rail{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
73
108
|
.canvas-toolbar{left:14px;top:14px;bottom:auto}
|
|
74
109
|
.preview-edge{display:none;fill:none;stroke:var(--accent);stroke-width:2;stroke-dasharray:6 5;vector-effect:non-scaling-stroke}
|
|
75
110
|
|
|
@@ -101,17 +136,37 @@ dialog{border:1px solid #505057;border-radius:4px;background:var(--panel);color:
|
|
|
101
136
|
.node[data-status="waiting"] .node-status{color:var(--warning)}
|
|
102
137
|
@media (prefers-reduced-motion:reduce){.edge.edge-active,.node[data-status="active"] .node-tile,.node[data-status="active"] .node-mark::before{animation:none}}
|
|
103
138
|
|
|
104
|
-
#node-panel{position:absolute;z-index:18;top:0;right:0;bottom:0;width:
|
|
139
|
+
#node-panel{position:absolute;z-index:18;top:0;right:0;bottom:0;width:480px;overscroll-behavior:contain;background:#171a18;border-left:1px solid #2c312d;box-shadow:-16px 0 40px #0006;color:var(--text)}
|
|
105
140
|
#node-panel[hidden]{display:none}
|
|
106
141
|
.node-panel-frame{display:flex;flex-direction:column;height:100%;min-height:0}
|
|
107
|
-
.node-panel-head{display:grid;grid-template-columns:44px minmax(0,1fr) auto;
|
|
108
|
-
.panel-type-icon{
|
|
142
|
+
.node-panel-head{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:4px 12px;align-items:center;padding:18px 16px 4px}
|
|
143
|
+
.panel-type-icon{width:44px;height:44px;border-radius:12px}
|
|
109
144
|
.panel-type-icon svg{width:24px;height:24px}
|
|
110
|
-
.node-panel-titles{
|
|
145
|
+
.node-panel-titles{min-width:0}
|
|
111
146
|
.node-panel-titles h2{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;line-height:1.2}
|
|
112
147
|
.node-panel-titles p{margin:3px 0 0;color:#9aa39c;font-size:13px}
|
|
113
|
-
.node-panel-
|
|
114
|
-
.node-
|
|
148
|
+
.node-panel-close{align-self:start;border:0;background:transparent;color:#6c746e;font-size:20px;line-height:1;padding:2px 6px}
|
|
149
|
+
.node-chip-row{display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px 0}
|
|
150
|
+
.node-chip{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 10px;border:1px solid #2c312d;border-radius:999px;background:#1d211f}
|
|
151
|
+
.chip-label{color:#6c746e;font:10px ui-monospace,monospace;letter-spacing:.06em;text-transform:uppercase}
|
|
152
|
+
.node-chip strong{font-size:12.5px;font-weight:600}
|
|
153
|
+
.status-text.status-passed{color:#28ad00}
|
|
154
|
+
.status-text.status-active{color:#83db69}
|
|
155
|
+
.status-text.status-failed{color:#ef6262}
|
|
156
|
+
.status-text.status-waiting{color:#e4a853}
|
|
157
|
+
.status-text.status-idle,.status-text.status-skipped{color:#9aa39c}
|
|
158
|
+
.tab-count{display:inline-grid;place-items:center;min-width:18px;height:16px;margin-left:6px;padding:0 5px;border-radius:8px;background:#22352a;color:#83db69;font-size:10px;font-weight:700}
|
|
159
|
+
.evidence-lines{list-style:none;margin:8px 0 0;padding:0}
|
|
160
|
+
.evidence-line{display:grid;grid-template-columns:minmax(96px,34%) minmax(0,1fr) auto;gap:4px 10px;align-items:baseline;padding:6px 0;border-top:1px solid #2a2f2c}
|
|
161
|
+
.evidence-label{color:#9aa39c;font:11px ui-monospace,monospace}
|
|
162
|
+
.evidence-value{overflow-wrap:anywhere}
|
|
163
|
+
.evidence-detail,.evidence-duration{color:#6c746e;font-size:12px;white-space:nowrap}
|
|
164
|
+
.evidence-note{margin:8px 0 0;color:#83db69;font-size:12px}
|
|
165
|
+
.artifact-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
|
|
166
|
+
.artifact-chip{border:1px solid #2c312d;border-radius:6px;background:#1a1d1b;color:#9aa39c;font:11.5px ui-monospace,monospace;padding:3px 8px}
|
|
167
|
+
button.artifact-chip{cursor:pointer}
|
|
168
|
+
.timeline-group{margin-top:4px}
|
|
169
|
+
.node-summary{font-size:14px;line-height:1.5}
|
|
115
170
|
.status-pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700}
|
|
116
171
|
.status-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
|
|
117
172
|
.status-pill.status-active{background:#203a18;color:#83db69}
|
|
@@ -121,13 +176,13 @@ dialog{border:1px solid #505057;border-radius:4px;background:var(--panel);color:
|
|
|
121
176
|
.status-pill.status-skipped,.status-pill.status-idle{background:#222624;color:#9aa39c}
|
|
122
177
|
.status-duration{color:#9aa39c;font-size:13px}
|
|
123
178
|
#node-panel .io-tabs{margin:8px 16px 0}
|
|
124
|
-
.node-panel-body{flex:1;min-height:0;overflow:auto;padding:8px 18px 28px}
|
|
179
|
+
.node-panel-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 18px 28px}
|
|
125
180
|
.node-panel-body h3{margin:16px 0 6px;color:#9aa39c;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
|
|
126
181
|
.node-panel-body p{margin:0 0 8px;line-height:1.45}
|
|
127
182
|
.node-panel-body pre{max-height:280px;overflow:auto;white-space:pre-wrap;background:#151518;padding:12px;border-radius:8px;font-size:11px}
|
|
128
183
|
.node-panel-body .empty-state{padding:36px 8px}
|
|
129
184
|
.panel-timeline{list-style:none;margin:8px 0 0;padding:0}
|
|
130
|
-
.panel-timeline li{display:grid;grid-template-columns:
|
|
185
|
+
.panel-timeline li{display:grid;grid-template-columns:minmax(120px,190px) minmax(0,1fr);gap:2px 10px;padding:8px 0;border-top:1px solid var(--line)}
|
|
131
186
|
.panel-timeline time{color:var(--muted);font:11px ui-monospace,monospace}
|
|
132
187
|
.panel-timeline strong{font-size:12px}
|
|
133
188
|
.panel-timeline span{color:#c8c8ce}
|
|
@@ -145,7 +200,7 @@ dialog{border:1px solid #505057;border-radius:4px;background:var(--panel);color:
|
|
|
145
200
|
.zoom-sep{width:1px;height:18px;margin:0 2px;background:#2c312d}
|
|
146
201
|
.zoom-level{min-width:44px;margin-left:8px;color:#6c746e;font-size:12px;text-align:right}
|
|
147
202
|
.minimap{position:absolute;z-index:12;right:14px;bottom:14px;width:180px;height:110px;background:#1a1d1b;border:1px solid #2c312d;border-radius:10px;box-shadow:0 8px 24px #0006;pointer-events:all}
|
|
148
|
-
.canvas.panel-open .minimap{right:
|
|
203
|
+
.canvas.panel-open .minimap{right:504px}
|
|
149
204
|
.minimap-passed{fill:#28ad00}
|
|
150
205
|
.minimap-active{fill:#83db69}
|
|
151
206
|
.minimap-failed{fill:#ef6262}
|
|
@@ -161,7 +216,7 @@ dialog{border:1px solid #505057;border-radius:4px;background:var(--panel);color:
|
|
|
161
216
|
.shortcut-list dd{margin:0;color:#9aa39c}
|
|
162
217
|
button:focus-visible,select:focus-visible,a:focus-visible,[role="tab"]:focus-visible,[role="button"]:focus-visible,.canvas:focus-visible{outline:2px solid #83db69;outline-offset:2px}
|
|
163
218
|
.node:focus-visible .node-tile{outline:2px solid #83db69;outline-offset:3px}
|
|
164
|
-
@media(max-width:900px){#node-panel{width:min(
|
|
219
|
+
@media(max-width:900px){#node-panel{width:min(480px,100%)}.canvas.panel-open .minimap{display:none}}
|
|
165
220
|
|
|
166
221
|
.run-summary-card{position:absolute;z-index:14;top:14px;left:50%;transform:translateX(-50%);width:min(860px,calc(100% - 280px));padding:12px 14px;border:1px solid #2c312d;border-radius:12px;background:#1a1d1bf5;box-shadow:0 12px 32px #0007}
|
|
167
222
|
.run-summary-card[hidden]{display:none}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-engineering-loop
|
|
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
|
-
---
|
|
5
|
-
<!-- Generated from skill-src/ by npm run build:skills; do not edit. -->
|
|
6
|
-
|
|
7
|
-
# AI Engineering Loop
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
## Host rules
|
|
12
|
-
|
|
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.
|
|
18
|
-
|
|
19
|
-
## Commands
|
|
20
|
-
|
|
21
|
-
`init|status|refresh|sync-hosts|generate-adapter|generate-workflow`: run `npx ai-engineering-loop <command>` (`loop-commands`); do not commit unless asked. No task: offer `workflow interview` or a task; no Run. Otherwise: the loop.
|
|
22
|
-
|
|
23
|
-
## Loop
|
|
24
|
-
|
|
25
|
-
Map (not a second OS) of the 8-stage loop: Specify (stages 0-1), Make (stages 2-4), Review (stages 5-7), Deliver (stage 8). Parent = Maker + orchestrator; Devil's Advocate (DA) and Judge are fresh **siblings**, never nested or resumed. Gate failures override prose. Never edit `state.json`/`current.json`.
|
|
26
|
-
|
|
27
|
-
Tier (from `run --json`; it only rises). Do not skip Goal Contract, verification, Devil's Advocate, or Judge gates; the tier only decides who fills them.
|
|
28
|
-
- **T0** trivial (docs, typo, lint): `gate goal`, Maker, `verify`, claimed-vs-reality, `gate review`, `gate judge` (deterministic); no subagents.
|
|
29
|
-
- **T1** normal: frozen Goal, red test, `verify`, lean DA, `gate review --json`; spawn Judge only on `judgeRequired`.
|
|
30
|
-
- **T2** risky (HIGH_RISK_PATH, DOT business logic, >10 files): add `loop-risky` (blast radius, Judge on STRONG_MODEL). Unseen risk: `run --new --tier T2 --tier-reason <why>`.
|
|
31
|
-
|
|
32
|
-
0. `run --json [--mode report-only|assisted|unattended]` (`RUN_DIR` = `.ai-engineering-loop/runs/<runId>/`). Do not run `sync-hosts` per run; if `hostSkills.stale`, ask the user. Read `.ai-engineering-loop/glossary.md`, plus `lessons.md`/`workflow.md` if present.
|
|
33
|
-
1. Goal Contract: `loop-goal`. 2-4. Maker: `loop-maker`, then `gate maker`. 5. Verify: `loop-verify`. 6-7. DA and Judge: `loop-review`. 8. Deliver: `loop-deliver`.
|
|
34
|
-
|
|
35
|
-
Invariants (every tier):
|
|
36
|
-
- AC is a failure table. Do not freeze sunny-path-only. Chat agreement is not freeze.
|
|
37
|
-
- One red test per AC row (bugs: red repro) before the fix.
|
|
38
|
-
- Write claimed-vs-reality.md after `gate verification` passes. Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality.
|
|
39
|
-
- ITERATE at most to iteration 3, each with a **new** DA.
|
|
40
|
-
- Never infer human approval.
|
|
41
|
-
- After each child `budget record` real usage or `--unavailable`; never invent counts.
|
|
42
|
-
- No secrets or hidden reasoning in activity messages.
|
|
43
|
-
|
|
44
|
-
## Report header
|
|
45
|
-
|
|
46
|
-
When a subagent returned its own result (Grok: its own `subagent_id`):
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
Execution Mode: TRUE_INDEPENDENT_AGENT
|
|
50
|
-
Independent LLM Execution: PROVEN
|
|
51
|
-
Native Subagent Invocation: AVAILABLE
|
|
52
|
-
Review Method: True Independent Agent
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
When no subagent ran (tool AVAILABLE: mode adds `(reason: <why>)`):
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Execution Mode: CONTEXT_ISOLATION_ONLY
|
|
59
|
-
Independent LLM Execution: NOT PROVEN
|
|
60
|
-
Native Subagent Invocation: UNAVAILABLE
|
|
61
|
-
Review Method: Clean-Slate Artifact Isolation Barrier
|
|
62
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Loop commands and Studio
|
|
2
|
-
|
|
3
|
-
- `init` / `status` / `refresh` / `sync-hosts`: run `npx ai-engineering-loop <command>` in the repo. `sync-hosts` installs the core pack into hosts that already exist; `--pack backend|design` opts in, and user-edited files are backed up first. Do not commit unless asked.
|
|
4
|
-
- `onboard`: load skill `project-onboarding` to fill `.ai-engineering-loop/architecture.md` and `conventions.md` from the code with evidence. Never automatic.
|
|
5
|
-
- `generate-adapter`: load skill `generate-adapter` if present. Grill Q1-Q5, then write `.ai-engineering-loop/adapter.md`. Do not start Maker.
|
|
6
|
-
- `generate-workflow`: load skill `generate-workflow` if present. Grill Q1-Q6. Q6 Maker intern: list numbered options from the host model catalog (see Host rules) plus `none`; if there is no catalog, offer only `none`. Do not type a model name. Write `.ai-engineering-loop/workflow.md` and an empty `lessons.md` if missing. Do not start Maker. Missing `maker_intern` means INVOCATION_UNAVAILABLE.
|
|
7
|
-
|
|
8
|
-
- Never run `update apply|auto|rollback|policy` unless the user asks; the CLI applies updates itself under the user's policy (`docs runtime-safety`).
|
|
9
|
-
|
|
10
|
-
## Personal workflow
|
|
11
|
-
|
|
12
|
-
No task (`ael`, "hi", "what can you do"): offer, numbered, 1) build my workflow, 2) start a task, 3) show status. Do not create a Run or edit files. For 1: `workflow interview --json`, show the pre-filled answers with their evidence, let the user confirm or change them, write the answers to a temp file, then `workflow propose --answers <file> --json` and show the diff. Install only after the user says yes: `workflow accept --proposal <id> --by <name>`. At a no-task start or at Deliver, show at most one pending `workflow suggest` proposal. Never accept for the user. The safety backbone cannot be removed (`docs personal-workflow`).
|
|
13
|
-
|
|
14
|
-
## Studio
|
|
15
|
-
|
|
16
|
-
Stage commands (`run`, `goal`, `gate`, `verify`, `review-pack`, `deliver`, `node start|activity|complete`) stream into an open Studio; `status --json` reports `studioUrl`. Emit `npx ai-engineering-loop activity heartbeat --run <runId> --phase <phase> --message <short factual summary>` only during long manual work, never before every stage. Before asking the human, persist the question with `npx ai-engineering-loop interaction question --run <runId> --id <id> --message <text>` so it appears once in Studio.
|
|
17
|
-
|
|
18
|
-
## Budget
|
|
19
|
-
|
|
20
|
-
`run --json` already reports the budget; run `budget status --run <runId>` only before each new iteration. After each child, `budget record --input <n> --output <n> --model <id> --run <runId>` from provider usage. No usage shown: `budget record --unavailable --run <runId>` once; ASSISTED continues and discloses it at delivery (do not ask the human); UNATTENDED fails that command, so stop and escalate. `budget pause` is the kill switch. The ledger mode is immutable. UNATTENDED or budget errors: `docs runtime-safety`.
|
|
21
|
-
|
|
22
|
-
## Resuming
|
|
23
|
-
|
|
24
|
-
`state --json` gives the current runId only when resuming a run. If stopping mid-loop, write `.ai-engineering-loop/tasks/handoff.md` (`docs handoff-policy`).
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Stage 8: Delivery
|
|
2
|
-
|
|
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.
|
|
5
|
-
- The PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Disclose any `budget record --unavailable`.
|
|
6
|
-
- Preview remote payloads; never include context packs, usage ledgers, raw logs, or credentials.
|
|
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.
|
|
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.
|
|
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.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Stage 1: Goal Contract
|
|
2
|
-
|
|
3
|
-
- If the user asks for ideas, list a short menu and wait; do not implement.
|
|
4
|
-
- Ambiguous task the user can answer: grill first (`docs grill-policy`): design tree, recommended answers, never ask look-up facts. T2 adds `loop-risky`.
|
|
5
|
-
- If the user prompt has no numbered AC, draft the contract (`docs goal-contract` if needed), list it, and wait. Chat agreement is not freeze.
|
|
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
|
-
- 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
|
-
- 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`).
|
|
10
|
-
- Do not edit production code until the Goal gate passes.
|
|
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,48 +0,0 @@
|
|
|
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,14 +0,0 @@
|
|
|
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
|
-
- 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.
|
|
7
|
-
- Bugs: red repro first. Features: one red test per AC row, then green.
|
|
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).
|
|
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,20 +0,0 @@
|
|
|
1
|
-
# Stages 6-7: Devil's Advocate and Judge
|
|
2
|
-
|
|
3
|
-
REPORT_ONLY runs skip these stages; their single report review is in `loop-maker`.
|
|
4
|
-
|
|
5
|
-
## Devil's Advocate (T1, T2)
|
|
6
|
-
|
|
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`).
|
|
8
|
-
- Use the runtime policy `reviewProfile` (default `lean`); upgrade to `standard` or `thorough` only when the human asks or the budget gate requires it.
|
|
9
|
-
- Spawn a new DA as a sibling (Host rules) with the pack path, the changed paths as a short list, and claimed-vs-reality.md. Do not paste Maker rationale. DA prompt includes "at most 8 tool calls; read the diff file; skip css and generated files".
|
|
10
|
-
- Iteration 2+: give unresolved findings and new hunks, not the whole diff again.
|
|
11
|
-
- Wait, `budget record` its usage (or `--unavailable`), normalize its ledger into `RUN_DIR/findings.json` with runId and diffHash, then `npx ai-engineering-loop gate review --json`. Report Spec and Standards separately.
|
|
12
|
-
|
|
13
|
-
## Judge
|
|
14
|
-
|
|
15
|
-
- T0, or T1 when `gate review --json` reports `judgeRequired: false`: run `gate judge`; the CLI writes the deterministic verdict.
|
|
16
|
-
- Otherwise run `npx ai-engineering-loop escalation --json` and resolve the required tier through the host model catalog; if unavailable, escalate to the user. T2 needs STRONG_MODEL.
|
|
17
|
-
- Judge context: only run-summary.md, verification-summary.json (or verification.json), open-findings.json/findings.json, and the Goal hash; it reads the full diff only if those contradict each other. Judge prompt includes "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
|
|
18
|
-
- Spawn a fresh sibling Judge, wait, `budget record`, write `RUN_DIR/verdict.json` with `modelTier`, then `gate judge`. A gate failure overrides optimistic prose.
|
|
19
|
-
- Acting on findings (ITERATE or human MR comments): verify each one before changing code; fix valid ones test-first, decline invalid ones with evidence (skill `ael-receiving-code-review` if installed).
|
|
20
|
-
- ITERATE while iteration < 3: fix in the parent, re-verify, spawn a **new** DA (never resume the previous child). At the iteration ceiling (3) ESCALATE to the human instead.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# T2 risky tier
|
|
2
|
-
|
|
3
|
-
Applies to HIGH_RISK_PATH changes (auth, payments, migrations, secrets, infra), DOT business logic, more than 10 files, or a manual `--tier T2`.
|
|
4
|
-
|
|
5
|
-
- Grill before the Goal (`docs grill-policy`): design tree, recommended answers, no look-up questions.
|
|
6
|
-
- Business-logic changes need a blast radius: lifecycle sketch of what reads and writes the changed state; on `adapter_type: dot` load `task-impact-inquiry`. Skip it for docs, config, or UI-copy changes.
|
|
7
|
-
- Full DA (not the T1 lean shortcut) and Judge on STRONG_MODEL resolved through the host model catalog; if unavailable, escalate to the user. Never run the deterministic Judge for T2.
|
|
8
|
-
- UNATTENDED: sandbox worktree only, and `budget pause` is the kill switch (`docs runtime-safety`).
|
|
9
|
-
- The tier never falls back once raised.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Stage 5: Verification
|
|
2
|
-
|
|
3
|
-
- One call: `npx ai-engineering-loop verify --run <runId> [--cmd "<command>"]...` (defaults to `test_unit` from `.ai-engineering-loop/verification.md`). It records each command in parallel (`--serial` for dependent commands), binds bounded, redacted evidence to the gated diff, and only when all pass runs `gate verification`, `context compact`, and scaffolds claimed-vs-reality. Shell syntax needs `--shell`.
|
|
4
|
-
- Long form (same gate): `verification record --run <runId> -- <executable> [args...]` per command, `gate verification`, `context compact --run <runId>`, `context claimed-vs-reality --run <runId>`.
|
|
5
|
-
- A failed command is recorded honestly and returns non-zero; it cannot pass the gate. Vague "seems green" is invalid.
|
|
6
|
-
- Fill `.ai-engineering-loop/tasks/claimed-vs-reality.md`: Claimed from the actual change, Reality from command output. Do not spawn DA while the file is missing or any Claimed row lacks Reality.
|
|
7
|
-
- Hand-authored artifacts: `scaffold verification|findings|delivery --run <runId>` writes an incomplete `.template.json`; edit it into the real artifact, remove `_templateOnly`, and `validate <repository-relative-file>`. Templates are never evidence.
|
|
8
|
-
- Pass run-summary.md and verification-summary.json to reviewers instead of raw logs.
|
|
9
|
-
|
|
10
|
-
## No claim without fresh evidence
|
|
11
|
-
|
|
12
|
-
Before saying "done", "fixed", "passing", or "ready", run the proving command in this iteration and cite its output; earlier runs and "should work" are not evidence.
|
|
13
|
-
|
|
14
|
-
| Claim | Required evidence |
|
|
15
|
-
|---|---|
|
|
16
|
-
| Tests pass | the test command's output this iteration, exit 0 |
|
|
17
|
-
| Bug fixed | the red repro now passes, with the command shown |
|
|
18
|
-
| AC met | its claimed-vs-reality row cites that output |
|
|
19
|
-
|
|
20
|
-
After `verify`, continue from run-summary.md and verification-summary.json, not earlier logs or chat.
|