Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/architecture/05-building-block-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependency with its keyword.

| Block | Responsibility | Reads | Writes |
| ----- | -------------- | ----- | ------ |
| `generate_arm.py` | Makes one arm's file once: fixed text, one non-interactive generation from `agents.md`, under a line budget where the arm has one, or the emitter. Scans prompt and output for leaks, and refuses a file over its budget | `brief.txt`, the templates source | `arms/<arm>/CLAUDE.md`, `generation.json` |
| `generate_arm.py` | Builds one arm's file by script, with no model call: fixed text, the templates' emitter, its skills apart or inlined, or a map of the chain's topics. Scans the output for leaks and named tools; its self-test rebuilds every committed arm and fails on any difference | `brief.txt`, the templates source | `arms/<arm>/CLAUDE.md`, `generation.json` |
| `harness.py` | Prepares each workspace, runs the agent in isolation, catches reach, freezes the result, keeps the run record current | The specs, the arm files, the change prompt | The run root |
| `reuse.py` | Copies an earlier round's trials and readings into a new root, with their tool lock | An earlier root | The run root, the scoring area |
| `progress.py` | Watches a run: one bar per arm, its voided tries, its cost and the trial running; then its scoring: one bar per arm, the security readings and the trial being scored; then its judging: one bar per arm of judgings out of those owed, the failures still owed and the blind label in hand. Redrawn every 30 s. Read-only | The run records, the scoring area | The console |
Expand Down
1 change: 1 addition & 0 deletions docs/architecture/09-architecture-decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ told.
| [ADR-004](../decisions/004-the-builder-models.md) | Each round names its builder models in its registration, and none comes from the vendor of the rounds' judge | Accepted |
| [ADR-007](../decisions/007-the-baseline.md) | The baseline runs against `v2.90.0`, and a template change runs baseline and candidate head to head in one round | Accepted |
| [ADR-008](../decisions/008-the-brief-and-the-build-prompt.md) | The brief names the extension axes and the personal data, and the prompt tells every arm the spec is the approved plan and nobody will answer | Accepted |
| [ADR-026](../decisions/026-every-arm-is-built-by-a-script.md) | From round 6 every arm is built by a script with no model call, `inline` by the emitter's `--inline-skills`; `hybrid`, `short` and `hand` run no more | Accepted |

## 9.2 What a trial is measured on

Expand Down
7 changes: 4 additions & 3 deletions docs/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,15 @@ when:
| ID | Kind | Checked by |
| -- | ---- | ---------- |
| FR-13-01 | Self-test | `harness.py` "the record is written as every trial starts and ends"<br>`harness.py` "every trial records the CLI's version, read as it starts" |
| FR-13-02 | Self-test | `generate_arm.py` "every generated arm's file has its generation record beside it" |
| FR-13-02 | Self-test | `generate_arm.py` "every built arm's file has its generation record beside it"<br>`report.py` "a pilot arm no script builds keeps its record for the report, and its vendored templates" |
| FR-13-03 | Self-test | `archive.py` "readings, judgings, map and lock come; bundles do not"<br>`archive.py` "the original tarball's hash is recorded"<br>`archive.py` "the revisions are recorded"<br>`archive.py` "a reading changed in the archive fails the verify" |
| FR-13-04 | Self-test | `archive.py` "a reading changed after the stamp is a problem"<br>`archive.py` "the report refuses docs/reports/ without a current stamp"<br>`report.py` "a report into any docs/reports needs the stamp" |
| FR-13-05 | Self-test | `archive.py` "the restored root reads as the original does"<br>`archive.py` "a restored record points at the restored tarball and void"<br>`archive.py` "a restored transcript keeps its time" |
| FR-13-06 | Self-test | `generate_arm.py` "the two map arms name the same moments in the chain's order"<br>`generate_arm.py` "the reading map names every template of the chain once, under docs/solid-ai-templates/"<br>`generate_arm.py` "each template skill is its template verbatim, named by the manifest"<br>`generate_arm.py` "a chain file the manifest does not describe is refused" |
| FR-13-07 | Self-test | `generate_arm.py` "every fixed-text root opens with the brief, verbatim"<br>`generate_arm.py` "the brief and the facts name the stack and no tooling" |
| FR-13-08 | Self-test | `generate_arm.py` "a generated file naming a tool is refused, and the prompt forbids one" |
| FR-13-07 | Self-test | `generate_arm.py` "every built root opens with the brief, verbatim, the emitted ones too"<br>`generate_arm.py` "every committed arm's root opens with the brief, verbatim"<br>`generate_arm.py` "the brief and the facts name the stack and no tooling" |
| FR-13-08 | Self-test | `generate_arm.py` "a built file naming a tool is refused" |
| FR-13-09 | Self-test | `report.py` "with no --out-dir it lands in this repository's docs/reports/, needing the stamp but no templates source" |
| FR-13-10 | Self-test | `generate_arm.py` "every committed arm is what the script builds at its recorded ref, byte for byte, the same twice" |

## 14 One run at a time

Expand Down
82 changes: 82 additions & 0 deletions docs/decisions/026-every-arm-is-built-by-a-script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
id: "026"
status: Accepted
date: 2026-11-15
category: arms
supersedes: []
superseded_by: []
---

# ADR-026: From round 6, every arm is built by a script

## Context

Through round 5e, three arms were written: `inline`, `hybrid` and `short`
were one model generation each, and `hand` was a person's file. A
generation run again gives a different file, so the arm under one name
changes: round 5e's `hybrid` was 511 lines, and the one regenerated for
round 6 was 221. A result then speaks for one draw of the method, not for
the method, and two rounds of one arm do not compare.

The templates' own emitter, `resolve_chain.py --emit`, already builds a
root file and task skills from a chain by placing each section by its load,
copying the rule text unchanged; `--inline-skills` puts the skills in the
root. It builds no hybrid file: the templates hold that emitted files name
no template file (their FR-06-07), and that no rule is left to a reference
alone, since nothing loads a referenced file (their ADR-058). Round 5e bore
that out: `hybrid` read 0.1 of the 13 templates it pointed to, so it ran on
the rules it inlined, a slightly shorter `inline`.

## Decision

From round 6 every arm a round runs is built by `generate_arm.py` with no
model call, and the same ref gives the same bytes; `inline` is what the
emitter builds with `--inline-skills`, and `hybrid`, `short` and `hand` run
no more.

## Rationale

- An arm that is the same file on every build is a method, not a sample of
one; a round's result then speaks for it, and two rounds compare.
- The emitter is the templates' own build, so the arm is upstream's output,
as the benchmark measures upstream only.
- `hybrid` has no build upstream that keeps the templates' rules, and its
references went unread, so a scripted stand-in would measure the
benchmark's choices rather than the templates'.

## Design

| # | Rule | In practice |
| - | ---- | ----------- |
| 1 | No model writes an arm | `generate_arm.py` has no model path; every kind is fixed text, the emitter or a map |
| 2 | `inline` is the emitter's single file | `resolve_chain.py --emit --inline-skills`: every adopted rule in the root, a section a check enforces cut to its command and pass condition, as the emitter cuts it for every model |
| 3 | `skills` is the emitter's root and skills | `resolve_chain.py --emit`, as before |
| 4 | Every root states the brief | The emitter's description slot takes the brief whole, so an emitted root opens as every other arm's does |
| 5 | A committed arm is what the script builds | The self-test rebuilds every committed arm at its recorded ref and fails on any byte of difference, and builds one twice |
| 6 | The pilot's written arms stay as they are | `hand`, `short` and `hybrid` keep their files for the pilot rounds' reports; no script rebuilds them, and no round from 6 runs them |

## Alternatives considered

| # | Alternative | Outcome |
| - | ----------- | ------- |
| A | Every arm built by a script, `hybrid` dropped | Chosen |
| B | Several generations per written arm, trials spread across them | Why not: the arm stays a sample, and the spread between files has to be paid for in trials |
| C | A hybrid built by the benchmark: the emitter's root, the skills table cut, the chain listed | Why not: how the benchmark trims and joins shapes the arm, and the templates' rules forbid the result |
| D | Hybrid and inline modes added to the templates' emitter first | Why not: a hybrid that names template files breaks the templates' FR-06-07 and ADR-058; `--inline-skills` is already the inline build |

## Consequences

| Consequence | Effect |
| ----------- | ------ |
| `inline` changes | The emitter's file is 1,778 lines at `9abed019`, against the 552 a model wrote for round 5e: a new arm, with no round-5e reading |
| `skills` changes | Its root now carries the brief's paragraphs on personal data and on boundaries, which it lacked; a new arm too |
| Round 6's arms | `none`, `reference`, `inline`, `skills`, `lazyref`, `lazyskills`, and those #169 adds |
| The report still reads arm files from the checkout | The pilot arms' files stay so a pilot report can count their lines, until #171 |

## History

Every change to this decision, oldest first. `#N` is in this repository.

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-11-15 | Every arm is built by a script; `inline` from the emitter's `--inline-skills`; `hybrid`, `short` and `hand` run no more | A written arm changes with every writing; the owner kept only arms a script builds | #167 |
37 changes: 20 additions & 17 deletions docs/journeys/prepare/generate-the-arms.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
# Generate the arms

The operator prepares round 5, whose context files must each be made once,
before block A, from one chain of the templates.
The operator prepares a round, whose context files are each built by
script, before block A, from one chain of the templates.

Target:

- Each arm's file made once, with clean leak scans and its
`generation.json` committed beside it
- Each arm's file built, with a clean leak scan and its `generation.json`
committed beside it
([ch. 5.5.3](../../architecture/05-building-block-view.md))

Assumptions:

- A templates clone at the round's registered ref, named with `--templates`
- Round 5's four context-file arms: `reference` as fixed text, `inline` and
`hybrid` as one generation each, `skills` from the emitter
- A templates clone holding the round's registered ref, named with
`--templates`
- The arms, all built with no model call
([ADR-026](../../decisions/026-every-arm-is-built-by-a-script.md)):
`reference`, `lazyref` and `lazyskills` as fixed text, `inline` and
`skills` from the templates' emitter
- All times are estimates

## Steps

| # | Who | Step | Time | Notes |
| - | --- | ---- | ---- | ----- |
| 1 | Operator | Runs the generator's self test | 1 min | Proves the leak scan, the reference text and the fact filling can fail |
| 2 | Operator | Dry-runs each model arm: builds and scans the prompt without a model | 1 min each | The cheap check after any change to the brief or the chain |
| 3 | Generator | Makes each arm, at a root outside this repository | 5 to 10 min each | Nobody answers questions, and nobody trims a result |
| 4 | Operator | Reads each `generation.json`: ref, chain, commit, how the file was made, its size, both scans | 5 min | The report reads it from there |
| 1 | Operator | Runs the generator's self test | 2 min | Proves the scans and the fact filling can fail, and rebuilds every committed arm |
| 2 | Operator | Dry-runs each arm at the round's ref | 1 min each | Builds and scans the files, writes nothing under `arms/` |
| 3 | Generator | Builds each arm, at a root outside this repository | 1 min each | The same ref gives the same bytes |
| 4 | Operator | Reads each `generation.json`: ref, chain, commit, how the file was built, its size, both scans | 5 min | The report reads it from there |
| 5 | Operator | Commits the files and their records | 5 min | An existing file is never overwritten without `--replace` |
| | | Total | about 40 min | |
| | | Total | about 20 min | |

## Commands

```bash
py tests/efficacy/generate_arm.py --self-test
py tests/efficacy/generate_arm.py --arm inline --root <outside this repository> --dry-run
py tests/efficacy/generate_arm.py --arm inline --root <outside this repository>
py tests/efficacy/generate_arm.py --arm inline --ref <ref> --root <outside this repository> --dry-run
py tests/efficacy/generate_arm.py --arm inline --ref <ref> --root <outside this repository> --replace
```

## Findings

| # | Finding | Status |
| - | ------- | ------ |
| 1 | Retrying a refused generation until one passes would select the tersest sample. The instruction instead asks the model to measure every line before answering | Settled in [ADR-002](../../decisions/002-the-arms.md), 2026-09-26 |
| 2 | The prompt scan is broad and the output scan narrow: a spec-only token in the prompt means the wiring is wrong, and only data nobody could derive counts as an output leak | Settled in [ch. 5.5.4](../../architecture/05-building-block-view.md) |
| 3 | Round 5's `reference` and `skills` arms are made by other means: fixed text, and `resolve_chain.py --emit` | Open in [round 5's registration, 13.4](../../rounds/round-5.md) |
| 1 | A written arm changes with every writing: round 5e's `hybrid` was 511 lines, the one regenerated for round 6 was 221 | Settled in [ADR-026](../../decisions/026-every-arm-is-built-by-a-script.md), 2026-11-15 |
| 2 | The emitted `skills` root lacked the brief's paragraphs on personal data and on boundaries, and no check read an emitted root | Settled in [ADR-026](../../decisions/026-every-arm-is-built-by-a-script.md), rule 4 |
| 3 | The emitter builds no hybrid file, and the templates' rules forbid one that names template files | Settled in [ADR-026](../../decisions/026-every-arm-is-built-by-a-script.md); `hybrid` runs no more |
5 changes: 3 additions & 2 deletions docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@
| FR-13-04 | The benchmark shall refuse to write a report under `docs/reports/` once a reading changed since the archive was verified. | Archive, Report |
| FR-13-05 | The benchmark shall restore an archive so it reads as the original root does, its records pointing at the restored files. | Archive |
| FR-13-06 | The benchmark shall build a map arm's root from the brief, the chain and the templates' manifest alone, the same moments in the same order for both map arms, and each `lazyskills` skill holding one template verbatim. | Arm generator |
| FR-13-07 | The benchmark shall give every arm's root the same project facts: the brief, which names the stack the spec fixes and no tooling. | Arm generator |
| FR-13-08 | The benchmark shall tell a model arm's generation to name no tool, and refuse a generated file that names one. | Arm generator |
| FR-13-07 | The benchmark shall give every arm's root the same project facts: the brief, verbatim under the title, the emitted roots too, which names the stack the spec fixes and no tooling. | Arm generator |
| FR-13-08 | The benchmark shall refuse a built arm file that names a tool. | Arm generator |
| FR-13-09 | The benchmark shall write a round's report, by default, to its own `docs/reports/`, with no templates source named. | Report |
| FR-13-10 | The benchmark shall build every arm a round runs by script, with no model call, and fail its self-test where a committed arm differs from what the script builds at the arm's recorded ref. | Arm generator |

### 14 One run at a time

Expand Down
Loading
Loading