devlyn-cli 2.8.0 → 2.9.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.md CHANGED
@@ -36,9 +36,9 @@ ideate (optional) -> resolve -> ship
36
36
 
37
37
  Each skill's `SKILL.md` is the source of truth for flags and workflow. Do not duplicate.
38
38
 
39
- Engine roles: orchestrator = whichever CLI the user opened (this contract is symmetric with CLAUDE.md; measured status 2026-07-05: Claude Code + omp run the full phase-gated pipeline; in the iter-0061 minimal-repo trivial-add shape on this machine, Codex CLI also ran it when this AGENTS.md was present in the project (ordinary invocation, 4/4); without project AGENTS.md, the same shape silently skipped the pipeline (iter-0040 F6, 4/4). If you are Codex orchestrating `/devlyn:resolve`, the phase machinery is mandatory regardless of task size; if you will not run it, say so explicitly and stop — do not silently degrade to ad-hoc execution); executor (PLAN/IMPLEMENT/CLEANUP) defaults to `claude`, overridable per run with `--engine <name>` or durably via machine-local `.devlyn/engines.json` `{"executor": "<name>", "pair_judge_priority": ["<name>", ...]}`; pair judge = first available OTHER engine. Pins fail closed (`BLOCKED:<engine>-unavailable` / `BLOCKED:invalid-engine-config`); new engines plug in by shipping `_shared/adapters/<name>.md`. `/devlyn:engines` (no args) shows the role table + detected engines; `executor <name>` / `pair <name>,...` / `clear` manage the pins.
39
+ Engine roles: orchestrator = whichever CLI the user opened (this contract is symmetric with CLAUDE.md; measured status 2026-07-05: Claude Code + omp run the full phase-gated pipeline; in the iter-0061 minimal-repo trivial-add shape on this machine, Codex CLI also ran it when this AGENTS.md was present in the project (ordinary invocation, 4/4); without project AGENTS.md, the same shape silently skipped the pipeline (iter-0040 F6, 4/4). If you are Codex orchestrating `/devlyn:resolve`, the phase machinery is mandatory regardless of task size; if you will not run it, say so explicitly and stop — do not silently degrade to ad-hoc execution); executor (PLAN/IMPLEMENT/CLEANUP) defaults to `claude`, overridable per run with `--engine <name>` or durably via machine-local `.devlyn/engines.json` `{"executor": "<name>", "pair_judge_priority": ["<name>", ...]}`; pair judge = first available OTHER engine. Pins fail closed (`BLOCKED:<engine>-unavailable` / `BLOCKED:invalid-engine-config`); new engines plug in by shipping `_shared/adapters/<name>.md`. `/devlyn:engines` (no args) shows the role table + detected engines; `executor <name>` / `pair <name>,...` / `clear` manage the pins. The executor pin binds the orchestrator in plain conversation too, not only inside a skill run: when you would implement directly and executor is pinned to a non-default engine, route that work through the pin — via `/devlyn:resolve` (reads it at PHASE 0) or by delegating to that engine — instead of editing as `claude`; no pin / no file → unchanged (`claude`). The pair-judge pin stays pipeline-scoped.
40
40
 
41
- Conversational handoff + loop engineering (default entry): the orchestrating model — not the user — invokes the skills. `/devlyn:queue` fronts the intent queue (`docs/specs/queue.md`): no args = status, `add <intent>`, `drain` = serial unattended drain per the contract below. Large agreed work is written to `docs/specs/<id>/spec.md` (always a spec file; `--goal-file` is trivial/medium-only), summarized once for user review, then run hands-free via `--spec`. Outer loop per task: findings-backed verdicts (NEEDS_WORK, verify/build-gate exhaustion) get spec amendment + re-run, max 3 iterations; infrastructure / invalid-input / engine-availability / implement-empty BLOCKED verdicts surface immediately. Unattended queue drain (`docs/specs/queue.md`, strictly serial): assumptions may only take scope-narrowing, reversible, non-user-visible defaults — material ambiguity marks the item `[F] needs-review` and the drain continues.
41
+ Conversational handoff + loop engineering (default entry): the orchestrating model — not the user — invokes the skills. `/devlyn:queue` fronts the intent queue (`docs/specs/queue.md`): no args = status, `add <intent>`, `drain` = serial unattended drain per the contract below. Large agreed work is written to `docs/specs/<id>/spec.md` (always a spec file — the user's reviewed contract; free-form large assumes-and-logs instead of halting, zero-scope-signal goals still halt to ideate), summarized once for user review, then run hands-free via `--spec`. Outer loop per task: findings-backed verdicts (NEEDS_WORK, verify/build-gate exhaustion) get spec amendment + re-run, max 3 iterations; infrastructure / invalid-input / engine-availability / implement-empty BLOCKED verdicts surface immediately. Unattended queue drain (`docs/specs/queue.md`, strictly serial): assumptions may only take scope-narrowing, reversible, non-user-visible defaults — material ambiguity marks the item `[F] needs-review` and the drain continues.
42
42
 
43
43
  ## Subtractive-First Editing
44
44
 
@@ -106,6 +106,10 @@ Exclude vague claims. They produce vague fixes.
106
106
  - For installer or skill edits inside the devlyn-cli source repo, run `bash scripts/lint-skills.sh`.
107
107
  - Treat the project's own `docs/VISION.md`, `docs/ROADMAP.md`, `docs/roadmap/**`, and any local `AGENTS.md` / `CLAUDE.md` overrides as authoritative when present.
108
108
 
109
+ ### Evolution loop — orchestrator-neutral continuation
110
+
111
+ Any orchestrating engine (Claude, Codex, or future) continuing harness / loop-engineering work cold-starts from `autoresearch/HANDOFF.md` (read order inside), then `autoresearch/NORTH-STAR.md` (goal + floor/ceiling contracts + ops-test gates) and `autoresearch/PRINCIPLES.md`. Instruments and gates are scripts + files, never model memory. The pair partner is the strongest available OTHER engine — the protocol is direction-symmetric (iter-0060). On any model/version change, re-certify engine seats with the seat-fitness instrument before re-pinning `.devlyn/engines.json` (NORTH-STAR ceiling contract; iter-0064).
112
+
109
113
  ## Communication
110
114
 
111
115
  - Lead with objective evidence before opinion.
package/CLAUDE.md CHANGED
@@ -47,11 +47,13 @@ Each skill's `SKILL.md` is the source of truth for its flags and workflow — do
47
47
 
48
48
  `.devlyn/engines.json` is machine-local — not committed, not archived. Pins are promises: a pinned unavailable engine stops with `BLOCKED:<engine>-unavailable`; a name without a `_shared/adapters/<name>.md` adapter stops with `BLOCKED:invalid-engine-config`. New engines (GLM, pi-agent backends) plug in by shipping an adapter file — no skill changes. Codex BUILD/IMPLEMENT and PLAN-pair remain research-only paths behind explicit `--engine codex`.
49
49
 
50
+ **The executor pin binds the orchestrator in plain conversation too, not only inside a skill run.** When you would do implementation work directly and executor is pinned to a non-default engine, route that work through the pin — run it via `/devlyn:resolve` (which reads the pin at PHASE 0), or delegate to that engine — instead of editing as `claude`. No pin / no `.devlyn/engines.json` → unchanged (`claude`). The pair-judge pin stays pipeline-scoped.
51
+
50
52
  ### Conversational handoff + loop engineering — the default entry for all work
51
53
 
52
54
  The user does not invoke skills manually; the orchestrating model does. Small tasks: invoke `/devlyn:resolve "<goal>"` directly. Large tasks agreed in conversation:
53
55
 
54
- 1. Write the agreed contract to `docs/specs/<id>/spec.md` (+ `spec.expected.json` when mechanical verifications exist). Always a spec file for large work — never `--goal-file`, which routes into `BLOCKED:large-needs-ideation`.
56
+ 1. Write the agreed contract to `docs/specs/<id>/spec.md` (+ `spec.expected.json` when mechanical verifications exist). Always a spec file for large work — a written spec is the user's reviewed contract; free-form large now assumes-and-logs instead of halting (zero-scope-signal goals still halt to ideate).
55
57
  2. Present a one-screen plan-contract summary — the user's single review checkpoint, BEFORE the pipeline starts.
56
58
  3. On go-ahead, invoke `/devlyn:resolve --spec <path>` hands-free to completion.
57
59
  4. **Per-task outer loop**: read the terminal verdict. PASS → done. Verdicts backed by spec/verification findings (NEEDS_WORK, verify/build-gate exhaustion) → adjudicate the findings, amend the spec (recorded in the spec file; spec stays read-only inside a run), re-invoke — at most 3 outer iterations, then surface with the findings trail. Infrastructure, invalid-input, engine-availability, and implement-empty BLOCKED verdicts are not spec-amendable: surface immediately. Every iteration re-enters through durable artifacts (spec, findings, run archive), never conversation memory.
@@ -125,6 +127,10 @@ This rule exists because LLMs (including you) are trained to be helpful, compreh
125
127
  **Stopping rule.** A task is done when the user's stated goal is closed AND no off-path work was added. If you find yourself hesitating because "I should also do Z" — Z is drift. Note it for follow-up, do not execute.
126
128
  <!-- runtime-principles:section=goal-locked:end -->
127
129
 
130
+ ## Evolution loop — orchestrator-neutral continuation
131
+
132
+ Any orchestrating engine (Claude, Codex, or future) continuing harness / loop-engineering work cold-starts from `autoresearch/HANDOFF.md` (read order inside), then `autoresearch/NORTH-STAR.md` (goal + floor/ceiling contracts + ops-test gates) and `autoresearch/PRINCIPLES.md`. Instruments and gates are scripts + files, never model memory. The pair partner is the strongest available OTHER engine — the protocol is direction-symmetric (iter-0060). On any model/version change, re-certify engine seats with the seat-fitness instrument before re-pinning `.devlyn/engines.json` (NORTH-STAR ceiling contract; iter-0064).
133
+
128
134
  ## Error Handling Philosophy
129
135
 
130
136
  **No silent fallbacks.** Handle errors explicitly and show the user what happened.
package/README.md CHANGED
@@ -27,7 +27,7 @@ If devlyn-cli saved you time, [give it a star](https://github.com/fysoul17/devly
27
27
  npx devlyn-cli
28
28
  ```
29
29
 
30
- That's it. The installer opens with a single **agent selector** — pick any combination of **Claude Code**, **Codex CLI**, **oh-my-pi (omp)**, or **Pi**, and devlyn installs into every one you choose in a single pass. Claude Code and any agent already present on your machine are pre-checked, so the common case is just Enter. Skill-capable agents receive the `devlyn:resolve`, `devlyn:ideate`, and `devlyn:design-ui` skills in the directory each one loads from: Codex → `~/.codex/skills/`, while **omp and Pi share `~/.agents/skills/`** — the cross-agent standard both read — so the bundle is written there once, not duplicated per agent. In Codex / omp / Pi, invoke them as skills (`$devlyn:resolve`, `$devlyn:ideate`, `$devlyn:design-ui`); in Claude Code they're slash commands (`/devlyn:resolve`). Run it again anytime to update. (`npx devlyn-cli -y` installs the Claude core non-interactively; `npx devlyn-cli agents <cli>` adds one agent later.)
30
+ That's it. The installer opens with a single **agent selector** — pick any combination of **Claude Code**, **Codex CLI**, **oh-my-pi (omp)**, or **Pi**, and devlyn installs into every one you choose in a single pass. Claude Code and any agent already present on your machine are pre-checked, so the common case is just Enter. Skill-capable agents receive the `devlyn:resolve`, `devlyn:ideate`, and `devlyn:design-ui` skills — plus the `devlyn:engines` and `devlyn:queue` utilities — in the directory each one loads from: Codex → `~/.codex/skills/`, while **omp and Pi share `~/.agents/skills/`** — the cross-agent standard both read — so the bundle is written there once, not duplicated per agent. In Codex / omp / Pi, invoke them as skills (`$devlyn:resolve`, `$devlyn:ideate`, `$devlyn:design-ui`); in Claude Code they're slash commands (`/devlyn:resolve`). Run it again anytime to update. (`npx devlyn-cli -y` installs the Claude core non-interactively; `npx devlyn-cli agents <cli>` adds one agent later.)
31
31
 
32
32
  ---
33
33
 
@@ -97,10 +97,22 @@ golden fixture, risk-probe, or pair-evidence candidate must also include
97
97
  difference from rejected or solo-saturated controls such as `S2`-`S6`; without
98
98
  that, `/devlyn:resolve` stops with `BLOCKED:solo-ceiling-avoidance-required`.
99
99
 
100
- ### Engine selection — Claude implementation, conditional pair VERIFY
100
+ ### Queue multiple intents for unattended drain — `/devlyn:queue`
101
+
102
+ Stack tasks to run back-to-back without supervision. `/devlyn:queue add "<intent>"` appends to `docs/specs/queue.md` (an ordered checklist); `/devlyn:queue drain` runs each item serially — spec it, run the resolve outer loop, mark `[x]` done or `[F]` blocked with a reason, then move on. A blocked item never halts the queue, and unattended runs only take scope-narrowing, reversible defaults — anything user-visible or ambiguous is marked `[F] needs-review` for you to adjudicate afterward. `/devlyn:queue` with no args shows status.
103
+
104
+ ### Engine roles — auto-detected, pinnable with `/devlyn:engines`
105
+
106
+ devlyn separates three engine roles:
107
+
108
+ - **Orchestrator** — the CLI you opened (Claude Code, Codex, or omp) that drives the conversation and loop. The contract is symmetric (`CLAUDE.md` ↔ `AGENTS.md`), so the same phase-gated pipeline runs whichever you launch; the file artifacts (spec, queue, state) carry over if you switch.
109
+ - **Executor** — PLAN / IMPLEMENT / CLEANUP plus the primary VERIFY judge. Defaults to `claude`.
110
+ - **Pair judge** — the first available *other* engine, for conditional VERIFY pair-JUDGE and risk probes.
101
111
 
102
112
  `--engine claude` (default) is the canonical implementation surface for PLAN, IMPLEMENT, BUILD_GATE, and CLEANUP. VERIFY/JUDGE conditionally runs pair mode for verify-only runs, high-risk specs, risk probes, mechanical warnings, coverage gaps, or explicit `--pair-verify`.
103
113
 
114
+ Pin roles durably with `/devlyn:engines` (no args shows the role table + detected engines; `executor <name>` / `pair <name>,...` / `clear` manage the pins, stored machine-local in `.devlyn/engines.json`). Pins fail closed: an unavailable pinned engine stops with `BLOCKED:<engine>-unavailable`, and a name with no `_shared/adapters/<name>.md` adapter stops with `BLOCKED:invalid-engine-config`. New engines plug in by shipping an adapter file — no skill changes.
115
+
104
116
  `--engine codex` routes IMPLEMENT to Codex — research-only at HEAD: iter-0020 closed Codex BUILD/IMPLEMENT below the quality floor on the 9-fixture suite (L2 vs L1 = −3.6, 3/8 gated fixtures cleared the +5 margin floor — release-readiness FAIL); iter-0033g + iter-0034 closed PLAN-pair as research-only with explicit unblock conditions (container/sandbox infra OR production telemetry capturing positive evidence of subagent introspection). Install the Codex CLI (https://platform.openai.com/docs/codex) and pass the flag explicitly to opt in:
105
117
 
106
118
  ```
@@ -22,7 +22,7 @@ two targeted probes; the invoking phase sets `--effort`, pair-JUDGE uses
22
22
  `medium`):
23
23
 
24
24
  ```bash
25
- claude -p "<judge prompt>" \
25
+ python3 "$DEVLYN_SHARED_DIR/run-bounded.py" 600 -- claude -p "<judge prompt>" \
26
26
  --permission-mode dontAsk \
27
27
  --allowedTools "Read,Grep,Glob,Bash(<repo test command> *)" \
28
28
  --setting-sources project --strict-mcp-config --mcp-config '{"mcpServers":{}}' \
@@ -46,8 +46,11 @@ claude -p "<judge prompt>" \
46
46
  `.devlyn/verify.pair.findings.jsonl`. Raw stdout stays diagnostic at
47
47
  `.devlyn/claude-judge.stdout`; `verify-merge-findings.py` blocks the run
48
48
  if stdout contains findings the canonical file lacks.
49
- - Do not pipe stdout (`| tail`, `| grep`); capture to file. Non-zero exit or
50
- empty stdout → spawn failure, fail closed per the probe rule above.
49
+ - Exit 124 is a wall-budget abort (kills the process group) → the orchestrator
50
+ writes `.devlyn/verify.pair.timeout.json`; budget abort ≠ availability failure
51
+ and the fail-closed availability rules above are unchanged.
52
+ - Do not pipe stdout (`| tail`, `| grep`); capture to file. Non-zero exit other
53
+ than 124 or empty stdout → spawn failure, fail closed per the probe rule above.
51
54
 
52
55
  ## Identity
53
56
 
@@ -29,6 +29,8 @@ PER_RUN_PATTERNS = (
29
29
  "fix-batch.round-*.json",
30
30
  "criteria.generated.md",
31
31
  "risk-probes.jsonl",
32
+ # Probe scripts referenced by risk-probes.jsonl are archived by
33
+ # move_probe_scripts() to preserve probes/<file> layout.
32
34
  # iter-0019.8: spec-verify carrier artifacts get archived alongside
33
35
  # other per-run state. Killed mid-run cleanup is enforced separately
34
36
  # by spec-verify-check.py main() — when source markdown has no json
@@ -39,6 +41,7 @@ PER_RUN_PATTERNS = (
39
41
  "spec-verify.results.json",
40
42
  "spec-verify-findings.jsonl",
41
43
  "verify-merge.summary.json",
44
+ "finish-gate.summary.json",
42
45
  # iter-0033a/2026-04-30 archive-fix iter: NEW /devlyn:resolve emits
43
46
  # plan.md (PLAN output) + final-report.md (PHASE 6 render) +
44
47
  # cumulative.patch (cumulative diff). Smoke 2's archive listing
@@ -96,6 +99,24 @@ def move_artifacts(devlyn: pathlib.Path, dest: pathlib.Path) -> int:
96
99
  if src.is_file():
97
100
  shutil.move(str(src), str(dest / src.name))
98
101
  moved += 1
102
+ moved += move_probe_scripts(devlyn, dest)
103
+ return moved
104
+
105
+
106
+ def move_probe_scripts(devlyn: pathlib.Path, dest: pathlib.Path) -> int:
107
+ probes = devlyn / "probes"
108
+ if not probes.is_dir():
109
+ return 0
110
+ moved = 0
111
+ for src in sorted(probes.rglob("*")):
112
+ if not src.is_file():
113
+ continue
114
+ target = dest / src.relative_to(devlyn)
115
+ target.parent.mkdir(parents=True, exist_ok=True)
116
+ shutil.move(str(src), str(target))
117
+ moved += 1
118
+ if probes.exists():
119
+ shutil.rmtree(probes, ignore_errors=False)
99
120
  return moved
100
121
 
101
122
 
@@ -146,13 +167,16 @@ def self_test() -> int:
146
167
  "claude-judge.stderr",
147
168
  ):
148
169
  (devlyn / name).write_text("{}\n", encoding="utf-8")
170
+ (devlyn / "probes").mkdir()
171
+ (devlyn / "probes" / "P1.py").write_text("print('probe')\n", encoding="utf-8")
149
172
  run_id = read_run_id(devlyn)
150
173
  assert run_id == "run-1", run_id
151
174
  moved = move_artifacts(devlyn, devlyn / "runs" / run_id)
152
- assert moved >= 8, moved
175
+ assert moved >= 9, moved
153
176
  for name in (
154
177
  "pipeline.state.json",
155
178
  "risk-probes.jsonl",
179
+ "probes/P1.py",
156
180
  "verify.pair.findings.jsonl",
157
181
  "verify-merge.summary.json",
158
182
  "codex-judge.stdout",
@@ -48,6 +48,7 @@ Notes:
48
48
  - `-c model_reasoning_effort=xhigh` — config override for reasoning depth. Required for deep critique; skills may choose `high` or `medium` when thoroughness doesn't warrant xhigh.
49
49
  - **Omit `-m <model>`** — Codex CLI uses its configured flagship (currently `gpt-5.5`, automatically whatever ships next). This is the zero-touch mechanism. Only name `-m` when a role explicitly needs a different model (e.g., `gpt-5.3-codex` for SWE-bench-heavy coding tasks, `gpt-5.3-codex-spark` for speed).
50
50
  - `CODEX_MONITORED_ISOLATED=1` — required for bounded read-only critique/probe/judge calls. The wrapper adds `--ignore-user-config --ignore-rules --ephemeral --disable codex_hooks --disable hooks` so user config, AGENTS.md, hooks, and project rules cannot add hidden context, tool calls, or transcript side effects. Do not set it for workspace-write implementation phases.
51
+ - Wrapper calls are **foreground-blocking**. Never launch them via a backgrounded shell (`run_in_background`, `&`, `nohup`) and never end the orchestrator message while one runs: a headless print-mode session kills backgrounded children at wind-down (observed 2026-07-07: an FS1 A-arm IMPLEMENT codex call was killed at turn end → 0-byte delivery). The heartbeat stream is the observability channel; block on the call.
51
52
  - Raw `codex exec ...` invocations are **forbidden** in skill prompts. The benchmark variant arm runs a PATH shim (`scripts/codex-shim/codex`) that transparently re-routes any raw `codex exec` to the wrapper as a safety net, but skills should always emit the wrapper form directly so the orchestrator's first-attempt has the right shape. Two prior iterations (iter-0006 universal foreground ban, iter-0008 prompt-level kill-shape contract) failed because the orchestrator picked starvation-prone shapes (`codex exec ... 2>&1 | tail -200`) from its own pattern prior — the wrapper plus the shim is the runtime binding layer those iters lacked. See `autoresearch/iterations/0009-wrapper-and-hook.md`.
52
53
 
53
54
  ## Availability check