@parabolic-technologies/banzai 2.2.0 → 2.2.2

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/README.md CHANGED
@@ -1,1740 +1,216 @@
1
- # Banzai Local Orchestrator
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Parabolic-Technologies/banzai/main/assets/logo/banzai-logo-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Parabolic-Technologies/banzai/main/assets/logo/banzai-logo-light.svg">
5
+ <img alt="Banzai — Spec-Driven AI Development" src="https://raw.githubusercontent.com/Parabolic-Technologies/banzai/main/assets/logo/banzai-logo.svg" width="480">
6
+ </picture>
7
+ </p>
2
8
 
3
- The `banzai` CLI. It first uses the configured planning model to select a
4
- workflow through a read-only structured contract:
9
+ # Banzai — Spec-driven AI development for Codex and Claude Code
5
10
 
6
- 1. `quick-fix`: implementer runs `quick-fix`, deterministic verification, done;
7
- 2. `feature`: implementer runs `feature`, deterministic verification, done;
8
- 3. `strict`: planner runs `feature-description`, conditional
9
- `architecture-decision`, and `development-plan`; after explicit decisions,
10
- a compatible builder lineage runs `code-writing`, `test-writing`, and
11
- accepted fixes; deterministic verification runs, and an independent reviewer
12
- runs `feature-review`.
11
+ [![npm version](https://img.shields.io/npm/v/%40parabolic-technologies%2Fbanzai)](https://www.npmjs.com/package/@parabolic-technologies/banzai)
12
+ [![CI](https://github.com/Parabolic-Technologies/banzai/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/Parabolic-Technologies/banzai/actions/workflows/ci.yml)
13
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue)](https://github.com/Parabolic-Technologies/banzai/blob/main/LICENSE)
13
14
 
14
- Strict review findings are triaged by the human; only accepted findings reach
15
- the fixer. If none are accepted, the complete triage closes the run directly
16
- without a fixer, verification, or unchanged-source reviewer call; status keeps
17
- the latest `changes_requested` verdict and labels completion as human triage,
18
- not review pass. Accepted findings retain deterministic verification and bounded
19
- re-review. Primary review is fresh; routine re-review resumes the reviewer for
20
- at most two deltas before a fresh full audit. Automatic selection is the default,
21
- and uncertain or escalated work falls back to strict.
15
+ Turn a development request into requirements, plans, code, tests, and review
16
+ evidence. Banzai coordinates your coding agents while keeping you in control of
17
+ architecture decisions, plan approval, and review findings.
22
18
 
23
- New strict plans carry the installed plan policy's explicit **Plan Authority**
24
- convention: binding behavior, scope, necessary constraints and evidence, with
25
- useful optional guidance labeled separately. Role prompts refer to that same
26
- policy. A compliant alternative within approved discretion needs no reapproval
27
- or deviation report merely for differing; legacy directives retain their approved
28
- meaning and required checks remain mandatory. Editing any approved plan text,
29
- including guidance, still invalidates approval. Task parsing, completion and
30
- review-result v2 contracts are unchanged by this document convention.
19
+ Small changes take a lightweight path. Complex changes get an approved plan
20
+ and independent review.
31
21
 
32
- This package, `@parabolic-technologies/banzai`, is a separate npm workspace:
33
- it neither installs nor starts with the plugin, and the plugin remains usable
34
- on its own. Its package version is a mandatory mirror of root
35
- `package.json.version`, the sole Banzai release-train authority; shared source
36
- metadata does not imply shared installation or publication.
22
+ This npm package installs the `banzai` orchestrator CLI. The separately
23
+ installed [Banzai plugin](https://github.com/Parabolic-Technologies/banzai#using-the-plugin-without-the-orchestrator)
24
+ provides the workflow skills and can also be used directly in one client.
37
25
 
38
- ## Boundaries
26
+ [Quick start](#quick-start) · [Walkthrough](#workflow-walkthrough) ·
27
+ [Documentation](#documentation) ·
28
+ [Report an issue](https://github.com/Parabolic-Technologies/banzai/issues) ·
29
+ [Contribute](#contributing)
39
30
 
40
- - macOS or Linux with Node.js 22.20.0+ within major 22 or Node.js 24.11.1+
41
- within major 24;
42
- - npm workspace with one prompt dependency for the interactive terminal UI;
43
- - local `codex` 0.145.0+ and `claude` 2.1.218+ executables;
44
- - individual-subscription authentication only;
45
- - one active run in the current checkout;
46
- - no API keys, direct vendor APIs, worktrees, branch switching, stash, reset,
47
- commits, or external writes.
31
+ ## Why Banzai?
48
32
 
49
- ## Setup
33
+ - **Independent review.** In the strict workflow, the reviewer starts without
34
+ the builder's conversation and reports findings for you to triage. You can
35
+ use a different model family for implementation and review.
36
+ - **Human control.** You decide on architecture, approve the plan, and accept,
37
+ reject, or defer review findings. Only accepted findings reach the fixer.
38
+ - **Durable evidence.** Requirements, decisions, plans, code, tests, and review
39
+ artifacts stay in your project. Banzai runs your configured verification
40
+ commands before strict review.
41
+ - **Work sized to the task.** The planner chooses `quick-fix`, `feature`, or
42
+ `strict`. Lightweight routes finish after implementation and verification;
43
+ uncertain or escalated work falls back to strict.
50
44
 
51
- Initial GitHub and npm publication is pending. After publication, install the
52
- Banzai plugin in both Claude Code and Codex using the
53
- [plugin installation instructions](https://github.com/Parabolic-Technologies/banzai#install).
54
- The CLI requires Git and the locally installed, subscription-authenticated
55
- `codex` and `claude` executables listed above; npm does not install those clients
56
- or the Banzai plugin.
45
+ ## Workflow walkthrough
57
46
 
58
- After the npm registry release, install the CLI with:
47
+ ![Illustrated strict workflow: planning, human approval, implementation and verification, independent review, and human triage](https://raw.githubusercontent.com/Parabolic-Technologies/banzai/main/assets/demo/strict-workflow.svg)
59
48
 
60
- ```text
61
- npm install --global @parabolic-technologies/banzai
62
- banzai --help
63
- ```
64
-
65
- For development, run the following from a source checkout instead:
66
-
67
- ```text
68
- npm ci
69
- npm run install:orchestrator
70
- ```
71
-
72
- The development install command rebuilds the executable and exposes `banzai`
73
- through npm's global link. The link points to that checkout; rerun
74
- `npm run build` after changing orchestrator source.
75
-
76
- Then configure each project:
77
-
78
- ```text
79
- cd /path/to/project
80
- banzai init
81
- ```
82
-
83
- `init` creates tracked `.banzai/config.json` and adds ignore rules for local
84
- state. Review the model IDs, efforts, timeouts, and verification profiles, run
85
- `banzai doctor`, then commit the configuration before starting a run.
86
-
87
- The generated profile pairs Codex planning and implementation with a Claude
88
- reviewer on the current Opus model. Interactive startup rechecks those model IDs
89
- on every launch — see Model Configuration below.
90
-
91
- New configuration uses schema version 2. Its default `repository` profile has
92
- only `git diff --check`. Each downstream project should add a profile matching
93
- its project type and actual typecheck, lint, test, build, or formatter-check
94
- commands as direct `command` plus `args` arrays.
49
+ This is an illustrated walkthrough of the workflow, not a recorded model run.
50
+ For example, ask Banzai to:
95
51
 
96
- ## Interactive Human Time
52
+ > Add a CSV export for the currently filtered records. Preserve existing access
53
+ > rules and cover empty results and quoted values with tests.
97
54
 
98
- The interactive run summary includes `Human time — this run`. `Gate response
99
- elapsed` is the known subtotal from a pending decision to its recorded response,
100
- before any following model work. It includes passive waiting and does not
101
- measure active effort. Open, cancelled, superseded and incomplete gates, recovery
102
- waiting, and capture or clock gaps remain separate in the summary and details.
55
+ For work routed to `strict`, the planner reads the repository and prepares
56
+ requirements, any necessary architecture decisions, and a plan. You resolve
57
+ open decisions and approve the plan before implementation starts. The builder
58
+ implements the approved work; Banzai runs the configured checks, then gives an
59
+ independent reviewer the artifacts and current source. You triage any findings,
60
+ and accepted fixes go through verification and bounded re-review.
103
61
 
104
- At an existing human stop or blocked/terminal summary, select
105
- `Update my active time` to enter **your cumulative active minutes for this run
106
- so far**. Include preparation, approvals, review, active checks, debugging,
107
- manual repair and recovery, including work outside the CLI. Exclude passive
108
- waiting, minutes already allocated to another run or task, other contributors,
109
- and study-recording overhead. No identity question or additional post-gate
110
- prompt is added. The editor returns to the same decision; mid-triage selections
111
- are retained.
62
+ The result includes reviewable changes and durable project artifacts. The
63
+ chosen route, findings, and completion outcome depend on the actual repository
64
+ and run; the example above does not claim a particular result.
112
65
 
113
- An entry is always `estimated`, with an `as of` timestamp. Entering 15 after 12
114
- replaces the total with 15. Blank input or cancelling keeps the earlier value;
115
- explicit zero saves zero. Nothing is inferred from gate elapsed. The label
116
- `single-engineer estimate; identity not verified` identifies the collection
117
- scope. Later work does not refresh a saved estimate. Contributor coverage and
118
- a complete engineering-task total remain unestablished. Use
119
- `Show human-time details` to inspect episode outcomes and clock continuity.
66
+ ## Quick start
120
67
 
121
- The interactive path stores bounded local metadata in
122
- `.banzai/runs/<run-id>/human-time.json` as a private `0600` file. It retains
123
- observations and replacement history with the run, including cancelled work;
124
- deleting the run removes this evidence. The run directory is not a research
125
- archive. Historical completed gates are not backfilled when first opening an
126
- old run. Reopening preserves captured episodes, but intervals closed outside
127
- the process have unverified wall-clock continuity. No activity monitoring,
128
- personal names, answers, prompts, transcripts or arbitrary notes are collected.
68
+ For step-by-step setup, expected outcomes, and troubleshooting, follow
69
+ [Your first Banzai task](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/getting-started.md).
129
70
 
130
- `Time was not saved` means the write did not succeed; reopen the editor against
131
- the current evidence before retrying. Stale edits and concurrent writers cannot
132
- silently overwrite a newer total. A hard crash may leave `human-time.lock` or a
133
- temporary file. Reads still use the last valid ledger. An ambiguous guard is
134
- never reclaimed automatically: cleanup requires a separate explicit offline
135
- maintenance action with writers stopped. Timing cannot authorize or replay a
136
- workflow decision or invoke recovery.
71
+ ### 1. Check prerequisites
137
72
 
138
- Existing evaluation/KPI/context/control and status JSON contracts ignore this
139
- private ledger; evaluation v1 `humanMinutes` remains unavailable. The separate
140
- cancellation report has the narrow estimate disclosure described below. Task-wide
141
- collection, equivalent native-workflow collection, acceptance/quality evidence
142
- and the effectiveness comparison remain follow-up work. See
143
- [feature specification](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/features/interactive-human-time/description.md)
144
- and [ADR-0034](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/decisions/0034-durable-human-time-observations.md).
73
+ Use an existing Git repository with at least one commit, on macOS or Linux.
74
+ You need:
145
75
 
146
- ## Test Assurance And Verification Ownership
147
-
148
- Banzai selects tests by the observable guarantee and plausible regression they
149
- protect. Business rules, public and persisted contracts, authorization,
150
- security, privacy, state transitions, recovery, decision tables, and confirmed
151
- defects take priority. Coverage percentage and test count are diagnostics, not
152
- completion targets, unless the target project's manifest records an explicit
153
- policy threshold. Boundary fakes are valid when assertions exercise the real
154
- contract; tests that mirror private call order or duplicate existing evidence
155
- are not useful assurance.
156
-
157
- Implementation and fix prompts contain the configured profiles in exact profile
158
- and command order, including argv and timeout. Builders run focused affected
159
- tests and leave supplied full-scope commands to the runner's post-phase gate. If
160
- the manifest's applicable final suite is absent from the supplied profiles, the
161
- builder runs it once and records the readiness gap. A structured
162
- `requestedVerification` entry never authorizes an unconfigured command.
163
-
164
- Independent review treats successful current runner evidence as authoritative
165
- by default. It may run a focused reproduction or repeat missing, stale,
166
- inconsistent, or directly material evidence, recording the reason; it does not
167
- rerun the complete suite or formatter by habit. A missing-test finding must name
168
- the material guarantee, plausible regression, evidence gap, and proportionate
169
- observable test level.
170
-
171
- ## Engineering Quality Shadow Review
172
-
173
- The installed plugin carries one vendor-neutral Engineering Quality policy in
174
- `policies/engineering-quality.md`. Consuming skills explicitly read that file
175
- relative to their installed `SKILL.md`. Planning and implementation skills
176
- apply only properties material to the changed repository surface; Test
177
- Assurance continues to own test selection, while configured checks, contract
178
- verification, Security Assurance, or justified inspection may own other
179
- material claims.
180
-
181
- Strict review completes and freezes its ordinary findings, severities, and
182
- verdict before EQ classification. An already-actionable finding may add one
183
- primary `EQ-NN` entry to `violates` without changing ordinary review semantics.
184
- A genuinely incremental candidate may appear only as an `EQ-SHADOW:` string in
185
- the existing free-form `deferredCoverage` collection. Shadow entries never enter
186
- `findings`, human triage, accepted-finding payloads, fixer scope, verdict or
187
- completion logic, and are not parsed by runtime validation.
188
-
189
- New orchestrated reviews retain opaque `EQ-SHADOW:` strings exactly through
190
- runner rendering, including multiline content. Historical reviewer-written
191
- Markdown remains intact; standalone review owns its durable Markdown separately.
192
- No runtime interpretation or gate is added.
193
-
194
- After a fix, review is closure-oriented: it verifies the immediately preceding
195
- accepted IDs first. A new concern requires evidence that the fix introduced or
196
- newly exposed it, directly regressed an approved contract/invariant, or made a
197
- previously unobservable critical correctness, security, or lifecycle issue
198
- visible. Reviewer rotation does not reopen rejected or deferred advice against
199
- unchanged evidence and authority. The sampled evaluation procedure is
200
- [`documentation/evaluation/engineering-quality-shadow.md`](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/evaluation/engineering-quality-shadow.md).
201
-
202
- ## Repository Release Confidence
203
-
204
- Repository maintenance uses the committed bundle without requiring the global
205
- link:
206
-
207
- ```text
208
- npm run release:validate
209
- npm run smoke:committed
210
- npm run release:check
211
- ```
212
-
213
- For an explicitly approved product release, a maintainer first selects one
214
- canonical SemVer target from the highest impact across all included plugin and
215
- orchestrator changes, then synchronizes the fixed metadata set:
216
-
217
- ```text
218
- npm run version:set -- <version>
219
- ```
76
+ - Node.js **22.20.0+ within major 22**, or **24.11.1+ within major 24**;
77
+ - Git, **Codex CLI 0.145.0+**, and **Claude Code 2.1.218+**;
78
+ - subscription authentication in both model clients;
79
+ - the Banzai plugin installed in both clients as shown below.
220
80
 
221
- The operation changes root `package.json.version` and eight mirrors in seven
222
- files: four plugin fields, the orchestrator package, and the lockfile's
223
- `version`, `packages[""].version`, and `packages["packages/orchestrator"].version`.
224
- It prepares one candidate per physical file, including all three lockfile edits.
225
- Normal updates require nine equal current values and a greater target. The
226
- bootstrap exception accepts the six-field `1.19.0` state with the three new
227
- fields absent and inserts them at target `1.19.0`; partial bootstrap or root-only
228
- editing is invalid. It accepts no path override, selects no
229
- version, and does not build, validate, install, publish, or perform Git work.
230
- Before deleting `.banzai-version-set`, final cleanup durably writes the fixed
231
- `.banzai-version-set.guard` with the same exact originals and candidates. The
232
- guard remains validator-visible until the main journal removal is synced. If an
233
- interrupted operation retains the transaction directory, cleanup guard, or
234
- guard temporary, `npm run version:recover` restores its exact originals. Before
235
- changing targets or recursively cleaning a journal that coexists with the
236
- guard, recovery authenticates every retained entry as an expected remnant of
237
- that same transaction. It is not an interface for selecting a release rollback
238
- target. Before restoring any target, explicit recovery checks every current
239
- metadata file against the authenticated original/candidate bytes and recorded
240
- mode. Later edits or mode drift cause refusal and preserve recovery evidence.
241
- Recovery uses the retained format's fixed targets: six-file journal/guard
242
- format 1 and grouped seven-file format 2 are both supported, independently of
243
- the current write policy. Restoring an old independent-version candidate
244
- requires its matching historical tooling before another migration. The
245
- standalone CLI keeps its embedded package mirror and needs no root package file
246
- at runtime. Rebuild the bundle after release-policy changes because
247
- `live-compatibility.ts` embeds that configuration.
81
+ Banzai runs the local `codex` and `claude` executables. It does not require API
82
+ keys or call vendor APIs directly. Model work uses those clients' services and
83
+ subscription limits; running the orchestrator locally does not make model
84
+ inference offline. Use a regular terminal for the CLI.
248
85
 
249
- `release:validate` is read-only. It checks canonical nine-way release-train
250
- parity against root `package.json.version`, rejects any retained version
251
- transaction or cleanup-guard state, keeps the Claude marketplace versionless,
252
- and validates required skills/hooks/contracts/entry files, hook syntax,
253
- package/lockfile policy, canonical Test Assurance, Security Assurance,
254
- and Engineering Quality policy wiring, committed bundle mode, CI policy, and
255
- documentation policy. Instruction-layout validation pins the exact shim,
256
- process sections, five policy owners, complete required/conditional read matrix,
257
- scoped reference rules, migration approval text and last legacy-compatible
258
- release. The Engineering Quality check protects rule/reference
259
- and shadow-boundary text; it does not analyze target-project architecture.
260
- `smoke:committed` creates a disposable Git repository and runs the committed
261
- bundle's non-TTY help, init, agent-control capabilities/status, doctor JSON, and
262
- evaluation JSON paths twice. Capabilities also run outside Git. The smoke
263
- requires the v1 identities, clean stderr, deterministic bytes, no source,
264
- configuration, Git, or `.banzai` mutation, and complete cleanup. Help and
265
- capability versions must match the current package mirror independently of
266
- the pinned machine-contract versions.
267
- `release:check` adds both checks and direct formatting to the unchanged
268
- `verify` gate, rejects tracked byte or mode mutation, and never invokes
269
- `version:set` or `version:recover`.
86
+ ### 2. Install the CLI and plugin
270
87
 
271
- <!-- release-policy:start -->
272
-
273
- Engines: `>=22.20.0 <23 || >=24.11.1 <25`
274
-
275
- Version authority: `package.json#/version`; 9 fields in 7 files.
276
-
277
- | Evidence | Node | Image | GitHub Actions job | Policy |
278
- | --------------------- | ------- | ----------------------- | ------------------------------- | -------- |
279
- | Supported (blocking) | 22.20.0 | `node:22.20.0-bookworm` | `release_check_node_22` | required |
280
- | Supported (blocking) | 24.11.1 | `node:24.11.1-bookworm` | `release_check_node_24` | required |
281
- | Forward compatibility | 26.7.0 | `node:26.7.0-bookworm` | `forward_compatibility_node_26` | advisory |
282
-
283
- <!-- release-policy:end -->
284
-
285
- The supported lanes are blocking and each runs `npm ci` plus the full local
286
- gate. Node 26 is advisory forward compatibility. A required environment
287
- failure remains missing evidence rather than becoming a product pass.
288
- The images are the Git-capable official Bookworm variants. Each lane runs
289
- `git --version` and registers `$GITHUB_WORKSPACE` as a Git `safe.directory`
290
- before installation: the gate verifies tracked-file immutability with Git,
291
- and the container runs as root while the runner owns the checkout directory,
292
- which Git otherwise rejects as dubious ownership.
293
-
294
- The workflow is [`.github/workflows/ci.yml`](https://github.com/Parabolic-Technologies/banzai/blob/main/.github/workflows/ci.yml).
295
- Configure branch protection or rulesets to require `release_check_node_22` and
296
- `release_check_node_24` after GitHub has reported those checks. Workflow YAML
297
- does not configure repository merge rules. Validate workflow syntax locally
298
- with `actionlint`; `.github/actionlint.yaml` declares the custom runner label.
299
-
300
- To enable the manual live job, provision an isolated Linux runner labeled
301
- `banzai-live` with supported Codex/Claude CLIs and the subscription-auth roots
302
- described below. Restrict its runner group to this repository and this workflow
303
- at explicitly trusted protected refs using GitHub's
304
- [workflow access policy](https://docs.github.com/en/enterprise-cloud%40latest/actions/how-tos/manage-runners/self-hosted-runners/manage-access).
305
- The runner label and job condition do not restrict other workflows' access to
306
- that machine. Keep the live job disabled if that protected runner boundary is
307
- unavailable. Once provisioned, set repository variable
308
- `BANZAI_LIVE_COMPATIBILITY` to `1`, select **Run workflow** on a protected ref,
309
- and enable the `live_compatibility` input. The job requires all three conditions
310
- and is skipped on push and pull request events. Node setup disables automatic
311
- npm caching, checkout disables persisted credentials, and no artifact upload
312
- is configured. GitHub runner provisioning and authenticated live execution
313
- require their own evidence.
314
-
315
- The separate live command is deliberately absent from `release:check`:
316
-
317
- ```text
318
- npm run compatibility:live -- --confirm-live
319
- ```
320
-
321
- It requires dedicated out-of-band subscription state through
322
- `BANZAI_LIVE_CODEX_AUTH_ROOT` and `BANZAI_LIVE_CLAUDE_AUTH_ROOT`. API-key
323
- and third-party-provider paths are rejected. The command clones the exact
324
- committed candidate into disposable Codex and Claude checkouts, copies bounded
325
- auth state to restrictive temporary roots, verifies minimum CLI versions and
326
- subscription auth, and then performs at most one model call per vendor.
327
-
328
- Codex must execute the two exact runner-owned write-probe commands under its
329
- read-only sandbox. Only failed `item.completed` `command_execution` events with
330
- the direct command or a fully anchored `sh`/`bash`/`zsh -lc` wrapper, exact
331
- payload, target, bounded probe result, and non-zero denial count as evidence.
332
- Arbitrary prefixes, suffixes, operators, and trailing arguments are rejected;
333
- the runner renders both vendors' candidates from review-result/v2 and their
334
- frozen fixture snapshots. Claude uses the same read-only arguments as normal
335
- review. A typed host `system/init` inventory must include Read, Glob, Grep and
336
- Skill and exclude every other capability except StructuredOutput. This proves
337
- source/control/candidate writing is unavailable through exposed tools; it does
338
- not claim an attempted write was denied. Missing, duplicate, unknown or writable
339
- tools fail the authenticated scenario. Model prose and requested argv alone do
340
- not establish this evidence. Offline hook tests are separate from live evidence.
341
-
342
- Each invocation is limited to five minutes, the complete command to fifteen
343
- minutes, and the total to two model calls. The only stdout is
344
- `banzai-live-compatibility/v2` JSON with closed status/check/version/duration
345
- fields. Raw prompts, reasoning, transcripts, tool/model/auth output, source,
346
- paths, credentials, and private model output are never retained or emitted.
347
- Exit 0 means pass, 1 fail, and 2 unavailable. Missing auth is unavailable before
348
- any model call. The manual GitHub Actions job retains no artifact.
349
-
350
- Implementing and unit-testing this boundary does not prove current live vendor
351
- behavior. An authenticated run requires explicit human authorization and safe
352
- protected runner provisioning.
353
-
354
- ## Cancellation observations
355
-
356
- Interactive cancellation keeps the existing
357
- `Cancel this run? The persisted run becomes terminal.` confirmation,
358
- with refusal as the default. Once confirmed, the runner requests process stop
359
- and persists cancellation before showing one optional reason selection. `Skip`
360
- is first; no meaningful reason is preselected. Leaving the confirmation causes
361
- no cancellation. Leaving the reason prompt exits the interaction with the run
362
- already cancelled; an interrupted response is recorded best effort. A hard
363
- crash can leave an unanswered observation. This prompt uses the base IO, so it
364
- adds no human-time episode or estimate edit.
365
-
366
- The CLI opens no reason prompt, including without a TTY:
88
+ In your terminal:
367
89
 
368
90
  ```sh
369
- banzai cancel --run run-000014 --reason plan_unsuitable
370
- banzai cancel
371
- banzai eval cancellations --from 2026-09-06T00:00:00Z
372
- banzai eval cancellations --run run-000014 --json
373
- banzai control capabilities --cancellation
91
+ npm install --global @parabolic-technologies/banzai
92
+ banzai --help
374
93
  ```
375
94
 
376
- The eight values are `intent_changed`, `adr_rejected`, `plan_unsuitable`,
377
- `workflow_unsuitable`, `execution_blocked`, `superseded`, `other`, and
378
- `unspecified`. `other` means a known reason outside the list; `unspecified`
379
- means no reason was supplied. CLI omission and interactive Skip retain distinct
380
- provenance. An explicit reason describes operator motivation, not a verified
381
- root cause. ADR rejection alone returns to planning; a failure or a rejected
382
- ADR never selects a reason automatically. `--run` binds the action to that
383
- still-current run. Invalid arguments fail before mutation.
384
-
385
- A repeated cancellation preserves the original event and reason. Completed
386
- runs receive no cancellation observation. Only the original interactive call
387
- can submit its first response after cancellation, using its process-local
388
- receipt; there is no late-edit, backfill or historical reason command. Reporting
389
- and repeated cancellation never repair missing evidence.
390
-
391
- `Run cancelled. Cancellation observation was not saved.` means terminal state
392
- was saved but analytics was not. A stop signal is a request, not confirmation
393
- that the process exited. `Cancellation could not be confirmed` means terminal
394
- persistence is unresolved. A hard crash may leave a short `.state-write.lock`;
395
- it is never reclaimed automatically or during reporting. An offline maintenance
396
- action with writers stopped is outside this feature.
397
-
398
- `banzai eval cancellations` emits Markdown by default or JSON with `--json`.
399
- Both render the same deterministic `banzai-cancellation-report/v1` document
400
- (schema version 1). It uses run **creation** timestamps: `--from` inclusive,
401
- `--to` exclusive, intersected with repeatable `--run` selectors. No selectors
402
- means all local candidates. Explicitly missing IDs fail. Missing/malformed state
403
- remains visible as unknown lifecycle or unresolved date membership. Known
404
- cancelled runs remain in every reason denominator even without observations.
405
- Every ratio includes numerator and denominator; zero denominator yields `null`
406
- in JSON and `unavailable` in Markdown.
407
-
408
- The report separates meaningful reported-reason coverage, response coverage
409
- (including Skip, omission and unspecified), and observation availability.
410
- Legacy bare cancellation events are `legacy_absent`; absent evidence is
411
- `missing`; interrupted/unanswered, malformed, unsupported and conflicting
412
- evidence remain separate. Historical runs receive no invented reasons. Workflow
413
- and pre-cancellation phase/gate retain availability and provenance.
414
-
415
- Technical rows use report-local references and existing bounded failure fields.
416
- No raw logs, prompts, error prose, exact private IDs or source paths are exported.
417
- Usage and duration are covered subtotals from canonical attempts ending before
418
- cancellation; open/straddling attempts and inventory gaps prevent exact totals.
419
- Elapsed time is UTC wall time with unverified continuity. The existing current
420
- single-engineer active-time estimate is disclosed only if its `asOf` is on or
421
- before cancellation; it remains estimated with unknown contributor/later-work
422
- coverage. Superseded revisions are never resurrected. Neither elapsed spans nor
423
- estimates are summed into person-time or task totals. Report-local keys do not
424
- establish task identity; `superseded` records continuation intent and confirmed
425
- continuation remains unavailable without a supported exact source.
426
-
427
- Observation and optional discovery use `banzai-cancellation-observation/v1` and
428
- `banzai-cancellation-capabilities/v1`, independently of frozen evaluation/KPI v1,
429
- control 2.0.0 and state schema 3. The implementation candidate dated 2026-09-06
430
- enables new collection. Actual study collection starts with the first real v1
431
- observation after adoption; that start is not established by synthetic tests.
432
- The extra optional cancellation interaction is an instrumentation change.
433
- Coverage improvement is not evidence of improved agent performance, and a lower
434
- cancellation fraction is not itself the objective. See
435
- [feature specification](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/features/cancellation-observations/description.md).
436
-
437
- ## Commands
95
+ Inside Claude Code:
438
96
 
439
97
  ```text
440
- banzai
441
- banzai interactive
442
- banzai doctor [--json]
443
- banzai control capabilities [--cancellation]
444
- banzai control status
445
- banzai control start --slug <slug>
446
- banzai control answer [--by <name>] [--no-resume]
447
- banzai control recover [--by <name>] [--no-resume]
448
- banzai model
449
- banzai run --slug <slug> --request <text>
450
- banzai status [--json]
451
- banzai eval export [--json] [--from <RFC3339>] [--to <RFC3339>] [--run <run-id>]...
452
- banzai eval kpi [--json] [--from <RFC3339>] [--to <RFC3339>] [--run <run-id>]...
453
- banzai eval kpi --input <export.json> [--input <export.json>]... [--json]
454
- banzai eval context [--json] [--from <RFC3339>] [--to <RFC3339>] [--run <run-id>]...
455
- banzai eval cancellations [--json] [--from <RFC3339>] [--to <RFC3339>] [--run <run-id>]...
456
- banzai compatibility live --confirm-live
457
- banzai resume
458
- banzai retry
459
- banzai recover
460
- banzai approve adr --id <id> --decision accept|reject|rework
461
- banzai approve plan [--no-resume]
462
- banzai triage --accept R1-F1 --reject R1-F2 --defer ""
463
- banzai cancel [--run <run-id>] [--reason <enum>]
464
- ```
465
-
466
- Approval and triage commands resume automatically unless `--no-resume` is
467
- present.
468
-
469
- ## Agent Control
470
-
471
- The optional `orchestrate` plugin skill supervises this CLI through a narrow
472
- versioned control boundary. It is an outer operator only, reachable solely
473
- through an explicit user invocation. Claude Code enforces that boundary with
474
- `disable-model-invocation: true`; Codex uses `agents/openai.yaml` with
475
- `policy.allow_implicit_invocation: false`. The skill is never selected from
476
- prompt wording, and the runner's planner, implementer, fixer, selector, and
477
- reviewer phases never invoke it.
478
-
479
- `banzai control capabilities` is valid outside a Git repository and performs no
480
- repository discovery, adapter construction, vendor/authentication call, lock,
481
- recovery, or write. It emits canonical `banzai-agent-capabilities/v2` JSON with
482
- schema version 2, control contract `2.0.0`, the package-derived Banzai
483
- release-train version, umbrella contract, the exact supported non-TTY operation
484
- set, and an ordered `inputSchemas` list per operation. Capability and doctor
485
- output prove neither subscription authentication nor sandbox credential
486
- visibility. Compatibility still follows these explicit contract and operation
487
- identities, never the shared release-train value alone.
488
-
489
- `banzai control status` emits canonical `banzai-agent-status/v2` JSON. With no
490
- persisted run, `activeRun` is `null`. Otherwise the allow-list projection
491
- contains run identity/lifecycle, route, semantic next action, retry and bounded
492
- recovery eligibility, the pending human gate, approval validity,
493
- task-completion evidence, bounded verification outcomes, review verdict, and
494
- review-pass or human-triage completion basis. A terminal `done` or `cancelled`
495
- projection remains available for evidence but does not block an explicitly
496
- requested new run; only a non-terminal projection does. The status excludes the
497
- original request, prompts, transcripts, raw model output, environment values,
498
- secrets, approval digests, raw commands, arguments/logs, absolute repository
499
- paths, raw `.banzai` paths, and completed consultation history. A current
500
- `decision_consultation` gate is the only public surface that includes its
501
- bounded one-to-three-card request because the supervisor needs it for the next
502
- action.
503
-
504
- Start, escalation answer, keyed consultation answer, and recovery accept one
505
- closed JSON document of at most 64 KiB through direct process stdin. Request
506
- and recovery stay on v1; the ordered v1 answer remains the legacy/current
507
- escalation input, while consultation requires the keyed v2 answer:
508
-
509
- ```json
510
- {
511
- "schema": "banzai-agent-request/v1",
512
- "schemaVersion": 1,
513
- "request": "complete task request"
514
- }
515
- ```
516
-
517
- ```json
518
- {
519
- "schema": "banzai-agent-answer/v1",
520
- "schemaVersion": 1,
521
- "answers": ["first ordered answer", "second ordered answer"]
522
- }
523
- ```
524
-
525
- ```json
526
- {
527
- "schema": "banzai-agent-answer/v2",
528
- "schemaVersion": 2,
529
- "runId": "run-from-current-status",
530
- "requestId": "request-from-current-status",
531
- "roundId": "round-from-current-status",
532
- "answers": [
533
- {
534
- "decisionId": "decision-from-current-status",
535
- "response": {
536
- "kind": "option",
537
- "optionId": "option-from-current-status",
538
- "text": null
539
- },
540
- "note": null
541
- }
542
- ]
543
- }
544
- ```
545
-
546
- Recovery is a separate current-human decision, not a retry or approval. After
547
- showing the latest bounded workspace counts and exact identity, status either
548
- warns about partial/duplicated side effects for an interruption or names the
549
- resolved and remaining accepted findings plus a prerequisite count for a
550
- completed blocked fix. In the latter case the supervisor presents those bounded
551
- facts but does not execute raw prerequisite commands or widen permissions.
552
- Send:
553
-
554
- ```json
555
- {
556
- "schema": "banzai-agent-recovery/v1",
557
- "schemaVersion": 1,
558
- "attemptId": "implementation-1-abcd1234",
559
- "recoveryIdentity": "exact 64-character identity from current status",
560
- "unknownSideEffectsAccepted": true
561
- }
562
- ```
563
-
564
- Input is decoded completely before mutation. Invalid UTF-8/JSON, unknown or
565
- missing properties, unsupported versions, blank text, stale run/request/round
566
- identities, missing or duplicate decision IDs, unknown option IDs, oversized
567
- documents, and wrong answer counts fail closed. A v1 answer cannot answer a
568
- consultation. Request/answer whitespace, newlines, Unicode, quotes, backticks,
569
- dollar syntax, and shell operators are preserved as data.
570
- `WorkflowRunner` still owns one-active-run enforcement, state transitions,
571
- decision persistence, resume, retry, recovery, and completion. Progress remains
572
- on stderr; successful control output is one JSON document on stdout.
573
-
574
- Existing approval, triage, resume, retry, cancel, human status, interactive,
575
- and `status --json` commands retain their behavior. A supervisor refreshes
576
- control status after those commands instead of parsing their human prose.
577
-
578
- ## Project Verification Readiness
579
-
580
- `banzai doctor` inspects the current Git checkout and writes a deterministic
581
- human report to stdout. `banzai doctor --json` writes the authoritative
582
- `banzai-doctor/v1` object instead. It exits 0 exactly when no check failed and
583
- exits 1 when the checkout is not ready. Warnings, including a live or stale
584
- valid runner lock, remain visible without changing readiness.
585
-
586
- Doctor checks Git, the supported Node/platform and contract versions, config
587
- presence and structure, the Claude invocation environment and its tool
588
- permissions, detected project types, explicit profile coverage, substantive
589
- commands, configured executable availability, the active-run pointer and
590
- referenced state, and the runner lock. The report's fixed check
591
- order, sorted project types, two-space JSON, and final newline are stable for
592
- automation. Expected readiness findings stay in the selected stdout report;
593
- unexpected CLI failures go to stderr.
594
-
595
- Doctor also emits an `authentication.models` advisory: it does not invoke a
596
- vendor, so authentication readiness is not checked and executable availability
597
- is not authentication proof. This warning leaves `ready` and exit semantics
598
- unchanged. Startup and phase preflight remain authoritative.
599
-
600
- Project detection is root-only and uses these markers:
601
-
602
- | Project type | Root marker |
603
- | ------------ | --------------------------------------------------- |
604
- | `node` | `package.json` |
605
- | `php` | `composer.json` |
606
- | `python` | `pyproject.toml`, `setup.py`, or `requirements.txt` |
607
- | `go` | `go.mod` |
608
- | `rust` | `Cargo.toml` |
609
- | `ruby` | `Gemfile` |
610
- | `jvm` | `pom.xml`, `build.gradle`, or `build.gradle.kts` |
611
- | `dotnet` | any root `.sln`, `.csproj`, or `.fsproj` file |
612
- | `custom` | no recognized marker |
613
-
614
- The `custom` fallback requires confirmed absence of every recognized marker.
615
- If marker metadata or root enumeration fails because of permissions or I/O,
616
- `project.types` fails, the human projection reports project types as
617
- unavailable, and dependent profile checks are skipped. Doctor never converts
618
- unreadable evidence into a ready custom project.
619
-
620
- Every detected type in a polyglot root needs at least one matching explicit
621
- profile with a substantive command. A `repository` profile is reserved for
622
- checkout-wide hygiene and cannot satisfy a detected project type. The exact
623
- `git` command with `args: ["diff", "--check"]` never counts as substantive,
624
- regardless of its name or profile. Doctor validates the declared coverage and
625
- executable paths; it does not claim that a command is a good test and never
626
- executes it.
627
-
628
- A schema-version-2 verification section is an ordered profile list. Profiles
629
- execute in list order and commands execute in their listed order. Each command
630
- is always spawned directly from `command` plus `args`, without a shell:
631
-
632
- ```json
633
- {
634
- "schemaVersion": 2,
635
- "verification": {
636
- "profiles": [
637
- {
638
- "id": "node",
639
- "projectType": "node",
640
- "commands": [
641
- {
642
- "name": "unit tests",
643
- "command": "npm",
644
- "args": ["test"],
645
- "timeoutMs": 600000
646
- }
647
- ]
648
- },
649
- {
650
- "id": "repository",
651
- "projectType": "repository",
652
- "commands": [
653
- {
654
- "name": "git diff check",
655
- "command": "git",
656
- "args": ["diff", "--check"],
657
- "timeoutMs": 120000
658
- }
659
- ]
660
- }
661
- ]
662
- }
663
- }
664
- ```
665
-
666
- For a root containing both `package.json` and `composer.json`, declare both
667
- types explicitly; repository hygiene can remain a third profile:
668
-
669
- ```json
670
- {
671
- "verification": {
672
- "profiles": [
673
- {
674
- "id": "node",
675
- "projectType": "node",
676
- "commands": [
677
- {
678
- "name": "node tests",
679
- "command": "npm",
680
- "args": ["test"],
681
- "timeoutMs": 600000
682
- }
683
- ]
684
- },
685
- {
686
- "id": "php",
687
- "projectType": "php",
688
- "commands": [
689
- {
690
- "name": "php tests",
691
- "command": "composer",
692
- "args": ["test"],
693
- "timeoutMs": 600000
694
- }
695
- ]
696
- }
697
- ]
698
- }
699
- }
98
+ /plugin marketplace add https://github.com/Parabolic-Technologies/banzai.git
99
+ /plugin install banzai@banzai-plugins
700
100
  ```
701
101
 
702
- Existing schema-version-1 files remain runner-compatible and retain their flat
703
- command order, but doctor reports their project coverage as legacy and not
704
- ready. Migration is manual: change `schemaVersion` to 2 and wrap the former
705
- flat `verification` array in `verification.profiles[0].commands`, adding a
706
- unique kebab-case `id` and the correct `projectType`. Split commands into
707
- multiple profiles when the checkout has multiple detected types; keep
708
- repository-only hygiene in a `repository` profile. Neither config loading,
709
- `banzai init` on an existing project, `banzai model`, nor doctor performs this
710
- migration.
711
-
712
- Model selection preserves this tracked representation byte-for-byte outside
713
- the exact requested `model`, `executable`, and `effort` JSON value tokens,
714
- including schema-version-1 formatting and unknown fields.
715
-
716
- Doctor is offline and structurally read-only. It runs before vendor adapters or
717
- `WorkflowRunner`, never authenticates, invokes a model, executes verification,
718
- recovers or resumes a run, acquires or removes a lock, calls a network service,
719
- or writes configuration, state, approval markers, source, or report files.
720
- Normal `run`, `resume`, and `retry` behavior remains compatible in this
721
- iteration; readiness is advisory outside the doctor's exit status.
722
-
723
- ## Context Accounting and Budgets
724
-
725
- Every model attempt has an adjacent `banzai-context-attempt/v1` ledger. The
726
- runner checkpoints the exact rendered prompt and vendor-specific output-schema
727
- UTF-8 byte counts immediately before each adapter call, divided into closed
728
- semantic categories. Referenced authority is recorded separately as artifact
729
- class counts; vendor-reported tokens/cost/turns and session inventory have
730
- independent per-metric availability. New reviews have only the primary
731
- invocation; deterministic rendering adds none. Historical primary and repair
732
- invocations remain separately readable and are counted once each.
733
-
734
- The persisted privacy allow-list contains only identities already owned by the
735
- run, closed enums, timestamps, counts, budget outcomes, and the existing
736
- inventory digest. Prompt/request/artifact text and paths, source, transcripts,
737
- reasoning, model/tool output, tool names and arguments, commands, environment,
738
- credentials, and error prose are excluded. A present malformed or
739
- content-bearing ledger fails closed as `INVALID_CONTEXT_EVIDENCE`; an older
740
- attempt with no ledger is incomplete coverage.
741
-
742
- Configuration defaults to observation with no universal numerical limit:
743
-
744
- ```json
745
- {
746
- "context": {
747
- "mode": "observe",
748
- "limits": []
749
- }
750
- }
751
- ```
102
+ For Codex, in your terminal:
752
103
 
753
- Optional limits select a metric and may select `phase`, `role`, or both.
754
- Phase-plus-role outranks either single selector, which outranks the default;
755
- the smaller maximum wins a specificity tie. `observe` never changes execution.
756
- In `enforce`, only exact pre-call `runner_payload_bytes` can stop an invocation,
757
- before the adapter starts, as `CONTEXT_BUDGET_EXCEEDED`. Required context is
758
- never truncated or summarized, and vendor-token, cost, turn, and inventory
759
- crossings remain post-call advisory observations.
760
-
761
- The offline read-only report uses the export cohort grammar:
762
-
763
- ```text
764
- banzai eval context
765
- banzai eval context --json --from 2026-08-01T00:00:00Z --to 2026-09-01T00:00:00Z
766
- banzai eval context --run 20260801-example --run 20260815-other
104
+ ```sh
105
+ codex plugin marketplace add https://github.com/Parabolic-Technologies/banzai.git
106
+ codex plugin add banzai@banzai-plugins
767
107
  ```
768
108
 
769
- Its independent identity is `banzai-context-report/v1`. Coverage is shown
770
- before values; runner bytes, vendor tokens/cost/turns, and inventory are never
771
- folded together. JSON is canonical and Markdown derives from the same object.
772
- The command constructs neither adapters nor `WorkflowRunner` and creates no
773
- config, lock, run, active pointer, or report file. See the
774
- [context governance guide](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/context/README.md) for the full
775
- privacy allow-list, config examples, and the required 15–30 completed-run
776
- baseline before optimization or enforcement.
109
+ The npm package installs the CLI and its runtime dependencies. The plugin and
110
+ model clients are separate installations; the plugin can also be used on its
111
+ own.
777
112
 
778
- ## Evaluation Export
113
+ ### 3. Configure your project
779
114
 
780
- `banzai eval export` reads all directories under `.banzai/runs/` in the current
781
- checkout and writes a compact Markdown report to stdout. It needs neither
782
- `.banzai/config.json` nor a TTY or active run. Use `--json` for the authoritative
783
- versioned dataset:
115
+ From your repository root:
784
116
 
785
- ```text
786
- banzai eval export --json
787
- banzai eval export --from 2026-07-01T00:00:00Z --to 2026-08-01T00:00:00Z
788
- banzai eval export --run 20260701-example --run 20260715-other
117
+ ```sh
118
+ banzai init
789
119
  ```
790
120
 
791
- The JSON identity is `banzai-evaluation-export/v1` with `schemaVersion: 1`.
792
- Every field is present, arrays and enum breakdowns have stable ordering, JSON
793
- uses two-space indentation and one trailing newline, and repeated exports over
794
- unchanged evidence and arguments are byte-for-byte deterministic. Markdown is
795
- rendered only from that completed object; it is not a second data contract.
796
-
797
- `--from` includes a run created exactly at the RFC3339 boundary; `--to`
798
- excludes one created exactly at its boundary. Both require `Z` or an explicit
799
- offset. Repeatable `--run` selectors are deduplicated, path-safe local inputs
800
- and are never reproduced in output. Date and run selectors use intersection
801
- semantics. Missing selected runs and invalid, duplicate, missing, positional,
802
- or unknown options fail before stdout is written.
803
-
804
- The default cohort retains done, blocked, cancelled, active, legacy,
805
- incomplete, and malformed runs. Unreadable creation time remains an unresolved
806
- cohort member under date filters. One damaged record produces bounded issue
807
- codes and partial coverage rather than failing every healthy run. Root
808
- `.banzai/runs/` discovery errors remain fatal; state, attempt, review, and event
809
- read errors inside one run degrade only that run. Numeric
810
- metrics use `value` only for exact totals; otherwise `observedSubtotal`,
811
- `observedCount`, `unknownCount`, `invalidCount`, and `availability` explain the
812
- coverage. Zero therefore differs from unknown. Vendor-reported cost is never
813
- invented. Human minutes and true false-positive rate are unavailable under the
814
- current persistence contract, and rejected findings are named only as rejected
815
- triage.
121
+ Choose models and effort for planning, implementation, and review. Then open
122
+ your project in either client and initialize project guidance:
816
123
 
817
- The export path uses direct Node read operations only. It never initializes or
818
- normalizes state through `RunStore`, writes a report file, acquires a lock,
819
- reconciles an attempt, resumes a workflow, runs verification, creates vendor
820
- adapters, invokes a model, or performs a network call. Warnings are emitted to
821
- stderr after the complete report, keeping JSON stdout clean.
124
+ - Claude Code: `/banzai:project-manifest`
125
+ - Codex: `$banzai:project-manifest`
822
126
 
823
- Privacy is a fixed v1 allow-list. Exact run IDs, attempt IDs, feature slugs,
824
- requests, repository/artifact/source/result/log paths, prompts, reasoning,
825
- transcripts, raw or structured model prose, findings prose, commands and their
826
- output, source contents, credentials, environment values, session IDs, human
827
- identities, notes, and block/error text are excluded. Runs and attempts receive
828
- deterministic export-local ordinal keys instead. Active attempt identity is used
829
- only for an exact internal leaf join and is never exported. Exact persisted timestamps and
830
- model IDs remain useful cohort variables and may still be linkable; the opaque
831
- keys are minimization labels, not anonymized durable identities.
127
+ Review the generated project guidance and `.banzai/config.json`. Add verification
128
+ profiles for your project's actual test, typecheck, lint, or build commands.
129
+ The default profile contains only `git diff --check`; it does not run tests.
130
+ See [verification profile examples](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/verification-examples.md).
832
131
 
833
- ### Evaluation source precedence
834
-
835
- The JSON contract assigns each metric to exactly one persisted evidence owner:
836
-
837
- | Evidence owner | Authoritative evaluation fields |
838
- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
839
- | Raw `state.json` | State/contract schema provenance, status, route, run timestamps, cumulative verification count, cumulative triage, and fix cycles. |
840
- | Unique supported `attempts/*.json` records | Schema version 1 owns model-attempt count/outcome, phase duration, session and review mode, rotation evidence, normalized model profile, tokens, and reported cost. Missing schema is legacy-absent; unsupported or malformed schema contributes invalid coverage. |
841
- | Retained `state.verification` entries | Available command outcomes and derivable verification duration; the state counter represents cumulative command attempts. |
842
- | Review files proven applied by `state.latestReview` | Review verdicts and findings by severity. Files beyond the applied iteration are bounded incomplete evidence and contribute no yield. |
843
- | Recognized `events.jsonl` event types | Explicit attempt/start/review retries and bounded start/review failure categories. |
844
-
845
- Overlapping state usage, session, review, and finding metrics are consistency
846
- checks only. They create safe mismatch issues but are not summed with their
847
- owning leaf evidence. Raw logs, command output, and source content are never
848
- read.
849
-
850
- ## Evaluation KPIs
851
-
852
- `banzai eval kpi` derives outcome KPIs from evaluation-export data under the
853
- independent contract `banzai-evaluation-kpi/v1` (`schemaVersion: 1`). Without
854
- `--input` it computes the export for the current checkout in memory under the
855
- same cohort options, rules, and error codes as `eval export` — nothing new is
856
- read from `.banzai/runs/` and no export file is written — and renders one
857
- source labeled `current`:
858
-
859
- ```text
860
- banzai eval kpi
861
- banzai eval kpi --json --from 2026-07-01T00:00:00Z --to 2026-08-01T00:00:00Z
862
- ```
863
-
864
- With repeatable `--input` it instead derives one source per previously
865
- exported JSON file, labeled `<ordinal>: <basename>` in argument order, and
866
- renders one comparison table per KPI whose columns are the sources. `--input`
867
- cannot be combined with `--from`, `--to`, or `--run`, needs no Git checkout,
868
- and reads only the named files:
869
-
870
- ```text
871
- banzai eval kpi --input a.json --input b.json
132
+ ```sh
133
+ banzai doctor
872
134
  ```
873
135
 
874
- Each input is validated before use: a file that is unreadable, not JSON, not
875
- schema `banzai-evaluation-export/v1`, not `schemaVersion` 1, or structurally
876
- missing the fields the derivation reads fails closed with the stable code
877
- `INVALID_EVAL_INPUT`, names the file on stderr, and writes nothing to stdout.
136
+ Resolve failed checks and review warnings, then commit the reviewed configuration
137
+ and project guidance using your normal Git workflow. Doctor is read-only: it
138
+ checks declarations and local readiness without running your test commands or
139
+ verifying model authentication. Run the configured checks yourself before the
140
+ first task.
878
141
 
879
- The KPI set — completion rate, first-review pass rate and mean findings,
880
- first-review acceptance rate, reviewer precision with separately reported
881
- deferred triage, zero-accepted review rate, fix cycles per
882
- completed run, attempt retry ratios by kind, and per-completed-run usage with
883
- independent token and cost coverage — plus the fail-closed
884
- planner/implementer/reviewer configuration-signature grouping is documented
885
- with exact derivations in
886
- [`documentation/evaluation/README.md`](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/evaluation/README.md).
887
- Every KPI value carries its numerator, denominator, value (`null` on a zero
888
- denominator), and exact-versus-incomplete run coverage; only exact-evidence
889
- runs contribute. KPIs derive from per-run evidence only, never from export
890
- `aggregates`, and identical inputs produce byte-identical Markdown and JSON.
142
+ ### 4. Run your first task
891
143
 
892
- ## Interactive Mode
144
+ From the configured repository, on your chosen task branch:
893
145
 
894
- Run the short command from an initialized project:
895
-
896
- ```text
897
- cd /path/to/project
146
+ ```sh
898
147
  banzai
899
148
  ```
900
149
 
901
- With terminal input and output attached, the runner opens a minimal
902
- state-driven interface. When no run exists, it collects the task request,
903
- derives a deterministic kebab-case slug, and shows that slug before the start
904
- confirmation. The planner then selects and displays `quick-fix`, `feature`, or
905
- `strict` with its reason and skill chain.
906
-
907
- The request prompt enables terminal bracketed-paste mode. A multiline paste is
908
- captured through its closing marker and rendered as
909
- `[Pasted text #1 +N lines]`, so Markdown newlines do not submit the prompt.
910
- Typed text and multiple pasted blocks retain their order, while Enter submits
911
- the complete expanded request rather than placeholder text. Pasting the same
912
- block again shows a terminal-safe preview without duplicating it; Backspace at
913
- the placeholder boundary removes the complete block. The prompt disables
914
- bracketed-paste mode on success, cancellation, and errors, while a recoverable
915
- validation failure keeps the same prompt active. Single-line input and every
916
- other interactive prompt retain their existing behavior.
917
-
918
- The interface otherwise offers only actions valid for the current persisted
919
- state:
920
-
921
- - sequential decision cards for a material unresolved strict-planning choice;
922
- - arrow-key ADR accept, reject, or rework;
923
- - exact plan-bundle approval;
924
- - accept, reject, or defer for every review finding;
925
- - eligible retry, including explicit plan-task completion-evidence repair;
926
- - resume, confirmed cancellation, or exit.
927
-
928
- These are the workflow's five decision gates: conditional planning-only decision
929
- consultation, ADR acceptance, plan approval, review triage, and escalation. The
930
- interface is the only place they are answered, and no other phase boundary asks
931
- for confirmation.
932
-
933
- When a model requests a recognized human gate, the model process returns
934
- control to the orchestrator but the interactive session does not exit. Banzai
935
- immediately displays the exact current decision needed to continue.
936
-
937
- For `decision_consultation`, the interface presents one to three cards in order:
938
- `Decision`, `Why this matters`, `Repository evidence`, `Options`, and
939
- `Recommendation` when present. The engineer may use the recommendation, choose
940
- another listed option, provide an exact free preference, inspect details, or
941
- pause without mutating the run. Answers are keyed to the current run, request,
942
- round, and decision identities. They record provenance only and never accept an
943
- ADR, approve a plan, authorize implementation, triage, recovery, release, or an
944
- external side effect. Planning analyzes the answers again before it may produce
945
- a dependent ADR or plan; those artifacts retain their separate later gates.
946
-
947
- For an escalation raised during planning, implementation, or fixing, the
948
- interface displays the model's questions and collects a non-empty answer for
949
- each one. A lite route invalidates its workflow authorization and selects again
950
- with the recorded answers. A strict route invalidates previous plan approval,
951
- returns to planning, and requires approval of the revised artifact bundle
952
- before code execution resumes.
953
-
954
- The interface shows artifact paths, findings, blocked reasons, and retry
955
- eligibility before asking for decisions. `Ctrl+C` while a prompt is open exits
956
- the interface without changing the run. `banzai interactive` is an explicit
957
- alias.
958
-
959
- ### macOS Dock Attention
960
-
961
- After an automatic operation takes at least 30 seconds, Banzai requests one
962
- Dock bounce when the result needs plan or ADR approval, human input (including
963
- consultation), review triage, or action on a blocked run. This applies to
964
- interactive mode and the human `run`, `resume`, `retry`, `recover`, `approve`,
965
- and `triage` commands. Time spent reading or answering prompts does not count.
966
- Opening an existing pending decision, revisiting menus, and completed or
967
- cancelled runs do not trigger attention; each new automatic operation has its
968
- own threshold.
969
-
970
- - **Terminal.app:** select the active profile under **Settings → Profiles →
971
- Advanced → Bell**, then enable **Bounce the app icon when in the background**.
972
- Banzai sends BEL; the profile controls sound, badge, and whether bouncing
973
- continues until the application returns to the foreground. Disable
974
- **Audible bell** if you want a visual signal only.
975
- - **iTerm2:** Banzai sends `OSC 1337;RequestAttention=once` to request a single
976
- bounce. The terminal handles attention without Banzai changing window focus.
977
-
978
- Disable this feature for a command or shell session with
979
- `BANZAI_ATTENTION=off`. It requires macOS and TTY stdin, stdout, and stderr.
980
- Control commands, JSON output, CI, `TERM=dumb`, unsupported terminals, and
981
- tmux/screen sessions stay quiet. Notification failures never change the run
982
- result. The actual animation depends on the terminal and macOS settings.
983
-
984
- Protocol references: [Apple Terminal profiles](https://support.apple.com/guide/terminal/change-profiles-advanced-settings-trmladvn/mac)
985
- and [iTerm2 attention requests](https://iterm2.com/documentation-escape-codes.html).
986
-
987
- ## Review Artifact
988
-
989
- Every successful review iteration publishes exactly one durable canonical
990
- Markdown artifact:
991
-
992
- ```text
993
- documentation/features/<slug>/review-<iteration>.md
994
- ```
995
-
996
- Each physical attempt owns
997
- `.banzai/runs/<run-id>/attempts/<attempt-id>.review-candidate.md` and a private,
998
- immutable `.review-snapshot.json` sidecar. Codex and Claude are read-only and
999
- return `review-result/v2`; the runner owns rendering, validation and publication.
1000
- Claude exposes Read, Glob, Grep and Skill, with Write and other mutation tools
1001
- explicitly denied. Stale inherited review/workflow authorization is removed.
1002
-
1003
- The reviewer acknowledges the exact approved artifact paths and snapshot digest
1004
- with scope acknowledgment version 1. Full reviews cover the complete approved
1005
- change surface; delta reviews require compatible full-review lineage and a new
1006
- explicit assertion for every approved artifact against the current changed
1007
- surface and accepted findings. Any required `not_reviewed` entry requires a
1008
- reason and `blocked`; it cannot pass. The assertion is not independent proof
1009
- that a file was read or substantively assessed. Layout and authority blockers
1010
- can produce a truthful blocked artifact with zero findings or coverage.
1011
-
1012
- The self-contained `banzai-feature-review/v2` document distinguishes required
1013
- scope from acknowledged coverage. Fenced JSON values retain every semantic
1014
- string, including multiline summary, evidence details, reproduction, fix
1015
- acceptance, reviewed finding IDs, `reviewNotes` and opaque deferred content.
1016
- Verification and completion are projected from the original snapshot; later
1017
- checks cannot enter an earlier review. Equal inputs produce equal bytes.
1018
-
1019
- After retaining structured output and diagnostics, the runner validates scope,
1020
- renders the candidate, validates bytes and current authority/workspace, and
1021
- atomically publishes validated proof bytes. Failures retain attempt evidence
1022
- and leave earlier canonical reviews intact. No model call repairs formatting
1023
- or JSON/Markdown parity. Human triage still owns finding dispositions; only
1024
- accepted IDs authorize fixing.
1025
-
1026
- Historical v1 records, Markdown prose, repair usage and terminal checkpoints
1027
- keep their original meanings and validation. They are never given synthetic
1028
- scope acknowledgment. New attempts enforce v2; absent/v1 reviewer session
1029
- identities rotate fresh/full with `output-contract-not-reusable`. Frozen
1030
- evaluation v1 treats that unsupported present rotation cause as invalid
1031
- evidence, leaving affected rotation statistics incomplete without changing its
1032
- enum or KPI semantics.
1033
-
1034
- Recovery uses the original snapshot and matching immutable terminal proof. An
1035
- absent candidate can be rendered without a model call; conflicting or explicitly
1036
- failed evidence cannot be promoted. Interrupted publication/application reconciles
1037
- canonical JSON, event, counters and state once. Missing proof requires the
1038
- existing explicit retry flow. Standalone `$banzai:feature-review` remains usable
1039
- without the runner and writes its own next `review-N.md` in v1 format.
1040
-
1041
- ## Choosing Models
1042
-
1043
- `banzai model` walks planning, implementation, and review, asking for a model and
1044
- then an effort level for each. The planning model also performs read-only
1045
- workflow selection:
1046
-
1047
- ```text
1048
- Planning: codex gpt-5.6-sol effort=xhigh
1049
- ? Planning model
1050
- Keep gpt-5.6-sol (effort=xhigh)
1051
- Claude Opus 5 (claude-opus-5) Complex agentic coding and long-horizon work.
1052
- Claude Fable 5.1 (claude-fable-5-1) Most capable model for demanding long-horizon agentic work.
1053
- Claude Fable 5 (claude-fable-5) Previous-generation Fable for demanding agentic work.
1054
- Claude Sonnet 5 (claude-sonnet-5) Near-Opus coding quality at lower cost and latency.
1055
- Claude Opus 4.8 (claude-opus-4-8) Previous-generation Opus for complex agentic work.
1056
- Claude Sonnet 4.6 (claude-sonnet-4-6) Previous-generation Sonnet balancing intelligence and speed.
1057
- GPT-6-Astra (gpt-6-astra) Most capable model for complex, demanding work.
1058
- > GPT-5.6-Sol (gpt-5.6-sol) Reliable agentic workhorse for everyday tasks.
1059
- GPT-5.6-Terra (gpt-5.6-terra) Balanced agentic coding model for everyday work.
1060
- GPT-5.6-Luna (gpt-5.6-luna) Fast and affordable agentic coding model.
1061
- GPT-5.5 (gpt-5.5) Previous-generation frontier model for complex coding and research.
1062
- ```
1063
-
1064
- Every phase runs on either vendor, so each menu lists both Claude and GPT models.
1065
- GPT-6-Astra supports `low`, `medium`, `high`, `xhigh`, `max`, and `ultra` effort.
1066
- The adapter picks its argument shape from the configured executable: `codex exec`
1067
- with a schema file and a sandbox, or `claude -p` with an inline schema and a tool
1068
- allow-list. A phase that writes gets edit and shell tools or `workspace-write`;
1069
- review gets a read-only tool set or `--sandbox read-only`, whichever vendor runs
1070
- it. An executable belonging to neither vendor fails with `UNSUPPORTED_VENDOR`
1071
- before a process starts.
1072
-
1073
- For implementation, the first choice recommends matching the effective planning
1074
- selection exactly, including executable, model, and effort. A planning change
1075
- made earlier in the same dialog is used immediately:
1076
-
1077
- ```text
1078
- Implementation: codex gpt-5.6-sol effort=xhigh
1079
- Planning selection: claude claude-fable-5-1 effort=max
1080
- ? Implementation model
1081
- > Match Planning: Claude Fable 5.1 (claude-fable-5-1), effort=max - recommended
1082
- ```
1083
-
1084
- An existing exact match is marked on **Keep** instead. Exact matching makes a
1085
- strict Planning -> Implementation builder session eligible for reuse when a
1086
- valid saved planning session exists; it does not guarantee a resume. Choosing a
1087
- different executable, model, or effort remains allowed, and the summary says
1088
- that implementation will start fresh from approved artifacts. Lite routes do
1089
- not inherit the planner session, and the reviewer remains independent.
1090
-
1091
- The picker offers the current generation plus deliberate previous-generation
1092
- choices: Claude Fable 5, Claude Opus 4.8, Claude Sonnet 4.6, and GPT-5.5. Older
1093
- identifiers still load from a hand-edited config but are not presented as
1094
- choices.
1095
-
1096
- The effort menu is filtered to the levels the chosen model accepts. For
1097
- implementation, the planning effort is recommended when the executable and
1098
- model match; otherwise the picker preselects the phase's current level when the
1099
- model supports it, or `xhigh`. Codex's `ultra` tier appears for GPT-5.6-Sol and
1100
- GPT-5.6-Terra, which support it, and not for GPT-5.6-Luna or any Claude model,
1101
- which do not. GPT-5.5 offers `low`, `medium`, `high`, and `xhigh`.
1102
-
1103
- Nothing is written until the dialog shows a before-and-after summary and the
1104
- change is confirmed. Only `executable`, `model`, and `effort` are rewritten;
1105
- timeouts, verification commands, and unrecognized fields are left alone.
1106
-
1107
- Mixing vendors is supported in any combination: GPT planning with a Claude
1108
- reviewer, Claude implementation with a GPT reviewer, or one vendor throughout.
1109
- Keeping the reviewer on a different vendor than the implementer is the point of
1110
- the loop. Compatible planning, implementation, and fixes share a builder
1111
- lineage; the primary reviewer starts fresh with no builder transcript. Routine
1112
- re-review may resume only that independent source-read-only reviewer.
1113
-
1114
- `banzai init` runs the same dialog once the configuration exists, so a new project
1115
- picks its models immediately. Outside a terminal, `init` prints a pointer to
1116
- `banzai model` instead, and `banzai model` itself exits with `TTY_REQUIRED`.
1117
-
1118
- `banzai model` refuses while a run is active, for the same reason the startup
1119
- currency check defers: phases read model settings fresh, so a mid-run change
1120
- would swap the model executing the rest of an approved plan.
1121
-
1122
- The Claude entries come from the published Claude model catalog; the GPT entries
1123
- and their reasoning levels come from the Codex CLI's model metadata and official
1124
- model documentation. Both are source facts maintained in
1125
- [`src/models.ts`](src/models.ts) — see the note on catalog maintenance below.
1126
-
1127
- ## Model Configuration
1128
-
1129
- Interactive startup names the Banzai release-train version and the checkout,
1130
- then prints one row per phase — vendor, model, effort, timeout — and checks
1131
- subscription authentication for every vendor the configuration actually uses:
1132
-
1133
- ```text
1134
- ▄▟ banzai v1.19.1 spec-driven run orchestrator
1135
- ▛▀ my-project · main · @ 90d9fb2 · 3 carried-in changes
1136
-
1137
- plan codex gpt-5.6-sol xhigh · 30m ✓
1138
- impl codex gpt-5.6-sol xhigh · 60m ✓
1139
- review claude claude-opus-5 xhigh · 30m ✓
1140
-
1141
- No configured model needs a known update.
1142
- ```
1143
-
1144
- The check is driven by the `executable` each role configures, not by the role, so
1145
- Claude is checked whenever any of planning, implementation, or review runs it —
1146
- and each vendor is checked once even when several roles share it. Checks run
1147
- concurrently and add roughly a second to startup.
1148
-
1149
- A ready launch spends no lines on authentication. An unavailable vendor marks
1150
- every phase row it blocks and is named once, with the reason and the phases it
1151
- would have run:
1152
-
1153
- ```text
1154
- plan codex gpt-5.6-sol xhigh · 30m ✓
1155
- impl codex gpt-5.6-sol xhigh · 60m ✓
1156
- review claude claude-opus-5 xhigh · 30m ✗
1157
-
1158
- │ claude (Review): Claude subscription authentication is unavailable. Run
1159
- │ `claude auth login`; API-key and third-party provider authentication are not
1160
- │ accepted.
1161
- │ Every phase re-checks this; resolve it before starting a run.
1162
- ```
1163
-
1164
- When Claude reports `loggedIn: false` and Banzai itself has inherited a Codex
1165
- sandbox, preflight classifies it as `CLAUDE_AUTH_UNAVAILABLE_IN_SANDBOX` and
1166
- interactive startup shows sandbox-specific guidance instead of asking for
1167
- another login. Authentication visibility is unproven: on macOS the sandbox can
1168
- hide a Claude Code entry in Keychain from every child process, but the result
1169
- does not prove an entry exists. An absolute executable path, shell wrapper, or
1170
- pseudo-terminal cannot repair access. Run `banzai` in a regular terminal to
1171
- check or restore login. For unattended execution, run `claude setup-token`
1172
- outside the sandbox and supply that subscription token through
1173
- `CLAUDE_CODE_OAUTH_TOKEN`; Banzai preserves this variable while still removing
1174
- API-key and third-party-provider overrides. Neither route lets Banzai escape a
1175
- parent network or filesystem sandbox.
1176
-
1177
- Codex has a separate host-readiness requirement: its effective `CODEX_HOME`
1178
- must be writable so the CLI can maintain SQLite-backed runtime state, session
1179
- state, and its app-server client. Banzai checks directory write access without
1180
- creating a probe file and before spawning `codex --version`, `codex login
1181
- status`, or a model attempt. An enclosing Codex sandbox that makes the directory
1182
- read-only produces `CODEX_STATE_UNAVAILABLE_IN_SANDBOX`; another permissions
1183
- failure produces `CODEX_STATE_NOT_WRITABLE`. Neither is evidence of SQLite
1184
- corruption, lock contention, or lost authentication. Run the eligible Banzai
1185
- action from a regular terminal or, for agent supervision, grant normal host
1186
- approval for that action to execute outside the parent sandbox. Do not change
1187
- the model-facing `--sandbox` setting: it cannot widen the host permissions the
1188
- Banzai process inherited.
1189
-
1190
- The report is informational — it does not stop the session, and every phase still
1191
- re-checks its own vendor and fails closed. Its purpose is to surface an expired
1192
- session at launch rather than after planning and implementation have already run.
1193
-
1194
- It shares one limit with the phase checks, because it runs the same command:
1195
- `claude auth status` reports whether credentials are stored, not whether they can
1196
- still be refreshed. A session that is present but no longer refreshable reports
1197
- `ready` here and fails when a phase calls the model. There is no expiry field to
1198
- read, so detecting that would require a real model call at every launch.
1199
-
1200
- It then checks each configured model against a catalog of known model
1201
- identifiers. When a newer or supported model replaces one, Banzai names the
1202
- replacement and offers to write it to `.banzai/config.json`:
1203
-
1204
- ```text
1205
- Newer models are available:
1206
- Review: claude-opus-4-7 is superseded by claude-opus-5.
1207
- ```
1208
-
1209
- The dialog offers updating every reported model, choosing them one at a time, or
1210
- keeping the configuration. Nothing is written without an explicit confirmation.
1211
- The rewrite replaces only the `model` fields it was asked to change; executables,
1212
- efforts, timeouts, verification commands, and unrecognized fields are preserved
1213
- byte-for-byte, and a configuration the runner would refuse to load is never
1214
- written. The result is a tracked file — review and commit it.
1215
-
1216
- Three cases produce no offer:
1217
-
1218
- - an unrecognized model identifier, so a model newer than this catalog is never
1219
- reported as stale;
1220
- - a supported previous-generation choice from `banzai model`;
1221
- - a Claude Code tier alias such as `opus` or `sonnet`, which already resolves to
1222
- the current model of its tier;
1223
- - an active run. Banzai reports the models and the available updates, then defers
1224
- the change until the run is done or cancelled, so a run's phases cannot switch
1225
- models midway.
1226
-
1227
- The catalog is a source fact maintained by hand and shipped with a release. The
1228
- runner authenticates through individual subscriptions and never calls a vendor
1229
- API, so currency is not discovered at run time. Codex identifiers are tracked
1230
- only as far as this repository can state them, which is why an unlisted Codex
1231
- model raises nothing. Update the catalog in
1232
- [`src/models.ts`](src/models.ts) when a model ships, is deprecated, or is
1233
- retired.
1234
-
1235
- `banzai init` and non-interactive commands do not run this check.
1236
-
1237
- Bare `banzai` in a non-TTY environment prints help instead of waiting for
1238
- input. Existing subcommands remain the authoritative non-interactive interface
1239
- for scripts, CI, direct recovery, and explicit slug overrides:
1240
-
1241
- ```text
1242
- banzai run --slug my-explicit-slug --request "Implement the task"
1243
- ```
1244
-
1245
- ## Spawned Claude Environment
1246
-
1247
- Banzai scopes the environment of every `claude` process it spawns. Each one
1248
- loads only the whitelisted MCP servers (below), the Banzai plugin it ships
1249
- with, and your project's own `CLAUDE.md` shim to `AGENTS.md` — not your installed MCP servers,
1250
- plugins, skills, or slash commands. Those tool schemas sit at the head of the
1251
- cached prompt prefix and are resent on every API round-trip, so an unscoped
1252
- reviewer pays for them repeatedly even though it cannot call them; in one
1253
- measured project the turn-1 prefix fell from 42,201 to 19,799 tokens under
1254
- scoping.
1255
-
1256
- Process instructions live in project `AGENTS.md`; policies stay in the installed
1257
- plugin and consuming skills read them explicitly. A legacy project stops before
1258
- affected work with **legacy Banzai layout: run `project-manifest` to migrate**.
1259
- Only an explicit `project-manifest` invocation proposes a migration diff for
1260
- approval. Cancellation, a new run, retry, recovery and answering a gate grant
1261
- no migration authority. Writing phases use the existing escalation route;
1262
- review uses a blocked result with no findings and the existing retry route.
1263
- See [layout migration](https://github.com/Parabolic-Technologies/banzai/blob/main/plugins/banzai/skills/project-manifest/references/layout-migration.md).
1264
- Client versions, fixture tests and environment scoping do not prove effective
1265
- instruction delivery; automatic ingress, tool reads and application require
1266
- separate host evidence.
1267
-
1268
- The optional `claudeEnvironment` section of `.banzai/config.json` controls
1269
- this:
1270
-
1271
- ```json
1272
- {
1273
- "claudeEnvironment": {
1274
- "mode": "scoped",
1275
- "pluginDirectory": null
1276
- }
1277
- }
1278
- ```
1279
-
1280
- - `mode: "scoped"` (the default, also used when the section is absent) isolates
1281
- MCP unconditionally and scopes setting sources only when it can verify a
1282
- Banzai plugin directory to re-supply. If it cannot, it keeps ambient setting
1283
- sources rather than disabling Banzai skills and the enforcement hook, and says
1284
- so in the run's progress output and events.
1285
- - `pluginDirectory` names an explicit plugin directory instead of the one
1286
- shipped beside the orchestrator. The directory must identify the Banzai
1287
- plugin and contain its required skills and enforcement hook; a configured
1288
- directory that fails verification stops the run rather than degrading
1289
- silently.
1290
- - `mode: "ambient"` restores the previous behaviour and lets spawned sessions
1291
- discover your whole Claude Code installation.
1292
-
1293
- `banzai doctor` reports this state as `claude.environment`: verified scoping
1294
- passes, explicit ambient mode and automatic MCP-only degradation warn, and an
1295
- invalid explicit plugin directory fails readiness. The check is filesystem-only
1296
- and does not invoke Claude.
1297
-
1298
- ### Claude Tool Permissions
1299
-
1300
- Every Claude phase is spawned with `--permission-mode dontAsk`, which answers a
1301
- permission prompt with a denial instead of a human. Three surfaces can still
1302
- grant a call, and only three: the enforcement hook, which allows exactly the
1303
- approved bundle while a phase carries runner identity; an `--allowedTools`
1304
- entry, which a run spends on the Serena whitelist alone; and the permission
1305
- rules of the settings files the session loads.
1306
-
1307
- Planning phases carry no runner identity — that is what stops a planner from
1308
- writing code — so the hook defers their documentation writes to the ordinary
1309
- permission flow, and under `dontAsk` that flow is the third surface or nothing.
1310
- A checkout that never granted `Write` therefore denies the description, plan,
1311
- and decision artifacts the phase exists to produce, after the model has already
1312
- been paid for. Shell commands are never hook-granted in any phase, so a Claude
1313
- planner or implementer runs only the commands a rule already names.
1314
-
1315
- Startup preflight audits this before the first phase and ends the run with one
1316
- remediation when a `Write` grant is missing or refused. `banzai doctor` reports
1317
- the same audit as `claude.permissions`; both skip it when no configured role
1318
- depends on those rules — a Claude reviewer does not, because the hook authorizes
1319
- its one write and its shell access is already denied.
1320
-
1321
- What the audit reads is exactly what the session will honor:
1322
-
1323
- - the settings sources the resolved scope passes. Scoped mode loads `project`
1324
- only, so grants belong in the tracked `.claude/settings.json`;
1325
- `.claude/settings.local.json` is never loaded for a scoped run;
1326
- - administrator policy settings, which apply whatever `--setting-sources` names;
1327
- - Claude Code's workspace trust record. An untrusted checkout has its repository
1328
- permission rules ignored with a warning rather than an error, so it looks
1329
- exactly like a checkout whose rules were never written. Run `claude` once in
1330
- the checkout and accept the trust prompt.
1331
-
1332
- A minimal grant for a repository whose planner or implementer runs Claude:
1333
-
1334
- ```json
1335
- {
1336
- "permissions": {
1337
- "allow": ["Write", "Edit", "Bash(mkdir:*)", "Bash(git status:*)"]
1338
- }
1339
- }
1340
- ```
1341
-
1342
- `Edit`, `Bash`, and path-scoped grants are reported as advisories rather than
1343
- blocks: the run continues, and the phase keeps only what the rules named.
1344
-
1345
- ### Serena MCP Whitelist
1346
-
1347
- Scoped isolation exists to keep unusable tool schemas out of the cached prompt
1348
- prefix, not to deny the phases semantic tooling. Serena is the one MCP server
1349
- worth its schema budget here, so when it is genuinely available it is
1350
- re-admitted explicitly — through `--mcp-config` beside `--strict-mcp-config`
1351
- for Claude, and a `-c mcp_servers=...` override for Codex that replaces the
1352
- whole table, so no other user-scope server leaks into a run.
1353
-
1354
- Availability is checked once per run and every gate that fails downgrades to
1355
- "no whitelist" with a reason, never a blocked run:
1356
-
1357
- - the checkout is onboarded (`.serena/project.yml` exists);
1358
- - the vendor has serena registered — the project's `.mcp.json` or the
1359
- user-scope `.claude.json` for Claude, `codex mcp get serena --json` for
1360
- Codex, so each vendor runs its own registration verbatim;
1361
- - the registered command resolves on the sanitized PATH the child receives.
1362
-
1363
- The result is reported once per run —
1364
- `MCP whitelist: serena -> claude, codex` or `MCP whitelist: none (…reasons)` —
1365
- and recorded as an `mcp_whitelist.resolved` event.
1366
-
1367
- Phases reach Serena for navigation only — symbol lookup, references,
1368
- diagnostics, memories. Its editing tools are never granted, in any role:
1369
- Banzai's spec gate enforces the approved bundle by intercepting
1370
- `Edit`/`Write`/`apply_patch` and never sees an MCP call, so a phase editing
1371
- through `replace_symbol_body` would bypass that enforcement. Phases already
1372
- hold `Edit` and `Write`; what they lacked was navigation.
1373
-
1374
- Shipping the schemas alone did not change behavior: real runs showed every
1375
- phase still navigating by `grep`/`sed` line windows while a connected Serena
1376
- went unused. When the phase vendor's whitelist entry resolved, the planning,
1377
- implementation, fix, and review prompts therefore append one guidance line
1378
- steering symbol lookup to Serena's read-only tools; runs without Serena keep
1379
- byte-identical prompts.
1380
-
1381
- ## Live Progress
1382
-
1383
- Commands that advance a workflow report progress to stderr. By default each
1384
- action settles into one line carrying its duration, and a run of identical
1385
- consecutive actions is closed with its count:
1386
-
1387
- ```text
1388
- [banzai] Preparing run sc-12345-example-task in /path/to/project
1389
- [banzai] START Preflight - Node, contracts, executables, verification commands, and subscription authentication
1390
- [banzai] DONE Preflight (2.1s)
1391
- ── Planning ──────────── codex · gpt-5.6-sol · xhigh · fresh · 30m cap ──
1392
- [banzai] · banzai:feature-description
1393
- [banzai] · 0.3s command: git diff --stat
1394
- [banzai] · 0.2s command: rg -n "resolveScope" src
1395
- [banzai] ×4 total
1396
- [banzai] ✗ 0.4s command: npm run lint --silent
1397
- [banzai] · tokens: 24.8K in (248 fresh · 99% cached) · 122 out
1398
- [banzai] DONE Planning (48s)
1399
- [banzai] Produced a description, 2 ADRs, a plan
1400
- ```
1401
-
1402
- The phase banner and colour appear only on a terminal; piped and redirected
1403
- output stays plain. On a terminal a live status line also reports the running
1404
- phase, its elapsed time, what is in flight, and how many actions have settled,
1405
- and is erased before every settled line and when the phase ends.
1406
-
1407
- Three verbosity levels are available on any command that runs a phase:
1408
-
1409
- | Level | Flag | Shows |
1410
- | ------- | ----------- | ----------------------------------------------------------- |
1411
- | quiet | `--quiet` | Phase boundaries, failures, and runner messages |
1412
- | normal | default | Plus one settled line per finished action, and token usage |
1413
- | verbose | `--verbose` | Every model action, started and finished, with no live line |
1414
-
1415
- `BANZAI_PROGRESS=quiet\|normal\|verbose` sets the same levels; an explicit flag
1416
- wins over it, and an unrecognized value falls back to `normal` rather than
1417
- failing the run. `--metrics` additionally prints attempt, session, and review
1418
- counters, which are otherwise reserved for `banzai status --json`.
1419
-
1420
- The runner reports preflight and repository checks, workflow selection,
1421
- planning when strict, implementation, each configured verification command,
1422
- review when strict, and accepted-finding fixes, and names what each phase
1423
- produced when it completes. Without a live line, a heartbeat is printed every 30
1424
- seconds naming the actions still running.
1425
- Codex `--json` and Claude `--output-format stream-json` events are normalized
1426
- into the same model, action, skill, and usage lines. Every phase's required
1427
- Banzai skill chain is included in its start line; observable Claude `Skill`
1428
- calls and supported Codex skill events are reported as they occur. Because
1429
- implementation, verification, and review advance without a gate, this progress
1430
- stream is how an approved run reports itself until the next decision.
1431
-
1432
- Progress is deliberately separate from stdout, so `banzai status --json`
1433
- remains machine-readable. Progress exposes safe tool identity and file paths,
1434
- not raw prompts, reasoning, assistant prose, command arguments, search queries,
1435
- command output, or tool results. Redacted result and failure evidence continues
1436
- to be stored in the run directory.
1437
-
1438
- `status` reports a `nextAction` plus separate retry and recovery eligibility.
1439
- Use `resume` for a paused phase or to reconcile a durable terminal checkpoint.
1440
- Use `retry` only
1441
- after resolving the external cause of a retryable startup check, review check,
1442
- or failed selection/planning/review attempt.
1443
-
1444
- ## Failure Recovery
1445
-
1446
- If initial preflight or the repository check fails, the confirmed request
1447
- is preserved as a blocked run. Resolve the reported prerequisite and choose
1448
- `Retry start checks` in interactive mode, or run:
1449
-
1450
- ```text
1451
- banzai retry
1452
- ```
1453
-
1454
- The retry reruns preflight and the repository check, refreshes the base commit,
1455
- and begins workflow selection under the same run ID. It does not ask for the
1456
- request again.
1457
-
1458
- For a failed selection, planning, or review process:
1459
-
1460
- ```text
1461
- banzai status
1462
- # Resolve the reported authentication, CLI, MCP, or provider problem.
1463
- banzai retry
1464
- ```
1465
-
1466
- Retry reruns preflight, preserves the failed attempt, and creates a distinct
1467
- attempt. Selection and source-read-only review are also retryable after
1468
- interruption. A review retry reuses the latest unfinished iteration and
1469
- canonical `review-<iteration>.md` identity instead of skipping an artifact
1470
- number, but allocates a new candidate path. Adapter success followed by review
1471
- validation failure retains the structured result, redacted stdout/stderr,
1472
- candidate bytes and digest, exact validation error, and typed failure code in
1473
- the failed attempt. These remain diagnostic rather than canonical. Non-zero
1474
- vendor exits likewise retain redacted stdout and stderr under the run's
1475
- `attempts/` directory, while the state and event log contain only a concise
1476
- error.
1477
-
1478
- Planning retries preserve the vendor session ID as soon as Codex announces its
1479
- thread or Claude sends its initialization event. After a supported capacity,
1480
- timeout, transport, result-format, or plan-validation failure, the new attempt
1481
- resumes that session only when the planner settings, planning instructions,
1482
- tool scope, and stopped workspace still match. Its prompt names the failure and
1483
- existing planning artifacts and asks it to finish the remaining work. Missing
1484
- or legacy context, changed inputs, and unclassified or integrity failures use a
1485
- fresh session with an artifact-first continuation prompt. The failed attempt
1486
- stays intact; the new attempt records `planningContext.retryOf` and its actual
1487
- fresh/resumed mode. No private vendor transcript is imported or treated as
1488
- completion evidence. Interrupted planning without a proven terminal result
1489
- retains its existing non-retryable policy.
1490
-
1491
- The interactive action is `Continue the failed planning attempt`. A valid saved
1492
- planning terminal checkpoint is reconciled without another model call, with
1493
- the ordinary plan validation and human approval gate. A rejected plan artifact
1494
- requires repair; conflicting terminal or session evidence cannot promote an
1495
- earlier checkpoint. If checkpoint validation rejects an otherwise retryable
1496
- failed planner, an explicit retry creates a fresh session and includes the
1497
- rejection diagnostic. Consumption is accounted once across failure and terminal
1498
- reconciliation.
1499
-
1500
- Codex progress JSON is provisional: the final agent message confirmed by
1501
- `turn.completed` owns the terminal checkpoint, and the post-close result file
1502
- must agree. Subsequent tool work invalidates a provisional message; duplicate
1503
- terminal events, work after an explicit final message, and conflicting final
1504
- results remain errors. Observer failures, timeouts, and post-close decoding
1505
- failures retain captured redacted output and any vendor-reported usage.
1506
-
1507
- If review checks fail before Claude starts, no model attempt exists yet. After
1508
- fixing Claude authentication or another reported prerequisite, interactive mode
1509
- offers `Retry review checks`; the scriptable equivalent is `banzai retry`.
1510
- The runner then rechecks the base commit, approved artifact digest, Claude
1511
- authentication, and workspace snapshot before invoking Claude.
1512
-
1513
- Retry never bypasses approval integrity. `banzai approve plan` stores the
1514
- exact bytes of every approved artifact beside the run evidence
1515
- (`.banzai/runs/<run-id>/approval/`), because the bundle paths are typically
1516
- uncommitted and would otherwise leave no recoverable approved form. If an
1517
- approved description, plan, or ADR later changes — an editor, a formatter, or
1518
- a parallel agent session touching the checkout — the next phase's checks block
1519
- the run, and `banzai restore` (or the interactive
1520
- `Restore the approved planning artifacts` action) rewrites the approved paths
1521
- with the snapshot bytes after verifying them against the recorded approval
1522
- digest; `banzai retry` then re-enters the blocked phase, since
1523
- implementation-checks and fix-checks failures are retryable exactly like
1524
- review checks. Runs recorded before snapshots exist report that restoration
1525
- must be manual. Alternatively cancel the run and start a new one so the
1526
- revised bundle can receive explicit approval. Orchestrated
1527
- implementation and fix prompts keep approved planning artifacts immutable and
1528
- record progress in reports instead of plan checkboxes. New strict
1529
- implementation results carry a versioned canonical task-completion ledger in
1530
- approved `TNNN` order. The **Plan Task Completion** report table and persisted
1531
- summary are deterministic projections validated against approval, repository
1532
- scope, required reports, and each other. Inside the table's Evidence and Gap
1533
- JSON cells the canonical grammar HTML-escapes `&`, `|`, `<`, and `>`
1534
- (`&amp;`, `&#124;`, `&lt;`, `&gt;`) and emits raw JSON rather than Markdown code
1535
- spans. As a narrow compatibility rule for model-authored reports, the decoder
1536
- accepts exactly one complete outer backtick pair around a whole Evidence or Gap
1537
- JSON cell before the normal shape and exact-parity checks; partial and repeated
1538
- wrappers remain invalid. It additionally recovers a row whose JSON cells
1539
- contain a raw unescaped `|` when exactly one rejoin boundary decodes both cells
1540
- to their required shapes, and otherwise fails closed with the offending task
1541
- named in the diagnostic. Implementation and fix-refresh prompts and skills show
1542
- the canonical raw-JSON row and prohibit authoring code-spanned cells. Persisted
1543
- state separately owns lifecycle and `nextAction`; legacy runs without the
1544
- ledger retain that lifecycle but report completion as legacy/unknown rather
1545
- than fabricated `N/N`.
1546
- Evidence paths must name files created or modified relative to the run baseline,
1547
- or the exact required implementation/test reports. A carried-in unchanged source
1548
- or test file is not direct completion evidence even when the task confirms it
1549
- read-only; that confirmation belongs in a required report, and the ledger cites
1550
- the report. Evidence-repair prompts include the persisted violation and exact
1551
- task ID so the replacement does not preserve a known-invalid row.
1552
-
1553
- Implementation, fix, and interrupted planning attempts may have partial
1554
- repository side effects, so they cannot normally be retried. An implementation
1555
- result rejected with `PLAN_TASK_COMPLETION_INVALID` is the narrow exception,
1556
- whether ledger validation rejected a decoded result or the result failed
1557
- decoding on a completion field — for example a gap detail over the 500
1558
- character single-line bound: the runner classified both as completion-evidence
1559
- failures when it wrote the invalid checkpoint, retains what decoded, and may
1560
- request one replacement result without duplicating the attempt or task ledger.
1561
- The repair prompt carries the rejected attempt's persisted diagnostic so the
1562
- replacement names the exact offending field, and the writing prompts state the
1563
- ledger field bounds (500-character single-line strings, at most 16 evidence
1564
- entries) so first-pass records are composed to fit. Strict implementation and
1565
- fix prompts also carry the run's recorded human decisions, with the rule that a
1566
- recorded answer is authoritative and a question it covers is never re-raised as
1567
- a new escalation — so a decision made at any earlier gate stays visible to
1568
- every later writing phase instead of being re-asked.
1569
-
1570
- After a fix changes tests, verification commands, or their expected or observed
1571
- results, the fix prompt and shipped `quick-fix` skill require a complete sweep
1572
- of test-count and command-result claims in the current `test-report.md`,
1573
- `implementation-report.md`, and the fix change report. Each current claim must
1574
- come from a command actually run in that fix; older evidence must be scoped
1575
- explicitly as `historical/pre-fix`. In orchestrated mode, runner-owned final
1576
- verification is recorded only as `pending at fix handoff`, with durable runner
1577
- evidence owning the eventual result, rather than predicted from an earlier
1578
- total. All three artifacts must remain mutually consistent.
1579
-
1580
- Per ADR 0025, an accepted-finding fix whose changes made the recorded
1581
- completion evidence stale may return a complete refreshed `taskCompletion`
1582
- ledger with a regenerated report projection, validated by the identical
1583
- fail-closed pipeline; the checkpoint then records the fix attempt as the
1584
- canonical source (`sourceAttemptKind: "fix"`, absent means implementation) and
1585
- the runner emits `plan_task_completion.refreshed`. Statuses cannot regress
1586
- through a refresh — a completed fix outcome still requires every task
1587
- completed, and a genuine downgrade still escalates. A rejected refresh fails
1588
- the fix attempt with the invalid checkpoint and offers the same
1589
- `Repair plan-task completion evidence` retry, which reruns the fix with the
1590
- persisted diagnostic and unchanged triage scope.
1591
-
1592
- The canonical Implementation Tasks heading grammar
1593
- (`- [ ] **TNNN - Title**`, one line, ending at the closing `**`, unchecked
1594
- even in a revised plan) is validated twice before it can bind anything: a plan
1595
- result with a malformed heading fails its attempt before the approval gate is
1596
- raised, and `approvePlan` re-checks the exact bytes it is about to bind so an
1597
- on-disk edit after the gate cannot smuggle one in. If a run nonetheless holds
1598
- an invalid completion checkpoint whose violation lives in the plan bundle
1599
- (`approved_plan_invalid`, `approval_invalid`), retry does not loop the
1600
- evidence repair — the interactive action reads
1601
- `Rerun planning to correct the approved plan`, the recorded approval is
1602
- voided, the stale checkpoint is cleared, and planning reruns toward a fresh
1603
- plan-approval gate. Interactive mode labels that action
1604
- `Repair plan-task completion evidence`, distinct from a source-read-only
1605
- retry. If the rejected result also has a terminal checkpoint, the repair action
1606
- takes precedence over reconciliation: `resume` leaves the run unchanged rather
1607
- than replaying the already-rejected evidence. The same repair applies when the
1608
- pre-verification revalidation after a completed fix rejects the evidence — for
1609
- example when the fix edited the frozen Plan Task Completion projection — even
1610
- though no attempt failed: the retry starts a fresh completion-repair
1611
- implementation attempt from the invalid checkpoint. That repair restores the
1612
- projection when the ledger records are correct; when the divergence reflects an
1613
- accepted review finding that a record was overstated, it returns the corrected
1614
- ledger and matching projection with `gate=escalation` instead of restoring the
1615
- false claim. Fix prompts state the projection is frozen: a fix never edits that
1616
- section, and an accepted finding it cannot truthfully resolve escalates rather
1617
- than rewriting completion evidence. Interrupted selection and review
1618
- are explicitly retryable because their model phases cannot change production
1619
- source; review retains only its bounded attempt-owned candidate evidence.
1620
- When a supported vendor emits a valid terminal success, Banzai atomically
1621
- persists an attempt-owned checkpoint before waiting for process closure. If the
1622
- parent is then interrupted, status reports `resume`; reconciliation validates
1623
- the same attempt, base commit, approval/workflow, scope, model/session context,
1624
- and structured result before applying it exactly once. Raw result files,
1625
- terminal prose, and successful tests are not terminal checkpoints.
1626
-
1627
- A mutable implementation or fix with no checkpoint remains ineligible for
1628
- ordinary retry when it was interrupted or failed after the model started with a
1629
- typed `capacity`, `timeout`, or `transport` cause and no terminal result. If the
1630
- process is dead and every current base, approval/workflow, scope, model
1631
- configuration, attempt, and workspace check is valid, status instead offers
1632
- `banzai recover` with bounded change counts, an exact identity, and a warning
1633
- that repository or external effects may be partial or duplicated. Process-start
1634
- and unclassified failures remain fail-closed. Interactive recovery has a
1635
- negative-default confirmation. Non-TTY callers use the closed
1636
- `banzai-agent-recovery/v1` document. Recovery preserves the old attempt as
1637
- `interrupted`, creates one new linked physical attempt, and routes the fresh
1638
- result through normal completion, verification, independent review, and triage
1639
- gates. It never infers completion from existing source or reports.
1640
-
1641
- A completed strict fix result is separately eligible only when it is the unique
1642
- current canonical source, has `outcome: blocked`, proves a non-empty proper
1643
- subset of accepted findings resolved, and records at least one question or
1644
- requested verification prerequisite. The run has no active attempt or live
1645
- process, current review and triage agree, and no recovery descendant exists.
1646
- Status keeps retry unavailable and presents the resolved IDs, remaining IDs,
1647
- and prerequisite actions with a negative-default confirmation. After the
1648
- operator addresses them, the same closed recovery document authorizes one
1649
- linked fix attempt containing only the remaining accepted findings. The source
1650
- record remains completed and byte-stable; a new descendant cannot seed another
1651
- prerequisite recovery chain.
1652
-
1653
- The source result, exact checkout, approval, configuration, and remaining scope
1654
- are rebound before and after implementer preflight. Drift invalidates the
1655
- authorization before a model call. Banzai never executes the recorded
1656
- prerequisites, adds a broad Bash allowance, loads local Claude settings, or
1657
- weakens project-scoped `dontAsk`; those are operator-owned actions outside the
1658
- recovery mutation.
1659
-
1660
- If the workspace changes after authorization, recovery fails before another
1661
- model call and requires a new inspection and decision. Other interrupted or
1662
- non-recoverable blocked states fail closed. Inspect the checkout and logs, then
1663
- run `banzai cancel` when appropriate. Do not edit or delete `.banzai` state to
1664
- recover.
1665
-
1666
- ## Local State
1667
-
1668
- `.banzai/runs/<run-id>/state.json` is atomically replaced. `events.jsonl` is an
1669
- append-only summary without full transcripts. New runs create
1670
- `verification-attempts/ledger.json` plus one atomic sequence-ordered leaf per
1671
- physical verification attempt; `state.verification` remains the latest
1672
- operational round. Attempts, structured results, attempt-owned review
1673
- candidates, redacted CLI output, verification evidence, and review results
1674
- remain local under the ignored run directory. Evaluation counts supported
1675
- failed attempt records but does not treat candidate Markdown, raw result files,
1676
- terminal checkpoints, recovery authorizations, or failed structured results as
1677
- review verdicts or completion evidence.
1678
- New model attempts use schema version 2 so an interrupted source and its linked
1679
- recovery attempt remain distinct. New run state uses schema version 3 for the
1680
- tagged pending consultation and exact keyed decision history; legacy state v1
1681
- and v2 remains readable without fabricated consultation evidence. State v3 also
1682
- retains the additive `source_preserved` stage while a completed blocked source
1683
- remains immutable and one linked attempt is prepared. Checkpoints and recovery
1684
- authorizations are immutable atomic mode-`0600` evidence; users and supervisors
1685
- must never edit them manually.
1686
-
1687
- The model hand-off uses phase-result v3. It adds the planning-only
1688
- `decision_consultation` gate and required nullable `decisionConsultation`
1689
- payload; phase-result v1 and v2 remain read-only legacy inputs and cannot be
1690
- returned by a new attempt. Evaluation export and KPI stay on their independent
1691
- privacy-minimized v1 contracts. Consultation events retain only card counts,
1692
- answer-mode counts, timing, and completion state, never request/card/option IDs,
1693
- questions, recommendations, answers, evidence detail, decision-maker labels,
1694
- or raw paths.
1695
- Evaluation never exports commands, candidate/error metadata, log references/
1696
- digests, raw output, or credential material from the ledger.
1697
-
1698
- State binds resumable sessions to role, executable, model, and effort. Status,
1699
- events, attempts, and metrics distinguish fresh/resumed sessions and full/delta
1700
- reviews, including rotation reasons, without persisting prompts or transcripts.
1701
- The reviewer rotates fresh when its binding or approved bundle changes, a
1702
- review fails, is interrupted, or blocks, a blocker/security finding is
1703
- accepted, or two delta reviews complete. Every resume reapplies the current
1704
- Codex sandbox or Claude tool restrictions.
1705
-
1706
- One refinement to "a review fails": retries preserve the same reviewer session
1707
- and delta context when the failure is structurally classified as capacity,
1708
- timeout, process-start, or transport. Unclassified failures, invalid contracts
1709
- or artifacts, workspace or approval drift, and other integrity-sensitive
1710
- conditions rotate to a fresh full review, as does a changed invocation scope or
1711
- reported tool inventory (`session-inventory-changed`).
1712
-
1713
- Failed model attempts retain their redacted stdout/stderr and any structured
1714
- usage already spent. That usage counts toward run totals, but the attempt is
1715
- excluded from completed-attempt, verdict, review, and finding metrics. Runs
1716
- persisted before failed-turn capture did not record every failed turn, so
1717
- historical and new-run totals are comparable only with their evidence coverage
1718
- in mind. New reviews make no formatting-only model calls. Deterministic
1719
- rendering, validation or publication failure is explicit and retains available
1720
- result, candidate, diagnostics, immutable terminal proof and usage. Historical
1721
- formatting-repair records and combined usage remain readable without being
1722
- replayed or double-counted.
1723
-
1724
- Schema-version-1 run state remains readable. Its unbound string session IDs are
1725
- not reused; Banzai preserves artifacts and human decisions, normalizes the state
1726
- to version 2 on the next write, and safely starts the next eligible model phase
1727
- fresh.
1728
-
1729
- If a completed model attempt was persisted before its state transition, then
1730
- `resume` reconciles it without repeating the model phase. An interrupted attempt
1731
- is never silently retried; eligible interrupted selection and review attempts
1732
- require an explicit `banzai retry`.
1733
-
1734
- Selection exports only `BANZAI_RUN_ID`, which denies writes. Strict code phases
1735
- add `BANZAI_APPROVAL_DIGEST`; lite code adds `BANZAI_WORKFLOW_DIGEST`. Review
1736
- supplies run and approval identity for reads while removing inherited
1737
- `BANZAI_REVIEW_ARTIFACT` and `BANZAI_WORKFLOW_DIGEST`. The hook denies every
1738
- mutation while reviewing or while a review attempt is active, before workflow
1739
- write grants. Standalone session behavior remains separate when runner variables
1740
- are absent.
150
+ Enter a bounded request, such as the CSV example above. Banzai displays the
151
+ selected workflow and guides you through any required decisions. You can
152
+ inspect progress and retained evidence with `banzai status`.
153
+
154
+ For model settings, see [Model Configuration](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#model-configuration). For a
155
+ blocked or interrupted run, see [Failure Recovery](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#failure-recovery).
156
+
157
+ ## Documentation
158
+
159
+ | What you want to do | Guide |
160
+ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
161
+ | Complete your first task or diagnose setup | [Getting started](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/getting-started.md) |
162
+ | Adapt checks for Node, Python, Go, or mixed projects | [Verification examples](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/verification-examples.md) |
163
+ | Find commands and options | [CLI reference](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#commands) |
164
+ | Choose models for each role | [Model configuration](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#model-configuration) |
165
+ | Configure your project's checks | [Verification profiles](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#project-verification-readiness) |
166
+ | Resume or diagnose blocked work | [Failure recovery](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#failure-recovery) |
167
+ | Understand review evidence | [Review artifacts](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#review-artifact) |
168
+ | Explore workflow skills and maintainer guides | [Documentation index](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/README.md) |
169
+
170
+ ## Contributing
171
+
172
+ AI-assisted contributions are welcome. Useful places to start:
173
+
174
+ - **Improve onboarding:** clarify a setup step or propose a verification profile
175
+ for your stack.
176
+ - **Report a reproducible bug:** include versions, a minimal reproduction, and
177
+ expected versus actual behavior in
178
+ [GitHub Issues](https://github.com/Parabolic-Technologies/banzai/issues).
179
+ - **Share your workflow:** describe your use case and suggest a reusable example
180
+ through an issue or a documentation pull request. Use synthetic data and
181
+ redact credentials and private project details.
182
+
183
+ Read the [contribution guide](https://github.com/Parabolic-Technologies/banzai/blob/main/CONTRIBUTING.md)
184
+ and [Code of Conduct](https://github.com/Parabolic-Technologies/banzai/blob/main/CODE_OF_CONDUCT.md).
185
+ Report vulnerabilities privately through the
186
+ [security policy](https://github.com/Parabolic-Technologies/banzai/blob/main/SECURITY.md).
187
+
188
+ <details>
189
+ <summary>All reference topics</summary>
190
+
191
+ Browse the complete [orchestrator reference](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md), or jump to a topic:
192
+
193
+ - [Workflow Reference](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#workflow-reference)
194
+ - [Boundaries](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#boundaries)
195
+ - [Setup](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#setup)
196
+ - [Interactive Human Time](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#interactive-human-time)
197
+ - [Test Assurance And Verification Ownership](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#test-assurance-and-verification-ownership)
198
+ - [Engineering Quality Shadow Review](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#engineering-quality-shadow-review)
199
+ - [Repository Release Confidence](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#repository-release-confidence)
200
+ - [Cancellation observations](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#cancellation-observations)
201
+ - [Commands](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#commands)
202
+ - [Agent Control](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#agent-control)
203
+ - [Project Verification Readiness](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#project-verification-readiness)
204
+ - [Context Accounting and Budgets](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#context-accounting-and-budgets)
205
+ - [Evaluation Export](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#evaluation-export) with [source precedence](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#evaluation-source-precedence)
206
+ - [Evaluation KPIs](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#evaluation-kpis)
207
+ - [Interactive Mode](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#interactive-mode) with [macOS Dock attention](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#macos-dock-attention)
208
+ - [Review Artifact](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#review-artifact)
209
+ - [Choosing Models](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#choosing-models)
210
+ - [Model Configuration](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#model-configuration)
211
+ - [Spawned Claude Environment](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#spawned-claude-environment) with [Claude tool permissions](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#claude-tool-permissions) and [Serena MCP whitelist](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#serena-mcp-whitelist)
212
+ - [Live Progress](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#live-progress)
213
+ - [Failure Recovery](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#failure-recovery)
214
+ - [Local State](https://github.com/Parabolic-Technologies/banzai/blob/main/documentation/orchestrator.md#local-state)
215
+
216
+ </details>