@aperant/framework 0.16.0 → 0.19.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 +185 -1
- package/dist/cli/commands/ci-watch.mjs +49 -2
- package/dist/cli/commands/ci-watch.mjs.map +1 -1
- package/dist/cli/commands/commit.mjs +3 -3
- package/dist/cli/commands/commit.mjs.map +1 -1
- package/dist/cli/commands/event.mjs +16 -16
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/merge-integrate.mjs +3 -3
- package/dist/cli/commands/merge-integrate.mjs.map +1 -1
- package/dist/cli/commands/produce.d.mts +9 -0
- package/dist/cli/commands/produce.d.mts.map +1 -0
- package/dist/cli/commands/produce.mjs +1345 -0
- package/dist/cli/commands/produce.mjs.map +1 -0
- package/dist/cli/commands/spar-resolve-partner.d.mts +9 -0
- package/dist/cli/commands/spar-resolve-partner.d.mts.map +1 -0
- package/dist/cli/commands/spar-resolve-partner.mjs +82 -0
- package/dist/cli/commands/spar-resolve-partner.mjs.map +1 -0
- package/dist/cli/commands/task.d.mts +16 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +434 -266
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/config/gitignore-drift.d.mts.map +1 -1
- package/dist/cli/config/gitignore-drift.mjs +1 -0
- package/dist/cli/config/gitignore-drift.mjs.map +1 -1
- package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
- package/dist/cli/config/post-merge-sweep.mjs +1 -0
- package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -1
- package/dist/cli/coordination/event-schema.d.mts +5 -3
- package/dist/cli/coordination/event-schema.d.mts.map +1 -1
- package/dist/cli/coordination/event-schema.mjs +245 -21
- package/dist/cli/coordination/event-schema.mjs.map +1 -1
- package/dist/cli/coordination/store.d.mts +2 -2
- package/dist/cli/coordination/store.mjs +4 -4
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +4 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +31 -0
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/host/codex-config.d.mts +78 -0
- package/dist/cli/host/codex-config.d.mts.map +1 -0
- package/dist/cli/host/codex-config.mjs +169 -0
- package/dist/cli/host/codex-config.mjs.map +1 -0
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/produce/blind-probe.d.mts +85 -0
- package/dist/cli/produce/blind-probe.d.mts.map +1 -0
- package/dist/cli/produce/blind-probe.mjs +217 -0
- package/dist/cli/produce/blind-probe.mjs.map +1 -0
- package/dist/cli/produce/claim.d.mts +188 -0
- package/dist/cli/produce/claim.d.mts.map +1 -0
- package/dist/cli/produce/claim.mjs +518 -0
- package/dist/cli/produce/claim.mjs.map +1 -0
- package/dist/cli/produce/done-gate.d.mts +87 -0
- package/dist/cli/produce/done-gate.d.mts.map +1 -0
- package/dist/cli/produce/done-gate.mjs +200 -0
- package/dist/cli/produce/done-gate.mjs.map +1 -0
- package/dist/cli/produce/events.d.mts +77 -0
- package/dist/cli/produce/events.d.mts.map +1 -0
- package/dist/cli/produce/events.mjs +126 -0
- package/dist/cli/produce/events.mjs.map +1 -0
- package/dist/cli/produce/evidence-oracle.d.mts +63 -0
- package/dist/cli/produce/evidence-oracle.d.mts.map +1 -0
- package/dist/cli/produce/evidence-oracle.mjs +122 -0
- package/dist/cli/produce/evidence-oracle.mjs.map +1 -0
- package/dist/cli/produce/ledger.d.mts +140 -0
- package/dist/cli/produce/ledger.d.mts.map +1 -0
- package/dist/cli/produce/ledger.mjs +272 -0
- package/dist/cli/produce/ledger.mjs.map +1 -0
- package/dist/cli/produce/probe-family.d.mts +53 -0
- package/dist/cli/produce/probe-family.d.mts.map +1 -0
- package/dist/cli/produce/probe-family.mjs +160 -0
- package/dist/cli/produce/probe-family.mjs.map +1 -0
- package/dist/cli/produce/projection.d.mts +55 -0
- package/dist/cli/produce/projection.d.mts.map +1 -0
- package/dist/cli/produce/projection.mjs +97 -0
- package/dist/cli/produce/projection.mjs.map +1 -0
- package/dist/cli/produce/run-id.d.mts +42 -0
- package/dist/cli/produce/run-id.d.mts.map +1 -0
- package/dist/cli/produce/run-id.mjs +79 -0
- package/dist/cli/produce/run-id.mjs.map +1 -0
- package/dist/cli/produce/saga.d.mts +180 -0
- package/dist/cli/produce/saga.d.mts.map +1 -0
- package/dist/cli/produce/saga.mjs +290 -0
- package/dist/cli/produce/saga.mjs.map +1 -0
- package/dist/cli/produce/scheduler.d.mts +165 -0
- package/dist/cli/produce/scheduler.d.mts.map +1 -0
- package/dist/cli/produce/scheduler.mjs +399 -0
- package/dist/cli/produce/scheduler.mjs.map +1 -0
- package/dist/cli/produce/setpoint.d.mts +52 -0
- package/dist/cli/produce/setpoint.d.mts.map +1 -0
- package/dist/cli/produce/setpoint.mjs +113 -0
- package/dist/cli/produce/setpoint.mjs.map +1 -0
- package/dist/cli/produce/verification-ttl.d.mts +75 -0
- package/dist/cli/produce/verification-ttl.d.mts.map +1 -0
- package/dist/cli/produce/verification-ttl.mjs +169 -0
- package/dist/cli/produce/verification-ttl.mjs.map +1 -0
- package/dist/cli/roadmap/{conductor-view.d.mts → showrunner-view.d.mts} +3 -3
- package/dist/cli/roadmap/showrunner-view.d.mts.map +1 -0
- package/dist/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +7 -7
- package/dist/cli/roadmap/showrunner-view.mjs.map +1 -0
- package/dist/cli/wfrun/run.d.mts.map +1 -1
- package/dist/cli/wfrun/run.mjs +1 -0
- package/dist/cli/wfrun/run.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/skills/apt/SKILL.md +112 -38
- package/dist/plugin/skills/apt-debug/SKILL.md +14 -24
- package/dist/plugin/skills/apt-fan-out/SKILL.md +4 -4
- package/dist/plugin/skills/apt-handoff/SKILL.md +1 -1
- package/dist/plugin/skills/apt-plan/SKILL.md +5 -5
- package/dist/plugin/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
- package/dist/plugin/skills/apt-produce/SKILL.md +606 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +14 -22
- package/dist/plugin/skills/apt-run/SKILL.md +126 -3
- package/dist/plugin/skills/apt-ship/SKILL.md +2 -0
- package/dist/plugin/skills/apt-spar/SKILL.md +19 -9
- package/dist/plugin/skills/apt-watch-ci/SKILL.md +4 -4
- package/package.json +4 -4
- package/prompts/{conductor-framework-context.md → showrunner-framework-context.md} +1 -1
- package/prompts/{conductor-status-check.md → showrunner-status-check.md} +1 -1
- package/prompts/{conductor-sub-agent.md → showrunner-sub-agent.md} +6 -6
- package/prompts/{conductor-system.md → showrunner-system.md} +8 -8
- package/skills/apt/SKILL.md +112 -38
- package/skills/apt-debug/SKILL.md +14 -24
- package/skills/apt-fan-out/SKILL.md +4 -4
- package/skills/apt-handoff/SKILL.md +1 -1
- package/skills/apt-plan/SKILL.md +5 -5
- package/skills/apt-plan/adapters/{conductor.md → showrunner.md} +16 -16
- package/skills/apt-produce/SKILL.md +606 -0
- package/skills/apt-quick/SKILL.md +14 -22
- package/skills/apt-run/SKILL.md +126 -3
- package/skills/apt-ship/SKILL.md +2 -0
- package/skills/apt-spar/SKILL.md +19 -9
- package/skills/apt-watch-ci/SKILL.md +4 -4
- package/src/cli/commands/ci-watch.mjs +51 -2
- package/src/cli/commands/commit.mjs +3 -3
- package/src/cli/commands/event.mjs +16 -16
- package/src/cli/commands/merge-integrate.mjs +3 -3
- package/src/cli/commands/produce.mjs +1466 -0
- package/src/cli/commands/spar-resolve-partner.mjs +85 -0
- package/src/cli/commands/task.mjs +482 -285
- package/src/cli/config/gitignore-drift.mjs +1 -0
- package/src/cli/config/post-merge-sweep.mjs +1 -0
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +5 -5
- package/src/cli/coordination/event-schema.d.ts +4 -2
- package/src/cli/coordination/event-schema.mjs +276 -21
- package/src/cli/coordination/store.mjs +4 -4
- package/src/cli/dispatch.mjs +4 -0
- package/src/cli/help.mjs +31 -0
- package/src/cli/host/codex-config.mjs +165 -0
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/src/cli/produce/blind-probe.mjs +245 -0
- package/src/cli/produce/claim.mjs +543 -0
- package/src/cli/produce/done-gate.mjs +238 -0
- package/src/cli/produce/events.mjs +131 -0
- package/src/cli/produce/evidence-oracle.mjs +133 -0
- package/src/cli/produce/ledger.mjs +284 -0
- package/src/cli/produce/probe-family.mjs +168 -0
- package/src/cli/produce/projection.mjs +105 -0
- package/src/cli/produce/run-id.mjs +84 -0
- package/src/cli/produce/saga.mjs +303 -0
- package/src/cli/produce/scheduler.mjs +423 -0
- package/src/cli/produce/setpoint.mjs +122 -0
- package/src/cli/produce/verification-ttl.mjs +191 -0
- package/src/cli/roadmap/showrunner-view.d.ts +10 -0
- package/src/cli/roadmap/{conductor-view.mjs → showrunner-view.mjs} +6 -6
- package/src/cli/wfrun/run.mjs +1 -0
- package/dist/cli/roadmap/conductor-view.d.mts.map +0 -1
- package/dist/cli/roadmap/conductor-view.mjs.map +0 -1
- package/src/cli/roadmap/conductor-view.d.ts +0 -10
|
@@ -17,7 +17,7 @@ execution_modes:
|
|
|
17
17
|
- plan-mode
|
|
18
18
|
- plan-only
|
|
19
19
|
allowed-tools: "Bash, Read, Write, Edit, Grep, Glob, Task"
|
|
20
|
-
argument-hint: "apt:run [task description] [--skip-review] [--phase-mode auto|agent-team|sub-agents|sequential] [--spar-gates plan[,execute]]"
|
|
20
|
+
argument-hint: "apt:run [task description] [--skip-review] [--phase-mode auto|agent-team|sub-agents|sequential] [--spar-gates plan[,execute]] [--full]"
|
|
21
21
|
gates:
|
|
22
22
|
- constitution-read
|
|
23
23
|
- constitution-coverage
|
|
@@ -29,6 +29,8 @@ config_keys:
|
|
|
29
29
|
Run the full Aperant pipeline: plan a task, execute all subtasks, verify the implementation, and optionally review the code. This is the one-command experience — from task description to verified, reviewed code.
|
|
30
30
|
|
|
31
31
|
As of C32 the STANDARD and DEEP auto pipelines **terminate on review** (`plan → execute → verify → review`). Pass `--skip-review` to stop after verify; for trivial work the QUICK track still skips planning entirely.
|
|
32
|
+
|
|
33
|
+
Pass `--full` to carry a SINGLE task all the way to **merged + green**: it extends the pipeline past review through **ship** (a PR that auto-merges to main on green — never a direct push) and **watch-CI** (arm the watcher with auto-merge so the change lands once CI passes). `--full` is a thin chain over the existing `/apt:ship` + `/apt:watch-ci` skills — it forces review ON and is hard-guarded by `autonomy.allow_yolo` plus a one-time confirm (§1a). A `/apt:run` invocation WITHOUT `--full` behaves exactly as today (terminates on review).
|
|
32
34
|
</objective>
|
|
33
35
|
|
|
34
36
|
<your_environment>
|
|
@@ -58,7 +60,7 @@ As of C32 the STANDARD and DEEP auto pipelines **terminate on review** (`plan
|
|
|
58
60
|
|
|
59
61
|
1. Read `AGENTS.md` if it exists
|
|
60
62
|
2. Parse task description from `$ARGUMENTS` (everything before flags)
|
|
61
|
-
3. Parse flags: `--skip-review`, `--dry-run`, `--phase-mode <mode>`, `--spar-gates <comma-list
|
|
63
|
+
3. Parse flags: `--skip-review`, `--dry-run`, `--phase-mode <mode>`, `--spar-gates <comma-list>`, `--full`.
|
|
62
64
|
- `--spar-gates <plan|execute|plan,execute>` (FRAMEWORK-RFC-001) — comma-separated stage list to auto-fire `/apt:spar` after. Per-invocation override of `.aperant/config.local.json` `spar.enabled`. On QUICK track, print the verbatim hard-reject line and discard the flag (Fast Path Guarantee — CLAUDE.md):
|
|
63
65
|
|
|
64
66
|
```
|
|
@@ -71,6 +73,52 @@ As of C32 the STANDARD and DEEP auto pipelines **terminate on review** (`plan
|
|
|
71
73
|
node packages/framework/bin/apt-tools.mjs state .
|
|
72
74
|
```
|
|
73
75
|
|
|
76
|
+
## 1a. `--full` flag — surface + gates
|
|
77
|
+
|
|
78
|
+
This section runs ONLY when `--full` was parsed in §1. When `--full` is absent, skip this entire section and run the pipeline exactly as today (manual mode is byte-behavior-unchanged).
|
|
79
|
+
|
|
80
|
+
**Contradiction handling (resolve in THIS precedence order — the "discard" cases win first, so a `--full` that is discarded never triggers the conflict or autonomy gates):**
|
|
81
|
+
|
|
82
|
+
0. **QUICK track wins first (Fast Path Guarantee).** If the task is QUICK track, discard `--full` with the Fast-Path line (item 4 below) and run the QUICK one-shot path unchanged — do NOT evaluate the `--skip-review` conflict (item 1) or the autonomy gate. On QUICK, `--full` is treated as never passed.
|
|
83
|
+
|
|
84
|
+
1. **`--full` + `--skip-review` → hard reject.** `--full` requires review before auto-ship, so the two flags are contradictory. Do NOT silently let one win — print the verbatim line and exit:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
[apt:run] --full and --skip-review conflict (--full requires review before auto-ship). Pick one.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. **`--full` IMPLIES review ON.** Treat `--skip-review` as never set for the rest of the run; §6 Review always executes.
|
|
91
|
+
|
|
92
|
+
3. **`--full` + `--dry-run` → dry-run wins.** Run the plan stage only and report (the existing §3 dry-run exit), then stop. No execute, no ship — `--full` is discarded for this run.
|
|
93
|
+
|
|
94
|
+
4. **QUICK track → discard `--full` with the Fast-Path line.** On QUICK track `--full` is hard-exempt (CLAUDE.md Fast Path Guarantee). Print the verbatim line and run the QUICK one-shot path unchanged:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
[apt:run] --full ignored for QUICK track (Fast Path Guarantee)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`--full` composes normally with `--phase-mode` and `--spar-gates`.
|
|
101
|
+
|
|
102
|
+
**Autonomy gate (load-bearing safety valve, ID-03):**
|
|
103
|
+
|
|
104
|
+
Auto-ship + auto-merge is YOLO-class. Read `.aperant/config.json` for `autonomy.allow_yolo` (boolean) and the autonomy `level` (0–3).
|
|
105
|
+
|
|
106
|
+
1. **`allow_yolo` hard guard.** If `autonomy.allow_yolo !== true`, STOP before ship with the verbatim line and leave the task at `reviewing` (fully shippable by hand):
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
[apt:run] --full needs autonomy.allow_yolo=true (auto-ship + auto-merge to main). Enable via /apt:setup or drop --full.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
2. **One-time confirm at autonomy < 3.** Before opening the auto-merging PR (just before §6.1 Ship below), emit ONE confirmation when autonomy `level < 3` AND `--yolo` was not also passed:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
[apt:run --full] About to open a PR that auto-merges to main once CI is green. Proceed? [y/N]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
At autonomy 3 OR when `--yolo` is passed, degrade to silent (mirrors `/apt:ship`'s autonomy-3 degrade). On `N` / empty, STOP after review with the standard `/apt:ship` hand-off hint — the task is left at `reviewing`, fully shippable by hand.
|
|
119
|
+
|
|
120
|
+
Note: the `allow_yolo` guard + the one-time confirm are evaluated up front here (parse-time gating) and the confirm is RE-SURFACED at the ship boundary (§6.1) so the user confirms immediately before the irreversible auto-merge arm. Review always runs first, and auto-merge always waits for green.
|
|
121
|
+
|
|
74
122
|
## 1b. Resolve Orchestration Mode
|
|
75
123
|
|
|
76
124
|
Run reconcile to determine the effective orchestration strategy for this pipeline run. Pass the task's track via `--track <quick|standard|deep>` so per-track defaults from `.aperant/config.json:orchestration.per_track` apply (roundtable 2026-05-14 R7):
|
|
@@ -338,6 +386,58 @@ Skip on `spar.enabled === true` (no pre-ship gate exists in v2 — see spec §8
|
|
|
338
386
|
|
|
339
387
|
**This is the task review, not the PR review.** It runs inline without sub-agents. For heavy multi-agent PR review, use `/apt:pr-review` separately.
|
|
340
388
|
|
|
389
|
+
## 6.1. Stage 5 — Ship (apt:ship) — `--full` only
|
|
390
|
+
|
|
391
|
+
**Run this section ONLY when `--full` was parsed (§1a) AND review passed** — "review passed" means the §6 review `assessment` is `approve`; a `request-changes` assessment STOPS here (task left at `reviewing`, no ship — see the stop-condition table in §6.2). When `--full` is absent, skip §6.1 + §6.2 entirely and go straight to §7 (manual mode — terminates on review).
|
|
392
|
+
|
|
393
|
+
Pipeline order note: the user's phrasing was *"review, verify"* but `/apt:run` runs **verify (§5) → review (§6) → ship (§6.1)**. KEEP this order — verify gates review, and review consumes `qa_signoff.json`. Do NOT silently reorder. `--full` runs `plan → execute → verify → review → ship → watch-ci`.
|
|
394
|
+
|
|
395
|
+
**Pre-ship gate (re-surface the §1a confirm at the boundary):**
|
|
396
|
+
|
|
397
|
+
1. Re-check `autonomy.allow_yolo === true` (already validated in §1a; re-read here so a mid-run config edit cannot slip an auto-merge past the guard). If false, STOP with the §1a `allow_yolo` line; leave the task at `reviewing`.
|
|
398
|
+
2. Emit the §1a one-time confirm (`[apt:run --full] About to open a PR that auto-merges to main once CI is green. Proceed? [y/N]`) when autonomy `level < 3` and `--yolo` was not passed. At autonomy 3 / `--yolo`, degrade to silent. On `N` / empty, STOP after review with the standard `/apt:ship` hand-off hint; the task stays at `reviewing`.
|
|
399
|
+
|
|
400
|
+
**Ship (Option A — PR that auto-merges to main on green; NEVER a direct push/merge):**
|
|
401
|
+
|
|
402
|
+
Invoke `/apt:ship` inline. It runs its own hard-gate (verify-approved / review-clean / consistency / gitignore), opens the PR against the task's recorded `base_branch` (main for a task forked from main), and atomically flips `reviewing → shipped-pending-merge` via `task update --pr-url` — which also arms the post-ship watcher per `ci_watch.after_ship`. `--full` MUST NEVER `git push`/`git merge` directly to main (ID-02 Option B is rejected unconditionally): "ship to main" means **a PR that auto-merges to main on green**, not a force-push.
|
|
403
|
+
|
|
404
|
+
Capture the opened PR number `{N}` from the `/apt:ship` result for §6.2.
|
|
405
|
+
|
|
406
|
+
If `/apt:ship`'s hard-gate fails, or the branch is behind and the rebase conflicts with no `resolve_merge_conflicts`, STOP — no PR is opened and the task stays at `reviewing` (see the stop-condition table below).
|
|
407
|
+
|
|
408
|
+
## 6.2. Stage 6 — Watch-CI arm (auto-merge-on-green) — `--full` only
|
|
409
|
+
|
|
410
|
+
After the PR opens, force auto-merge for THIS run regardless of the config default (`ci_watch.auto_merge_on_green` is `false` by default per the D-08 kill-criteria). `/apt:ship` already armed the watcher via `ci_watch.after_ship`; this call PATCHES that already-armed watch's auto-merge flag to `true` (it does NOT reimplement arming and is idempotent):
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
node packages/framework/bin/apt-tools.mjs ci-watch start . --pr {N} --task-id {task-id} --host {cli} --auto-merge-on-green
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**Branch on host cron capability.** Run host-detect and read `host_capabilities.cron`:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
node packages/framework/bin/apt-tools.mjs host-detect .
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
- **cron-capable host** (e.g. Claude Code, `cron: true`): the watcher is armed with auto-merge ON; register the recurring tick via the host's `CronCreate` (per `/apt:watch-ci` §3). Then **EXIT — do NOT loop** (respect `/apt:watch-ci`'s single-execution-per-invocation contract). The cron beat drives the watcher to merged + green unattended. Report: watcher armed, auto-merge ON, and the deadline.
|
|
423
|
+
- **non-cron host** (Codex / Gemini / OpenCode): truly-unattended watching is impossible. Arm the watch state + auto-merge (the `ci-watch start --auto-merge-on-green` above) but do NOT impersonate a scheduler — NEVER fake a `while` / `sleep` loop. Print the honest manual-tick instruction:
|
|
424
|
+
|
|
425
|
+
```
|
|
426
|
+
[apt:run --full] PR opened + CI watcher state created (host has no cron). Advance manually: /apt:watch-ci --tick --pr {N}. Auto-merge-on-green is set; the merge fires on the first green tick you run.
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Stop conditions (every gate is reused; each STOP leaves the task in its current lifecycle state and NEVER merges). `--full` adds NO new gate — it only chains the existing ones and surfaces the stop reason in §7:**
|
|
430
|
+
|
|
431
|
+
| Stop point | Resulting state |
|
|
432
|
+
|---|---|
|
|
433
|
+
| QA `rejected` after max iters (§5) | `verifying`; no ship |
|
|
434
|
+
| Review `request-changes` (§6) | `reviewing`; no ship |
|
|
435
|
+
| Ship hard-gate fail (verify-approved / review-clean / consistency / gitignore) | `reviewing`; no PR |
|
|
436
|
+
| Branch behind + rebase conflict (no `resolve_merge_conflicts`) | `reviewing`; no PR |
|
|
437
|
+
| `allow_yolo=false` or confirm `N` (§1a / §6.1) | `reviewing`; no PR |
|
|
438
|
+
| CI red after 5-attempt / 4h-wall (watcher) | `shipped-pending-merge`; PR comment, NOT merged |
|
|
439
|
+
| Merge conflict mid-watch (`diverged-bailed`) | `shipped-pending-merge`; PR comment, NOT merged |
|
|
440
|
+
|
|
341
441
|
## 7. Pipeline Summary
|
|
342
442
|
|
|
343
443
|
Render the phase rail panel verbatim — branch glyphs `┌─ │ └─`, status glyphs `✓` (done) / `●` (active) / `○` (pending/skipped), inline metrics per row drawn from the artifacts written across §3–§6:
|
|
@@ -359,7 +459,18 @@ Substitute live values from the on-disk artifacts: `build-progress.json.complete
|
|
|
359
459
|
**Always end with a "What's Next" recommendation:**
|
|
360
460
|
|
|
361
461
|
```
|
|
362
|
-
{If
|
|
462
|
+
{If --full ran and the PR opened (cron host):}
|
|
463
|
+
-> Shipped. PR #{N} opened; CI watcher armed with auto-merge-on-green (deadline {deadline}).
|
|
464
|
+
The cron beat drives it to merged + green. /apt:close-task runs post-merge.
|
|
465
|
+
|
|
466
|
+
{If --full ran and the PR opened (non-cron host):}
|
|
467
|
+
-> Shipped. PR #{N} opened; watcher state created with auto-merge-on-green.
|
|
468
|
+
Advance manually: /apt:watch-ci --tick --pr {N} (merge fires on the first green tick).
|
|
469
|
+
|
|
470
|
+
{If --full was requested but a gate STOPPED before ship:}
|
|
471
|
+
-> {stop reason}. Task left at {lifecycle state}, not merged. {remediation per the stop-condition table}
|
|
472
|
+
|
|
473
|
+
{If review assessment is "approve" and QA approved (no --full):}
|
|
363
474
|
-> Recommended: /apt:ship — create PR for this task
|
|
364
475
|
Also: /apt:pr-review (deep multi-agent review) | manual review
|
|
365
476
|
|
|
@@ -388,5 +499,17 @@ atomic `reviewing → shipped-pending-merge` flip. `/apt:ship` then flips
|
|
|
388
499
|
does not need to record or drain anything beyond ensuring each child-skill
|
|
389
500
|
stage runs to its success-end.
|
|
390
501
|
|
|
502
|
+
**`--full` full lifecycle map:** `planning → executing → verifying → reviewing
|
|
503
|
+
→ shipped-pending-merge → (CI green + merged) → completed`. The `reviewing →
|
|
504
|
+
shipped-pending-merge` flip is done atomically by ship's `task update --pr-url`
|
|
505
|
+
(§6.1). `shipped-pending-merge → completed` is done by `/apt:close-task`
|
|
506
|
+
post-merge — **`--full` does NOT auto-invoke `/apt:close-task`.** On cron hosts
|
|
507
|
+
the merge happens asynchronously AFTER `--full` has exited, so `--full` cannot
|
|
508
|
+
observe it; closeout is left to the existing path (the watcher's green branch
|
|
509
|
+
suggests `/apt:close-task`, and the user / passive sweeper runs it). Folding
|
|
510
|
+
close-task into `--full` would require it to become a recurring watcher —
|
|
511
|
+
explicitly rejected (it would duplicate the watcher and violate the
|
|
512
|
+
single-execution contract).
|
|
513
|
+
|
|
391
514
|
</process>
|
|
392
515
|
</output>
|
|
@@ -578,6 +578,8 @@ suggest_mode=$(jq -r '.pr_review.suggest_after_ship // "always"' .aperant/config
|
|
|
578
578
|
|
|
579
579
|
### 7.2 Post-ship /apt:watch-ci hook
|
|
580
580
|
|
|
581
|
+
> Cross-reference: `/apt:run --full` drives this skill's §6 PR creation + §7.2 watcher arming end-to-end (review → ship → auto-merge-on-green watch). When invoked from that chain, the watcher's auto-merge is force-enabled for the run via `apt-tools ci-watch start --auto-merge-on-green` (see `apt-run/SKILL.md` §6.1–§6.2); `/apt:ship` itself behaves identically whether invoked standalone or by `--full`.
|
|
582
|
+
|
|
581
583
|
After Section 7.1's hint resolves (whether it ran the deep review or skipped), report or interactively arm the post-ship CI watcher. The hook is controlled by `ci_watch.after_ship` in `.aperant/config.json` (tri-state: `auto` | `ask` | `never`). The default depends on host capability — `auto` on cron-capable hosts (Claude Code, Pi), `never` elsewhere.
|
|
582
584
|
|
|
583
585
|
**Skip entirely** when no PR URL was captured in Section 6 (library `npm publish`-only path — same skip rule as 7.1).
|
|
@@ -137,6 +137,8 @@ Do NOT proceed; self-sparring is sycophancy by construction (the host cannot obj
|
|
|
137
137
|
|
|
138
138
|
Walk the ladder in order; pick the first rung with `detected: true` (or `"runtime-host-only"` for MCP). **MCP rung has a hard timeout** — default 900000ms (15 min), configurable via `apt-spar.mcp_timeout_ms` in `.aperant/config.json`. The MCP rung is a structured tool call, NOT a Bash invocation, so the Bash tool's 600000ms ceiling does NOT apply — the MCP rung can carry heavy-research partner runs (e.g. Claude Code partner doing multiple minutes of Read/Grep/Bash) where the Bash rungs would hit the host ceiling. On MCP timeout, **automatically fall through to rung 2 or rung 3** — do NOT fail the whole spar. Treat MCP timeout as "rung unavailable for this invocation."
|
|
139
139
|
|
|
140
|
+
**Codex walk order (anti-staleness — do NOT infer it from prose).** The codex MCP rung is the ONLY codex transport that forces the agent to NAME a model, and a named model is a staleness vector (the upstream MCP server has no access to the user's config and silently substitutes a stale default; the agent could also substitute one from training memory). The self-resolving rungs (plugin shim → raw CLI) pass NO `--model` and let `codex exec` inherit `~/.codex/config.toml`, so they are staleness-proof by construction. Therefore, for the **codex** partner specifically, prefer the self-resolving plugin → CLI rungs in the common case and demote the MCP rung to **LAST**. Do NOT hand-order the rungs from this prose — run `apt-tools spar-resolve-partner --partner codex` and FOLLOW the preference it returns: walk in the order of its `recommended_walk` array (`["plugin","cli","mcp"]`) and treat `prefer_self_resolving: true` as authoritative. The generic `host.partner_transports.codex` array stays MCP-first (it is data shared with other consumers, not a spar walk order); the resolver's preference overrides it for codex only. **claude / gemini stay MCP-first** — their MCP rungs take only `{prompt}` and need no model, so there is no staleness vector and no walk change.
|
|
141
|
+
|
|
140
142
|
If all three rungs are unavailable (every rung `detected: false`, or MCP `runtime-host-only` timed out AND rungs 2+3 are `detected: false`), print:
|
|
141
143
|
|
|
142
144
|
```
|
|
@@ -183,9 +185,9 @@ The table below shows the canonical command shape per (partner × rung); the act
|
|
|
183
185
|
|
|
184
186
|
| Partner | Rung | Command | Notes |
|
|
185
187
|
|---|---|---|---|
|
|
186
|
-
| codex | mcp | tool call: `mcp__codex-mcp__codex({prompt, model})` where `model` is
|
|
187
|
-
| codex | plugin | `node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)"` | No `--model` flag — `codex-companion.mjs` invokes `codex exec` which inherits `~/.codex/config.toml` automatically. **NO `--write`. NO `--effort` override.** Per SPAR-04 — spar is conversation, not patching. |
|
|
188
|
-
| codex | cli | `codex exec "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)"` | Precedent: `apt-pr-review/SKILL.md:1084`. No `--model` flag — `codex exec` inherits `~/.codex/config.toml` automatically. Verify with `codex --help`. |
|
|
188
|
+
| codex | mcp | tool call: `mcp__codex-mcp__codex({prompt, model})` where `model` is the `model` field returned by `apt-tools spar-resolve-partner --partner codex` (see §5a below). | **Demoted to LAST for codex** (see the codex walk-order note in §3) — attempt this rung only when the resolver returns `available: true`. 900000ms (15 min) timeout (configurable `apt-spar.mcp_timeout_ms`); on timeout fall through to plugin then CLI. When the resolver returns `available: false`, treat the MCP rung as UNAVAILABLE and fall through to plugin/CLI — never invent a default model (the MCP server silently substitutes a stale hardcoded default model id, which is exactly the bug we are fixing). |
|
|
189
|
+
| codex | plugin | `node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)" < /dev/null` | No `--model` flag — `codex-companion.mjs` invokes `codex exec` which inherits `~/.codex/config.toml` automatically. **NO `--write`. NO `--effort` override.** Per SPAR-04 — spar is conversation, not patching. The `< /dev/null` is load-bearing — the shim forwards to `codex exec`, which wedges on stdin EOF under a no-TTY subprocess (see the wedge note below). |
|
|
190
|
+
| codex | cli | `codex exec --sandbox read-only "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)" < /dev/null` | Precedent: `apt-pr-review/SKILL.md:1084`. No `--model` flag — `codex exec` inherits `~/.codex/config.toml` automatically. The `< /dev/null` un-wedges the no-TTY stdin block and `--sandbox read-only` keeps the spar read-only (see the wedge note below). Verify with `codex --help`. |
|
|
189
191
|
| claude | mcp | tool call: `mcp__claude-code-mcp__claude_code({prompt})` | Preferred. Same 900000ms (15 min) timeout + fallthrough rule. |
|
|
190
192
|
| claude | plugin | n/a | No plugin shim exists for Claude. Skip this rung. |
|
|
191
193
|
| claude | cli | `claude -p "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)" --output-format text` | Symmetric. Claude has no `--write` equivalent — asymmetric flags are a smell. |
|
|
@@ -193,21 +195,29 @@ The table below shows the canonical command shape per (partner × rung); the act
|
|
|
193
195
|
| gemini | plugin | n/a | No plugin shim exists for Gemini. Skip this rung. |
|
|
194
196
|
| gemini | cli | `gemini "$(cat <<'APT_SPAR_PROMPT_EOF' ... APT_SPAR_PROMPT_EOF\n)"` | No `-m` flag — gemini-cli resolves model via `--model` > `GEMINI_MODEL` env > `~/.gemini/settings.json` > built-in default per `docs/cli/model-routing.md:47-58`. Drop the flag, let the cascade work; users override per-shell via `GEMINI_MODEL=...` or per-project via `settings.json`. |
|
|
195
197
|
|
|
198
|
+
**Codex stdin-wedge note (load-bearing).** `codex exec` reads the positional prompt and THEN blocks on stdin EOF under a no-TTY subprocess (the Bash tool), printing `Reading additional input from stdin…` and never returning. Redirecting `< /dev/null` un-wedges it (verified: returns in ~6s instead of hanging, exit 0, and prints the resolved `model:` it used). Both codex Bash rungs (plugin shim + raw CLI) carry `< /dev/null` because the shim forwards to `codex exec`. The `--sandbox read-only` flag on the raw-CLI rung keeps the spar read-only — aligning with the SPAR-04 "NO `--write`" rule; read-only still permits the partner's investigative Read/Grep.
|
|
199
|
+
|
|
196
200
|
Set the Bash tool's `timeout` parameter to `--timeout-ms` (default 300000).
|
|
197
201
|
|
|
198
202
|
**Timeout calibration.** The 5-min Bash-rung default and 15-min MCP-rung default are sized for heavy-research partner runs — modern partner CLIs commonly spend multiple minutes doing real Read/Grep/Bash investigation before producing a round response. The two defaults are intentionally asymmetric: the Bash rungs (plugin shim, raw CLI) are capped at the Claude Code Bash tool's 600000ms (10 min) host ceiling, while the MCP rung — a structured tool call rather than a Bash invocation — has no host ceiling and can carry the worst-case 15-min Claude Code partner. For tighter budgets (e.g. CI), pass `--timeout-ms` explicitly. The MCP-rung override is downward-only: if you observe consistent partner-CLI wedges (auth handshakes, hosted-API stalls, CI lanes wanting fast failure), set `apt-spar.mcp_timeout_ms` BELOW the 15-min default in `.aperant/config.json` (e.g. `120000` for a 2-min fast-fail budget) — raising it above 15 min is unnecessary because the default already covers the documented worst case. Future versions may introduce per-partner defaults.
|
|
199
203
|
|
|
200
204
|
## 5a. Codex MCP model resolution
|
|
201
205
|
|
|
202
|
-
The codex MCP rung (table row above) requires an explicit `model` arg sourced from the user's `~/.codex/config.toml`. The MCP server (`codex-mcp-server`) does NOT read `~/.codex/config.toml` itself — when no `model` is passed it
|
|
206
|
+
The codex MCP rung (table row above) requires an explicit `model` arg sourced from the user's `~/.codex/config.toml`. The MCP server (`codex-mcp-server`) does NOT read `~/.codex/config.toml` itself — when no `model` is passed it silently substitutes a stale hardcoded default model id, overriding the user's actual configured model. **Aperant holds zero model names** — resolve the model LIVE via the deterministic resolver exactly once per spar invocation, before the rung-table walk:
|
|
203
207
|
|
|
204
208
|
```bash
|
|
205
|
-
# Resolve the codex
|
|
206
|
-
|
|
207
|
-
#
|
|
209
|
+
# Resolve the codex partner model + transport preference LIVE, once per spar
|
|
210
|
+
# invocation, before the rung-table walk. apt-tools reads ~/.codex/config.toml
|
|
211
|
+
# fresh and never bakes a default.
|
|
212
|
+
apt-tools spar-resolve-partner --partner codex
|
|
208
213
|
```
|
|
209
214
|
|
|
210
|
-
|
|
215
|
+
The command emits a JSON envelope `{available, model, source, reason, prefer_self_resolving, recommended_walk}`:
|
|
216
|
+
|
|
217
|
+
- When `available: true`, pass the returned `model` field **VERBATIM** into the codex MCP tool call's `model` arg — do NOT transform it, and do NOT substitute a model from your own training memory.
|
|
218
|
+
- When `available: false` (the envelope carries a machine `reason` of `config_missing` / `no_model_key` / `unparseable`), treat the codex MCP rung as **UNAVAILABLE** and fall through to plugin → CLI. **Never invent a default** — substituting any model name is exactly the staleness bug this resolution path exists to fix. The plugin and raw-CLI rungs pass no `--model` and let `codex exec` self-resolve from the user's live config, so the fall-through is always staleness-proof.
|
|
219
|
+
|
|
220
|
+
Follow the envelope's `recommended_walk` / `prefer_self_resolving` for the rung order (see the codex walk-order note in §3) rather than ordering the rungs by hand.
|
|
211
221
|
|
|
212
222
|
**Prompt-quoting safety.** The prompt is user-controlled (it comes from `[topic]` and/or conversation context) and may legitimately contain double quotes, dollar signs, backticks, or `$(...)` substitution that bash would otherwise expand or break on. NEVER interpolate `<prompt>` directly inside a double-quoted shell argument. Instead, pipe via a here-document so the shell treats the body as opaque text:
|
|
213
223
|
|
|
@@ -216,7 +226,7 @@ If `$CODEX_MCP_MODEL` is empty (file missing, `model =` line absent, or value no
|
|
|
216
226
|
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "$(cat <<'APT_SPAR_PROMPT_EOF'
|
|
217
227
|
<prompt body — opaque, no shell expansion>
|
|
218
228
|
APT_SPAR_PROMPT_EOF
|
|
219
|
-
)"
|
|
229
|
+
)" < /dev/null
|
|
220
230
|
|
|
221
231
|
# Claude direction
|
|
222
232
|
claude -p "$(cat <<'APT_SPAR_PROMPT_EOF'
|
|
@@ -37,7 +37,7 @@ The locked decisions backing every section are in `.aperant/context/notes/framew
|
|
|
37
37
|
- **Working directory:** the task's worktree (or the project root if this is a non-worktree task).
|
|
38
38
|
- **State files:** `.aperant/ci-watches/{pr}.json` (per-PR state, D-04); `.aperant/ci-watches/{pr}.lock` (per-PR atomic lock, D-05). Both ephemeral — they are NOT committed.
|
|
39
39
|
- **Events:** every tick appends a `ci-watch.tick` event to `.aperant/events/{today}.jsonl`; `start` appends `ci-watch.armed`; the fix-and-push path appends `ci-watch.fix-pushed`; terminal actions append `ci-watch.stopped` with a `reason`.
|
|
40
|
-
- **CLI surface:** `apt-tools ci-watch start|stop|status|tick --pr N`. The skill body shells out to those subcommands — DO NOT re-implement the classifier in your prompt; the cmd already does it.
|
|
40
|
+
- **CLI surface:** `apt-tools ci-watch start|stop|status|tick --pr N`. `start` also accepts `--auto-merge-on-green` (per-run override — forces `auto_merge_on_green: true` on the snapshot without persisting `ci_watch.auto_merge_on_green` into config; on an already-armed watch it PATCHES the snapshot rather than no-opping). `/apt:run --full` uses this flag to guarantee auto-merge for a single PR after ship's config-driven arm runs first. The skill body shells out to those subcommands — DO NOT re-implement the classifier in your prompt; the cmd already does it.
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -87,7 +87,7 @@ For the `--tick` mode, execute exactly the following sequence — once — insid
|
|
|
87
87
|
|
|
88
88
|
When `action ∈ {green, merged, closed, attempts-cap, wall-cap, identical-log}`:
|
|
89
89
|
|
|
90
|
-
- **green** — print "CI green for PR {N}." If `ci_watch.auto_merge_on_green` is `true` in `.aperant/config.json`, run `gh pr merge {N} --
|
|
90
|
+
- **green** — print "CI green for PR {N}." If `ci_watch.auto_merge_on_green` is `true` in `.aperant/config.json`, run `gh pr merge {N} --squash` then suggest `/apt:close-task`. Use a PLAIN merge here, NOT `--auto`: the classifier has already confirmed every check is `SUCCESS`/`SKIPPED` (`stop-matrix.mjs` `allGreen`) before this branch fires, so green is gated by the watcher, not by GitHub branch protection. `--auto` bought nothing on this path — in a repo WITHOUT required status checks `gh pr merge --auto` degrades to an immediate merge anyway — and dropping it removes the classify→merge ambiguity in unprotected repos.
|
|
91
91
|
- **DO NOT pass `--delete-branch`** to `gh pr merge` from this auto-merge path — ever, unconditionally. The watcher's cwd is the task worktree, where `gh`'s `--delete-branch` post-merge cleanup tries to `git switch <base>` and fails because `<base>` is checked out in the primary worktree. The remote merge has already succeeded by then; local branch + worktree cleanup is `/apt:close-task`'s job via `apt-tools task close-merged` → `computeWorktreeCleanup` (see FRAMEWORK-BUG-019).
|
|
92
92
|
|
|
93
93
|
Else print the exact D-08 text:
|
|
@@ -127,7 +127,7 @@ When `action === 'fix'` (or `diverged-rebased`/`diverged-bailed`):
|
|
|
127
127
|
|
|
128
128
|
For `diverged-rebased`: the cmd already returned the verb; the orchestrator runs `git -C {worktree} fetch && git rebase origin/{base}` BEFORE the fix step. On conflict the action becomes `diverged-bailed`.
|
|
129
129
|
|
|
130
|
-
For `diverged-bailed`: default behavior is to exit with a PR comment summarizing the conflict. Self-heal is **opt-in** via `ci_watch.resolve_merge_conflicts` (default false) in `.aperant/config.json`. When enabled, instead of bailing, hand off to **`/apt:merge-conflict-resolution`** (`--base origin/{base}`) for the worktree; it resolves the rebase conflict inline and re-probes mergeability. On success, continue to the §5 fix-and-push step (`git push origin {branch}`) and reschedule per §3 — the watcher keeps running. On its non-convergence STOP (it aborts the rebase to a clean tree first), fall back to the bail-with-PR-comment path. The resolved branch still goes through CI; the watcher never auto-merges except via the existing config-gated `gh pr merge --
|
|
130
|
+
For `diverged-bailed`: default behavior is to exit with a PR comment summarizing the conflict. Self-heal is **opt-in** via `ci_watch.resolve_merge_conflicts` (default false) in `.aperant/config.json`. When enabled, instead of bailing, hand off to **`/apt:merge-conflict-resolution`** (`--base origin/{base}`) for the worktree; it resolves the rebase conflict inline and re-probes mergeability. On success, continue to the §5 fix-and-push step (`git push origin {branch}`) and reschedule per §3 — the watcher keeps running. On its non-convergence STOP (it aborts the rebase to a clean tree first), fall back to the bail-with-PR-comment path. The resolved branch still goes through CI; the watcher never auto-merges except via the existing config-gated green-branch `gh pr merge --squash` (§4).
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
@@ -164,5 +164,5 @@ If you find yourself wanting to add "and then wait 5 minutes and run again," STO
|
|
|
164
164
|
## Notes for the orchestrator
|
|
165
165
|
|
|
166
166
|
- All gh CLI calls run with the host's existing auth. The watcher introduces no new secret material (per task `dimensions_covered.token-encryption.crossed: false`).
|
|
167
|
-
- `auto_merge_on_green` is snapshotted from `.aperant/config.json` at `start` time (state file's `auto_merge_on_green` field). Changing the config mid-watch does NOT retroactively affect armed watches — re-run `start` to pick up the new value.
|
|
167
|
+
- `auto_merge_on_green` is snapshotted from `.aperant/config.json` at `start` time (state file's `auto_merge_on_green` field). Changing the config mid-watch does NOT retroactively affect armed watches — re-run `start` to pick up the new value. The `--auto-merge-on-green` start flag forces it `true` for one run regardless of the config default (it patches an already-armed snapshot too); this is how `/apt:run --full` drives auto-merge without flipping the global config.
|
|
168
168
|
- The fix-CLI shell-out is the cleanest abstraction we have for portability. It's NOT a sub-agent. On Claude Code that means another `claude` invocation; on Codex/Gemini/OpenCode/Pi, the equivalent binary. Detection lives in `apt-tools host-detect`'s `cli` field.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aperant/framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "AI coding framework — composable skills for planning, executing, verifying, and reviewing code with any LLM provider. Works as Claude Code commands, Codex tasks, or programmatically.",
|
|
5
5
|
"author": "Mikalsen AI <hello@mikalsen.ai>",
|
|
6
6
|
"type": "module",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"types": "./src/cli/coordination/event-schema.d.ts",
|
|
45
45
|
"import": "./src/cli/coordination/event-schema.mjs"
|
|
46
46
|
},
|
|
47
|
-
"./roadmap/
|
|
48
|
-
"types": "./src/cli/roadmap/
|
|
49
|
-
"import": "./src/cli/roadmap/
|
|
47
|
+
"./roadmap/showrunner-view": {
|
|
48
|
+
"types": "./src/cli/roadmap/showrunner-view.d.ts",
|
|
49
|
+
"import": "./src/cli/roadmap/showrunner-view.mjs"
|
|
50
50
|
},
|
|
51
51
|
"./design/scan": {
|
|
52
52
|
"import": "./src/cli/design/scan.mjs"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Showrunner — Tap-on-Shoulder Status Check Template
|
|
2
2
|
|
|
3
3
|
> NOTE: Phase 1 does not inject this prompt. It is the canonical template that Phase 3's tap-on-shoulder protocol will consume. The `{request_id}` substitution is the only dynamic value.
|
|
4
4
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Showrunner Sub-Agent — Reviewer System Prompt
|
|
2
2
|
|
|
3
|
-
You are a **
|
|
3
|
+
You are a **showrunner sub-agent reviewer**: a single-pass parallel reviewer spawned by the Showrunner's sub-agent queue (via the sparring engine) to evaluate a fleet event and recommend whether the Showrunner should log an intent.
|
|
4
4
|
|
|
5
5
|
## Identity
|
|
6
6
|
|
|
7
7
|
- You run on a **frontier model** (Anthropic Opus 4.7 1M, OpenAI GPT-5.4/5.5 frontier, Google Gemini latest frontier). Cheap-model fallback is forbidden.
|
|
8
|
-
- You have **no project filesystem access**. You do not call Read, Glob, or Grep. You see only the event payload, the prior context the
|
|
8
|
+
- You have **no project filesystem access**. You do not call Read, Glob, or Grep. You see only the event payload, the prior context the Showrunner handed you, and the cross-check tool.
|
|
9
9
|
- You return a structured `findings` blob (severity / title / body / ref) — the same shape the sparring engine's lens reviewers return.
|
|
10
10
|
|
|
11
11
|
## Your one tool: `crossCheck`
|
|
@@ -20,7 +20,7 @@ If your evaluation depends on an agent's self-reported claim ("I finished the sp
|
|
|
20
20
|
|
|
21
21
|
## What to evaluate
|
|
22
22
|
|
|
23
|
-
The
|
|
23
|
+
The Showrunner hands you:
|
|
24
24
|
|
|
25
25
|
- The triggering event (e.g. `phase.changed{ to: 'idle' }`, `artifact.ready`, `budget.exceeded`).
|
|
26
26
|
- The enrolled terminal's tier (A / B / C) and current autonomy setting.
|
|
@@ -29,8 +29,8 @@ The Conductor hands you:
|
|
|
29
29
|
Recommend one of:
|
|
30
30
|
|
|
31
31
|
1. **No-op** — the event is routine; no intent needed. (severity: `low`, title: `routine event`)
|
|
32
|
-
2. **Suggest** — the
|
|
33
|
-
3. **Escalate** — the event signals an error / blocked state / security concern. The
|
|
32
|
+
2. **Suggest** — the Showrunner should log an intent suggesting a follow-up action. Include the action and reasoning. (severity: `medium`, title: `<suggested action>`)
|
|
33
|
+
3. **Escalate** — the event signals an error / blocked state / security concern. The Showrunner should surface this prominently. (severity: `high`, title: `<concern>`)
|
|
34
34
|
4. **Cross-check failed** — you called `crossCheck` and the claim did not verify. (severity: `high`, title: `cross-check failed: <claim>`)
|
|
35
35
|
|
|
36
36
|
## Output shape
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Showrunner — Master Orchestrator
|
|
2
2
|
|
|
3
3
|
You orchestrate up to 12 parallel agent terminals. You do not write code.
|
|
4
4
|
You think a lot. You output little. You replace human babysitting.
|
|
@@ -41,7 +41,7 @@ For each task you take responsibility for, drive ALL phases yourself:
|
|
|
41
41
|
- known architecture (use `getRoadmap`, `getTaskState`)
|
|
42
42
|
4. Decide:
|
|
43
43
|
- **Approve** → `sendToTerminal('/apt:execute\r')` to that terminal
|
|
44
|
-
- **Realign** → `sendToTerminal('[
|
|
44
|
+
- **Realign** → `sendToTerminal('[Showrunner realignment] <terse note>\r')`.
|
|
45
45
|
Wait for fresh `artifact.ready`. Re-review. Loop up to 3 attempts.
|
|
46
46
|
After 3, escalate (respawn or surface to human).
|
|
47
47
|
- **Reject** → `sendToTerminal('abort\r')`; spawn replacement if task
|
|
@@ -65,14 +65,14 @@ Run multiple terminals in parallel. Track each by terminal_id.
|
|
|
65
65
|
You are the only thing standing between agents and silent failure. Catch:
|
|
66
66
|
|
|
67
67
|
- **Idle**: terminal `phase.changed{to:'idle'}` with no fresh artifact
|
|
68
|
-
for > 5 min after a /apt:* dispatch. Poll: `sendToTerminal('[
|
|
68
|
+
for > 5 min after a /apt:* dispatch. Poll: `sendToTerminal('[showrunner]
|
|
69
69
|
status: phase? blocker?\r')`. If still idle after another 5 min,
|
|
70
70
|
escalate (realign with explicit next step, or respawn).
|
|
71
71
|
- **Slacking**: agent reports completion but artifacts don't exist on
|
|
72
72
|
disk OR don't match the spec. Use `crossCheck` + `reviewPlan` to verify.
|
|
73
73
|
Never trust self-reports.
|
|
74
74
|
- **Looping**: same `phase.changed` toggling > 6 times in 10 min. Send
|
|
75
|
-
`[
|
|
75
|
+
`[Showrunner realignment] You are looping. State the blocker and stop.\r`
|
|
76
76
|
- **Cost runaway**: a terminal's `budget.exceeded` event arrives. Halt
|
|
77
77
|
that terminal with `sendToTerminal('exit\r')` after persisting state.
|
|
78
78
|
|
|
@@ -108,7 +108,7 @@ Write (use when needed, no human approval gating):
|
|
|
108
108
|
|
|
109
109
|
## Framework knowledge
|
|
110
110
|
|
|
111
|
-
The auto-injected `
|
|
111
|
+
The auto-injected `showrunner-framework-context` block at the very top of
|
|
112
112
|
this system prompt lists every `/apt:*` skill you can dispatch into a
|
|
113
113
|
sub-terminal. Consult it BEFORE deciding which skill to send.
|
|
114
114
|
|
|
@@ -144,13 +144,13 @@ enforces required fields per op (see `coordination/event-schema.mjs`).
|
|
|
144
144
|
Locked op set:
|
|
145
145
|
`terminal.enrolled` `terminal.unenrolled` `phase.changed` `awaiting-input`
|
|
146
146
|
`input-rescinded` `artifact.ready` `heartbeat` `budget.exceeded`
|
|
147
|
-
`
|
|
147
|
+
`showrunner.intent` `showrunner.cross_check` `showrunner.realignment`
|
|
148
148
|
|
|
149
149
|
Reserved meanings:
|
|
150
150
|
- `phase.changed.to` ∈ {busy, idle} ONLY (PTY state). NEVER use for plan
|
|
151
151
|
completion.
|
|
152
152
|
- `artifact.ready{kind:'plan'}` IS the plan-completion signal. Auto-
|
|
153
|
-
emitted by `apt-tools commit` when planner runs under a
|
|
153
|
+
emitted by `apt-tools commit` when planner runs under a Showrunner PTY
|
|
154
154
|
(`APERANT_TERMINAL_ID` set).
|
|
155
155
|
|
|
156
156
|
Every action you take appends an audit envelope. The framework writes
|
|
@@ -177,7 +177,7 @@ The chat thread is a control surface, not a journal.
|
|
|
177
177
|
|
|
178
178
|
On first turn in a NEW thread (no prior assistant messages), one line:
|
|
179
179
|
|
|
180
|
-
`
|
|
180
|
+
`Showrunner ready. Goal?`
|
|
181
181
|
|
|
182
182
|
Nothing else. No greeting paragraph. No tool list. The user knows what
|
|
183
183
|
you are.
|