@amsterdamdatalabs/enact-extensions 0.1.25 → 0.1.27
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/extensions/enact-evolve/skills/mined-investigate-loop/SKILL.md +68 -0
- package/extensions/enact-factory/skills/autonomous-runner/SKILL.md +10 -4
- package/extensions/enact-factory/skills/drive-loop/SKILL.md +9 -4
- package/extensions/enact-factory/skills/drive-loop/references/contract-schema.md +1 -1
- package/extensions/enact-factory/skills/handoff/SKILL.md +4 -1
- package/extensions/enact-loop/skills/enact-loop/SKILL.md +11 -3
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mined-investigate-loop
|
|
3
|
+
description: >-
|
|
4
|
+
Auto-mined procedure (enact-evolve P4 procedural tier). Before editing
|
|
5
|
+
unfamiliar code, run an investigate loop: read a file, grep to locate the
|
|
6
|
+
related symbol/usage, then read the located target — read → grep → read —
|
|
7
|
+
before making changes. Mined from 251 real Claude+Codex sessions; sessions
|
|
8
|
+
that ran this loop succeeded at 58.3% vs a 43.0% baseline (+15pp). Use when
|
|
9
|
+
navigating unfamiliar code, locating a definition/usage, or scoping a change
|
|
10
|
+
before editing. Trigger keywords: investigate, locate, find usages, where is,
|
|
11
|
+
scope a change, read before edit, navigate code.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# mined-investigate-loop (read → grep → read)
|
|
15
|
+
|
|
16
|
+
> **Provenance — machine-mined, pending human graduation (Track B G2).** This
|
|
17
|
+
> skill was produced by the enact-evolve procedural tier's execution-mining →
|
|
18
|
+
> graduation path over real session history. It is under review; do not treat it
|
|
19
|
+
> as hand-authored guidance until merged.
|
|
20
|
+
|
|
21
|
+
## The procedure
|
|
22
|
+
|
|
23
|
+
When you are about to change code you don't already hold in context, **investigate
|
|
24
|
+
before you act**:
|
|
25
|
+
|
|
26
|
+
1. **read** — open the entry file you were handed (the symbol, the failing test,
|
|
27
|
+
the reported file).
|
|
28
|
+
2. **grep** — search the repo for the related symbol / call site / definition you
|
|
29
|
+
now know to look for (don't guess the path; locate it).
|
|
30
|
+
3. **read** — open the located target and confirm the real shape before editing.
|
|
31
|
+
|
|
32
|
+
Only then edit. The loop may repeat (read → grep → read → grep → …) until the
|
|
33
|
+
change is fully scoped.
|
|
34
|
+
|
|
35
|
+
## When to use
|
|
36
|
+
|
|
37
|
+
- Navigating unfamiliar code or a new package.
|
|
38
|
+
- Locating a definition, its usages, or the blast radius of a change.
|
|
39
|
+
- Scoping an edit before making it (especially across files).
|
|
40
|
+
|
|
41
|
+
## When NOT to use
|
|
42
|
+
|
|
43
|
+
- You already have the target file and its dependencies in context — skip
|
|
44
|
+
straight to the edit.
|
|
45
|
+
- Pure debugging-thrash (grep → stream-edit → grep with no reads) is an
|
|
46
|
+
**anti-pattern** the miner explicitly rejected (see Evidence) — investigate by
|
|
47
|
+
reading, don't blind-edit-and-re-grep.
|
|
48
|
+
|
|
49
|
+
## Evidence (why this graduated)
|
|
50
|
+
|
|
51
|
+
Mined by `enact-evolve/eval/mine-procedures.mjs` over real session transcripts
|
|
52
|
+
(the existing Claude + Codex adapters → `SessionEvidence.tool_timeline`):
|
|
53
|
+
|
|
54
|
+
| field | value |
|
|
55
|
+
|---|---|
|
|
56
|
+
| corpus | 251 sessions (205 Claude + 46 Codex) |
|
|
57
|
+
| baseline zero-failure rate | 0.430 |
|
|
58
|
+
| this procedure (read → grep → read) | **60 sessions, 35 success → 0.583** |
|
|
59
|
+
| lift over baseline | **+0.153 (×1.36)** |
|
|
60
|
+
| graduation policy | rate ≥ 1.25× baseline, support ≥ 8, success ≥ 4 |
|
|
61
|
+
|
|
62
|
+
Reward signal: a session "succeeds" when it records zero failed tool/hook/watchdog
|
|
63
|
+
events (`SessionEvidence.failures` empty). Graduation is **lift-based** because the
|
|
64
|
+
absolute zero-failure base rate is low; frequency alone is rejected — the
|
|
65
|
+
highest-frequency pattern `rg → sed → rg` (debugging thrash) scored 2/13 (0.15)
|
|
66
|
+
and did **not** graduate.
|
|
67
|
+
|
|
68
|
+
Full artifact: `enact-evolve/eval/P4-mined-procedures.json`.
|
|
@@ -215,14 +215,19 @@ or return an empty session:
|
|
|
215
215
|
|
|
216
216
|
| Grader provider | Paseo flag | Notes |
|
|
217
217
|
|---|---|---|
|
|
218
|
-
| `codex` | `--mode auto` | `--mode bypass` is rejected by codex |
|
|
218
|
+
| `codex` | `--mode auto-review` | Routes the grader's eligible `on-request` approvals through codex's auto-reviewer subagent instead of BLOCKING — without it a grader can stall on an approval (e.g. a cargo/network fetch during build verification). `--mode bypass` is rejected by codex |
|
|
219
219
|
| `cursor` | default / agent | `--mode bypass` is a claude mode, NOT cursor's — previously documented wrong; cursor uses default or agent mode |
|
|
220
220
|
| `kimi` | `--mode auto` | Same as codex |
|
|
221
221
|
| `opencode` (minimax M3) | default | No special mode flag needed |
|
|
222
222
|
|
|
223
|
+
Codex mode enum (authoritative): `read-only` · `auto` · `auto-review` · `full-access`. The grader
|
|
224
|
+
stays read-only BY PROMPT; `auto-review` only governs approval handling and composes with
|
|
225
|
+
`--output-schema` verdict capture. Flip a running grader with `paseo agent mode <id> auto-review`.
|
|
226
|
+
|
|
223
227
|
**Verdict capture is STRUCTURED, not log-scraped.** Dispatch the grader with:
|
|
224
|
-
`paseo run --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
225
|
-
— stdout is the validated `{verdict, evidence}` object.
|
|
228
|
+
`paseo run --provider <graderModel> --mode auto-review --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
229
|
+
— stdout is the validated `{verdict, evidence}` object. On the codex provider, `--mode auto-review`
|
|
230
|
+
keeps on-request approvals from blocking the grader (read-only stays enforced by prompt). Recover the actual grader model and cost
|
|
226
231
|
via `paseo ls -a --label continuation=<cid> --json` then `paseo inspect <id> --json`. Watch live
|
|
227
232
|
with `paseo attach <id>` (recover the id by label first).
|
|
228
233
|
See design doc: `enact-loop/docs/design/2026-06-22-paseo-verdict-capture.md`.
|
|
@@ -243,7 +248,8 @@ lists in `FACTORY_DRIVE_DECISION_TREE.md` §4), then hand to
|
|
|
243
248
|
- `loop_start({ contract })` — the boulder activates; you cannot stop until
|
|
244
249
|
every required stage passes and every judgment stage has an independent GO.
|
|
245
250
|
- Mechanical stages → `loop_grade({ stageId })` — engine runs stage command in loop root.
|
|
246
|
-
- Judgment stages → `loop_grader_dispatch` → spawn grader on a **different model**
|
|
251
|
+
- Judgment stages → `loop_grader_dispatch` → spawn grader on a **different model**
|
|
252
|
+
(Paseo codex provider: `--mode auto-review` so on-request approvals don't block) →
|
|
247
253
|
driver relays `loop_grader_verdict` (`captureSource: "relayed"`) or grader calls directly.
|
|
248
254
|
- **No `git stash` during an active loop** — invalidates worktree fingerprints.
|
|
249
255
|
- On stall: escalate via `committee` (root-cause) or `advisor` (judgment call);
|
|
@@ -161,7 +161,7 @@ For each judgment stage:
|
|
|
161
161
|
> the factory MCP tool `factory_paseo_grader_run` runs the grader with
|
|
162
162
|
> `paseo run --output-schema --json --wait-timeout` so **stdout is the validated `{verdict,
|
|
163
163
|
> evidence}` object** — no `paseo logs | grep`. It bakes in the per-provider `--mode`
|
|
164
|
-
> (codex
|
|
164
|
+
> (codex `auto-review` so on-request approvals don't block, kimi `auto`, cursor/opencode default) and recovers the actual resolved model via
|
|
165
165
|
> `paseo ls --label` / `inspect`, which you relay as `graderModelActual` on `loop_grader_verdict`.
|
|
166
166
|
> Full design: `enact-loop/docs/design/2026-06-22-paseo-verdict-capture.md`.
|
|
167
167
|
|
|
@@ -250,11 +250,15 @@ OpenAI lineage); grade sonnet work with gpt-5.5 / opus / minimax / kimi.
|
|
|
250
250
|
|
|
251
251
|
| Provider | Paseo flag | Notes |
|
|
252
252
|
|---|---|---|
|
|
253
|
-
| `codex` | `--mode auto` | `--mode bypass` is rejected by codex |
|
|
253
|
+
| `codex` | `--mode auto-review` | Routes the grader's eligible `on-request` approvals through codex's auto-reviewer subagent instead of BLOCKING — without it a grader can stall on an approval (e.g. a cargo/network fetch during build verification). `--mode bypass` is rejected by codex |
|
|
254
254
|
| `cursor` | default / agent | `--mode bypass` is a claude mode, NOT cursor's — previously documented wrong |
|
|
255
255
|
| `kimi` | `--mode auto` | Same as codex |
|
|
256
256
|
| `opencode` (minimax M3) | default | No special mode flag needed |
|
|
257
257
|
|
|
258
|
+
Codex mode enum (authoritative): `read-only` · `auto` · `auto-review` · `full-access`. The grader
|
|
259
|
+
stays read-only BY PROMPT; `auto-review` only governs approval handling and composes with
|
|
260
|
+
`--output-schema` verdict capture. Flip a running grader with `paseo agent mode <id> auto-review`.
|
|
261
|
+
|
|
258
262
|
#### Sonnet-executor caveat
|
|
259
263
|
|
|
260
264
|
`cursor` (`cursor/claude-sonnet-4-6`) is NOT model-distinct from a sonnet executor.
|
|
@@ -264,9 +268,10 @@ escalate to opus 4.8 / gpt-5.5 for high-risk judgment. Reserve `cursor` for opus
|
|
|
264
268
|
#### Verdict capture — structured `--output-schema`, not log-scraped
|
|
265
269
|
|
|
266
270
|
Dispatch the grader with:
|
|
267
|
-
`paseo run --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
271
|
+
`paseo run --provider <graderModel> --mode auto-review --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
268
272
|
— stdout is the validated `{verdict, evidence}` object (verified on codex / cursor / opencode / kimi;
|
|
269
|
-
coexists with tool use).
|
|
273
|
+
coexists with tool use). On the codex provider, `--mode auto-review` keeps on-request approvals from
|
|
274
|
+
blocking the grader (read-only stays enforced by prompt). Recover actual grader model + cost via
|
|
270
275
|
`paseo ls -a --label continuation=<cid> --json` + `paseo inspect <id> --json`. Watch live by
|
|
271
276
|
recovering the id by label then `paseo attach <id>`.
|
|
272
277
|
Design doc: `enact-loop/docs/design/2026-06-22-paseo-verdict-capture.md`.
|
|
@@ -37,7 +37,7 @@ disclosure supplement to `SKILL.md`.
|
|
|
37
37
|
| `role` | `"architect" \| "critic" \| "code-reviewer" \| "verifier"` | yes | Determines the subagent type spawned. |
|
|
38
38
|
| `model` | string | recommended | Model ID for the grader. **Must differ from the executor model.** Cross-vendor preferred. Omit only if the harness selects automatically. |
|
|
39
39
|
| `harness` | `"paseo" \| "subagent"` | optional | How to dispatch. Default: `subagent`. Use `paseo` when the grader needs multi-step tool access. |
|
|
40
|
-
| `dispatchTool` | string | optional | Factory tool the driver uses to run a Paseo grader and capture a structured verdict — `"factory_paseo_grader_run"` (runs `paseo run --output-schema --json`, returns `{verdict, evidence}` + `graderModelActual`). Replaces `paseo logs` scraping. |
|
|
40
|
+
| `dispatchTool` | string | optional | Factory tool the driver uses to run a Paseo grader and capture a structured verdict — `"factory_paseo_grader_run"` (runs `paseo run --provider <graderModel> --mode auto-review --output-schema --json`, returns `{verdict, evidence}` + `graderModelActual`). On the codex provider `--mode auto-review` routes on-request approvals through the auto-reviewer subagent so the grader doesn't BLOCK (read-only stays enforced by prompt). Replaces `paseo logs` scraping. |
|
|
41
41
|
| `rounds` | integer | optional | Number of independent grading rounds before aggregating. Default: `1`. |
|
|
42
42
|
| `timeoutMs` | integer | optional | Grader session timeout in ms (default 30 min). Timeout → `grader-unavailable` blocker. |
|
|
43
43
|
|
|
@@ -35,7 +35,10 @@ the factory value-add the generic delegate pattern lacks.
|
|
|
35
35
|
repos, change scope, or split the item. Out-of-scope discoveries → new
|
|
36
36
|
WorkItem (the receiver follows the same rule).
|
|
37
37
|
- **The receiver still drives the loop** (its own contract + cross-vendor
|
|
38
|
-
grader). Handoff delegates the work, not the gates.
|
|
38
|
+
grader). Handoff delegates the work, not the gates. When the receiver
|
|
39
|
+
dispatches a grader via Paseo on the codex provider, it passes
|
|
40
|
+
`--mode auto-review` so the grader's on-request approvals don't block (the
|
|
41
|
+
grader stays read-only by prompt); see `drive-loop`.
|
|
39
42
|
|
|
40
43
|
## Sequence
|
|
41
44
|
|
|
@@ -72,7 +72,8 @@ identity.
|
|
|
72
72
|
|
|
73
73
|
Judgment stages must be graded by a **different model** than the executor (model-distinct, not
|
|
74
74
|
vendor/surface-distinct). The loop rejects a verdict whose grader model, session, or agent equals
|
|
75
|
-
the executor's. Graders are dispatched out-of-session via Paseo `--provider <model>`
|
|
75
|
+
the executor's. Graders are dispatched out-of-session via Paseo `--provider <model>` (use
|
|
76
|
+
`--mode auto-review` so on-request approvals don't block; see Verdict capture) for
|
|
76
77
|
cross-surface grading; in-surface graders just need a supported model that differs from the
|
|
77
78
|
executor's.
|
|
78
79
|
|
|
@@ -143,6 +144,7 @@ loop_grader_dispatch stageId=<id> [model=<grader-model>]
|
|
|
143
144
|
advancing through `fallbackModels` on re-dispatch after a spawn failure
|
|
144
145
|
- requires the resolved model to differ from the executor's (`E_NO_DIVERSITY` otherwise)
|
|
145
146
|
- launches the grader agent (read-only, same cwd) via Paseo `--provider <graderModel>`
|
|
147
|
+
(use `--mode auto-review` so on-request approvals don't block; see Verdict capture)
|
|
146
148
|
- returns the `continuationId` you must pass to step 2
|
|
147
149
|
|
|
148
150
|
**Step 2 — Record the grader's verdict** (driver-relayed is the default):
|
|
@@ -228,9 +230,15 @@ They MUST NOT call `loop_*` management tools (complete, pause, resume, retarget,
|
|
|
228
230
|
or `factory_*` tools. The runtime rejects these calls from grader sessions.
|
|
229
231
|
|
|
230
232
|
**Verdict capture is STRUCTURED, not log-scraped.** Dispatch with:
|
|
231
|
-
`paseo run --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
233
|
+
`paseo run --provider <graderModel> --mode auto-review --output-schema <verdict.json> --json --label continuation=<cid>`
|
|
232
234
|
— stdout is the validated `{verdict, evidence}` object (verified on codex / cursor / opencode / kimi;
|
|
233
|
-
coexists with tool use).
|
|
235
|
+
coexists with tool use). With the codex provider, `--mode auto-review` routes the grader's eligible
|
|
236
|
+
`on-request` approvals through codex's auto-reviewer subagent instead of BLOCKING — without it a
|
|
237
|
+
grader can stall waiting on an approval (e.g. a cargo/network fetch during build verification). The
|
|
238
|
+
grader stays read-only BY PROMPT; auto-review only governs approval handling and composes with the
|
|
239
|
+
`--output-schema` structured verdict capture. Codex mode enum (authoritative): `read-only` · `auto`
|
|
240
|
+
· `auto-review` · `full-access`. Flip a running grader with `paseo agent mode <id> auto-review`.
|
|
241
|
+
Recover actual grader model + cost via
|
|
234
242
|
`paseo ls -a --label continuation=<cid> --json` + `paseo inspect <id> --json`.
|
|
235
243
|
Watch live: recover the id by label then `paseo attach <id>`.
|
|
236
244
|
Fallback only: if structured capture is unavailable, embed evidence inline in the `evidence` field.
|