@amsterdamdatalabs/enact-extensions 0.1.26 → 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.
|
@@ -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`.
|