agent-bios 0.9.7 → 0.9.9
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/DEPENDENCIES.md +19 -19
- package/README.md +34 -11
- package/claude/CLAUDE.md +2 -1
- package/claude/guides/claude-prompting.md +1 -1
- package/claude/guides/cli-multi-model-workflow.md +19 -1
- package/claude/guides/coding-staged-workflow.md +32 -0
- package/claude/guides/gpt-prompting.md +1 -1
- package/claude/guides/learning-flow.md +5 -5
- package/claude/guides/llm-capability-boundary.md +6 -1
- package/claude/guides/session-distill-workflow.md +19 -9
- package/claude/guides/tooling-gotchas.md +16 -0
- package/claude/hooks/__pycache__/tooling-gotchas-hook.cpython-314.pyc +0 -0
- package/claude/hooks/tooling-gotchas-hook.py +7 -0
- package/codex/AGENTS.md +2 -1
- package/codex/guides/claude-prompting.md +1 -1
- package/codex/guides/cli-multi-model-workflow.md +19 -1
- package/codex/guides/coding-staged-workflow.md +32 -0
- package/codex/guides/gpt-prompting.md +1 -1
- package/codex/guides/learning-flow.md +5 -5
- package/codex/guides/llm-capability-boundary.md +6 -1
- package/codex/guides/session-distill-workflow.md +19 -9
- package/codex/guides/tooling-gotchas.md +16 -0
- package/{scripts → compose}/assemble.py +209 -25
- package/{scripts → compose}/canary.sh +14 -5
- package/{scripts → compose}/check-domains.py +9 -3
- package/{config → compose}/domains.json +1 -0
- package/{scripts → compose}/pkgid.py +8 -1
- package/compose/prune-backups.py +204 -0
- package/compose/register-hooks.py +44 -0
- package/{scripts/install.sh → install.sh} +403 -94
- package/launch/agent-launch.py +5294 -0
- package/launch/agent-launch.toml +376 -0
- package/{scripts → launch}/check-prompting-targets.sh +1 -1
- package/{scripts → launch}/provision-venv.sh +1 -1
- package/{scripts → learn}/check-learning.py +7 -7
- package/{scripts → learn}/collect-learning.py +10 -10
- package/{config → learn}/learning.schema.json +3 -3
- package/{scripts → learn}/migrate-learnings.py +95 -54
- package/{scripts → learn}/redact.py +4 -4
- package/package.json +25 -23
- package/wrappers/claude-run.sh +162 -0
- package/{scripts → wrappers}/codex-run.sh +62 -6
- package/config/agent-launch.toml +0 -143
- package/scripts/agent-launch.py +0 -2350
- package/scripts/check-parity.sh +0 -2003
- /package/{shell → launch}/agent-launch.zsh +0 -0
- /package/{config → learn}/promotions.json +0 -0
- /package/{scripts/session-cost.py → session-cost.py} +0 -0
- /package/{scripts → wrappers}/codex-helm.sh +0 -0
package/DEPENDENCIES.md
CHANGED
|
@@ -8,12 +8,12 @@ Korean: [`ko/DEPENDENCIES.md`](ko/DEPENDENCIES.md). Dates = verification time; u
|
|
|
8
8
|
|
|
9
9
|
| Tool | Required by | Required capability | Verified |
|
|
10
10
|
| --- | --- | --- | --- |
|
|
11
|
-
| `codex` (codex-cli) | `
|
|
12
|
-
| `bash` | `
|
|
13
|
-
| `python3` | `
|
|
14
|
-
| `textual` (managed venv) | `
|
|
15
|
-
| `jsonschema` (system python) | `
|
|
16
|
-
| `zsh` | `
|
|
11
|
+
| `codex` (codex-cli) | `wrappers/codex-run.sh`, `wrappers/codex-helm.sh`, `launch/agent-launch.py`; guide "Codex direct-drive" + "Session relocation" bindings | existing `codex exec` contract plus `agents.<name>.description/config_file` config projection; final output on stdout and progress on stderr; honors `CODEX_HOME`; `codex resume` cwd-filtered | 0.144.1 · 2026-07-13 |
|
|
12
|
+
| `bash` | `install.sh`, `*/*.sh` | POSIX + arrays; runs on macOS system bash | 3.2.57 · 2026-07 |
|
|
13
|
+
| `python3` | `session-cost.py`, `launch/agent-launch.py` | stdlib for every direct / non-TTY / numbered path; Python 3.11+ (`tomllib`). The interactive preflight additionally needs `textual` (next row) | 3.14.5 · 2026-07-13 |
|
|
14
|
+
| `textual` (managed venv) | `launch/agent-launch.py` interactive preflight; provisioned by `launch/provision-venv.sh` | Textual TUI framework in `~/.local/share/agent-launch/venv` (override `AGENT_LAUNCH_VENV`); the launcher re-execs into it on the interactive TTY path only. Absent/broken venv, non-TTY, or `TERM` `dumb`/unset falls back to numbered prompts and never blocks | 8.2.8 · py 3.14.5 · 2026-07-13 |
|
|
15
|
+
| `jsonschema` (system python) | `learn/check-learning.py` (learning record gate; chained from `gates/check-parity.sh`) | JSON Schema Draft 2020-12 validator executing `learn/learning.schema.json` as the SSOT | 4.26.0 · 2026-07-20 |
|
|
16
|
+
| `zsh` | `launch/agent-launch.zsh` | functions, TTY tests, argument-preserving dispatch | 5.9 · 2026-07-13 |
|
|
17
17
|
| `git` | scripts, workflow (`origin/<base>..HEAD`, worktrees) | modern git; worktree support | 2.50.1 · 2026-07 |
|
|
18
18
|
| coreutils (`mktemp`, `cp`) | `codex-run.sh` hermetic home; `codex-helm.sh` managed home | BSD or GNU | 2026-07 |
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ Korean: [`ko/DEPENDENCIES.md`](ko/DEPENDENCIES.md). Dates = verification time; u
|
|
|
21
21
|
|
|
22
22
|
| CLI | Role | Required capability | Version owner |
|
|
23
23
|
| --- | --- | --- | --- |
|
|
24
|
-
| Claude Code | primary host; loads `CLAUDE.md` + `guides/`; `agent-launch` backend | `--model`; effort `low/medium/high/xhigh/max`; `--agents` JSON with per-agent `model`/`effort`; `--append-system-prompt`; `--mcp-config`; permission modes `acceptEdits/auto/bypassPermissions/manual/dontAsk/plan` | Environment Binding (v2.1.
|
|
24
|
+
| Claude Code | primary host; loads `CLAUDE.md` + `guides/`; `agent-launch` backend | `--model`; effort `low/medium/high/xhigh/max`; `--agents` JSON with per-agent `model`/`effort`; `--append-system-prompt`; `--mcp-config`; permission modes `acceptEdits/auto/bypassPermissions/manual/dontAsk/plan` | Environment Binding (v2.1.220 — the version whose behaviour is verified here) |
|
|
25
25
|
| Codex CLI | mirror host; loads `AGENTS.md` + `guides/`; worker/reviewer runtime | see codex row above | Environment Binding + this file |
|
|
26
26
|
|
|
27
27
|
## LLM models & providers — owned by `Environment Binding`
|
|
@@ -33,19 +33,19 @@ Concrete role-slot→model bindings live only in each guide's `Environment Bindi
|
|
|
33
33
|
|
|
34
34
|
## Deployed Codex assets
|
|
35
35
|
|
|
36
|
-
- **Codex custom agents** (`codex/agents/*.toml`) — installed role templates for `frontier`, `workhorse`, `sweep`, and `reviewer`; optional at runtime, but part of the Restore contract and activated by `
|
|
36
|
+
- **Codex custom agents** (`codex/agents/*.toml`) — installed role templates for `frontier`, `workhorse`, `sweep`, and `reviewer`; optional at runtime, but part of the Restore contract and activated by `wrappers/codex-helm.sh` when Codex subagent fan-out is explicitly authorized.
|
|
37
37
|
|
|
38
38
|
## Referenced / optional — not required by the core repo
|
|
39
39
|
|
|
40
|
-
- **ultracode-for-codex** (0.5.0) — the `$ultracode-for-codex` Codex skill / CLI (Codex-backed, gpt). In cross-family review it is the **ultracode** route a **Claude** main dispatches (gpt review); a Codex main instead uses `claude
|
|
41
|
-
- **Cross-family review reviewers** — with `review_family=cross` (default), each main routes review to the opposite family. A Claude main dispatches gpt review via `$CODEX_HOME/bin/codex-run --profile hermetic` (and `codex-helm --mode review` for hybrid fan-out); a Codex main dispatches Claude review via the `claude` CLI (`claude -p --permission-mode plan` for native/onto, and
|
|
42
|
-
- **codex-plugin-cc** (1.0.6; re-evaluated 2026-07-16) — spawns `codex app-server` with inherited env and no `--ignore-user-config`/`--profile`, so every run reads the real `~/.codex` (config.toml, auth, its MCP servers); it has no per-invocation hermetic reach, which is what makes it unfit as a **review** route: the reviewer would inherit the same config and AGENTS.md as the main, undercutting the independent lens `review_family=cross` exists to provide. The model *is* selectable (`--model`/`--effort`); what is dated is the bundled `gpt-5-4-prompting` skill, so passing a current model does not resolve it. **Not adopted**; `
|
|
40
|
+
- **ultracode-for-codex** (0.5.0) — the `$ultracode-for-codex` Codex skill / CLI (Codex-backed, gpt). In cross-family review it is the **ultracode** route a **Claude** main dispatches (gpt review); a Codex main instead uses the **ultracode** capability, which is the `claude` backend itself run headless with the keyword `ultracode` in the prompt — that keyword is what opens the Workflow tool for the turn (`workflowKeywordTriggerEnabled`, default true, read in the installed 2.1.220 bundle). Required only when the ultracode/hybrid route is selected and the main is Claude.
|
|
41
|
+
- **Cross-family review reviewers** — with `review_family=cross` (default), each main routes review to the opposite family. A Claude main dispatches gpt review via `$CODEX_HOME/bin/codex-run --profile hermetic` (and `codex-helm --mode review` for hybrid fan-out); a Codex main dispatches Claude review via the `claude` CLI (`claude -p --permission-mode plan` for native/onto, and, for the workflow-orchestration route, the same `claude` CLI headless with the keyword `ultracode` in the prompt — the keyword trigger is what the injected contract names, so this is the mechanism to follow). The reviewer command, resolved path, and opposite-family tier bindings are named in the launch contract; an absent or unauthenticated route degrades to same-family native (PROPOSED). `review_family=same` restores same-family review.
|
|
42
|
+
- **codex-plugin-cc** (1.0.6; re-evaluated 2026-07-16) — spawns `codex app-server` with inherited env and no `--ignore-user-config`/`--profile`, so every run reads the real `~/.codex` (config.toml, auth, its MCP servers); it has no per-invocation hermetic reach, which is what makes it unfit as a **review** route: the reviewer would inherit the same config and AGENTS.md as the main, undercutting the independent lens `review_family=cross` exists to provide. The model *is* selectable (`--model`/`--effort`); what is dated is the bundled `gpt-5-4-prompting` skill, so passing a current model does not resolve it. **Not adopted**; `wrappers/codex-run.sh` is preferred for controlled reach. It does not touch Claude Code's `/code-review` (no `code-review.md`; it adds namespaced `/codex:*`), so it never made that route cross-family. Capability we lack and may still want independently: its opt-in `Stop` hook review gate.
|
|
43
43
|
- **MCP servers** (onto, clickhouse, node_repl, …) — environment-specific; referenced by Environment Binding (VERIFIER-A; coding-staged guide's structured multi-lens review slot), not a core dependency. For cross-family review, agent-launch mounts `onto` and instructs the main to call `onto_review` with `llmOverride={provider,model}` (from `[hosts.*].onto_review`, an onto review-role registered pair) so onto runs the opposite family; onto's own model seats are not launcher-controllable, so the family is set per call.
|
|
44
44
|
- **spreadsheet-processing** (skill) — referenced by the global spreadsheet rule; present in the author's Claude Code and Codex environments. If absent, the rule's inline fallback (plain tools/code + real Excel-engine validation) applies.
|
|
45
45
|
|
|
46
46
|
## Untracked — dependencies, but excluded by design
|
|
47
47
|
|
|
48
|
-
Host `config.toml` and `settings.json` — machine-specific trust lists, hook paths, and MCP secrets. The tracked `
|
|
48
|
+
Host `config.toml` and `settings.json` — machine-specific trust lists, hook paths, and MCP secrets. The tracked `launch/agent-launch.toml` contains launch bindings but no secrets. See README Scope.
|
|
49
49
|
|
|
50
50
|
## Re-verify
|
|
51
51
|
|
|
@@ -61,13 +61,13 @@ printf '%s\n' "$codex_help" | grep -Eq '(^|[[:space:]])-p([,[:space:]]|$)' || {
|
|
|
61
61
|
printf '%s\n' "$codex_help" | grep -Eq '(^|[[:space:]])-s([,[:space:]]|$)' || { echo "missing codex flag: -s"; exit 1; }
|
|
62
62
|
claude --version; claude --help | grep -E -- '--model|--effort|--agents|--append-system-prompt|--mcp-config'
|
|
63
63
|
bash --version | head -1; zsh --version; python3 --version; git --version
|
|
64
|
-
AGENT_LAUNCH_VENV="${AGENT_LAUNCH_VENV:-$HOME/.local/share/agent-launch/venv}" bash
|
|
64
|
+
AGENT_LAUNCH_VENV="${AGENT_LAUNCH_VENV:-$HOME/.local/share/agent-launch/venv}" bash launch/provision-venv.sh
|
|
65
65
|
"${AGENT_LAUNCH_VENV:-$HOME/.local/share/agent-launch/venv}/bin/python" -c 'import textual, sys; print("textual", textual.__version__, "py", sys.version.split()[0])'
|
|
66
|
-
bash -n
|
|
67
|
-
zsh -n
|
|
68
|
-
python3 -c 'compile(open("
|
|
69
|
-
./
|
|
70
|
-
./
|
|
66
|
+
bash -n wrappers/codex-run.sh wrappers/codex-helm.sh gates/check-parity.sh launch/check-prompting-targets.sh launch/provision-venv.sh install.sh
|
|
67
|
+
zsh -n launch/agent-launch.zsh
|
|
68
|
+
python3 -c 'compile(open("launch/agent-launch.py").read(), "launch/agent-launch.py", "exec")'
|
|
69
|
+
./gates/check-parity.sh
|
|
70
|
+
./launch/check-prompting-targets.sh
|
|
71
71
|
python3 - <<'PY'
|
|
72
72
|
import os, pathlib, tomllib
|
|
73
73
|
roots = [pathlib.Path("codex/agents"), pathlib.Path(os.environ.get("CODEX_HOME", pathlib.Path.home() / ".codex")) / "agents"]
|
|
@@ -79,7 +79,7 @@ for root in roots:
|
|
|
79
79
|
tomllib.loads(path.read_text())
|
|
80
80
|
print(f"agent TOML ok: {root}")
|
|
81
81
|
PY
|
|
82
|
-
|
|
82
|
+
wrappers/codex-helm.sh --dry-run --mode review "probe"
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
## Ownership
|
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Single source of truth for the global instructions and scoped guides that drive multiple LLM CLI agents (Claude Code, Codex CLI) under one working discipline. Edit once; it applies to every agent in every environment.
|
|
4
4
|
|
|
5
|
+
A deployable instruction corpus for coding agents, plus the CLI that
|
|
6
|
+
installs, verifies, and evolves it. The npm package ships the corpus; `install.sh` is both the
|
|
7
|
+
`agent-bios` CLI entry and the deployer.
|
|
8
|
+
|
|
5
9
|
Korean reference: [`ko/`](ko/) mirrors every doc below — reference only, never installed or loaded.
|
|
6
10
|
|
|
7
11
|
## Model
|
|
@@ -14,9 +18,13 @@ Two layers:
|
|
|
14
18
|
## Principles
|
|
15
19
|
|
|
16
20
|
- **Rule bodies never name concrete models or tools** — only role slots and tiers. Bindings live in each guide's `Environment Binding` (dated; expire ~8 weeks or on a newer model). New model → update that row + date; leave rules alone. Declared exceptions: sections whose subject is a concrete tool surface (the cli guide's Codex direct-drive section) and optional-capability names inventoried in `DEPENDENCIES.md` (e.g. the `spreadsheet-processing` skill) — the Adopting checklist below covers swapping both.
|
|
17
|
-
- **The
|
|
21
|
+
- **The Codex tree is generated, not mirrored by hand** — `gates/emit-mirrors.py` projects `claude/` → `codex/` and `ko/claude/` → `ko/codex/`, differing only in title and config-home variable (`$CLAUDE_CONFIG_DIR` ↔ `$CODEX_HOME`), plus one declared Codex-only standing-dispatch authorization required by Codex's trigger contract, inserted at a pinned position. It owns the projection rule; `gates/check-parity.sh` runs its `--check` and adds pointer resolvability, frontmatter, shared anchor phrases on the global↔guide restatement pairs that remain, and Codex role-binding / wrapper-default projections. Parity enforces content synchronization only; it does not guarantee both harnesses respond to the same wording with the same strength.
|
|
18
22
|
- **The global is a per-session token budget** — it is re-sent every session and to every subagent, and each added bullet dilutes every other rule. A new global bullet must name the bullet it displaces (or why none does); procedures, tables, numbers, and worked examples belong in guides.
|
|
19
|
-
-
|
|
23
|
+
- **Deploying is not loading** — file presence cannot detect a declined import approval or a broken entry import line, so `onboard` ends with an activation canary and `verify` checks the entry import line. A corpus that landed but is not read has changed nothing.
|
|
24
|
+
- **Every span we write into a file we do not own has a remover** — the Codex config block, the settings hook registrations, the `AGENTS.md` central region and the zsh hook line each sit in a span identifiable as ours (a marker pair, a tagged line, or a manifest name), and `uninstall` removes exactly those and nothing around them. The entry `CLAUDE.md`/`AGENTS.md` are seeded once and then yours: the corpus is assembled under `central/` and the entry file only imports it, so your own additions are never mixed with ours and never removed with them. `uninstall` is a security operation — everything of ours goes, and what it took leaves as one archive you can hand off or delete.
|
|
25
|
+
- **Metadata selects, observation authorizes** — a record of what was promoted can propose an irreversible act but never authorize one; it has never seen the machine it will run on. Clearing a user's personal copy of a promoted learning asks the deployed corpus whether the replacement is really there, excludes the copy being deleted from that evidence, and keeps the copy on any uncertainty: a kept duplicate is redundant, a wrong removal is data loss.
|
|
26
|
+
- **The deployment outlives the act that made it** — a command's success says nothing about which version landed; a cached package can serve the previous one at exit 0. So the deployed state carries its own version marker and `status` reads that marker rather than the source it was launched from. With no marker the answer is `unknown`, never a guess.
|
|
27
|
+
- **`Evidence Base` (per guide) is the single owner of numbers.** Measure with `session-cost.py`.
|
|
20
28
|
- **English is canonical and installed; Korean (`ko/`) is reference only.** The harness loads only fixed-name English files; the installer deploys English only.
|
|
21
29
|
|
|
22
30
|
## Layout
|
|
@@ -27,8 +35,20 @@ Two layers:
|
|
|
27
35
|
| `claude/guides/*.md`, `codex/guides/*.md` | scoped guides (en) — installed |
|
|
28
36
|
| `codex/agents/*.toml` | Codex custom subagent role templates — installed |
|
|
29
37
|
| `ko/**` | Korean mirror of every doc above + this README + DEPENDENCIES (reference only) |
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
38
|
+
| `launch/` | launch profile, preflight TUI, zero-argument shell interception, the managed Textual venv, and the prompting-target check that guards the profile's model bindings |
|
|
39
|
+
| `compose/` | corpus classification and per-selection assembly — domain manifest and its gate, assembler, package identity, hook registration, activation canary, deployed-corpus state |
|
|
40
|
+
| `learn/` | the collection loop — capture, record schema and its validator, curation intake, promotion manifest, redistribution, and the secret-redaction floor |
|
|
41
|
+
| `session-distill/` | the heavy curator pipeline that mines many sessions into corpus-grade items |
|
|
42
|
+
| `wrappers/` | internal Codex wrappers, deployed to `$CODEX_HOME/bin/` |
|
|
43
|
+
| `gates/` | author-side verification (mirror generation, parity, lexicon, payload, assembler scenarios) — reachable only from a repo checkout, and `check-package.sh` fails if any of it enters the npm payload |
|
|
44
|
+
| `ontology/` | what a change obliges elsewhere — entities, obligation edges, and the service's routes, held against real source by `check-ontology.py`. `instances/graph.json` is canonical; `LEXICON.md`, the RDF views, the HTML map, and the competency/extension docs are generated from it |
|
|
45
|
+
| `install.sh`, `session-cost.py` | the CLI and the cost meter — the two things you run directly |
|
|
46
|
+
| `decisions/` | the decision record for developing this repo — what was decided and which alternative it closed; author-side, never shipped |
|
|
47
|
+
| `packages/` | authored corpus packages, organized by package identity rather than by concept home |
|
|
48
|
+
| `.githooks/` | the pre-commit hook that runs the gates against the index, enabled per clone with `core.hooksPath` |
|
|
49
|
+
| `SURFACES.md` | where knowledge and tools reach a model, and what each place admits — every entry names the code that realizes it |
|
|
50
|
+
| `FINDINGS.md` | open implementation defects, live; closing one deletes its entry |
|
|
51
|
+
| `design/`, `benchmarks/` | design records and the instruction-behavior benchmark |
|
|
32
52
|
| `DEPENDENCIES.md` | external tools / host CLIs / model providers + verified versions |
|
|
33
53
|
|
|
34
54
|
`config.toml` and `settings.json` are machine-specific (trust lists, hook paths, secrets) and intentionally untracked.
|
|
@@ -46,10 +66,9 @@ Two layers:
|
|
|
46
66
|
|
|
47
67
|
## Edit workflow
|
|
48
68
|
|
|
49
|
-
1. Edit the English canonical (`claude/`)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
3. `./scripts/check-parity.sh` must pass.
|
|
69
|
+
1. Edit the English canonical (`claude/`), and the Korean canonical (`ko/claude/`) when the change is user-facing.
|
|
70
|
+
2. `python3 gates/emit-mirrors.py` — regenerates `codex/` and `ko/codex/` from those two canonicals. Never hand-edit the Codex side: it is a generated projection, and `--check` (which the parity gate runs) fails on any file that is not exactly what the generator emits.
|
|
71
|
+
3. `./gates/check-parity.sh` must pass.
|
|
53
72
|
4. Commit, then deploy: `agent-bios install` (or `agent-bios update` from a clone).
|
|
54
73
|
|
|
55
74
|
## Install (deploy)
|
|
@@ -59,16 +78,16 @@ The `agent-bios` CLI deploys this SSOT into your environment by copy — idempot
|
|
|
59
78
|
```bash
|
|
60
79
|
npm install -g agent-bios
|
|
61
80
|
agent-bios install # deploy, back up replaced files, then verify
|
|
62
|
-
agent-bios onboard # pick domain packages,
|
|
81
|
+
agent-bios onboard # pick domain packages, install, activation canary
|
|
63
82
|
agent-bios verify # re-check the deployed state matches the source
|
|
64
83
|
agent-bios status # show what is installed and where
|
|
65
84
|
agent-bios update # git pull + reinstall (clone), or print the npm update line
|
|
66
85
|
agent-bios uninstall # remove deployed files and the zsh hook
|
|
67
86
|
```
|
|
68
87
|
|
|
69
|
-
From a git clone, run `./
|
|
88
|
+
From a git clone, run `./install.sh install` directly (the same CLI). `install` respects `CLAUDE_CONFIG_DIR`, `CODEX_HOME`, `AGENT_LAUNCH_VENV`, and `ZDOTDIR`; `--dry-run` prints actions without changing anything. Deploy to **every active environment in one sitting** — a partial deploy leaves a shared global pointing at a guide some environment lacks; globals are English only. Replaced files are backed up under `~/.local/share/agent-bios/backups/<timestamp>/`, and the installed set is recorded in a manifest that `uninstall` consumes. Those copies are **a manual escape hatch, not a restore mechanism**: nothing reads them back, so recovering from one means copying files yourself. The supported paths are the ones `agent-bios help` prints — a clone rolls corpus content back to a registered version, an npm install rolls the whole package back by version — and `uninstall` emits one archive of everything it removed. The backups exist for the case those three do not cover: the exact bytes that were on disk before a particular install. The published npm package ships only the deploy set (never `settings.json`, `config.toml`, `ko/`, or `benchmarks/`).
|
|
70
89
|
|
|
71
|
-
In a TTY, zero-argument `codex` or `claude` opens the launch preflight. Every arrow-key TUI selection screen keeps the complete current setup in a fixed top panel, followed by the highlighted option's description and then the option list. Move with Up/Down, select with Enter, use Esc to return to the previous menu, and use `q` to cancel; Esc at the mode root also cancels. Each tier's model is chosen from the host's configured catalog, or via **Other** to type any model id the backend accepts; that text input preserves values that start with `q`, so Esc or Ctrl-C cancels immediately there, while submitting `q` cancels after Enter. The Textual preflight reflows to the terminal size, so there is no fixed minimum geometry. The root menu picks a mode — **Software Engineer** (repo-scoped work that defers to the project's own AGENTS.md/CLAUDE.md: **Vanilla**, the bare CLI with no launch contract, tier bindings, or applied permissions, plus **Custom**; SE-specific review defaults arrive later), **Builder** (the tier presets: Balanced, Deep review, Fast batch, Solo with delegation off, plus Custom), **Session distill** — then a preset within it. Select **Custom** (in Software Engineer or Builder) to open a persistent settings hub for the main tier, review setup, host policy, and each tier binding. Every edit returns to that hub; **Start with these settings** is the final launch confirmation, **Save these settings globally and start** additionally persists the setup as a named preset (with host-scoped tier overrides) in your user config for reuse elsewhere, and **Exit without launching** cancels the launch. The rich preflight runs from a managed virtualenv (`
|
|
90
|
+
In a TTY, zero-argument `codex` or `claude` opens the launch preflight. Every arrow-key TUI selection screen keeps the complete current setup in a fixed top panel, followed by the highlighted option's description and then the option list. Move with Up/Down, select with Enter, use Esc to return to the previous menu, and use `q` to cancel; Esc at the mode root also cancels. Each tier's model is chosen from the host's configured catalog, or via **Other** to type any model id the backend accepts; that text input preserves values that start with `q`, so Esc or Ctrl-C cancels immediately there, while submitting `q` cancels after Enter. The Textual preflight reflows to the terminal size, so there is no fixed minimum geometry. The root menu picks a mode — **Software Engineer** (repo-scoped work that defers to the project's own AGENTS.md/CLAUDE.md: **Vanilla**, the bare CLI with no launch contract, tier bindings, or applied permissions, plus **Custom**; SE-specific review defaults arrive later), **Builder** (the tier presets: Balanced, Deep review, Fast batch, Solo with delegation off, plus Custom), **Session distill** — then a preset within it. Select **Custom** (in Software Engineer or Builder) to open a persistent settings hub for the main tier, review setup, host policy, and each tier binding. Every edit returns to that hub; **Start with these settings** is the final launch confirmation, **Save these settings globally and start** additionally persists the setup as a named preset (with host-scoped tier overrides) in your user config for reuse elsewhere, and **Exit without launching** cancels the launch. The rich preflight runs from a managed virtualenv (`launch/provision-venv.sh`, at `~/.local/share/agent-launch/venv`) that the launcher re-execs into on the interactive path; when that venv is unavailable, or the call is non-interactive, or `TERM` is `dumb`/unset, the launcher falls back to numbered prompts, where `b` is the back command. Backend command names are resolved from the calling environment's `PATH`; shell functions are not re-entered. Codex child bindings are materialized as session-selected agent configs under the user cache, while Claude receives model and effort in `--agents` JSON when delegation is enabled. Review runs cross-family by default (`review_family`, default `cross`; `same` restores today's same-family projection): because the main's tiers are one model family, every dispatchable review route — native, onto, and ultracode — runs on the opposite family. The exception is `slash-review`, the host's own built-in review command (`/code-review` on Claude, with `ultra` for its deep multi-agent pass; `/review` on Codex): it needs no dependency and always resolves, but being the main's own command it cannot be dispatched cross-family, so under `cross` it runs as the same-family floor and its verdicts are labeled PROPOSED. A Claude main dispatches gpt/codex review (native via the `codex-run` reviewer wrapper resolved under `$CODEX_HOME/bin`, onto via an `llmOverride` to the configured openai seat, ultracode via the `$ultracode-for-codex` Codex skill); a Codex main dispatches Anthropic/Claude review (native via `claude -p --permission-mode plan`, onto via an `llmOverride` to the anthropic seat, ultracode via the `claude` CLI headless with the keyword `ultracode` in the prompt, which is what opens Claude Code's dynamic workflow for that turn). The concrete reviewer command, resolved absolute path, `llmOverride`, and opposite-family tier bindings are named in the injected session-start contract; cross-family reviewers are dispatched as read-only subprocesses, not CLI-native subagents, since neither CLI hosts the other family as a native subagent. When a cross-family route is unavailable at launch or unauthenticated at use time it degrades to same-family native subagent review labeled PROPOSED (family collapse) rather than blocking; a requested non-none review with no cross-family route and no same-family fallback (delegation off) stays fail-closed. Review setup means configured/requested; this launcher does not claim that review completed, and unavailable runtimes such as Ultrawork are not offered until integrated.
|
|
72
91
|
|
|
73
92
|
At the shell-wrapper boundary, every argument-bearing command (`codex exec ...`, `claude -p ...`) and every non-TTY invocation skips launch-profile projection and preserves caller arguments. The Claude direct path intentionally retains its wrapper default, `--dangerously-skip-permissions`. `codex --no-tui ...` / `claude --no-tui ...` explicitly take that direct path, and `AGENT_LAUNCH_TUI=0` disables zero-argument TUI interception for a process tree.
|
|
74
93
|
|
|
@@ -76,6 +95,10 @@ Direct `agent-launch` calls still require a valid profile to resolve the backend
|
|
|
76
95
|
|
|
77
96
|
Add `$CODEX_DIR/bin` to `PATH` or invoke the wrappers by absolute path. `codex-helm` follows the local CLI default and launches the HELM main with `--dangerously-bypass-approvals-and-sandbox`; an explicit `--sandbox MODE` disables bypass for that run regardless of flag order. `AGENTS.md` gives root/main local Codex sessions standing ordinary-subagent authorization when the delegation gates fire. A non-Ultra HELM main sets native multi-agent off by default and instructs HELM to send tiered dispatch through the internal `codex-run` adapter, where the selected model, effort, and sandbox are pinned; native multi-agent defaults on only when the HELM main itself is explicitly Ultra. FRONTIER is instructed to run as a separate `gpt-5.6-sol` root that is always read-only, at max by default, Ultra for genuinely divisible complex work, or a lower supported effort when cost or latency dominates. Because the HELM main has bypass authority and arbitrary expert `-c` by design, this dispatch route is an instruction-backed, live-E2E-verified default rather than a security boundary. Keep `codex-run` as the low-level internal adapter, not as a user-facing policy boundary. Both wrappers accept `-c key=value` as an expert override, and that override may intentionally change wrapper defaults for a single run.
|
|
78
97
|
|
|
98
|
+
`claude-run` is the Claude-side adapter, deployed to `$CLAUDE_DIR/bin`, and it takes `--model` and `--effort` to pin the seat. Omitting either warns and dispatches anyway, matching `codex-run`: refusing outright turned "the review ran unpinned" into "the review did not run", which is the worse of the two. The honest signal is downstream instead — an unpinned dispatch can name no seat, so it emits no receipt and the method adjudicates to UNKNOWN rather than to a clean pass. Its default denies the mutating tools, which is not the OS-level sandbox its Codex twin gets — do not read the two defaults as equivalent guarantees.
|
|
99
|
+
|
|
100
|
+
**Review receipts.** A launch reports what it *projected*, because at launch no review has run — so a clean verdict without a receipt is PROPOSED, never ACHIEVED. Given `REVIEW_RECEIPT_DIR`, both adapters record what they observed of the dispatch they just performed: exit status, a hash of the packet fed in, a hash of the bytes returned, and the seat actually sent. Unset, they behave exactly as they would otherwise and write nothing. `agent-launch --fold-receipts DIR PACKET MAIN_DISPATCH_ID` folds a run into a `ReviewReceipts/v1` bundle — several passes of one method become the one record it is judged on — and `agent-launch --verify-receipts PLAN BUNDLE` adjudicates it, exiting non-zero unless every selected method verified. Adapting another tool needs no change here: call `agent-launch --emit-receipt` from your adapter and prove it conforms with `agent-launch --check-adapter SEAT -- CMD`, which is adjudicated by the same code that credits a real review. A receipt is still written by whoever ran the review, so this buys drift rather than honesty: what it stops is a reviewer that quietly never ran, returned nothing, or exited non-zero reading as a clean pass.
|
|
101
|
+
|
|
79
102
|
`agent-bios verify` runs the post-deploy gate (also run at the end of `install`): every `guides/*.md` referenced by the deployed global exists in that environment's `guides/`; required agent files `frontier.toml`, `workhorse.toml`, `sweep.toml`, and `reviewer.toml` exist under `$CODEX_DIR/agents/` and parse as TOML; `frontier.toml` deliberately omits `model_reasoning_effort` for native surfaces that accept per-spawn effort; each required `codex exec --help` flag in `DEPENDENCIES.md` is present; and `$CODEX_DIR/bin/codex-helm --dry-run --mode review "probe"` succeeds as a credential-free assembly check (not a live Codex call). `install` overwrites each guide's `Environment Binding`; keep per-environment binding edits in the repo copy or an untracked file.
|
|
80
103
|
|
|
81
104
|
## Adopting elsewhere
|
package/claude/CLAUDE.md
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
- Use static checks broadly: typecheck, lint, build, format, schema/config validation, graph validation, workbook structure checks, import boundaries, and security checks when available.
|
|
95
95
|
- Add the narrowest reliable runtime or semantic test that proves the changed behavior, meaning, or contract.
|
|
96
96
|
- Pick each domain's verification mix (code, ontology, config/data, spreadsheets, docs) from the Verification Menus in the coding-staged-workflow guide.
|
|
97
|
-
- Let the LLM derive scenarios from the diff, user impact, concept impact, and failure modes; let tools/code execute and verify them.
|
|
97
|
+
- Let the LLM derive scenarios from the diff, user impact, concept impact, and failure modes; let tools/code execute and verify them. Where an artifact already defines the case space — a config, a schema, a route table — enumerate the cases from it rather than from judgment, and record real output as the expectation instead of typing one: a hand-listed set of cases silently stops covering as the artifact grows past it.
|
|
98
98
|
- Keep E2E stable with deterministic data, resilient selectors, isolated external dependencies, and explicit waits.
|
|
99
99
|
- Report the checks run, results, and any unverified risk before calling the work done.
|
|
100
100
|
- Trust a green check only when it traversed the actual changed code through the real dispatch and real calls (not a mock, dry-run, or bypass), and remember that "it ran" is not "quality met" — a fallback, floor, or mock run is not done; treat a zero-findings verdict as suspect until you confirm the harness ran rather than silently crashed, and make PASS mean concrete assertions on real output from the real path.
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
- For work spanning multiple models or CLI agents, context resets and handoffs, unattended LLM batches (including orchestrated subagent fleets), or parallel worktree branches, read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/cli-multi-model-workflow.md` as a scoped extension of this section.
|
|
123
123
|
- For composing a prompt, packet, or tool description aimed at a specific model family — including cross-family review dispatch, porting a prompt written for an older model, or choosing a reasoning-effort level for a model family — read and use `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/gpt-prompting.md` for gpt-family targets and `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/guides/claude-prompting.md` for claude-family targets as scoped extensions of this section.
|
|
124
124
|
- Allocate models by difficulty × blast radius, not phase name; when implementation ran on a cheaper tier, compensate by raising reviewer effort or adding a reviewer kind — never economize on implementation and verification at once.
|
|
125
|
+
- Judge a review by how much independence it actually bought, per reviewer and in this order: different provider, then different model, then strictly higher effort, then the two-perspective floor. A lower effort earns nothing — cheaper is not another perspective. Isolation is a gate rather than a rung: a reviewer you cannot show ran in a fresh context is not a weak review but no review, so exclude it instead of grading it low. Several ready methods are coverage, not proof the perspectives differed; and a clean verdict is PROPOSED until a receipt evidences a fresh dispatch of the declared packet on the exact seat, since a model echo is not evidence.
|
|
125
126
|
- When the user asks for design AND two or more providers are reachable at frontier tier, run dual-provider frontier design drafts: two independent drafts from the same blind packet, one per provider, compared and synthesized into the working draft. The consent gate is about metered spend, not the fan-out: a provider reached via an OAuth session (subscription-covered, no marginal cost) proceeds WITHOUT asking — if a non-main-context OAuth frontier provider exists, just run the dual-provider design; do not ask. Explicit per-request approval (never standing) is required ONLY before dispatching to a provider reachable solely via a metered API key, and it approves that spend. If withholding un-approved API spend leaves fewer than two providers, run single-provider rather than blocking the design on approval. Inject the corpus design principles (concept economy, LLM/capability boundary, staged workflow) into every dispatched design packet — an external model does not load this corpus.
|
|
126
127
|
- Never retry-storm a live rate limit: give unattended batches you author a code-level circuit breaker with per-item completion tracking (thresholds, backoff, and dead-letter rules in the guide); for third-party dispatchers, confirm equivalent protection exists or attend the run.
|
|
127
128
|
- On any resumed, cleared, or relocated session, re-verify where you are (pwd; in a repo, branch and HEAD) before acting on prior-session assumptions — against the pinned handoff state when one exists.
|
|
@@ -137,5 +137,5 @@ pick the path.
|
|
|
137
137
|
Derived from the vendor's published guidance for the `targets` models above.
|
|
138
138
|
When a `targets` model changes, re-derive this guide from current vendor
|
|
139
139
|
guidance rather than editing around the old rules — prompting guidance is
|
|
140
|
-
version-bound. `
|
|
140
|
+
version-bound. `launch/check-prompting-targets.sh` fails when the launch config
|
|
141
141
|
binds a model this guide does not list.
|
|
@@ -108,6 +108,23 @@ Instruction/config reach is per invocation. A rule in AGENTS.md cannot bind a he
|
|
|
108
108
|
- A silent/dead lens is incomplete, never clean. Confirm liveness from usage/error/report evidence; rerun, swap provider, or report PROPOSED.
|
|
109
109
|
- Kind labels do not guarantee distinct backends: wrappers and rate-limit fallbacks can silently route two "different-kind" verifiers to the same model/provider. Before trusting diversity on a high-stakes verdict, confirm each verifier's actual backing model from live process or usage evidence; on collapse, treat the pair as one kind and label PROPOSED.
|
|
110
110
|
|
|
111
|
+
### Review Independence
|
|
112
|
+
|
|
113
|
+
How much independence a review actually bought, as an ordinal grade per reviewer rather than a global cross/same flag. Given the main seat `M` and the reviewer seat `R`:
|
|
114
|
+
|
|
115
|
+
| Grade | When |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `provider_difference` | `R.provider != M.provider` |
|
|
118
|
+
| `model_difference` | same provider, `R.model != M.model` |
|
|
119
|
+
| `higher_effort` | same provider and model, `R.effort` strictly above `M.effort` |
|
|
120
|
+
| `perspective_floor` | otherwise — still a real review |
|
|
121
|
+
|
|
122
|
+
- Only upward counts. A different-but-**lower** effort earns nothing and lands on the floor: cheaper is not another perspective.
|
|
123
|
+
- **Isolation is a gate, not a rung.** A reviewer that cannot be shown to run in a fresh context is excluded entirely (`NOT_REVIEW`), never graded low — an in-context "review" is the failure this ladder exists to make visible, so it must not appear as a weak pass. Isolation is realised per mechanism: a fresh read-only subprocess, a hermetic profile, a stdio tool call in a fresh session, a headless host workflow, or a stateless API call. If none of these can deliver the required seat, the review did not happen.
|
|
124
|
+
- The floor still requires **at least two distinct perspectives**; one pass on the main's own seat is self-review with extra steps.
|
|
125
|
+
- Multiple ready methods are **coverage, not diversity**. Distinct labels do not prove the perspectives differed.
|
|
126
|
+
- **Achieved is not available.** What can be projected before a review runs is `projected`; a clean verdict without a receipt evidencing a fresh dispatch, the declared packet, a non-empty result and the exact seat is `PROPOSED`, never ACHIEVED. A model echo is not a receipt.
|
|
127
|
+
|
|
111
128
|
## Dual-Provider Design Drafts
|
|
112
129
|
|
|
113
130
|
- Trigger: the task is design (the staged-workflow guide's design stages) AND two or more providers are reachable at frontier tier. Reachability via an OAuth session is subscription-covered — no marginal spend, so no approval and no question: if a non-main-context OAuth frontier provider exists, proceed with the dual-provider design directly. The consent gate applies ONLY to a provider reachable solely via a metered API key: dispatching to it needs the user's explicit per-request approval of that spend (per-request, not standing — an old approval does not carry to the next design). If the only way to reach a second provider is un-approved metered API spend, stay single-provider rather than blocking the design.
|
|
@@ -154,7 +171,7 @@ Write for the next agent and re-verification, not narrative. Required content:
|
|
|
154
171
|
|
|
155
172
|
## Environment Binding (edit per environment)
|
|
156
173
|
|
|
157
|
-
This is the human-readable projection of concrete models/tools; `
|
|
174
|
+
This is the human-readable projection of concrete models/tools; `launch/agent-launch.toml` is the machine launch authority and parity checks keep them aligned. Re-probe when the binding is older than ~8 weeks or a newer observable model/tool changes the surface. `agent-bios install` overwrites deployed bindings, so edit the repo copy.
|
|
158
175
|
|
|
159
176
|
Binding (2026-07-25):
|
|
160
177
|
|
|
@@ -178,6 +195,7 @@ Codex direct-drive (verified 0.144.1, 2026-07-12):
|
|
|
178
195
|
- HELM is instructed to dispatch tiers through internal `codex-run`, which pins model/effort/sandbox. FRONTIER uses a separate `gpt-5.6-sol`, read-only root: max by default, Ultra for divisible work, lower effort when cost/latency dominates. Nested multi-agent is enabled only for Ultra. Native `codex exec` spawn cannot pin role/effort.
|
|
179
196
|
- This is an instruction-backed, live-E2E-verified default, not a security boundary: main bypass and arbitrary expert `-c` remain available by design. `frontier.toml` omits fixed effort for native surfaces that accept overrides.
|
|
180
197
|
- `codex-run` owns reach, stdin, schema, profiles, expert `-c`, channel preservation, and exit status. Keep it internal.
|
|
198
|
+
- `claude-run` is its Claude-side twin and the command a composable review contract names for a panel dispatch on that host. Same shape: prompt on stdin, final message on stdout, exit status mirrored, `--model`/`--effort` pinning the seat, everything it does not recognise forwarded to `claude`. It denies the mutating tools by default, which is not the OS-level sandbox `codex-run` gets — do not read the two defaults as equivalent guarantees. Dispatch whatever command the contract names rather than the bare CLI: only the adapter can report what the dispatch actually did, and a review with no receipt stays PROPOSED.
|
|
181
199
|
|
|
182
200
|
Dispatch packets:
|
|
183
201
|
|
|
@@ -60,6 +60,38 @@ Per-domain menus for the global Verification Discipline loop; pick the narrowest
|
|
|
60
60
|
- Branch/version test builds against real data: explicitly separate every state sink the app touches (files, DB, OS-level stores that ignore env overrides), confirm the launch path propagates the isolation to child processes, and back up live data before the first run — a mismatched schema that drops unknown fields on write is data loss, not a no-op.
|
|
61
61
|
- Irreversible capture switches: when activation itself has unreproducible cost (a capture window that cannot be replayed), prove the downstream consumption path against existing samples before enabling — reversibility of the code path alone is not enough.
|
|
62
62
|
|
|
63
|
+
### Deriving the case space
|
|
64
|
+
|
|
65
|
+
A check has two authored halves, and they rot differently. The **verdict** — what the
|
|
66
|
+
answer should be — rots by encoding a belief that was wrong from the start. The
|
|
67
|
+
**space** — which cases exist — rots by staying still while the thing it covers grows.
|
|
68
|
+
Recording the verdict is common practice; deriving the space is the half usually left
|
|
69
|
+
hand-written, and a suite can have every expectation derived and still cover a set
|
|
70
|
+
someone typed once.
|
|
71
|
+
|
|
72
|
+
- Record the verdict, do not type it. Run the real path and store what came back;
|
|
73
|
+
drift then shows as a diff instead of as a belief someone has to re-justify.
|
|
74
|
+
- Enumerate the space from the artifact that defines it — the config's entries, the
|
|
75
|
+
schema's fields, the router's routes, the installer's call sites. Adding one there
|
|
76
|
+
should widen coverage with no edit here.
|
|
77
|
+
- Derive the exemption rule too. If some cases legitimately have no answer, decide that
|
|
78
|
+
from a property the artifact carries, never from a list of names: the list is the
|
|
79
|
+
authored space coming back through a side door, and it absorbs the regression where
|
|
80
|
+
a case that should have an answer stops having one.
|
|
81
|
+
- Dedupe on the tuple that actually determines the outcome, and report how many
|
|
82
|
+
collapsed. A coverage count that hides its own truncation reads as more than it is.
|
|
83
|
+
- Split by cost, not by space. When the real path needs money, credentials, or a
|
|
84
|
+
network, run a cheap stand-in on every commit and the real one on demand — both from
|
|
85
|
+
the **same enumeration**, so the two can never disagree about which cases exist.
|
|
86
|
+
- Derivation moves authorship rather than removing it: the extractor and the invariants
|
|
87
|
+
are still written by hand. Give them a negative control, or the derived suite is just
|
|
88
|
+
a larger unfalsifiable one.
|
|
89
|
+
- Planting a violation to prove a control fires is a write into the working tree, and
|
|
90
|
+
the restore is not atomic with it: if the probe can time out, abort, or be
|
|
91
|
+
interrupted, a restore sitting after it never runs and the plant survives into a
|
|
92
|
+
commit. Plant in a copy where the shape allows it, and when it must be in place, snapshot
|
|
93
|
+
first and restore from the snapshot as its own step rather than trusting the probe to finish.
|
|
94
|
+
|
|
63
95
|
## Stop Conditions
|
|
64
96
|
|
|
65
97
|
- If the issue boundary expands compared with the previous review, stop and ask the user to choose redesign/rework or continuing the current iteration.
|
|
@@ -114,5 +114,5 @@ Derived from the vendor's published prompting guidance for the `targets` models
|
|
|
114
114
|
above. When a `targets` model changes, re-derive this guide from current vendor
|
|
115
115
|
guidance rather than editing around the old rules — prompting guidance is
|
|
116
116
|
version-bound, and the previous generation's advice inverted on this one.
|
|
117
|
-
`
|
|
117
|
+
`launch/check-prompting-targets.sh` fails when the launch config binds a model
|
|
118
118
|
this guide does not list.
|
|
@@ -18,9 +18,9 @@ The **light**, per-user, single-session capture flow: turn a lesson from the
|
|
|
18
18
|
current session into a **learning** (prose + a JSON record) that (a) applies to
|
|
19
19
|
the user's own next session and (b) reaches the org for curation. This is the
|
|
20
20
|
counterpart of the **heavy** session-distill pipeline (`distill!`), which mines
|
|
21
|
-
many sessions and is curator/power-user only.
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
many sessions and is curator/power-user only. Terminology and the full routing
|
|
22
|
+
framework are maintained in the agent-bios repo; the criteria this flow applies
|
|
23
|
+
are stated below.
|
|
24
24
|
|
|
25
25
|
Defer to the preset mission: if this session runs the **Session distill** preset
|
|
26
26
|
(trigger `distill!`), that mission owns capture — do not also run this flow.
|
|
@@ -62,7 +62,7 @@ still-valid candidates are surfaced for the user's approval.
|
|
|
62
62
|
|
|
63
63
|
## Domain tagging (the curation join key)
|
|
64
64
|
|
|
65
|
-
Suggest a `domain` from the registered vocabulary in `
|
|
65
|
+
Suggest a `domain` from the registered vocabulary in `compose/domains.json`
|
|
66
66
|
(domain keys for domain-specific lessons, or a tier name like `core`/`infra`
|
|
67
67
|
for a genuinely cross-cutting lesson); the user **confirms**. If unsure, use
|
|
68
68
|
`unclassified` (never blocks capture — the curator assigns later). If no
|
|
@@ -86,7 +86,7 @@ match your host):
|
|
|
86
86
|
| agent-bios learn --host <claude|codex>
|
|
87
87
|
|
|
88
88
|
The script (capability boundary) owns `learning_id` / `created` / `schema_version`,
|
|
89
|
-
validates against `
|
|
89
|
+
validates against `learn/learning.schema.json`, logs the JSON record, and writes
|
|
90
90
|
the lesson prose where THIS host loads it next session:
|
|
91
91
|
- **Claude**: appended to the automation-owned personal learnings file, pulled in
|
|
92
92
|
by the entry file's `@personal/learnings.md` import.
|
|
@@ -204,7 +204,12 @@ Use it per field or operation, not as a blanket replacement for LLM judgment.
|
|
|
204
204
|
Use this procedure when designing a new LLM-assisted artifact or revising an
|
|
205
205
|
existing one.
|
|
206
206
|
|
|
207
|
-
1. Identify the canonical artifact and downstream consumers.
|
|
207
|
+
1. Identify the canonical artifact and downstream consumers. When the consumer already
|
|
208
|
+
exists, read its **acceptance predicate**, not only its schema: the schema says which
|
|
209
|
+
fields may appear, and the predicate says which combinations are credited. A producer
|
|
210
|
+
designed against the schema alone can emit records that are valid and never
|
|
211
|
+
accepted — one record per event where the consumer judges one record per subject is
|
|
212
|
+
the common shape of this, and it survives every field-level check.
|
|
208
213
|
2. Split fields into semantic fields, deterministic fields, provenance fields,
|
|
209
214
|
and side-effect operations.
|
|
210
215
|
3. Assign each field or operation one primary authority.
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
guide_id: session-distill-workflow
|
|
3
3
|
language: en
|
|
4
4
|
status: active
|
|
5
|
+
audience: author
|
|
5
6
|
use_when:
|
|
6
7
|
- a session was launched with the Session distill preset (mission-injected)
|
|
7
8
|
- the launcher nudge says enough sessions accumulated for a mining window
|
|
8
9
|
- mining local Claude/Codex sessions for learnings absent from the corpus
|
|
9
10
|
- promoting, incubating, or retiring items in the session-distill ledger
|
|
10
11
|
core_rules:
|
|
11
|
-
- the ledger
|
|
12
|
+
- the ledger is the SSOT for state; read it before touching the pipeline
|
|
12
13
|
- placement follows PLACEMENT-FRAMEWORK.md, never ad-hoc judgment
|
|
13
14
|
- every promotion passes an explicit user-approval gate
|
|
14
15
|
- global growth per round is hard-capped (~500 tokens) by a measured gate
|
|
@@ -17,19 +18,28 @@ core_rules:
|
|
|
17
18
|
|
|
18
19
|
# Session-Distill Workflow
|
|
19
20
|
|
|
21
|
+
**Requires an agent-bios checkout.** This runbook edits the corpus itself, so it
|
|
22
|
+
names repo paths and runs repo scripts. On a packaged install those do not exist:
|
|
23
|
+
say so and stop rather than following steps you cannot execute.
|
|
24
|
+
|
|
20
25
|
Runbook for a session-distill run: mine recent main-context sessions,
|
|
21
26
|
verify candidates, place them through the framework, and apply with the user.
|
|
22
27
|
Everything durable lives in the agent-bios repo.
|
|
23
28
|
|
|
24
29
|
## Read first (SSOT)
|
|
25
30
|
|
|
26
|
-
1. `design/session-distill/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
1. `design/session-distill/ledger.json` — the initiative's state. Every item
|
|
32
|
+
carries its status (placed / incubating / incubating-G / absorbed /
|
|
33
|
+
adopted-no-text), strength, and provenance, so what is open, what was
|
|
34
|
+
promoted, and what is still incubating are all queries against this file.
|
|
35
|
+
Read state here and nowhere else: a count or a status written into prose is
|
|
36
|
+
correct on the day it is written and silently wrong afterwards.
|
|
37
|
+
2. `design/session-distill/versions.json` — which closed mining window maps to
|
|
38
|
+
which commit, and therefore what a rollback restores.
|
|
39
|
+
3. `design/session-distill/PLACEMENT-FRAMEWORK.md` — the placement authority
|
|
40
|
+
(typology A–G, layers, admission bars, lifecycle).
|
|
31
41
|
|
|
32
|
-
## Stage 1 — Mine (pipeline in `
|
|
42
|
+
## Stage 1 — Mine (pipeline in `session-distill/`)
|
|
33
43
|
|
|
34
44
|
Run in order; each stage reads the previous stage's `out/`:
|
|
35
45
|
|
|
@@ -73,7 +83,7 @@ Run in order; each stage reads the previous stage's `out/`:
|
|
|
73
83
|
stdout/stderr channel contracts) → codex/ + ko/ mirrors.
|
|
74
84
|
- Verify per layer, not just by diff: enforcement/gate fixture tests
|
|
75
85
|
(non-vacuous — known-bad must fire), hook trigger positive/negative sets,
|
|
76
|
-
`
|
|
86
|
+
`gates/check-parity.sh` exit 0 unpiped, prompting-target gate, then
|
|
77
87
|
`agent-bios install` to activate and re-verify.
|
|
78
88
|
|
|
79
89
|
## Stage 4 — G-pass (principles, not directives)
|
|
@@ -95,6 +105,6 @@ Run in order; each stage reads the previous stage's `out/`:
|
|
|
95
105
|
3. Register the corpus version: append {version = window end, commit = the
|
|
96
106
|
corpus-close commit} to `design/session-distill/versions.json` — this is
|
|
97
107
|
what the launcher's Versions & rollback screen offers — then run
|
|
98
|
-
`python3
|
|
108
|
+
`python3 session-distill/update-state.py --window-end <date>`
|
|
99
109
|
(nudge baseline) and `corpus-state.py project` (launcher status panel).
|
|
100
110
|
4. Merge the branch, push, and confirm deployed state (`agent-bios verify`).
|
|
@@ -62,6 +62,15 @@ depends on it, pin it explicitly instead of trusting the environment.
|
|
|
62
62
|
early-exit consumers (`cmd | head -1` → SIGPIPE 141), so it is a per-command
|
|
63
63
|
choice, not a global default. Does not apply when the final stage IS the
|
|
64
64
|
assertion (`cmd | grep -q pattern`).
|
|
65
|
+
- **Passthrough arguments in a CLI you author**: an option meant to carry
|
|
66
|
+
another command's own flags cannot use a greedy-but-dash-stopping arity —
|
|
67
|
+
Python's `nargs="+"` ends at the first token starting with `-`, so the
|
|
68
|
+
wrapped command's `--model x` lands on the next positional and the error
|
|
69
|
+
names a parameter the caller never mentioned. Use the parser's
|
|
70
|
+
everything-after form (`argparse.REMAINDER`). A bare `--` separator is a
|
|
71
|
+
second, separate trap: argparse consumes it as its own positional marker
|
|
72
|
+
before the remainder sees it, so the form every caller reaches for first is
|
|
73
|
+
the one that breaks — normalize it out of `argv` before parsing.
|
|
65
74
|
- **Reserved parameter names**: assigning to reserved shell names (`UID`,
|
|
66
75
|
`EUID`, `GID`, `PPID`) can invoke the bound system behavior instead of
|
|
67
76
|
storing a value — silently changing process credentials mid-script. Use
|
|
@@ -105,6 +114,13 @@ depends on it, pin it explicitly instead of trusting the environment.
|
|
|
105
114
|
diffs use `git diff origin/base...HEAD` (merge-base form); suspect this
|
|
106
115
|
mechanism first when a diff looks too large or shows deletions in untouched
|
|
107
116
|
files.
|
|
117
|
+
- **Reverting a path is not undoing your edit**: `git checkout <path>` and
|
|
118
|
+
`git restore <path>` discard *every* uncommitted change in that file. Used
|
|
119
|
+
to remove a planted probe it also removes whatever else was in flight there,
|
|
120
|
+
and the loss is silent. Check `git diff <path>` first, or plant in a copy and
|
|
121
|
+
restore from that. The same asymmetry makes the restore step fragile: if the
|
|
122
|
+
probe can time out or abort, the restore must not be the next command in the
|
|
123
|
+
same invocation — put it where a failure cannot skip it.
|
|
108
124
|
- **Dirty-worktree pulls**: before pulling into a worktree with
|
|
109
125
|
staged/unstaged/untracked changes, fetch first and compare incoming paths
|
|
110
126
|
against every dirty path; on overlap or a non-fast-forward, stop and clear
|
|
Binary file
|
|
@@ -34,6 +34,13 @@ RULES = [
|
|
|
34
34
|
re.compile(r"\$\?"),
|
|
35
35
|
"A pipeline's $? reflects only the last stage — capture the tested "
|
|
36
36
|
f"stage's own status (unpiped run, PIPESTATUS, per-command pipefail) ({GUIDE})."),
|
|
37
|
+
# Path-shaped argument only: `git checkout main` is a branch switch and needs no
|
|
38
|
+
# warning, while `git checkout src/x.py` silently discards every uncommitted edit in
|
|
39
|
+
# that file — including ones the caller did not put there.
|
|
40
|
+
("git-checkout-path",
|
|
41
|
+
re.compile(r"\bgit\s+(checkout|restore)\b[^|;&]*(--\s|[\w.-]*[./][\w./-]*)"),
|
|
42
|
+
"Reverting a path discards ALL uncommitted edits in that file, not just the one "
|
|
43
|
+
f"you planted — check `git diff <path>` first, or restore from a copy ({GUIDE})."),
|
|
37
44
|
("grep-binary-heuristic",
|
|
38
45
|
re.compile(r"(^|[;&(]\s*|&&\s*|\|\|\s*)grep\s"),
|
|
39
46
|
"grep can misread text with heavy non-ASCII/NUL as binary and return a "
|
package/codex/AGENTS.md
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
- Use static checks broadly: typecheck, lint, build, format, schema/config validation, graph validation, workbook structure checks, import boundaries, and security checks when available.
|
|
95
95
|
- Add the narrowest reliable runtime or semantic test that proves the changed behavior, meaning, or contract.
|
|
96
96
|
- Pick each domain's verification mix (code, ontology, config/data, spreadsheets, docs) from the Verification Menus in the coding-staged-workflow guide.
|
|
97
|
-
- Let the LLM derive scenarios from the diff, user impact, concept impact, and failure modes; let tools/code execute and verify them.
|
|
97
|
+
- Let the LLM derive scenarios from the diff, user impact, concept impact, and failure modes; let tools/code execute and verify them. Where an artifact already defines the case space — a config, a schema, a route table — enumerate the cases from it rather than from judgment, and record real output as the expectation instead of typing one: a hand-listed set of cases silently stops covering as the artifact grows past it.
|
|
98
98
|
- Keep E2E stable with deterministic data, resilient selectors, isolated external dependencies, and explicit waits.
|
|
99
99
|
- Report the checks run, results, and any unverified risk before calling the work done.
|
|
100
100
|
- Trust a green check only when it traversed the actual changed code through the real dispatch and real calls (not a mock, dry-run, or bypass), and remember that "it ran" is not "quality met" — a fallback, floor, or mock run is not done; treat a zero-findings verdict as suspect until you confirm the harness ran rather than silently crashed, and make PASS mean concrete assertions on real output from the real path.
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
- For work spanning multiple models or CLI agents, context resets and handoffs, unattended LLM batches (including orchestrated subagent fleets), or parallel worktree branches, read and use `${CODEX_HOME:-$HOME/.codex}/guides/cli-multi-model-workflow.md` as a scoped extension of this section.
|
|
124
124
|
- For composing a prompt, packet, or tool description aimed at a specific model family — including cross-family review dispatch, porting a prompt written for an older model, or choosing a reasoning-effort level for a model family — read and use `${CODEX_HOME:-$HOME/.codex}/guides/gpt-prompting.md` for gpt-family targets and `${CODEX_HOME:-$HOME/.codex}/guides/claude-prompting.md` for claude-family targets as scoped extensions of this section.
|
|
125
125
|
- Allocate models by difficulty × blast radius, not phase name; when implementation ran on a cheaper tier, compensate by raising reviewer effort or adding a reviewer kind — never economize on implementation and verification at once.
|
|
126
|
+
- Judge a review by how much independence it actually bought, per reviewer and in this order: different provider, then different model, then strictly higher effort, then the two-perspective floor. A lower effort earns nothing — cheaper is not another perspective. Isolation is a gate rather than a rung: a reviewer you cannot show ran in a fresh context is not a weak review but no review, so exclude it instead of grading it low. Several ready methods are coverage, not proof the perspectives differed; and a clean verdict is PROPOSED until a receipt evidences a fresh dispatch of the declared packet on the exact seat, since a model echo is not evidence.
|
|
126
127
|
- When the user asks for design AND two or more providers are reachable at frontier tier, run dual-provider frontier design drafts: two independent drafts from the same blind packet, one per provider, compared and synthesized into the working draft. The consent gate is about metered spend, not the fan-out: a provider reached via an OAuth session (subscription-covered, no marginal cost) proceeds WITHOUT asking — if a non-main-context OAuth frontier provider exists, just run the dual-provider design; do not ask. Explicit per-request approval (never standing) is required ONLY before dispatching to a provider reachable solely via a metered API key, and it approves that spend. If withholding un-approved API spend leaves fewer than two providers, run single-provider rather than blocking the design on approval. Inject the corpus design principles (concept economy, LLM/capability boundary, staged workflow) into every dispatched design packet — an external model does not load this corpus.
|
|
127
128
|
- Never retry-storm a live rate limit: give unattended batches you author a code-level circuit breaker with per-item completion tracking (thresholds, backoff, and dead-letter rules in the guide); for third-party dispatchers, confirm equivalent protection exists or attend the run.
|
|
128
129
|
- On any resumed, cleared, or relocated session, re-verify where you are (pwd; in a repo, branch and HEAD) before acting on prior-session assumptions — against the pinned handoff state when one exists.
|
|
@@ -137,5 +137,5 @@ pick the path.
|
|
|
137
137
|
Derived from the vendor's published guidance for the `targets` models above.
|
|
138
138
|
When a `targets` model changes, re-derive this guide from current vendor
|
|
139
139
|
guidance rather than editing around the old rules — prompting guidance is
|
|
140
|
-
version-bound. `
|
|
140
|
+
version-bound. `launch/check-prompting-targets.sh` fails when the launch config
|
|
141
141
|
binds a model this guide does not list.
|
|
@@ -108,6 +108,23 @@ Instruction/config reach is per invocation. A rule in AGENTS.md cannot bind a he
|
|
|
108
108
|
- A silent/dead lens is incomplete, never clean. Confirm liveness from usage/error/report evidence; rerun, swap provider, or report PROPOSED.
|
|
109
109
|
- Kind labels do not guarantee distinct backends: wrappers and rate-limit fallbacks can silently route two "different-kind" verifiers to the same model/provider. Before trusting diversity on a high-stakes verdict, confirm each verifier's actual backing model from live process or usage evidence; on collapse, treat the pair as one kind and label PROPOSED.
|
|
110
110
|
|
|
111
|
+
### Review Independence
|
|
112
|
+
|
|
113
|
+
How much independence a review actually bought, as an ordinal grade per reviewer rather than a global cross/same flag. Given the main seat `M` and the reviewer seat `R`:
|
|
114
|
+
|
|
115
|
+
| Grade | When |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `provider_difference` | `R.provider != M.provider` |
|
|
118
|
+
| `model_difference` | same provider, `R.model != M.model` |
|
|
119
|
+
| `higher_effort` | same provider and model, `R.effort` strictly above `M.effort` |
|
|
120
|
+
| `perspective_floor` | otherwise — still a real review |
|
|
121
|
+
|
|
122
|
+
- Only upward counts. A different-but-**lower** effort earns nothing and lands on the floor: cheaper is not another perspective.
|
|
123
|
+
- **Isolation is a gate, not a rung.** A reviewer that cannot be shown to run in a fresh context is excluded entirely (`NOT_REVIEW`), never graded low — an in-context "review" is the failure this ladder exists to make visible, so it must not appear as a weak pass. Isolation is realised per mechanism: a fresh read-only subprocess, a hermetic profile, a stdio tool call in a fresh session, a headless host workflow, or a stateless API call. If none of these can deliver the required seat, the review did not happen.
|
|
124
|
+
- The floor still requires **at least two distinct perspectives**; one pass on the main's own seat is self-review with extra steps.
|
|
125
|
+
- Multiple ready methods are **coverage, not diversity**. Distinct labels do not prove the perspectives differed.
|
|
126
|
+
- **Achieved is not available.** What can be projected before a review runs is `projected`; a clean verdict without a receipt evidencing a fresh dispatch, the declared packet, a non-empty result and the exact seat is `PROPOSED`, never ACHIEVED. A model echo is not a receipt.
|
|
127
|
+
|
|
111
128
|
## Dual-Provider Design Drafts
|
|
112
129
|
|
|
113
130
|
- Trigger: the task is design (the staged-workflow guide's design stages) AND two or more providers are reachable at frontier tier. Reachability via an OAuth session is subscription-covered — no marginal spend, so no approval and no question: if a non-main-context OAuth frontier provider exists, proceed with the dual-provider design directly. The consent gate applies ONLY to a provider reachable solely via a metered API key: dispatching to it needs the user's explicit per-request approval of that spend (per-request, not standing — an old approval does not carry to the next design). If the only way to reach a second provider is un-approved metered API spend, stay single-provider rather than blocking the design.
|
|
@@ -154,7 +171,7 @@ Write for the next agent and re-verification, not narrative. Required content:
|
|
|
154
171
|
|
|
155
172
|
## Environment Binding (edit per environment)
|
|
156
173
|
|
|
157
|
-
This is the human-readable projection of concrete models/tools; `
|
|
174
|
+
This is the human-readable projection of concrete models/tools; `launch/agent-launch.toml` is the machine launch authority and parity checks keep them aligned. Re-probe when the binding is older than ~8 weeks or a newer observable model/tool changes the surface. `agent-bios install` overwrites deployed bindings, so edit the repo copy.
|
|
158
175
|
|
|
159
176
|
Binding (2026-07-25):
|
|
160
177
|
|
|
@@ -178,6 +195,7 @@ Codex direct-drive (verified 0.144.1, 2026-07-12):
|
|
|
178
195
|
- HELM is instructed to dispatch tiers through internal `codex-run`, which pins model/effort/sandbox. FRONTIER uses a separate `gpt-5.6-sol`, read-only root: max by default, Ultra for divisible work, lower effort when cost/latency dominates. Nested multi-agent is enabled only for Ultra. Native `codex exec` spawn cannot pin role/effort.
|
|
179
196
|
- This is an instruction-backed, live-E2E-verified default, not a security boundary: main bypass and arbitrary expert `-c` remain available by design. `frontier.toml` omits fixed effort for native surfaces that accept overrides.
|
|
180
197
|
- `codex-run` owns reach, stdin, schema, profiles, expert `-c`, channel preservation, and exit status. Keep it internal.
|
|
198
|
+
- `claude-run` is its Claude-side twin and the command a composable review contract names for a panel dispatch on that host. Same shape: prompt on stdin, final message on stdout, exit status mirrored, `--model`/`--effort` pinning the seat, everything it does not recognise forwarded to `claude`. It denies the mutating tools by default, which is not the OS-level sandbox `codex-run` gets — do not read the two defaults as equivalent guarantees. Dispatch whatever command the contract names rather than the bare CLI: only the adapter can report what the dispatch actually did, and a review with no receipt stays PROPOSED.
|
|
181
199
|
|
|
182
200
|
Dispatch packets:
|
|
183
201
|
|