agent-bios 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEPENDENCIES.md +5 -4
- package/README.md +2 -2
- package/claude/CLAUDE.md +14 -5
- package/claude/agents/frontier.md +9 -0
- package/claude/agents/sweep.md +9 -0
- package/claude/agents/workhorse.md +8 -0
- package/claude/guides/claude-prompting.md +123 -0
- package/claude/guides/cli-multi-model-workflow.md +11 -4
- package/claude/guides/coding-staged-workflow.md +8 -0
- package/claude/guides/gpt-prompting.md +118 -0
- package/claude/guides/llm-capability-boundary-patterns.md +5 -0
- package/claude/guides/mock-realization-boundary.md +9 -0
- package/claude/guides/review-request.md +274 -0
- package/claude/guides/session-learning-workflow.md +100 -0
- package/claude/guides/tooling-gotchas.md +155 -0
- package/claude/hooks/tooling-gotchas-hook.py +79 -0
- package/codex/AGENTS.md +14 -5
- package/codex/config-additions.toml +22 -0
- package/codex/guides/claude-prompting.md +123 -0
- package/codex/guides/cli-multi-model-workflow.md +11 -4
- package/codex/guides/coding-staged-workflow.md +8 -0
- package/codex/guides/gpt-prompting.md +118 -0
- package/codex/guides/llm-capability-boundary-patterns.md +5 -0
- package/codex/guides/mock-realization-boundary.md +9 -0
- package/codex/guides/review-request.md +274 -0
- package/codex/guides/session-learning-workflow.md +100 -0
- package/codex/guides/tooling-gotchas.md +155 -0
- package/config/agent-launch.toml +23 -0
- package/package.json +6 -2
- package/scripts/agent-launch.py +504 -29
- package/scripts/check-parity.sh +73 -6
- package/scripts/check-prompting-targets.sh +62 -0
- package/scripts/codex-helm.sh +19 -1
- package/scripts/codex-run.sh +19 -0
- package/scripts/install.sh +298 -6
package/codex/AGENTS.md
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
- Ask for the user's goal or constraint when that determines the answer; otherwise choose the safest default and proceed.
|
|
30
30
|
- Evaluate user suggestions for goal fit, risk, complexity, and verification before turning them into implementation plans; if a suggestion does not fit the user's goal, say so clearly and recommend a better path.
|
|
31
31
|
- Distinguish implementation feasibility from recommendation.
|
|
32
|
+
- Do not default to a restrictive lens (security, masking, capability limits) when the system's purpose is sharing or utilization; confirm the purpose framing first, and restrict only on concrete, named risk.
|
|
32
33
|
- Treat user suggestions, inherited premises, prior diagnoses, handoff and design claims, reviewer findings, and your own earlier conclusions as hypotheses, not facts; re-derive each load-bearing claim from real code or data before building on it, and record a dated correction in the source doc or memory when a finding overturns it.
|
|
33
34
|
|
|
34
35
|
## LLM And Capability Boundary
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
- Treat viability as real behavior against real inputs, real authority, and the intended runtime path. Use mocks only for tests, fixtures, or explicitly requested simulations; mock-backed paths support verification but do not count as product completion.
|
|
80
81
|
- Make surgical changes. Touch only what the request requires, preserve existing style, and avoid casual adjacent refactors.
|
|
81
82
|
- Clean up issues introduced by the current change. Mention unrelated dead code separately.
|
|
83
|
+
- Own the full lifecycle of what you create — spawned processes and handles through teardown, artifacts out of tool-managed temp locations into a durable home — and keep differently-owned state separate: never colocate deploy-managed and user-owned data in one overwrite-managed file.
|
|
82
84
|
- Define success criteria before multi-step coding work, then verify against them.
|
|
83
85
|
- For bugs, prefer a reproducing test before the fix when practical.
|
|
84
86
|
- Every changed line should trace back to the user's request.
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
|
|
88
90
|
## Verification Discipline
|
|
89
91
|
|
|
92
|
+
- For composing a review request, packet, or reviewer role — the evidence bar, the verdict shape, and why a review returned noise, nothing, or a clean bill of health — read and use `${CODEX_HOME:-$HOME/.codex}/guides/review-request.md` as a scoped extension of this section.
|
|
90
93
|
- After every meaningful code, ontology, config, data, spreadsheet, or documentation change, run a verification loop regardless of commit or handoff status.
|
|
91
94
|
- Use static checks broadly: typecheck, lint, build, format, schema/config validation, graph validation, workbook structure checks, import boundaries, and security checks when available.
|
|
92
95
|
- Add the narrowest reliable runtime or semantic test that proves the changed behavior, meaning, or contract.
|
|
@@ -96,22 +99,28 @@
|
|
|
96
99
|
- Report the checks run, results, and any unverified risk before calling the work done.
|
|
97
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.
|
|
98
101
|
- Make completion criteria falsifiable: prefer signals that fail when the mechanism is wrong (negative or contrast controls), and if no existing gate can judge a criterion, build the executable judge or do not claim the criterion met.
|
|
102
|
+
- Before comparing two of anything (cost, performance, quality, frequency), fix a common basis — units, denominators, population, measurement surface — compare on equivalent output, and exclude or flag non-representative data (promotions, outages, smoke slices).
|
|
99
103
|
- For non-trivial designs or high-risk changes, run independent adversarial review across distinct lenses, ideally on the design before implementation, and re-verify each finding against real code before acting on it. Apply the convergence heuristic by reviewer kind (detailed in the multi-model guide): same-kind convergence is high confidence but same-kind reviewers share blind spots — their shared "clean" is not verification; different-kind divergence is the expected signal — act on the union. Never accept an orchestrated workflow's self-reported all-green as sufficient; independently re-run the diff inspection and verification suite yourself.
|
|
100
|
-
- Proportion verification to cost, risk, and information gain: before expensive or slow live runs, diagnose in code and replay the changed deterministic logic over persisted real artifacts, probe at N=1 with inputs precondition-checked, and reserve full design-review-plus-live verification for first-of-kind or authority-changing work.
|
|
101
|
-
- Trust a green / zero-findings verdict only if the check could have failed over a real, non-empty subject: assert the entity-under-test set has cardinality > 0 before any "no bad X" or "all X satisfy P" claim (an empty subject set passes vacuously and proves nothing), and for any test touching a branch you add or delete, confirm its inputs satisfy the live branch's entry guard — a copied fixture that fails the new guard silently routes into the about-to-be-deleted dead branch and stays green even after the real behavior breaks. When a check goes green unexpectedly fast or empty, dump what it actually ran over.
|
|
104
|
+
- Proportion verification to cost, risk, and information gain: before expensive or slow live runs, diagnose in code and replay the changed deterministic logic over persisted real artifacts, probe at N=1 with inputs precondition-checked, and reserve full design-review-plus-live verification for first-of-kind or authority-changing work; proportion assurance to the deployment context — a single-user, own-data tool does not warrant production-grade assurance; prefer delivery.
|
|
105
|
+
- Trust a green / zero-findings verdict only if the check could have failed over a real, non-empty subject: assert the entity-under-test set has cardinality > 0 before any "no bad X" or "all X satisfy P" claim (an empty subject set passes vacuously and proves nothing), and for any test touching a branch you add or delete, confirm its inputs satisfy the live branch's entry guard — a copied fixture that fails the new guard silently routes into the about-to-be-deleted dead branch and stays green even after the real behavior breaks. When a check goes green unexpectedly fast or empty, dump what it actually ran over. Checker code itself must assert the expected shape and fail loud — a permissive fallback (`a || b`) inside a gate absorbs wrong assumptions and keeps passing.
|
|
102
106
|
|
|
103
107
|
## Tooling and Operational Safety
|
|
104
108
|
|
|
109
|
+
- For concrete shell/CLI traps — pipe exit codes, output rendering, git range/pull semantics, config and managed-service pitfalls — read and use `${CODEX_HOME:-$HOME/.codex}/guides/tooling-gotchas.md` as a scoped extension of this section.
|
|
110
|
+
- Ambient state — the active shell, cloud CLI project/context, command-name resolution, 'latest'-style pointers, version-bearing paths — drifts silently; where an outcome depends on it, pin it explicitly (a pinned interpreter, --project/--context flags, exact handles, resolved paths) instead of trusting the environment.
|
|
105
111
|
- Before relying on any model id, tool flag, API capability, dependency version, or runtime constraint, confirm it empirically against the live or installed artifact (a minimal probe, the binary's registered options, the installed package version) rather than docs, memory, or a version string.
|
|
106
|
-
- Scope destructive actions (kill, rm, force-push, reset --hard) to targets you own, identified by PID, path, or ancestry — never a broad command-line substring or blanket match — and diagnose the actual state before any irreversible git, remote, or process operation.
|
|
107
|
-
- Never accept secrets through transcript- or history-logged channels; provide a gitignored env slot, read the value only from the environment, verify its presence and format without echoing it, and advise rotating anything already pasted.
|
|
112
|
+
- Scope destructive actions (kill, rm, force-push, reset --hard) to targets you own, identified by PID, path, or ancestry — never a broad command-line substring or blanket match — and diagnose the actual state before any irreversible git, remote, or process operation; snapshot the last good state before any in-place resume or overwrite of a completed run, and gate irreversible identity-tied actions (revoke, delete, grant, consent) on a live identity check — never auto-open a browser for a non-default identity (hand the operator the URL).
|
|
113
|
+
- Never accept secrets through transcript- or history-logged channels; provide a gitignored env slot, read the value only from the environment, verify its presence and format without echoing it, and advise rotating anything already pasted; assume a resource-creating call may echo the secret back in its success output — suppress or discard the response body, and treat an echoed secret as pasted (rotate).
|
|
108
114
|
- Treat a coarse runtime signal — a failure label, a `ps`/process-inspection result, idle CPU with no output — as a hypothesis, and confirm the cause against the authoritative low-level evidence the mechanism emits before attributing blame or intervening: read the raw provider/skill log payload (e.g. `input_tokens:0` proves a pre-dispatch rejection that exonerates your content and your change), and confirm a config/env toggle reached a subprocess via a cheap artifact the gated branch emits rather than an unreliable `ps` env read. A multi-minute LLM or subprocess call at ~0% CPU with an output gap is the normal signature of I/O wait, not a hang — check process state and the call trace's in-flight duration before acting, so you do not abort healthy long-running work.
|
|
109
|
-
- Before reasoning about what a branch contains or opening a PR, run `git fetch` and compute the range as `origin/<base>..HEAD`, never `<base>..HEAD` against the local tracking ref — on a shared repo the local base drifts behind the remote until you pull, silently inflating the diff with already-merged work; if the range is surprisingly large, suspect a stale base before suspecting the branch.
|
|
115
|
+
- Before reasoning about what a branch contains or opening a PR, run `git fetch` and compute the range as `origin/<base>..HEAD`, never `<base>..HEAD` against the local tracking ref — on a shared repo the local base drifts behind the remote until you pull, silently inflating the diff with already-merged work; if the range is surprisingly large, suspect a stale base before suspecting the branch. Platform "mergeable" flags are computed against the base only — sibling PRs can each look clean yet conflict; before picking a merge order, diff their changed-file sets and simulate the sequence.
|
|
110
116
|
|
|
111
117
|
## Multi-Model Workflow
|
|
112
118
|
|
|
113
119
|
- Codex-only standing authorization: on root/main local tasks, ordinary subagent dispatch is authorized when the `When To Spawn` gates fire. Explicit no-fan-out wins. Delegated agents may re-delegate only when their role allows. This grants no destructive, remote, credential, install, OAuth, push, live-network-expanding, or broader-sandbox authority.
|
|
120
|
+
- Standing spawn policy: check the spawn gates at every work-unit boundary — judgment latitude applies inside a gate, never to whether the gates are checked. Independence: verifying or reviewing your own work always spawns. Parallelism: two or more independent items spawn in parallel — SWEEP when each item applies one explicit rule and returns ambiguity as an exception, else WORKHORSE. Residual context: work whose log dwarfs the conclusion the main needs spawns with a bounded report contract. Escalation: an irreversible or authority-changing action ahead, two failed attempts, or two persisting design alternatives spawns a bounded FRONTIER judgment with a blind packet (evidence, constraints, rubric, neutral alternatives — never your draft conclusion) and a pre-noted change condition. Specifiability/de-minimis: work needing your live context, or whose verification would repeat the reasoning, or whose packet outweighs the work, stays inline.
|
|
121
|
+
- Down-spawns carry a machine-checkable done-when on decision-complete work with staged output (no external irreversible actions) and briefing-plus-verifying clearly cheaper than doing. Record one line per gate decision — `SpawnGate: <gate> <tier> spawn|inline — <why>` — and for FRONTIER record the disposition afterward (what changed, or why nothing did). A launch contract's `Delegation=off` lifts the spawn obligation, not the records; explicit user no-fan-out always wins.
|
|
114
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 `${CODEX_HOME:-$HOME/.codex}/guides/cli-multi-model-workflow.md` as a scoped extension of this section.
|
|
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 `${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.
|
|
115
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.
|
|
116
125
|
- 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.
|
|
117
126
|
- 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.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# agent-bios additions for the LIVE ~/.codex/config.toml, which is user/
|
|
2
|
+
# runtime-owned and never deployed wholesale. `agent-bios install` merges
|
|
3
|
+
# exactly this content additively — the [agents.*] tables inside one marked
|
|
4
|
+
# block, and features.multi_agent as one tagged line — and touches nothing
|
|
5
|
+
# else in that file. `agent-bios uninstall` removes only that marked content.
|
|
6
|
+
# ${CODEX_HOME} expands at install time. Descriptions are projections of the
|
|
7
|
+
# canonical codex/agents/*.toml templates; check-parity fails on drift.
|
|
8
|
+
|
|
9
|
+
[features]
|
|
10
|
+
multi_agent = true
|
|
11
|
+
|
|
12
|
+
[agents.frontier]
|
|
13
|
+
description = "Bounded hardest decisions, first-of-kind design, triage, and final verdicts."
|
|
14
|
+
config_file = "${CODEX_HOME}/agents/frontier.toml"
|
|
15
|
+
|
|
16
|
+
[agents.workhorse]
|
|
17
|
+
description = "Bounded implementation, fixes, and per-item judgment for delegated Codex work."
|
|
18
|
+
config_file = "${CODEX_HOME}/agents/workhorse.toml"
|
|
19
|
+
|
|
20
|
+
[agents.sweep]
|
|
21
|
+
description = "Cheap read-heavy scans, candidate finding, mechanical checks, and closed-form summaries."
|
|
22
|
+
config_file = "${CODEX_HOME}/agents/sweep.toml"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
guide_id: claude-prompting
|
|
3
|
+
language: en
|
|
4
|
+
status: active
|
|
5
|
+
use_when:
|
|
6
|
+
- composing a prompt, packet, or tool description for a claude-family model
|
|
7
|
+
- dispatching cross-family review to the claude side from a Codex main
|
|
8
|
+
- prompting claude subagents, or prompting yourself when the main is Claude
|
|
9
|
+
- porting a prompt written for an older claude model
|
|
10
|
+
- deciding a reasoning-effort level for claude work
|
|
11
|
+
core_rules:
|
|
12
|
+
- state the goal, the constraints, and the reason behind the request; let the model choose the route
|
|
13
|
+
- de-prescribe ported prompts — step-by-step scaffolding written for older models reduces output quality on this tier
|
|
14
|
+
- put the full task specification in the first turn for long-horizon work rather than revealing it across turns
|
|
15
|
+
- make tool descriptions prescriptive about when to call, not only what the tool does
|
|
16
|
+
- require progress claims to be audited against a tool result from the same session
|
|
17
|
+
- name the boundary explicitly — what to do without asking, and what to stop and ask about
|
|
18
|
+
targets:
|
|
19
|
+
- claude-fable-5
|
|
20
|
+
- claude-opus-4-8
|
|
21
|
+
- claude-sonnet-5
|
|
22
|
+
- claude-haiku-4-5
|
|
23
|
+
verification_focus:
|
|
24
|
+
- prompt changes are A/B'd against the prior scaffolding rather than assumed
|
|
25
|
+
- effort changes are swept across levels on a real eval set, not chosen by reputation
|
|
26
|
+
- per-model constraints are confirmed against the live surface before use
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Claude Prompting Guide
|
|
30
|
+
|
|
31
|
+
This guide is a scoped extension of the global Coding Guidelines. Use it when
|
|
32
|
+
composing a prompt for a claude-tier model — a review packet dispatched
|
|
33
|
+
cross-family, a subagent brief, or the main's own instructions when the main is
|
|
34
|
+
Claude.
|
|
35
|
+
|
|
36
|
+
The central shift: this tier is more autonomous and more literal than its
|
|
37
|
+
predecessors, and prompts written for older models are often too prescriptive —
|
|
38
|
+
they measurably reduce output quality. Porting a prompt means removing
|
|
39
|
+
scaffolding, not adding to it. State the goal and the constraints; let the model
|
|
40
|
+
pick the path.
|
|
41
|
+
|
|
42
|
+
## Default prompt recipe
|
|
43
|
+
|
|
44
|
+
- `Goal` and the **reason behind it** — this tier connects a task to relevant
|
|
45
|
+
context when it knows the intent, instead of inferring intent on its own.
|
|
46
|
+
"I'm doing X for Y, who needs Z; with that in mind: …" outperforms the bare
|
|
47
|
+
request, most of all for long-running agents holding several workstreams.
|
|
48
|
+
- `Success criteria` — what done means and how it is checked.
|
|
49
|
+
- `Constraints and boundaries` — say what not to do. This tier sometimes takes
|
|
50
|
+
unrequested-but-adjacent actions; naming the boundary is the fix.
|
|
51
|
+
- `Tools` — each description states **when to call it**, not only what it does.
|
|
52
|
+
Prescriptive trigger conditions give measurable lift here.
|
|
53
|
+
- `Output` — the artifact shape and the register.
|
|
54
|
+
|
|
55
|
+
## When to add blocks
|
|
56
|
+
|
|
57
|
+
- Long-horizon or autonomous work: give the full spec up front in one
|
|
58
|
+
well-specified turn and run at a high effort. Add an explicit self-check
|
|
59
|
+
cadence; separate fresh-context verifier subagents beat self-critique.
|
|
60
|
+
- Review: state the evidence bar and the verdict shape. This tier follows
|
|
61
|
+
severity filters literally, so "only report high-severity" depresses measured
|
|
62
|
+
recall even as bug-finding improves — ask for every finding with confidence
|
|
63
|
+
and severity attached, and filter downstream.
|
|
64
|
+
- Delegation: say when to delegate. Left unprompted this tier under-reaches for
|
|
65
|
+
subagents, file-based memory, and custom tools — it will not spend an
|
|
66
|
+
expensive capability unless it is reasonably sure the capability is needed.
|
|
67
|
+
- Autonomous runs with no human watching: say so. Otherwise it asks permission
|
|
68
|
+
it does not need and blocks. Grant autonomy on minor choices (naming,
|
|
69
|
+
defaults, equivalent approaches) while keeping the ask for scope changes and
|
|
70
|
+
destructive actions.
|
|
71
|
+
- Progress reporting: require each claim to be traceable to a tool result from
|
|
72
|
+
the session, and unverified work to be labeled as such.
|
|
73
|
+
|
|
74
|
+
## How to choose prompt shape
|
|
75
|
+
|
|
76
|
+
- One bounded question with a self-contained packet → a single run. Default for
|
|
77
|
+
review.
|
|
78
|
+
- Independent workstreams → delegate, and prefer asynchronous subagents over
|
|
79
|
+
spawn-and-block: long-lived agents keep their context instead of rebuilding it
|
|
80
|
+
per subtask, and the orchestrator is not pinned to the slowest one.
|
|
81
|
+
- Effort ladder — `low`, `medium`, `high`, `xhigh`, `max` on the frontier, helm,
|
|
82
|
+
and workhorse bindings; `xhigh` is the best setting for most coding and
|
|
83
|
+
agentic work, `high` a sound default, `low` for cheap subagent scans. Sweep the
|
|
84
|
+
levels on a real eval set rather than reaching for the top: higher effort up
|
|
85
|
+
front often *reduces* turn count and total cost on agentic work, while some
|
|
86
|
+
tasks land equally well a level down.
|
|
87
|
+
- Per-model constraints differ across the `targets` bindings — thinking
|
|
88
|
+
configuration, sampling parameters, and effort support are not uniform, and
|
|
89
|
+
the sweep binding is the most restricted. Confirm the constraint against the
|
|
90
|
+
live surface before relying on it in a dispatch; do not assume the frontier
|
|
91
|
+
binding's rules apply to the sweep one.
|
|
92
|
+
|
|
93
|
+
## Working rules
|
|
94
|
+
|
|
95
|
+
- Expect long turns. A single request on a hard task at high effort can run for
|
|
96
|
+
minutes; plan timeouts, streaming, and progress UX around that rather than
|
|
97
|
+
treating a quiet call as a hang.
|
|
98
|
+
- Do not add "summarize every N tool calls" scaffolding — this tier narrates on
|
|
99
|
+
its own. If it narrates too much for a coding agent, set a silence default
|
|
100
|
+
instead: text only on a finding, a direction change, or a blocker.
|
|
101
|
+
- Give it somewhere to write learnings, tell it to consult that place later, and
|
|
102
|
+
give the file a format. It performs notably better with a memory surface.
|
|
103
|
+
- Keep the deliverable readable: the final message is the reader's first look at
|
|
104
|
+
work they did not watch. Lead with the outcome; drop the working shorthand.
|
|
105
|
+
- Do not show a remaining-context countdown. This tier can start conserving and
|
|
106
|
+
suggest a fresh session instead of finishing.
|
|
107
|
+
|
|
108
|
+
## Prompt assembly checklist
|
|
109
|
+
|
|
110
|
+
1. Write the goal, the reason behind it, and the success criteria.
|
|
111
|
+
2. Name the boundaries — what to do freely, what to stop and ask about.
|
|
112
|
+
3. Give each tool a when-to-call description.
|
|
113
|
+
4. Say how progress claims must be grounded, and how the deliverable should read.
|
|
114
|
+
5. Delete the step-by-step scaffolding inherited from older models, then A/B the
|
|
115
|
+
prompt with it removed before keeping either version.
|
|
116
|
+
|
|
117
|
+
## Sources
|
|
118
|
+
|
|
119
|
+
Derived from the vendor's published guidance for the `targets` models above.
|
|
120
|
+
When a `targets` model changes, re-derive this guide from current vendor
|
|
121
|
+
guidance rather than editing around the old rules — prompting guidance is
|
|
122
|
+
version-bound. `scripts/check-prompting-targets.sh` fails when the launch config
|
|
123
|
+
binds a model this guide does not list.
|
|
@@ -41,13 +41,14 @@ Main-context pollution is usually costlier than spawn overhead. Apply these gate
|
|
|
41
41
|
4. **Specifiability:** keep work local when it needs the main's live context or unresolved round-trips, especially deep debugging. Grind alone is not a FRONTIER reason.
|
|
42
42
|
5. **De-minimis:** do work directly when its dispatch packet would be larger than the work.
|
|
43
43
|
|
|
44
|
-
-
|
|
44
|
+
- **Escalation:** spawn FRONTIER first for a bounded judgment with material stakes (an irreversible or authority-changing action ahead, an architecture or public-interface commitment, or invalidation of two or more downstream units) and a named residual-risk signal (two failed attempts, two persisting alternatives, conflicting evidence, or an unverified assumption that can flip the decision). Pre-note the finding that would change what; send a blind packet — evidence, constraints, rubric, neutrally ordered alternatives, never the main's draft conclusion — and record the disposition afterward (what changed, or why nothing did; persistent no-change indicts the gate or the packet). Switch the main only when the judgment is not delegable.
|
|
45
45
|
- Every spawn gets a bounded report contract, artifact paths instead of pasted context, and an explicit model/effort pin. Never dump a worker transcript into the main.
|
|
46
46
|
- Explicit no-fan-out overrides standing authorization.
|
|
47
|
+
- Record one line per gate decision — `SpawnGate: <gate> <tier> spawn|inline — <why>` — plus the FRONTIER disposition. A launch contract's `Delegation=off` lifts the spawn obligation, not the records.
|
|
47
48
|
|
|
48
49
|
## Delegation Mechanics And Teammate Persistence
|
|
49
50
|
|
|
50
|
-
Delegate execution, not decisions. A unit is delegable only when it is decision-complete, self-containedly specifiable, machine-checkable at done-when, and bounded in blast radius.
|
|
51
|
+
Delegate execution, not decisions. A unit is delegable only when it is decision-complete, self-containedly specifiable, machine-checkable at done-when, and bounded in blast radius. Delegated output is staged until the main accepts it — workers take no external irreversible actions — and handling (brief, verify, correct, integrate) must be clearly subordinate to the work itself. A SWEEP-bound unit applies one explicit rule per item and returns ambiguity as an exception, never resolved.
|
|
51
52
|
|
|
52
53
|
- Re-cut units containing unresolved choice, discovery-before-spec, untestable completion, or unfrozen interfaces. A worker asking which direction to take is a sizing failure; the decision returns to the main.
|
|
53
54
|
- Bundle related sub-floor tasks up to the decision-complete ceiling. A scout is read-only and reports file:line evidence for named pending decisions, probing the highest kill-risk unknown first.
|
|
@@ -56,7 +57,8 @@ Delegate execution, not decisions. A unit is delegable only when it is decision-
|
|
|
56
57
|
- Use a resident teammate only for dependent slices in one burst. Verify that the CLI preserves its model and context; resume-after-completion may silently change both. Retire after the burst or cache TTL, and persist durable knowledge in files.
|
|
57
58
|
- After a discard or direction change, respawn once a routine round costs about as much as a fresh slice. Recover unique in-flight state to files first.
|
|
58
59
|
- Redirects to busy workers may queue rather than preempt. Check artifacts before destructive redirects, phrase them conditionally, and stop an actively harmful worker by scoped PID/worktree authority.
|
|
59
|
-
- Idle/progress notifications are hypotheses; verify repo artifacts before re-dispatch. Cross-reset state belongs in files, not task boards or transcripts.
|
|
60
|
+
- Idle/progress notifications are hypotheses; verify repo artifacts before re-dispatch. Cross-reset state belongs in files, not task boards or transcripts. When polling concurrent async jobs, pin the exact id/handle received at dispatch — a "latest" convenience selector can silently point at a sibling job and return plausible-but-wrong results.
|
|
61
|
+
- Give reviewers/subagents a read-only diff, snapshot, or isolated worktree — not the live tree the main is editing — and forbid destructive git ops (checkout --, reset --hard, stash, clean) on any tree with uncommitted work; re-verify tree integrity before trusting results produced mid-edit.
|
|
60
62
|
- Review cost scales with the diff, so layered review preserves delegation savings. Lower reviewer tier before dropping a review kind.
|
|
61
63
|
|
|
62
64
|
## Driving Codex CLI Directly
|
|
@@ -104,6 +106,7 @@ Instruction/config reach is per invocation. A rule in AGENTS.md cannot bind a he
|
|
|
104
106
|
- Run deterministic gates before LLM review. Funnel SWEEP finders → WORKHORSE judgments → FRONTIER triage/verdicts.
|
|
105
107
|
- On family collapse, record the downgrade and label clean verdicts PROPOSED until diversity is restored.
|
|
106
108
|
- A silent/dead lens is incomplete, never clean. Confirm liveness from usage/error/report evidence; rerun, swap provider, or report PROPOSED.
|
|
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.
|
|
107
110
|
|
|
108
111
|
## Unattended Batch Safety
|
|
109
112
|
|
|
@@ -117,6 +120,8 @@ Instruction/config reach is per invocation. A rule in AGENTS.md cannot bind a he
|
|
|
117
120
|
- Resume-first from artifacts that parse, pass schema, and match their recorded source/config/HEAD fingerprint; unverifiable means invalid.
|
|
118
121
|
- Resubmit one invalid unit unless failures are broadly correlated, which is structural and halts the run.
|
|
119
122
|
- Treat halt→continue as normal operation.
|
|
123
|
+
- Treat tool-managed temp/cache output locations as ephemeral — they are garbage-collected on the tool's own schedule. Copy any artifact a pending or handed-off decision depends on into a project-owned durable path before relying on it later.
|
|
124
|
+
- Bounded-size cross-session indexes (memory index files) truncate silently past their read limit. Compare size against the limit periodically; before compacting, migrate index-only detail into per-item files, then verify links and no orphans.
|
|
120
125
|
|
|
121
126
|
## Sessions, Branches, Worktrees
|
|
122
127
|
|
|
@@ -124,6 +129,7 @@ Instruction/config reach is per invocation. A rule in AGENTS.md cannot bind a he
|
|
|
124
129
|
- For a new worktree, relocate natively or write a handoff and start fresh. Re-integrate branches serially and re-verify after each merge.
|
|
125
130
|
- Mark superseded worktrees/handoffs dead so later resume cannot select them.
|
|
126
131
|
- After resume/clear/relocation, verify pwd, branch, and HEAD against the pinned handoff before acting.
|
|
132
|
+
- Attribute a parallel session's action (commit, branch, resource) by execution evidence in that session's own transcript, never by token mentions — shared handoff/memory files inject the same tokens into every session's context.
|
|
127
133
|
|
|
128
134
|
## Handoff Contract
|
|
129
135
|
|
|
@@ -131,11 +137,12 @@ Write for the next agent and re-verification, not narrative. Required content:
|
|
|
131
137
|
|
|
132
138
|
1. One-line current state.
|
|
133
139
|
2. Pinned worktree, branch, HEAD, upstream/merge-base, author tier, and active fallback/family collapse.
|
|
134
|
-
3. CONFIRMED claims whose cited command or anchored file evidence independently re-establishes them.
|
|
140
|
+
3. CONFIRMED claims whose cited command or anchored file evidence independently re-establishes them. Anchor code citations by stable symbol names (grep-re-derivable), not bare line numbers, which drift silently under later edits.
|
|
135
141
|
4. Separate PROPOSED/OPEN items, including inherited claims not re-verified this session.
|
|
136
142
|
5. Ordered next actions and the literal first command: model, orchestration authorization, and guide load for T1+.
|
|
137
143
|
6. Credentials only by env-var/gitignored slot; scrub secrets from excerpts and commands.
|
|
138
144
|
|
|
145
|
+
- Never record the hash of the commit that will contain the record itself — it is unstable by construction. Land substantive changes first and reference the settled hash from a follow-up commit, or use a relative phrase ("resume from the commit containing this handoff").
|
|
139
146
|
- A broken evidence anchor demotes CONFIRMED to PROPOSED. If pinned state fails or no trustworthy handoff exists, rebuild from source artifacts and write a fresh handoff before acting.
|
|
140
147
|
- Store handoffs in the working repo's isolated dated docs path, never this instruction-SSOT repo. Re-verify load-bearing claims on resume.
|
|
141
148
|
|
|
@@ -32,6 +32,8 @@ When the user asks to "설계" or design, stay in design mode. Focus on high-lev
|
|
|
32
32
|
2. Implementation-process design: turn the design into an ordered work plan with dependencies, verification points, review gates, and redesign triggers.
|
|
33
33
|
3. Implementation: make the smallest viable functional changes that satisfy the approved design and process plan.
|
|
34
34
|
|
|
35
|
+
When simplifying a pipeline, moving processing downstream and dropping captured source fields are separate decisions: relocation is free simplification, but reducing captured information is riskier and needs explicit confirmation — "no current consumer" is not evidence of no future value.
|
|
36
|
+
|
|
35
37
|
## Review Loop
|
|
36
38
|
|
|
37
39
|
- At each stage, run review loops as appropriate: self review, subagent review when available, and structured multi-lens review when the repository or domain supports one (concrete tool: Environment Binding below).
|
|
@@ -41,6 +43,7 @@ When the user asks to "설계" or design, stay in design mode. Focus on high-lev
|
|
|
41
43
|
- Treat high as supported user, environment, data, or execution path failure.
|
|
42
44
|
- Treat medium as meaningful weakening of trust, auditability, reproducibility, completeness, or decision quality.
|
|
43
45
|
- Treat low and info as non-blocking unless requested or promoted by new evidence.
|
|
46
|
+
- When a document declares sections co-authoritative for a rule (fixture blocks, conformance appendices), treat every occurrence as one replicated value: propagate edits to all declared locations in the same pass and check propagation completeness explicitly in review.
|
|
44
47
|
|
|
45
48
|
## Verification Menus
|
|
46
49
|
|
|
@@ -51,6 +54,11 @@ Per-domain menus for the global Verification Discipline loop; pick the narrowest
|
|
|
51
54
|
- Config or data: real parsers, schema checks, fixture validation, and sample transformations.
|
|
52
55
|
- Spreadsheets: static workbook checks, fixture-based output checks, cross-sheet flow checks, visual/layout checks, and real Microsoft Excel engine recalculation for formula-dependent results.
|
|
53
56
|
- Docs: links, terminology, current behavior alignment, and references to isolated historical notes.
|
|
57
|
+
- Release or distribution: after publishing to multiple independently writable channels (signed manifest, object storage, release host, embedded updater), digest-verify every referenced object against the staging original per channel — publish success and upload order are not evidence — and run the real installer/updater through its default path.
|
|
58
|
+
- A/B or on/off measurements: before accepting a null result, verify the arms actually received different treatment in the mechanism under test — a shared default or unconditional upstream step can silently apply the treatment to both arms.
|
|
59
|
+
- Model-behavior guardrails: verify by changed behavior, not recitation — a staged battery from named-trigger cases through disguised, deconfounded, category-wide, and single-variable framings; a clean pass means "no known defect", so re-run the battery when the model changes.
|
|
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
|
+
- 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.
|
|
54
62
|
|
|
55
63
|
## Stop Conditions
|
|
56
64
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
guide_id: gpt-prompting
|
|
3
|
+
language: en
|
|
4
|
+
status: active
|
|
5
|
+
use_when:
|
|
6
|
+
- composing a prompt, packet, or tool description for a gpt-family model
|
|
7
|
+
- dispatching cross-family review to the gpt side from a Claude main
|
|
8
|
+
- prompting gpt subagents, or prompting yourself when the main is Codex
|
|
9
|
+
- porting a prompt written for an older gpt model
|
|
10
|
+
- deciding a reasoning-effort level for gpt work
|
|
11
|
+
core_rules:
|
|
12
|
+
- describe the destination, not the route — state outcome, success bar, real constraints, and available evidence
|
|
13
|
+
- simplify before adding; remove one group of instructions, examples, or tools at a time and re-run the same evals
|
|
14
|
+
- keep only what changes behavior; cut repeated statements, style rules, and examples that do not
|
|
15
|
+
- replace blanket ALWAYS/NEVER with decision rules naming the condition each choice applies under
|
|
16
|
+
- fix the prompt before raising effort — weak output usually means a missing success criterion, dependency rule, tool-routing rule, or verification loop
|
|
17
|
+
- prompting habits carried from older gpt models cost tokens and can cost accuracy
|
|
18
|
+
targets:
|
|
19
|
+
- gpt-5.6-sol
|
|
20
|
+
- gpt-5.6-terra
|
|
21
|
+
- gpt-5.6-luna
|
|
22
|
+
verification_focus:
|
|
23
|
+
- prompt changes are validated by re-running the same evals, not by inspection
|
|
24
|
+
- removals are tested one group at a time so the cause of a delta is known
|
|
25
|
+
- effort changes are compared against the baseline and one level lower
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# GPT Prompting Guide
|
|
29
|
+
|
|
30
|
+
This guide is a scoped extension of the global Coding Guidelines. Use it when
|
|
31
|
+
composing a prompt for a gpt-tier model — a review packet dispatched
|
|
32
|
+
cross-family, a subagent brief, or the main's own instructions when the main is
|
|
33
|
+
Codex.
|
|
34
|
+
|
|
35
|
+
The current gpt tier is more concise and more self-directing than its
|
|
36
|
+
predecessors, so the failure mode has inverted: the usual defect is now an
|
|
37
|
+
over-specified prompt, not an under-specified one. Leaner system prompts
|
|
38
|
+
measured roughly +10–15% eval score at 41–66% fewer tokens and 33–67% lower
|
|
39
|
+
cost in the vendor's own coding-agent sample — directional, and worth
|
|
40
|
+
validating on your own workload rather than taking on faith.
|
|
41
|
+
|
|
42
|
+
## Default prompt recipe
|
|
43
|
+
|
|
44
|
+
Compose in this order; omit any block that would not change the artifact.
|
|
45
|
+
|
|
46
|
+
- `Role` and `Personality` — who is acting and in what register. Omit
|
|
47
|
+
personality when it does not change the output.
|
|
48
|
+
- `Goal` and `Success criteria` — the outcome, and the bar that decides done.
|
|
49
|
+
This is the block most worth its tokens; write it first. If you cannot state
|
|
50
|
+
the bar, the prompt is not ready.
|
|
51
|
+
- `Constraints` — safety, business, and scope limits that must hold. Real
|
|
52
|
+
constraints only; preferences belong in output shape or nowhere.
|
|
53
|
+
- `Tools` — only task-relevant ones. Each description states what it does, when
|
|
54
|
+
to use it, its important return fields, and its error behavior.
|
|
55
|
+
- `Output` — the artifact shape. `Stop rules` — when to stop looping and answer.
|
|
56
|
+
|
|
57
|
+
## When to add blocks
|
|
58
|
+
|
|
59
|
+
- Coding and debugging: name the validation to run after changes — targeted
|
|
60
|
+
tests for the changed behavior, type/lint checks, build, a minimal smoke test.
|
|
61
|
+
Require prerequisite lookups before edits.
|
|
62
|
+
- Review: no vendor task guidance exists for review specifically. Carry the
|
|
63
|
+
general rules and be explicit about the evidence bar and the verdict shape; a
|
|
64
|
+
reviewer with no stated bar defaults to plausible-sounding findings.
|
|
65
|
+
- Research and grounded work: cite only retrieved sources, attach citations to
|
|
66
|
+
the claims they support, and label inference separately from supported fact.
|
|
67
|
+
Say to narrow the answer or report missing evidence rather than guess.
|
|
68
|
+
- Write-capable work: name the safe actions explicitly (read files, edit code,
|
|
69
|
+
run tests) and require confirmation for external writes, destructive actions,
|
|
70
|
+
or scope expansion.
|
|
71
|
+
- Implementation plans: requirements, named resources, state transitions,
|
|
72
|
+
validation checks, failure behavior, privacy/security, open questions.
|
|
73
|
+
|
|
74
|
+
## How to choose prompt shape
|
|
75
|
+
|
|
76
|
+
- One bounded question with a self-contained packet → a single hermetic run.
|
|
77
|
+
This is the default for review.
|
|
78
|
+
- Work that divides into independent workstreams → fan-out. Parallelize
|
|
79
|
+
independent reads; keep dependent steps sequential.
|
|
80
|
+
- Effort ladder — `none`, `low`, `medium`, `high`, `xhigh`, `max` are all valid.
|
|
81
|
+
Hold the current binding as the baseline, then test it and one level lower on
|
|
82
|
+
representative tasks: `low` for latency-sensitive work, `medium` as the
|
|
83
|
+
balanced default, `high`/`xhigh` only where evals show real gain, `max`
|
|
84
|
+
reserved for the hardest quality-first work and compared against `xhigh`.
|
|
85
|
+
- Prefer a self-contained packet over resuming a long history: it is cheaper to
|
|
86
|
+
reason about and cheaper to cache.
|
|
87
|
+
|
|
88
|
+
## Working rules
|
|
89
|
+
|
|
90
|
+
- One clear task per run, with an explicit output contract.
|
|
91
|
+
- Keep reusable prefixes stable and avoid churn in large system prompts. Add
|
|
92
|
+
explicit cache breakpoints only where they measurably improve cache behavior —
|
|
93
|
+
a cache write costs 1.25× the uncached input rate, so read the cached-token
|
|
94
|
+
and cache-write counters before adding one.
|
|
95
|
+
- Do not say "be concise" reflexively. This tier is concise by default, and the
|
|
96
|
+
instruction can push responses past useful into thin.
|
|
97
|
+
- After each tool result, ask whether the core request can now be answered with
|
|
98
|
+
useful evidence. If yes, answer.
|
|
99
|
+
- Render any visual artifact before finalizing; inspect layout, clipping,
|
|
100
|
+
spacing, and missing content.
|
|
101
|
+
|
|
102
|
+
## Prompt assembly checklist
|
|
103
|
+
|
|
104
|
+
1. Write the success criteria first.
|
|
105
|
+
2. Add role, goal, real constraints, and the output shape.
|
|
106
|
+
3. Add only the tools the task needs, each with when-to-use and error behavior.
|
|
107
|
+
4. Add stop rules and the verification the task must pass.
|
|
108
|
+
5. Delete every line that would not change the artifact if removed, then re-read
|
|
109
|
+
for instructions inherited from older-model habits.
|
|
110
|
+
|
|
111
|
+
## Sources
|
|
112
|
+
|
|
113
|
+
Derived from the vendor's published prompting guidance for the `targets` models
|
|
114
|
+
above. When a `targets` model changes, re-derive this guide from current vendor
|
|
115
|
+
guidance rather than editing around the old rules — prompting guidance is
|
|
116
|
+
version-bound, and the previous generation's advice inverted on this one.
|
|
117
|
+
`scripts/check-prompting-targets.sh` fails when the launch config binds a model
|
|
118
|
+
this guide does not list.
|
|
@@ -278,6 +278,11 @@ Required rules:
|
|
|
278
278
|
- Log tool calls, arguments, policy decisions, and results for audit.
|
|
279
279
|
- Rate-limit and timeout tools that can loop, scan, spend, mutate, or call the
|
|
280
280
|
network.
|
|
281
|
+
- Resolve every authorization/allowlist entry against the live runtime key
|
|
282
|
+
space at boot or deploy — format validation only proves well-formedness, and
|
|
283
|
+
a mis-formatted entry can pass every deploy check while silently denying its
|
|
284
|
+
whole route class. Verify fixes with an explicit negative control plus a
|
|
285
|
+
live end-to-end call through the redeployed system.
|
|
281
286
|
|
|
282
287
|
The LLM can recommend an action. The capability surface decides whether the
|
|
283
288
|
action is available, permitted, confirmed, and accepted.
|
|
@@ -246,6 +246,15 @@ Examples:
|
|
|
246
246
|
- A mock provider can prove retry handling.
|
|
247
247
|
- A mock provider cannot prove the real provider integration is production-ready.
|
|
248
248
|
|
|
249
|
+
Connected cloud documents (live Sheets/Docs with bound scripts, triggers,
|
|
250
|
+
permissions, protections, named ranges, external references) are live
|
|
251
|
+
integrated systems, not portable files: unless the user explicitly asks for a
|
|
252
|
+
copy/export, edit in place through the native authority (connected-document
|
|
253
|
+
MCP/API). Before writing, enumerate the beyond-cell elements so none are
|
|
254
|
+
silently dropped, and report external load states (loading, timeout, quota,
|
|
255
|
+
permission-denied, broken reference) distinctly instead of collapsing them
|
|
256
|
+
into one success/failure.
|
|
257
|
+
|
|
249
258
|
## Design Procedure
|
|
250
259
|
|
|
251
260
|
Use this procedure before adding or extending mock behavior.
|