agent-bios 0.19.2 → 0.19.4
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 +76 -20
- package/INSTALL.md +1 -1
- package/README.md +55 -5
- package/claude/agents/sweep.md +2 -1
- package/claude/agents/workhorse.md +2 -2
- package/claude/guides/claude-prompting.md +101 -15
- package/claude/guides/cli-multi-model-workflow.md +5 -5
- package/claude/guides/coding-staged-workflow.md +17 -0
- package/claude/guides/gpt-prompting.md +40 -9
- package/claude/guides/llm-capability-boundary.md +7 -1
- package/claude/guides/tooling-gotchas.md +20 -1
- package/claude/guides/ui-design/visual-direction.md +88 -0
- package/claude/guides/ui-design.md +90 -0
- package/claude/guides/verification-discipline.md +10 -1
- package/claude/hooks/tooling-gotchas-hook.py +41 -0
- package/codex/agents/reviewer.toml +2 -2
- package/codex/agents/sweep.toml +1 -1
- package/codex/agents/workhorse.toml +2 -2
- package/codex/guides/claude-prompting.md +101 -15
- package/codex/guides/cli-multi-model-workflow.md +5 -5
- package/codex/guides/coding-staged-workflow.md +17 -0
- package/codex/guides/gpt-prompting.md +40 -9
- package/codex/guides/llm-capability-boundary.md +7 -1
- package/codex/guides/tooling-gotchas.md +20 -1
- package/codex/guides/ui-design/visual-direction.md +88 -0
- package/codex/guides/ui-design.md +90 -0
- package/codex/guides/verification-discipline.md +10 -1
- package/compose/app_bridge/scripts/bridge.py +23 -6
- package/compose/app_desktop/server.py +250 -0
- package/compose/domains.json +1 -0
- package/compose/host_platform.py +121 -0
- package/compose/instructions-state.py +5 -2
- package/compose/instructions_app.py +281 -48
- package/compose/instructions_catalog.py +2 -2
- package/compose/instructions_import.py +19 -11
- package/compose/instructions_install.py +77 -11
- package/compose/instructions_session.py +6 -6
- package/compose/instructions_setup.py +47 -10
- package/compose/instructions_setup_cli.py +31 -10
- package/compose/instructions_setup_i18n.py +6 -3
- package/compose/instructions_store.py +6 -6
- package/compose/instructions_transaction.py +8 -6
- package/compose/instructions_ui_runtime.py +4 -3
- package/compose/native_cli.py +52 -0
- package/compose/runtime_entry.py +58 -0
- package/compose/setup/START.md +1 -1
- package/compose/windows_deploy.py +719 -0
- package/docs/instructions.md +1 -0
- package/docs/releases/0.19.3.md +107 -0
- package/docs/releases/0.19.4.md +99 -0
- package/docs/session-model.md +8 -0
- package/docs/setup.md +39 -3
- package/docs/windows.md +99 -0
- package/install.sh +13 -6
- package/launch/agent-launch.py +31 -8
- package/launch/agent-launch.toml +49 -24
- package/launch/agent-launch.zsh +11 -1
- package/launch/provision-venv.sh +1 -1
- package/package.json +9 -4
- package/provenance.json +1 -1
- package/session-cost.py +61 -9
- package/wrappers/codex-helm.sh +6 -6
|
@@ -15,16 +15,18 @@ core_rules:
|
|
|
15
15
|
- replace blanket ALWAYS/NEVER with decision rules naming the condition each choice applies under
|
|
16
16
|
- fix the prompt before raising effort — weak output usually means a missing success criterion, dependency rule, tool-routing rule, or verification loop
|
|
17
17
|
- prompting habits carried from older gpt models cost tokens and can cost accuracy
|
|
18
|
-
derived_at: 2026-
|
|
18
|
+
derived_at: 2026-10-21
|
|
19
19
|
source_pins:
|
|
20
20
|
- doc: prompt-guidance-gpt-5p6
|
|
21
21
|
sha256: 46181efec9fd1160ef537b0379282a14c1ba32380f2f8149a805128253c1115a
|
|
22
|
-
pinned_at: 2026-
|
|
22
|
+
pinned_at: 2026-10-21
|
|
23
23
|
- doc: model-guidance-gpt-6-astra
|
|
24
|
-
sha256:
|
|
25
|
-
pinned_at: 2026-
|
|
24
|
+
sha256: ad1aeb3d87e2e61a91233447f7c54b7b18ebfecc4315eeefab15bf5861b3a5c7
|
|
25
|
+
pinned_at: 2026-10-21
|
|
26
26
|
targets:
|
|
27
27
|
- gpt-6-astra
|
|
28
|
+
- gpt-6.1-sol
|
|
29
|
+
- gpt-6-luna
|
|
28
30
|
- gpt-5.6-sol
|
|
29
31
|
- gpt-5.6-terra
|
|
30
32
|
- gpt-5.6-luna
|
|
@@ -51,6 +53,7 @@ permission policy; they do not change tool permissions or approval requirements.
|
|
|
51
53
|
| --- | --- | --- |
|
|
52
54
|
| `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna` | GPT-5.6 | `prompt-guidance-gpt-5p6` |
|
|
53
55
|
| `gpt-6-astra` | GPT-6 Astra | `model-guidance-gpt-6-astra` |
|
|
56
|
+
| `gpt-6.1-sol`, `gpt-6-luna` | none yet | Shared recipe only. No section is derived for these — read the vendor's current model guidance rather than borrowing the GPT-6 Astra tuning, whose document covers Astra alone |
|
|
54
57
|
|
|
55
58
|
## GPT-5.6
|
|
56
59
|
|
|
@@ -112,7 +115,32 @@ permission policy; they do not change tool permissions or approval requirements.
|
|
|
112
115
|
`none` or `minimal`, begin with `low` and compare results; otherwise preserve the
|
|
113
116
|
current effective effort. Check the active model and host for supported settings
|
|
114
117
|
instead of reusing a family-wide effort ladder. Fix a missing success criterion,
|
|
115
|
-
dependency rule, or verification loop before increasing effort.
|
|
118
|
+
dependency rule, or verification loop before increasing effort. To change effort
|
|
119
|
+
partway through a conversation, send a configuration update rather than editing the
|
|
120
|
+
request-level setting, which invalidates the prompt cache.
|
|
121
|
+
- **Output efficiency.** Astra holds together over longer tasks than GPT-5.6 Sol and
|
|
122
|
+
spent fewer output tokens across several of the vendor's evaluations. Re-measure
|
|
123
|
+
brevity pressure written for 5.6 before carrying it over; some of it now pays for
|
|
124
|
+
nothing.
|
|
125
|
+
- **`ultra` is a host-surface level, not the next rung.** The vendor's API
|
|
126
|
+
documentation lists `low`, `medium`, `high`, `xhigh`, and `max` and does not mention
|
|
127
|
+
`ultra` at all. The Codex CLI catalogue does report it for `gpt-6-astra`,
|
|
128
|
+
`gpt-6.1-sol`, and `gpt-5.6-sol`, described as maximum reasoning **with automatic
|
|
129
|
+
task delegation** — a different mode, not one step up. `gpt-6-luna` does not report
|
|
130
|
+
it and refuses it. Read the host catalogue for the seat you are configuring.
|
|
131
|
+
|
|
132
|
+
## GPT-6.1 Sol and GPT-6 Luna
|
|
133
|
+
|
|
134
|
+
Neither model has a prompting document of its own. The vendor's model hub states that
|
|
135
|
+
GPT-6.1 Sol defaults to `medium` reasoning effort, and says nothing further that is
|
|
136
|
+
specific to either model, so nothing in this section is derived from a model-specific
|
|
137
|
+
source:
|
|
138
|
+
|
|
139
|
+
- Treat the GPT-6 Astra section as the nearest reference, and verify each claim
|
|
140
|
+
against the model in front of you rather than assuming it carries over.
|
|
141
|
+
- Take supported effort levels from the host's own catalogue rather than the family
|
|
142
|
+
ladder — the two disagree, as the `ultra` bullet above shows.
|
|
143
|
+
- Re-derive this section as soon as either model gets its own page.
|
|
116
144
|
|
|
117
145
|
## Shared prompt recipe
|
|
118
146
|
|
|
@@ -224,10 +252,13 @@ that sample, not Astra measurements or promised gains on another workload.
|
|
|
224
252
|
## Sources
|
|
225
253
|
|
|
226
254
|
The GPT-5.6 section is derived from `prompt-guidance-gpt-5p6`; the GPT-6 Astra
|
|
227
|
-
section from `model-guidance-gpt-6-astra`. The
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
255
|
+
section from `model-guidance-gpt-6-astra`. The GPT-6.1 Sol and GPT-6 Luna section has
|
|
256
|
+
no model-specific source and says so in its own text; its effort claims come from the
|
|
257
|
+
host catalogue, which is a live surface rather than a pinned document. The shared
|
|
258
|
+
recipe retains task, evidence, tool, and validation practices from the GPT-5.6
|
|
259
|
+
guidance and the instructions; model behavior claims belong only to their matching
|
|
260
|
+
section. `source_pins` records the exact bytes used for this derivation so later
|
|
261
|
+
vendor edits can be detected.
|
|
231
262
|
|
|
232
263
|
When a `targets` model changes, re-derive its section from the matching current
|
|
233
264
|
document, check the shared rules for contradictions, and re-run representative
|
|
@@ -110,7 +110,13 @@ Important levers:
|
|
|
110
110
|
grounding checks, provenance checks, citation checks, static checks, E2E
|
|
111
111
|
checks, and semantic quality gates.
|
|
112
112
|
- Retry/fail policy: retry transient generation failures; fail clearly when the
|
|
113
|
-
available route cannot enforce the required contract.
|
|
113
|
+
available route cannot enforce the required contract. A contract-failing item
|
|
114
|
+
is rejected loudly and never recorded as a valid result; record its failed or
|
|
115
|
+
not-done status in artifact state. On a production path the whole run halts
|
|
116
|
+
only when continuing would contaminate what the next step reads — a stale or
|
|
117
|
+
not-reusable input, a contract-failing value about to be recorded as valid,
|
|
118
|
+
or an external write with an unknown outcome; otherwise it warns loudly and
|
|
119
|
+
continues, and the next run picks up the work not done.
|
|
114
120
|
- Observability: prompt packet snapshot, model/provider version, schema hash,
|
|
115
121
|
source snapshot, validator decision, retry reason, and artifact lineage.
|
|
116
122
|
|
|
@@ -256,7 +256,26 @@ depends on it, pin it explicitly instead of trusting the environment.
|
|
|
256
256
|
and check for a front-side cache/CDN separately. Aim the probe at an
|
|
257
257
|
in-unit sentinel the app answers without credentials: a denial the app
|
|
258
258
|
produces anyway passes with the control off, and a redirect into it is a
|
|
259
|
-
bypass.
|
|
259
|
+
bypass. The address an IP-based rule compares is the one selected at its
|
|
260
|
+
enforcement point, and configuration alone may not establish which: behind
|
|
261
|
+
a proxy or CDN it can be the client address the configured forwarded-header
|
|
262
|
+
trust chain hands the app, and a managed platform can route particular
|
|
263
|
+
destinations outside an otherwise configured NAT path — on GCP, Google API
|
|
264
|
+
traffic did not use the Cloud NAT address despite
|
|
265
|
+
`privateIpGoogleAccess: false`. Before writing or editing an allowlist or
|
|
266
|
+
perimeter rule, observe the address for the real workload and destination
|
|
267
|
+
at the enforcement point, with a control path that should show a different
|
|
268
|
+
one.
|
|
269
|
+
- **Locating a credential must not print it**: a command meant only to find
|
|
270
|
+
where a secret lives, or to check that it is set, exposes the value if it
|
|
271
|
+
emits it into the transcript — `cat` of an env file, `printenv`,
|
|
272
|
+
`echo $TOKEN`, a keychain read with `-w`, or a grep whose match is the
|
|
273
|
+
secret line. Check existence, length, or shape without emitting any secret
|
|
274
|
+
characters (`[ -n "${X:-}" ]`, `wc -c < file`, a key-name-only listing, a
|
|
275
|
+
nonprinting format check), and let the consumer read the value directly
|
|
276
|
+
from the environment or credential store only when it needs it. Do not
|
|
277
|
+
print even a partial prefix. A value that reached the transcript is
|
|
278
|
+
exposed: rotate it.
|
|
260
279
|
- **Tightening exposure is a behavior change for external clients**: switching
|
|
261
280
|
ingress mode, adding an allowlist, or requiring auth is not safe when
|
|
262
281
|
callers live outside your redeploy. Enumerate which clients reach the
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
language: en
|
|
3
|
+
status: active
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Choosing a visual direction for an operational interface
|
|
7
|
+
|
|
8
|
+
Use when a new visual direction or a material arrangement decision remains
|
|
9
|
+
unresolved in the requested work. For an established direction or a bounded copy
|
|
10
|
+
correction, use the existing system and verify the affected result proportionately.
|
|
11
|
+
|
|
12
|
+
## Start from the task and supported system
|
|
13
|
+
|
|
14
|
+
Identify the content people must read, compare, select, edit or act on. Preserve
|
|
15
|
+
the working scope, authority and state distinctions that matter to that task.
|
|
16
|
+
Inspect the project's existing components and tokens before introducing a new
|
|
17
|
+
visual vocabulary. An external reference does not itself justify replacing the
|
|
18
|
+
project's framework or component library.
|
|
19
|
+
|
|
20
|
+
Consult a reference when it helps resolve the remaining visual decision; reuse
|
|
21
|
+
sufficient existing evidence. Research more when the decision needs it or the
|
|
22
|
+
user requests research. Prefer task-relevant product views or official pattern
|
|
23
|
+
documentation. Distinguish live observations, release screenshots, historical
|
|
24
|
+
images and explanatory artwork. Record the source and date, what it informs,
|
|
25
|
+
and its applicability limits in the ordinary design note. Do not infer token
|
|
26
|
+
values or usability from an image alone.
|
|
27
|
+
|
|
28
|
+
## Choose only the patterns the task needs
|
|
29
|
+
|
|
30
|
+
| Task | Useful arrangement | Meaning to preserve |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Reading and review | Give the artifact sufficient space; keep necessary evidence nearby when switching would obstruct comparison | The artifact, source, applicable conditions and review target |
|
|
33
|
+
| Repeated record comparison | Align comparable values; distinguish whole-list, selected-set and individual-record actions | Units, comparison basis, exceptions and each action's scope |
|
|
34
|
+
| Selection-driven editing | Keep relevant properties bound to the selected object | Selection, draft and resulting changes remain attached to the same target |
|
|
35
|
+
| Input and result confirmation | Keep input, consequential effects and results close enough to follow | Entered, saved, approved and actually executed states stay distinct |
|
|
36
|
+
|
|
37
|
+
These are conditional patterns, not a required navigation structure or panel
|
|
38
|
+
count. Choose persistent supporting panels or transient overlays according to
|
|
39
|
+
their role. Give prose a readable measure and comparisons sufficient width.
|
|
40
|
+
Adapt the arrangement to the supported viewport while preserving the current
|
|
41
|
+
selection, return context, reading order and keyboard focus order. Compact
|
|
42
|
+
navigation when needed to keep the main task reachable on a narrow screen.
|
|
43
|
+
|
|
44
|
+
## Define roles before values
|
|
45
|
+
|
|
46
|
+
Explain the proposed reading order, emphasis, density and grouping briefly.
|
|
47
|
+
Map foregrounds, surfaces, action states, spacing relationships and any required
|
|
48
|
+
depth to the existing semantic tokens. Keep focus, selection, feedback and
|
|
49
|
+
disabled states distinct even when values initially coincide. Add a pattern
|
|
50
|
+
token only when it represents an independent decision. The role of a token
|
|
51
|
+
must survive theme changes; check its actual foreground/background pairing.
|
|
52
|
+
|
|
53
|
+
For information-dense operational work, start with typography, alignment and
|
|
54
|
+
spacing to organize content; add containers, color or elevation when they
|
|
55
|
+
communicate a needed relationship or interaction. Large introductory areas,
|
|
56
|
+
repeated summary cards, badges and icon backgrounds need a task or brand purpose.
|
|
57
|
+
Ordinary content need not look raised. Use depth when it clarifies a floating,
|
|
58
|
+
movable or otherwise distinct object. Preserve useful brand and user preferences.
|
|
59
|
+
|
|
60
|
+
Do not impose a reference palette, fixed pixel scale, permanently dim navigation,
|
|
61
|
+
universal card ban or identical layout across tasks. When no system exists, mark
|
|
62
|
+
initial values as project proposals. Define consistent text roles and spacing
|
|
63
|
+
within and between groups, then check the resulting density. Resolve crowded
|
|
64
|
+
content through grouping, widths and wrapping before shrinking text. Keep words
|
|
65
|
+
and meaningful phrases together where the language permits, with a fallback for
|
|
66
|
+
unbroken strings. Check representative Korean text when the product uses Korean.
|
|
67
|
+
|
|
68
|
+
## Compare only enough to resolve the decision
|
|
69
|
+
|
|
70
|
+
Use representative content, long labels, important exceptions and relevant
|
|
71
|
+
states at the target sizes. Keep task, content and capability constant while
|
|
72
|
+
comparing visual alternatives; use a credible baseline. Distinguish token
|
|
73
|
+
changes from changes to regions, information order and grouping. Typography
|
|
74
|
+
and spacing can still alter wrapping and geometry. Where narrow layouts
|
|
75
|
+
converge, do not claim a difference the user cannot see.
|
|
76
|
+
|
|
77
|
+
Inspect the actual rendered result when appearance is being judged. Check
|
|
78
|
+
contrast, clipping, wrapping, state distinctions, action targets and focus
|
|
79
|
+
visibility under the applicable accessibility requirements. Verify that
|
|
80
|
+
rearrangement preserves semantic reading and keyboard order. For interactive
|
|
81
|
+
changes, exercise selection, draft retention and the relevant failure/recovery
|
|
82
|
+
paths; styling does not establish permission or execution.
|
|
83
|
+
|
|
84
|
+
Record visual preference separately from observed task performance. Rendered
|
|
85
|
+
samples support visual inspection; interaction and user-performance claims need
|
|
86
|
+
their own evidence. Preserve the result and remaining uncertainty in ordinary
|
|
87
|
+
team artifacts. No prescribed number of variants or new research report is
|
|
88
|
+
needed for every task.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
guide_id: ui-design
|
|
3
|
+
language: en
|
|
4
|
+
status: active
|
|
5
|
+
description: For designing, reviewing, or changing task flows, information layout, visual hierarchy, or interaction in operational user interfaces; keep bounded corrections proportionate.
|
|
6
|
+
use_when:
|
|
7
|
+
- designing or reviewing a work application, operations tool, or interactive work surface
|
|
8
|
+
- changing information arrangement, visual hierarchy, design tokens, or interaction states
|
|
9
|
+
- preserving scope, evidence, authority, and continuity through a user interface
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Operational interface design and delivery
|
|
13
|
+
|
|
14
|
+
Use for interfaces where people inspect evidence, compose work, make decisions
|
|
15
|
+
or act on records. Match the deliverable to the user's requested stage and scope.
|
|
16
|
+
A clear text correction needs that correction and a proportionate check.
|
|
17
|
+
|
|
18
|
+
1. **Establish what the sources mean now.** Separate implemented behavior,
|
|
19
|
+
accepted requirements, proposed design choices and illustrative states.
|
|
20
|
+
Reconcile amendments and decisions before reusing an older screen. A newer
|
|
21
|
+
date alone does not establish authority. Keep material contradictions and
|
|
22
|
+
unknowns visible instead of silently choosing a convenient interpretation.
|
|
23
|
+
|
|
24
|
+
2. **Preserve requested coverage; bound the work at the right level.** Identify
|
|
25
|
+
the operator, outcome and evidence that would complete this deliverable.
|
|
26
|
+
Distinguish people consuming work context from those authoring or managing
|
|
27
|
+
it; do not invent their visit frequency or force a common starting screen.
|
|
28
|
+
For a complete design request, cover the required operations even when their
|
|
29
|
+
backend is not built; specify their subjects, inputs, effects, dependencies
|
|
30
|
+
and recovery rather than claiming implementation. For a bounded change,
|
|
31
|
+
complete the requested path before expanding neighboring features. Include
|
|
32
|
+
adjacent repairs when that path depends on them or this change causes a
|
|
33
|
+
regression, and state why. An unavailable implementation does not erase a
|
|
34
|
+
requested design contract.
|
|
35
|
+
|
|
36
|
+
3. **Organize around a meaningful next decision.** Show the working scope,
|
|
37
|
+
evidence to compare, current state, available action and resulting next step
|
|
38
|
+
together. Internal modules or protocol phases are not automatically menus
|
|
39
|
+
or buttons. Combine preparation steps behind one authorized intent when no
|
|
40
|
+
user choice is needed, while keeping distinct outcomes understandable. Use
|
|
41
|
+
the team's visual language to assign emphasis according to the task, and
|
|
42
|
+
make typography, spacing, color and boundaries express meaningful
|
|
43
|
+
relationships. Test whether actual task content is prominent at the target
|
|
44
|
+
size; decorative summaries must earn their space. When layout uncertainty
|
|
45
|
+
matters, compare arrangements at the lowest useful fidelity, explaining the
|
|
46
|
+
task tradeoff and what evidence would change the choice.
|
|
47
|
+
|
|
48
|
+
When a new visual direction or a material arrangement decision remains
|
|
49
|
+
unresolved, use
|
|
50
|
+
`${CODEX_HOME:-$HOME/.codex}/guides/ui-design/visual-direction.md`.
|
|
51
|
+
An established direction or a bounded correction does not require new
|
|
52
|
+
reference research or multiple designs.
|
|
53
|
+
|
|
54
|
+
4. **Keep qualifications with the thing they qualify.** Preserve applicable
|
|
55
|
+
conditions, exceptions, units, source/version, time meaning and affected
|
|
56
|
+
scope through summaries, edits, comparisons and exports. Keep independent
|
|
57
|
+
dimensions separate. Missing evidence is not an empty result or a zero, and
|
|
58
|
+
an index or relationship view is not proof of its underlying body or meaning.
|
|
59
|
+
Expand technical detail when useful without hiding a consequential limit.
|
|
60
|
+
|
|
61
|
+
5. **Make each action's authority and effect precise.** Name the exact target,
|
|
62
|
+
base and changed content when reviewing a change. Recheck a changed base or
|
|
63
|
+
permission instead of carrying approval onto different input. Distinguish
|
|
64
|
+
selection, saved draft, approval, execution and recipient use as applicable;
|
|
65
|
+
one positive state does not prove the next. Preserve request identity when
|
|
66
|
+
an outcome is uncertain and reconcile its actual result before retrying.
|
|
67
|
+
UI controls reflect the existing authoritative policy; they do not create it.
|
|
68
|
+
If policy is unsettled, label proposed choices and the responsible decision
|
|
69
|
+
owner rather than implying permission or omitting the required design.
|
|
70
|
+
|
|
71
|
+
6. **Carry the same work across views and people.** Preserve the draft, target,
|
|
72
|
+
review/request identity and return context when moving between surfaces.
|
|
73
|
+
Equivalent outcomes need suitable representations, not identical layouts or
|
|
74
|
+
duplicated business rules. Provide keyboard and structured alternatives for
|
|
75
|
+
necessary spatial interactions. Verify evidence for the actual recipient;
|
|
76
|
+
another worker's receipt does not establish their access or delivery.
|
|
77
|
+
|
|
78
|
+
7. **Verify this deliverable, then finish it.** Walk a design's concrete scenario
|
|
79
|
+
and relevant exceptions against its sources; inspect its proposed composition.
|
|
80
|
+
For working changes, exercise the changed runtime path, relevant failures,
|
|
81
|
+
keyboard and recovery. When a visual change is material, inspect the affected
|
|
82
|
+
composition with representative content and relevant states at the target
|
|
83
|
+
size, distinguishing token changes from changes to information arrangement.
|
|
84
|
+
Check that visual, reading and focus order remain coherent across layouts.
|
|
85
|
+
Report visual preference separately from observed task performance. Keep
|
|
86
|
+
simulation, observed runtime and user evidence distinct. Once the required
|
|
87
|
+
checks are complete, leave the result, material decisions, source bindings
|
|
88
|
+
and remaining work in ordinary team artifacts. Keep private facts within
|
|
89
|
+
their permitted boundary. Choose dependencies only when a requirement
|
|
90
|
+
demands a decision, using the supported environment first.
|
|
@@ -77,6 +77,7 @@ cheapest one to write.
|
|
|
77
77
|
- 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.
|
|
78
78
|
- Multi-stage pipelines with nondeterministic stages: a final-output diff cannot attribute an effect or a regression to a stage — it conflates the change with run-to-run variance. Persist every stage's output, tabulate what each creates, may edit, and only guards, restrict the suspects to the stages that edit the content in question, and find the first stage where the intended effect disappears or the defect appears. Fix there, preferring a structural recheck over another prompt-level instruction that already failed.
|
|
79
79
|
- Before/after comparisons: pin the input to an immutable copy — a snapshot or versioned artifact — and run both arms against it, because a live artifact (a growing log, a regenerated upstream stage) drifts between runs and any diff over it, a matching one included, is evidence of nothing; when the arms are metered, restore the baseline's exact upstream inputs and re-run only the changed stage. This is input identity, not the separate unit-and-denominator basis rule.
|
|
80
|
+
- Cost figures from provider usage records: before pricing, map every provider's token fields onto one schema — uncached input, cache read, cache write, output. Some providers report input as a total that already includes cached tokens: treating that total as uncached input and then adding the cache-read field again counts the cached portion twice, while charging the inclusive total once at the full rate misprices that portion instead. Other providers exclude cached tokens from the input field. When a provider reports or prices cache writes separately, keep them in their own field. Confirm each provider's field meaning against its own usage documentation or a known sample, never by analogy with another provider, and derive the cache hit rate from the normalized fields.
|
|
80
81
|
- 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.
|
|
81
82
|
- 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.
|
|
82
83
|
- Sandbox, replay, or re-adjudication runs on production-derived config: enumerate every outbound channel the stage can reach — publish, upload, notify, external write — and disable or redirect each one before the run, proving each disarm fires as you would prove a path guard; a guard on the input or target path alone leaves egress armed. Fingerprint every external destination before the run and diff it after, so an escaped write is caught by the run rather than by a recipient.
|
|
@@ -151,6 +152,11 @@ produce a green with no evidence behind it:
|
|
|
151
152
|
- **The suspiciously fast or empty run.** When a check goes green unexpectedly quickly, or reports
|
|
152
153
|
nothing at all, dump what it actually ran over before believing it. A harness that crashed early
|
|
153
154
|
and one that found nothing produce the same exit code.
|
|
155
|
+
- **The verdict that ran before its checks.** If a runner computes or prints its overall verdict
|
|
156
|
+
before all checks finish, later failures cannot change it. Accumulate one failure count across
|
|
157
|
+
every check, then compute the verdict and exit status once, after the last check. Read a
|
|
158
|
+
multi-check run from that final count and an exit status verified to derive from it — never from
|
|
159
|
+
`tail` or collapsed last lines, which hide failures printed earlier.
|
|
154
160
|
- **The control that failed by crashing.** A negative control is evidence only when it fails
|
|
155
161
|
through the assertion it names: a traceback and a caught violation share an exit code, and an
|
|
156
162
|
early crash can pre-empt every control after it. Treat each traceback in a control run as a
|
|
@@ -173,7 +179,10 @@ produce a green with no evidence behind it:
|
|
|
173
179
|
- **The mutant that never ran.** A mutation verdict counts only if the mutant is valid: it
|
|
174
180
|
compiled, sits on a path the exercised test traverses, and changes the guarded behavior, not
|
|
175
181
|
healed downstream or coinciding with a default. The runner must report build failure,
|
|
176
|
-
unreachable, and
|
|
182
|
+
unreachable, equivalent, and timed out distinctly from KILLED and SURVIVED, and halt on a moved
|
|
183
|
+
anchor. A timeout is not a kill: it moves with machine load, so set the limit well above the
|
|
184
|
+
unmutated suite's runtime and accept a verdict only when repeated runs agree on which mutants
|
|
185
|
+
timed out.
|
|
177
186
|
More tests red than the mutation should touch indicts it; classify a survivor (rebuild,
|
|
178
187
|
discard, genuine gap) before writing a test. **Equivalent is a verdict about the probe as
|
|
179
188
|
much as the mutant**: a probe that is dead or returns a constant reports every mutant as
|
|
@@ -10,9 +10,13 @@ import sys
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def main() -> int:
|
|
13
|
+
# A Windows PowerShell 5.1 caller may prefix piped input with a UTF-8 BOM.
|
|
14
|
+
for stream, encoding in ((sys.stdin, "utf-8-sig"), (sys.stdout, "utf-8"), (sys.stderr, "utf-8")):
|
|
15
|
+
if hasattr(stream, "reconfigure"):
|
|
16
|
+
stream.reconfigure(encoding=encoding, errors="strict")
|
|
13
17
|
root = Path(__file__).resolve().parents[1]
|
|
14
18
|
expected = {"SKILL.md", "agents/openai.yaml", "scripts/bridge.py",
|
|
15
|
-
"scripts/instructions_transaction.py", "bridge.json"}
|
|
19
|
+
"scripts/instructions_transaction.py", "scripts/host_platform.py", "bridge.json"}
|
|
16
20
|
try:
|
|
17
21
|
paths = list(root.rglob("*"))
|
|
18
22
|
if any(path.is_symlink() for path in paths):
|
|
@@ -32,6 +36,8 @@ def main() -> int:
|
|
|
32
36
|
if not isinstance(config.get(key), str) or not Path(config[key]).is_absolute():
|
|
33
37
|
raise RuntimeError("registered bridge needs absolute private roots")
|
|
34
38
|
sys.dont_write_bytecode = True
|
|
39
|
+
sys.path.insert(0, str(root / "scripts"))
|
|
40
|
+
from host_platform import cli_argv, python_argv, runtime_environment
|
|
35
41
|
from instructions_transaction import confirmed_release, guard_pending, reject_symlink_ancestors
|
|
36
42
|
state = Path(config["state_root"])
|
|
37
43
|
reject_symlink_ancestors(state)
|
|
@@ -52,27 +58,38 @@ def main() -> int:
|
|
|
52
58
|
if not isinstance(value, str) or (value and not Path(value).is_absolute()):
|
|
53
59
|
raise RuntimeError("registered bridge has an invalid managed runtime path")
|
|
54
60
|
env["AGENT_LAUNCH_VENV"] = value
|
|
61
|
+
if "python_binding" in config:
|
|
62
|
+
bound = config["python_binding"]
|
|
63
|
+
if not isinstance(bound, dict):
|
|
64
|
+
raise RuntimeError('registered Python binding must be an object')
|
|
65
|
+
env.update(runtime_environment(bound))
|
|
55
66
|
args = sys.argv[1:]
|
|
56
67
|
command = args[0] if args else "session"
|
|
57
68
|
tail = args[1:] if args else ["status", "--json"]
|
|
58
69
|
if command == "bootstrap":
|
|
59
|
-
|
|
70
|
+
text = (release / "compose/bootstrap/SKILL.md").read_text(encoding="utf-8")
|
|
71
|
+
if os.name == "nt":
|
|
72
|
+
prefix = "& '" + sys.executable.replace("'", "''") + "' '" + str(root / "scripts/bridge.py").replace("'", "''") + "' instructions"
|
|
73
|
+
text = text.replace('bash "$AGENT_BIOS_PACKAGE_ROOT/install.sh" instructions', prefix).replace('agent-bios instructions', prefix)
|
|
74
|
+
print(text, end="")
|
|
60
75
|
return 0
|
|
61
76
|
if command == "tui":
|
|
62
77
|
operation = "instructions" if (release / "compose/instructions.py").is_file() else "corpus"
|
|
63
|
-
argv =
|
|
78
|
+
argv = python_argv(release / 'compose/native_cli.py', operation, *tail, environ=env) if os.name == 'nt' else cli_argv(release, operation, *tail)
|
|
64
79
|
elif command in {"setup", "instructions", "corpus", "import", "learn"}:
|
|
65
80
|
if command == "instructions" and not (release / "compose/instructions.py").is_file():
|
|
66
81
|
command = "corpus"
|
|
67
|
-
argv =
|
|
82
|
+
argv = python_argv(release / 'compose/native_cli.py', command, *tail, environ=env) if os.name == 'nt' else cli_argv(release, command, *tail)
|
|
68
83
|
elif command == "session":
|
|
69
84
|
manager = release / "compose/instructions_app.py"
|
|
70
85
|
if not manager.is_file():
|
|
71
86
|
manager = release / "compose/corpus_app.py"
|
|
72
|
-
argv =
|
|
73
|
-
"--state-dir", config["state_root"], "--user-dir", config["user_root"], "session", *tail]
|
|
87
|
+
argv = python_argv(manager, "--repo", str(release), "--state-dir", config["state_root"], "--user-dir", config["user_root"], "session", *tail, environ=env)
|
|
74
88
|
else:
|
|
75
89
|
raise RuntimeError("bridge supports setup, session, instructions, import, learn, bootstrap and tui")
|
|
90
|
+
if os.name == "nt":
|
|
91
|
+
import subprocess
|
|
92
|
+
return subprocess.call(argv, env=env)
|
|
76
93
|
os.execve(argv[0], argv, env)
|
|
77
94
|
except (OSError, RuntimeError, ValueError, KeyError) as exc:
|
|
78
95
|
print(f"agent-bios app bridge: {exc}", file=sys.stderr)
|