@ai-dev-methodologies/rlp-desk 0.15.5 → 0.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.
- package/CHANGELOG.md +27 -0
- package/README.md +43 -40
- package/docs/rlp-desk/getting-started.md +6 -3
- package/package.json +1 -1
- package/src/commands/rlp-desk.md +13 -3
- package/src/node/cli/command-builder.mjs +5 -2
- package/src/node/run.mjs +36 -8
- package/src/scripts/run_ralph_desk.zsh +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,33 @@ For pre-v0.15.4 versions, refer to `git log` and individual GitHub release notes
|
|
|
11
11
|
- Post-v0.15.6: remove `RLP_LIFECYCLE_METRICS` flag entirely (per plan v3 ADR follow-ups).
|
|
12
12
|
- Phase D.1 (handoff documents) + Phase D.2 (per-stage agent role specialization) — both deferred per `docs/plans/v0.15.4-release-runbook.md` §7.6.
|
|
13
13
|
|
|
14
|
+
## [0.16.0] — 2026-06-18
|
|
15
|
+
|
|
16
|
+
Leader consolidation (ADR-001): `--mode tmux` is now the canonical production leader, self-verification works on it, and the deprecated `--mode agent` Node-CLI path is on a dated removal schedule.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Self-verification now works under `--mode tmux`.** `--with-self-verification` previously required the deprecated `--mode agent` path; the report is now generated by a pure-filesystem post-pass that runs after the zsh leader exits (reading the campaign's done-claim/verdict artifacts), so the canonical production path gets SV reports without the `claude --print` no-TTY hang.
|
|
20
|
+
|
|
21
|
+
### Deprecated
|
|
22
|
+
- **`node run.mjs run <slug> --mode agent` (Node-leader CLI alpha) is on a dated removal schedule** (ADR-001): 0.16.x louder banner → **0.17.0 hard-error** (and the Node-CLI default flips to `tmux`) → 0.18.0 dispatch branch removed. The `src/node/**` engine modules are retained throughout. Migrate direct-CLI wrappers to `--mode tmux` (canonical). This does NOT affect the slash command's `--mode native` default.
|
|
23
|
+
- **The flywheel (`--flywheel` / `--flywheel-guard`) is deprecated.** It was only ever implemented in the deprecated `--mode agent` Node path (never in the canonical zsh leader, despite a stale comment that claimed otherwise). Its only output, the advisory `next_mission_candidate` field, has no shipped runnable consumer. It will not be ported to the canonical leader; use a consumer-side wrapper for multi-mission chaining.
|
|
24
|
+
|
|
25
|
+
## [0.15.6] — 2026-06-18
|
|
26
|
+
|
|
27
|
+
Patch: CI/test integrity, a codex command-builder security fix, and documentation reconciliation.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- **Codex worker command no longer passes model/reasoning unquoted.** `buildCodexCmd` now shell-quotes the model and reasoning values (parity with the claude path), closing a shell-injection / argument-splitting hazard when operator-supplied flags reach the shell via tmux send-keys.
|
|
31
|
+
- **Docs now describe the correct execution modes.** The README "execution modes" section conflated the slash-command default (`--mode native`, `Agent()`-based) with the deprecated `--mode agent` (Node CLI). It is rewritten to the accurate three-mode model: `--mode tmux` is the canonical/recommended path, `--mode native` is the default companion for short/interactive use, `--mode agent` is deprecated.
|
|
32
|
+
- **Docs now point to the correct scaffold path.** Getting-started and README referenced the pre-v0.13.0 `.claude/ralph-desk/` project-local path; corrected to `.rlp-desk/` (the global install path `~/.claude/ralph-desk/` is unchanged).
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- **CI now runs the behavioral test suites.** A new CI job runs `test:node` + `test:zsh` (previously CI ran only the existence-grep fast gate). First rollout is non-blocking to inventory CI-only flakiness before being made blocking.
|
|
36
|
+
- **The full SV gate verifies the source tree.** `sv-gate:full`'s real-campaign E2E now targets the in-repo `src/` leader (and the correct `.rlp-desk/` sentinel paths) instead of the installed copy, so the gate validates the code being merged.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- **ADR-001 (Leader Consolidation).** Records the decision to make `--mode tmux` the canonical production leader, deprecate the `--mode agent` Node-CLI entry point on a dated schedule, and retain `--mode native` as a second-class companion. (Internal; not shipped in the tarball.)
|
|
40
|
+
|
|
14
41
|
## [0.15.5] — 2026-06-17
|
|
15
42
|
|
|
16
43
|
Patch: fixes surfaced by a fresh-context live dogfood of the tmux and agent run modes, plus packaging hygiene.
|
package/README.md
CHANGED
|
@@ -275,45 +275,48 @@ The brainstorm phase evaluates complexity (US count, file scope, logic, dependen
|
|
|
275
275
|
|
|
276
276
|
## Execution Modes
|
|
277
277
|
|
|
278
|
-
RLP Desk
|
|
279
|
-
|
|
280
|
-
> **
|
|
281
|
-
>
|
|
282
|
-
> no-progress detection,
|
|
283
|
-
> and
|
|
284
|
-
>
|
|
285
|
-
> use
|
|
278
|
+
RLP Desk has three execution modes, all honoring the same governance protocol. **`--mode tmux` is the canonical, recommended path for any real campaign** (see [ADR-001](docs/plans/adr-001-leader-consolidation.md)).
|
|
279
|
+
|
|
280
|
+
> **Mode status:**
|
|
281
|
+
> - **`--mode tmux`** (zsh-backed) — **stable / production / canonical.** Full safety net (heartbeat,
|
|
282
|
+
> copy-mode guard, prompt-stall timeout, no-progress detection, model upgrade chain). Use this for
|
|
283
|
+
> long campaigns and autonomous loops.
|
|
284
|
+
> - **`--mode native`** (the slash-command **default**) — the current Claude Code session is the Leader,
|
|
285
|
+
> dispatching via `Agent()`. Works anywhere (no tmux), good for short/interactive use, but is a
|
|
286
|
+
> second-class companion: no iteration watchdog, turn-based pauses possible. Not for long unattended runs.
|
|
287
|
+
> - **`--mode agent`** (direct Node CLI) — **deprecated alpha**, on a removal schedule (ADR-001). Prints a
|
|
288
|
+
> SCHEDULED-REMOVAL banner. Do not use for new work; prefer `--mode tmux`.
|
|
286
289
|
|
|
287
290
|
### Environment Compatibility
|
|
288
291
|
|
|
289
|
-
| Environment |
|
|
290
|
-
|
|
291
|
-
| Claude Code (any terminal) | **Works** | Requires tmux |
|
|
292
|
-
| Inside tmux session | **Works** | **Works** — panes split in current window |
|
|
293
|
-
| Outside tmux session | **Works** | **Rejected** — "start tmux first" |
|
|
292
|
+
| Environment | Native (default) | Tmux (canonical) | Agent (deprecated) |
|
|
293
|
+
|-------------|------------------|------------------|--------------------|
|
|
294
|
+
| Claude Code (any terminal) | **Works** | Requires tmux | Works |
|
|
295
|
+
| Inside tmux session | **Works** | **Works** — panes split in current window | Works |
|
|
296
|
+
| Outside tmux session | **Works** | **Rejected** — "start tmux first" | Works |
|
|
294
297
|
|
|
295
298
|
### Choosing Your Mode
|
|
296
299
|
|
|
297
300
|
| Need | Use |
|
|
298
301
|
|------|-----|
|
|
299
|
-
| Production / autonomous campaigns | `--mode tmux` (
|
|
300
|
-
|
|
|
301
|
-
|
|
|
302
|
+
| Production / autonomous / overnight / CI campaigns | `--mode tmux` (canonical) |
|
|
303
|
+
| Quick interactive exploration, no tmux available | `--mode native` (default) |
|
|
304
|
+
| (legacy direct-Node-CLI workflows) | `--mode agent` — deprecated; migrate to `--mode tmux` |
|
|
302
305
|
|
|
303
|
-
###
|
|
306
|
+
### Native Mode (slash-command default) — "Smart Mode"
|
|
304
307
|
|
|
305
308
|
```
|
|
306
|
-
/rlp-desk run calculator
|
|
309
|
+
/rlp-desk run calculator # defaults to --mode native
|
|
307
310
|
```
|
|
308
311
|
|
|
309
312
|
The current Claude Code session acts as the Leader, dispatching Workers and Verifiers via `Agent()`. The Leader is an LLM that dynamically routes models and reasons about context.
|
|
310
313
|
|
|
311
314
|
- Works anywhere — no tmux required
|
|
312
315
|
- Dynamic model routing — Leader upgrades models on failure
|
|
313
|
-
|
|
314
|
-
**Known limitation:** Agent mode runs inside Claude Code's turn-based request-response model. If the LLM outputs text without a tool call, the turn terminates and the loop pauses until the user sends "continue." This is a platform constraint — the protocol mitigates it but cannot guarantee 100% uninterrupted execution. For guaranteed autonomous loops, use tmux mode.
|
|
315
316
|
- Fix Loop — extracts verifier issues and feeds them back to the next worker
|
|
316
|
-
- Best for interactive development
|
|
317
|
+
- Best for short, interactive development
|
|
318
|
+
|
|
319
|
+
**Known limitation:** Native mode runs inside Claude Code's turn-based request-response model. If the LLM outputs text without a tool call, the turn terminates and the loop pauses until the user sends "continue." This is a platform constraint — the protocol mitigates it but cannot guarantee 100% uninterrupted execution. **For guaranteed autonomous loops, use `--mode tmux`.**
|
|
317
320
|
|
|
318
321
|
### Tmux Mode — "Lean Mode"
|
|
319
322
|
|
|
@@ -456,7 +459,7 @@ Each conflict is logged as a JSONL entry in `logs/<slug>/conflict-log.jsonl`:
|
|
|
456
459
|
After the campaign, review the conflict log to identify systemic issues:
|
|
457
460
|
|
|
458
461
|
```bash
|
|
459
|
-
cat .
|
|
462
|
+
cat .rlp-desk/logs/<slug>/conflict-log.jsonl | jq .
|
|
460
463
|
```
|
|
461
464
|
|
|
462
465
|
Common patterns:
|
|
@@ -471,20 +474,20 @@ After `init`, your project gets this scaffold:
|
|
|
471
474
|
```
|
|
472
475
|
your-project/
|
|
473
476
|
├── .claude/
|
|
474
|
-
│
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
│
|
|
478
|
-
│
|
|
479
|
-
|
|
480
|
-
│
|
|
481
|
-
|
|
482
|
-
│
|
|
483
|
-
|
|
484
|
-
│
|
|
485
|
-
│
|
|
486
|
-
|
|
487
|
-
|
|
477
|
+
│ └── settings.local.json # rlp-desk permissions (auto-added by init)
|
|
478
|
+
└── .rlp-desk/ # scaffold (v0.13.0+; was .claude/ralph-desk/)
|
|
479
|
+
├── prompts/
|
|
480
|
+
│ ├── <slug>.worker.prompt.md
|
|
481
|
+
│ └── <slug>.verifier.prompt.md
|
|
482
|
+
├── context/
|
|
483
|
+
│ └── <slug>-latest.md
|
|
484
|
+
├── memos/
|
|
485
|
+
│ └── <slug>-memory.md
|
|
486
|
+
├── plans/
|
|
487
|
+
│ ├── prd-<slug>.md
|
|
488
|
+
│ └── test-spec-<slug>.md
|
|
489
|
+
└── logs/<slug>/
|
|
490
|
+
└── status.json
|
|
488
491
|
```
|
|
489
492
|
|
|
490
493
|
### Local Settings
|
|
@@ -495,15 +498,15 @@ your-project/
|
|
|
495
498
|
{
|
|
496
499
|
"permissions": {
|
|
497
500
|
"allow": [
|
|
498
|
-
"Read(.
|
|
499
|
-
"Edit(.
|
|
500
|
-
"Write(.
|
|
501
|
+
"Read(.rlp-desk/**)",
|
|
502
|
+
"Edit(.rlp-desk/**)",
|
|
503
|
+
"Write(.rlp-desk/**)"
|
|
501
504
|
]
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
507
|
```
|
|
505
508
|
|
|
506
|
-
**Why:**
|
|
509
|
+
**Why:** Since v0.13.0 the scaffold lives at `.rlp-desk/` (outside `.claude/`), so Claude Code's `.claude/` sensitive-file gate no longer blocks Worker/Verifier writes. These explicit `.rlp-desk/**` permissions are a belt-and-suspenders helper that keeps automated loop execution prompt-free.
|
|
507
510
|
|
|
508
511
|
**Note:** `settings.local.json` is local to your machine and is not committed to git. If the file already exists, permissions are merged without overwriting your existing settings.
|
|
509
512
|
|
|
@@ -64,7 +64,7 @@ On approval, brainstorm offers to run `init` automatically.
|
|
|
64
64
|
This creates the scaffold:
|
|
65
65
|
|
|
66
66
|
```
|
|
67
|
-
.
|
|
67
|
+
.rlp-desk/
|
|
68
68
|
├── prompts/
|
|
69
69
|
│ ├── loop-test.worker.prompt.md
|
|
70
70
|
│ └── loop-test.verifier.prompt.md
|
|
@@ -78,9 +78,12 @@ This creates the scaffold:
|
|
|
78
78
|
└── logs/loop-test/
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
> Since v0.13.0 the scaffold lives at the project-local `.rlp-desk/` (not `.claude/ralph-desk/`),
|
|
82
|
+
> so Claude Code's `.claude/` sensitive-file gate no longer blocks Worker/Verifier writes.
|
|
83
|
+
|
|
81
84
|
## Step 5: Customize the PRD
|
|
82
85
|
|
|
83
|
-
Edit `.
|
|
86
|
+
Edit `.rlp-desk/plans/prd-loop-test.md` to define your user stories and acceptance criteria. See [`examples/calculator/`](../examples/calculator/.claude/ralph-desk/plans/prd-loop-test.md) for a complete example.
|
|
84
87
|
|
|
85
88
|
Key sections:
|
|
86
89
|
- **User Stories** with Given/When/Then acceptance criteria, Task Type, and Risk Level
|
|
@@ -91,7 +94,7 @@ Key sections:
|
|
|
91
94
|
|
|
92
95
|
## Step 6: Define the Test Spec
|
|
93
96
|
|
|
94
|
-
Edit `.
|
|
97
|
+
Edit `.rlp-desk/plans/test-spec-loop-test.md` to specify verification commands:
|
|
95
98
|
|
|
96
99
|
```markdown
|
|
97
100
|
## Verification Commands
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dev-methodologies/rlp-desk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Fresh-context iterative loops for Claude Code — autonomous task completion with independent verification",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node scripts/postinstall.js",
|
package/src/commands/rlp-desk.md
CHANGED
|
@@ -303,7 +303,7 @@ Legacy `--mode agent` typed against this slash command emits a deprecation notic
|
|
|
303
303
|
|
|
304
304
|
#### Tmux Mode (`--mode tmux`)
|
|
305
305
|
|
|
306
|
-
When `--mode tmux` is specified (v0.14.0+: `run.mjs` accepts the same flags as before but spawns `run_ralph_desk.zsh` as a subprocess and inherits stdio.
|
|
306
|
+
When `--mode tmux` is specified (v0.14.0+: `run.mjs` accepts the same flags as before but spawns `run_ralph_desk.zsh` as a subprocess and inherits stdio. ARCH Wave C: `--with-self-verification` **is honored** under tmux mode via a Node post-pass that runs after the zsh leader exits (see §348). `--flywheel`/`--flywheel-guard` are deprecated (ADR-001) and remain unimplemented in the zsh leader):
|
|
307
307
|
|
|
308
308
|
1. **Validate scaffold** — same as Agent() mode: check `.rlp-desk/prompts/<slug>.worker.prompt.md` etc.
|
|
309
309
|
2. **Check sentinels** — same as Agent() mode.
|
|
@@ -345,7 +345,7 @@ node ~/.claude/ralph-desk/node/run.mjs run '<slug>' \
|
|
|
345
345
|
- MUST launch with `run_in_background: true` so `/rlp-desk` returns control immediately while preserving live tmux visibility.
|
|
346
346
|
- Run-in-background is used so the shell can keep the command visible and keep the pane layout stable for status checks and completion flow.
|
|
347
347
|
- Do NOT kill panes after completion. Panes stay alive for inspection. User cleans up with `/rlp-desk clean <slug> --kill-session`.
|
|
348
|
-
-
|
|
348
|
+
- ARCH Wave C (ADR-001): `--with-self-verification` **is honored** under `--mode tmux`. The zsh leader cannot generate the SV report in-pane (`claude --print` hangs without a TTY — hence its `$TMUX` early-return), so `run.mjs` runs the **pure-filesystem** `generateSVReport` as a **post-pass after the zsh child exits**, reading the campaign's on-disk done-claim/verdict artifacts. `--flywheel` and `--flywheel-guard` are **deprecated** (ADR-001) and remain unimplemented in the zsh leader; the Node leader emits a stderr WARNING for those two only. The slash command's Native Agent() (`--mode native`) does not yet implement SV/flywheel.
|
|
349
349
|
- **For `--mode tmux` only**: the slash command invokes `node ~/.claude/ralph-desk/node/run.mjs run --mode tmux ...`. Do NOT invoke `~/.claude/ralph-desk/run_ralph_desk.zsh` directly — the Node router resolves the runner path, runs legacy detection, and surfaces actionable errors when the runner is missing. **For `--mode native`**, the slash command does NOT invoke the Node CLI — it acts as the leader itself; see Native Agent() Mode section below.
|
|
350
350
|
|
|
351
351
|
**tmux UX model (5 items):**
|
|
@@ -374,7 +374,17 @@ This contract MUST be observed in every iteration of the leader loop below. Futu
|
|
|
374
374
|
|
|
375
375
|
#### Direct Node CLI invocation (`node run.mjs run <slug> --mode agent` — deprecated alpha)
|
|
376
376
|
|
|
377
|
-
Direct invocation of `node ~/.claude/ralph-desk/node/run.mjs run <slug> --mode agent` is **the deprecated Node-leader alpha path**. This is unrelated to the slash command's Native Agent() path above — different code, different leader, different lifecycle. The Node leader currently retains SV/flywheel implementations not yet ported to Native Agent().
|
|
377
|
+
Direct invocation of `node ~/.claude/ralph-desk/node/run.mjs run <slug> --mode agent` is **the deprecated Node-leader alpha path**. This is unrelated to the slash command's Native Agent() path above — different code, different leader, different lifecycle. The Node leader currently retains SV/flywheel implementations not yet ported to Native Agent(). For production tmux orchestration, use `--mode tmux` (the **canonical** leader). For Claude Code Native Agent() campaigns, use `/rlp-desk run <slug> --mode native` from a Claude Code session.
|
|
378
|
+
|
|
379
|
+
**Deprecation schedule** (per [ADR-001](../../docs/plans/adr-001-leader-consolidation.md) §3 — applies to the Node-CLI `--mode agent` entry point ONLY; the `src/node/**` engine modules are retained throughout):
|
|
380
|
+
|
|
381
|
+
| Version | Behavior of `node run.mjs run <slug> --mode agent` |
|
|
382
|
+
|---------|-----------------------------------------------------|
|
|
383
|
+
| 0.16.x | runs, with a louder deprecation banner |
|
|
384
|
+
| **0.17.0** | **hard-errors** (exit 2) with a redirect to `--mode tmux` / `--mode native`; the Node-CLI default also flips to `tmux` |
|
|
385
|
+
| 0.18.0 | the `--mode agent` dispatch branch is removed (engine modules stay) |
|
|
386
|
+
|
|
387
|
+
External wrappers calling `--mode agent` must migrate to `--mode tmux` by 0.17.0. This is a breaking CLI change for that entry point, announced in CHANGELOG at each step.
|
|
378
388
|
|
|
379
389
|
### Preparation
|
|
380
390
|
1. Validate scaffold: `.rlp-desk/prompts/<slug>.worker.prompt.md` etc.
|
|
@@ -72,14 +72,17 @@ export function buildClaudeCmd(mode, model, options = {}) {
|
|
|
72
72
|
export function buildCodexCmd(mode, model, options = {}) {
|
|
73
73
|
assertTuiMode(mode, 'buildCodexCmd');
|
|
74
74
|
|
|
75
|
+
// GAP-2 (audit): shell-quote model + reasoning for parity with buildClaudeCmd.
|
|
76
|
+
// The command string is delivered to a shell (tmux send-keys), so unquoted
|
|
77
|
+
// operator-supplied values were a shell-injection / arg-splitting hazard.
|
|
75
78
|
const parts = [
|
|
76
79
|
CODEX_BIN,
|
|
77
80
|
'-m',
|
|
78
|
-
model,
|
|
81
|
+
shellQuote(model),
|
|
79
82
|
];
|
|
80
83
|
|
|
81
84
|
if (options.reasoning !== undefined) {
|
|
82
|
-
parts.push('-c', `model_reasoning_effort="${options.reasoning}"`);
|
|
85
|
+
parts.push('-c', shellQuote(`model_reasoning_effort="${options.reasoning}"`));
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
parts.push('--disable', 'plugins', '--dangerously-bypass-approvals-and-sandbox');
|
package/src/node/run.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { spawn, spawnSync } from 'node:child_process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
|
|
7
7
|
import { initCampaign } from './init/campaign-initializer.mjs';
|
|
8
|
-
import { readStatus } from './reporting/campaign-reporting.mjs';
|
|
8
|
+
import { readStatus, generateSVReport } from './reporting/campaign-reporting.mjs';
|
|
9
9
|
import {
|
|
10
10
|
run as runCampaignMain,
|
|
11
11
|
detectLegacyDeskInRunMode,
|
|
@@ -318,6 +318,10 @@ function buildZshEnv(slug, options, parentEnv) {
|
|
|
318
318
|
AUTONOMOUS_MODE: options.autonomous ? '1' : '0',
|
|
319
319
|
LANE_MODE: options.laneStrict ? 'strict' : 'warn',
|
|
320
320
|
TEST_DENSITY_MODE: options.testDensityStrict ? 'strict' : 'warn',
|
|
321
|
+
// ARCH Wave C-SV: forwarded for traceability only. The zsh leader keeps its
|
|
322
|
+
// $TMUX early-return (no in-pane `claude --print`); the SV report itself is
|
|
323
|
+
// produced by the Node post-pass in runTmuxViaZsh after the zsh child exits.
|
|
324
|
+
WITH_SELF_VERIFICATION: options.withSelfVerification ? '1' : '0',
|
|
321
325
|
};
|
|
322
326
|
}
|
|
323
327
|
|
|
@@ -360,23 +364,47 @@ async function runTmuxViaZsh(slug, options, deps) {
|
|
|
360
364
|
return 1;
|
|
361
365
|
}
|
|
362
366
|
|
|
363
|
-
// Surface flags the zsh runner cannot honor.
|
|
364
|
-
//
|
|
365
|
-
//
|
|
367
|
+
// Surface flags the zsh runner cannot honor. ARCH Wave C: --with-self-verification
|
|
368
|
+
// IS now honored in tmux mode via a post-zsh-return pass (see below) — only the
|
|
369
|
+
// flywheel flags remain unsupported here. Warn loudly instead of silent no-op.
|
|
366
370
|
const unsupported = [];
|
|
367
371
|
if (options.flywheel !== 'off') unsupported.push('--flywheel');
|
|
368
372
|
if (options.flywheelGuard !== 'off') unsupported.push('--flywheel-guard');
|
|
369
|
-
if (options.withSelfVerification) unsupported.push('--with-self-verification');
|
|
370
373
|
if (unsupported.length > 0) {
|
|
371
374
|
write(
|
|
372
375
|
deps.stderr,
|
|
373
|
-
`WARNING: ${unsupported.join(', ')} not honored in --mode tmux (zsh runner).
|
|
376
|
+
`WARNING: ${unsupported.join(', ')} not honored in --mode tmux (zsh runner). Flywheel is deprecated (ADR-001) — use --mode agent if you still need it.`,
|
|
374
377
|
);
|
|
375
378
|
}
|
|
376
379
|
|
|
377
380
|
const env = buildZshEnv(slug, options, process.env);
|
|
378
381
|
const spawnZsh = deps.spawnZsh ?? defaultSpawnZsh;
|
|
379
|
-
|
|
382
|
+
const exitCode = await spawnZsh(zshPath, env, options.rootDir);
|
|
383
|
+
|
|
384
|
+
// ARCH Wave C-SV: home self-verification onto --mode tmux. The zsh runner cannot
|
|
385
|
+
// produce the SV report itself (`claude --print` hangs without a TTY in a tmux
|
|
386
|
+
// pane — that is why lib_ralph_desk.zsh keeps its $TMUX early-return). Instead we
|
|
387
|
+
// run the Node PURE-FS generateSVReport as a post-pass AFTER the zsh child exits:
|
|
388
|
+
// real stdout, no pane, no TTY → no hang. It reads the campaign's on-disk
|
|
389
|
+
// iter-*-done-claim/verify-verdict artifacts the zsh leader already wrote.
|
|
390
|
+
if (options.withSelfVerification) {
|
|
391
|
+
try {
|
|
392
|
+
const paths = buildPaths(options.rootDir, slug);
|
|
393
|
+
const sv = await generateSVReport({
|
|
394
|
+
slug,
|
|
395
|
+
logsDir: paths.campaignLogDir,
|
|
396
|
+
prdFile: paths.prdFile,
|
|
397
|
+
testSpecFile: paths.testSpecFile,
|
|
398
|
+
analyticsFile: paths.analyticsFile,
|
|
399
|
+
outputDir: paths.analyticsDir,
|
|
400
|
+
});
|
|
401
|
+
write(deps.stdout, `\nSelf-verification report (tmux post-pass): ${sv.summary ?? 'generated'}`);
|
|
402
|
+
} catch (err) {
|
|
403
|
+
write(deps.stderr, `WARNING: self-verification post-pass failed: ${err.message}`);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return exitCode;
|
|
380
408
|
}
|
|
381
409
|
|
|
382
410
|
async function runRunCommand(args, deps) {
|
|
@@ -478,7 +506,7 @@ async function runRunCommand(args, deps) {
|
|
|
478
506
|
// not a replacement. See docs/plans/v0.15-stabilization-plan.md.
|
|
479
507
|
write(
|
|
480
508
|
deps.stderr,
|
|
481
|
-
'SCHEDULED REMOVAL: --mode agent (Node CLI alpha)
|
|
509
|
+
'SCHEDULED REMOVAL (ADR-001): --mode agent (Node CLI alpha) hard-errors in 0.17.0 (Node-CLI default flips to tmux) and the dispatch branch is removed in 0.18.0. Engine modules stay. Migrate to --mode tmux.',
|
|
482
510
|
);
|
|
483
511
|
write(
|
|
484
512
|
deps.stderr,
|
|
@@ -67,8 +67,12 @@ SV_SKIPPED_REASON="" # set when SV is di
|
|
|
67
67
|
# no-progress, stale-context, claude model upgrade chain, etc.), so the
|
|
68
68
|
# Node leader is now reserved for `--mode agent` (LLM-driven) only.
|
|
69
69
|
# `--mode tmux` invocations from src/node/run.mjs delegate here as a
|
|
70
|
-
# subprocess via env vars.
|
|
71
|
-
#
|
|
70
|
+
# subprocess via env vars. ARCH Wave C / ADR-001: FLYWHEEL and FLYWHEEL_GUARD
|
|
71
|
+
# are NOT implemented in the zsh leader (no dispatch site) and are deprecated —
|
|
72
|
+
# do NOT claim otherwise. WITH_SELF_VERIFICATION is forwarded for traceability,
|
|
73
|
+
# but the SV report is produced by the Node post-pass in run.mjs runTmuxViaZsh
|
|
74
|
+
# after this script exits (this script keeps its $TMUX early-return to avoid the
|
|
75
|
+
# `claude --print` no-TTY hang).
|
|
72
76
|
AUTONOMOUS_MODE="${AUTONOMOUS_MODE:-0}" # 1=don't stop on ambiguity, PRD is authoritative
|
|
73
77
|
# P1-E Lane enforcement: WARN-only by default; --lane-strict opts into BLOCKED
|
|
74
78
|
# escalation. governance §7¾. The opt-in defaults to "warn"; "strict" trips
|