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/01-introduction-and-goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ What it is not:
| 06 | Judge | Scores each trial blind, three times, on an anchored rubric, and checks every quoted line | [ch. 8.6.6](08-crosscutting-concepts.md), [ch. 8.6.7](08-crosscutting-concepts.md) |
| 07 | Check the judge | Builds damaged and improved trees that a working judge must tell apart | [ch. 8.6.7](08-crosscutting-concepts.md) |
| 08 | Report | Pairs trials, computes intervals and verdicts, owes or refuses the escalation, and prints the report | section 1.4, [ch. 8.7](08-crosscutting-concepts.md) |
| 09 | Archive | Copies a round's raw data to a private store, restores it and checks the figures match | Ch. 9 |
| 09 | Archive | Copies a round's raw data to a private store, restores it and checks the figures match | [ADR-019](../decisions/019-archive-before-the-report.md) |
| 10 | Reuse | Copies an earlier round's trials into a new run root, with their readings | [ch. 4.2](04-solution-strategy.md) |

## 1.2 Quality goals
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/06-runtime-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ restoring it, then the report.
| 1 | The context file, the vendored templates and every condition marker are removed. A bundle that still names its arm is not judged | [ch. 8.6.6](08-crosscutting-concepts.md) |
| 2-3 | The rubric is a JSON Schema, so a score is read by machine. Each primary row has anchors at 1, 3 and 5 in this domain's terms | [ch. 8.6.6](08-crosscutting-concepts.md) |
| 4 | Every quoted line is looked up in its bundle. A judge that never opened the code still returns plausible numbers | [ch. 8.6.7](08-crosscutting-concepts.md) |
| 5 | Run records, tarballs without their environments, transcripts and every reading go to a fresh directory of `braboj/tariff-runs` | Ch. 9 |
| 6-7 | The archive is restored into a temporary root and the report's table, contrasts, withdrawals, escalation, reach scan and lost trials are computed from both. Any difference fails | Ch. 9 |
| 5 | Run records, tarballs without their environments, transcripts and every reading go to a fresh directory of `braboj/tariff-runs` | [ADR-019](../decisions/019-archive-before-the-report.md) |
| 6-7 | The archive is restored into a temporary root and the report's table, contrasts, withdrawals, escalation, reach scan and lost trials are computed from both. Any difference fails | [ADR-019](../decisions/019-archive-before-the-report.md) |
| 8 | K paired differences per contrast, a 10,000-resample bootstrap interval at a recorded seed, the registered verdict rule, and whether the one escalation to K = 5 is owed | [ch. 8.1](08-crosscutting-concepts.md) |
| 9 | Without the stamp, or once any reading changed since it was written, the report refuses to write under `docs/audits/` | Ch. 9 |
| 9 | Without the stamp, or once any reading changed since it was written, the report refuses to write under `docs/audits/` | [ADR-019](../decisions/019-archive-before-the-report.md) |
| 10 | The finding table first, then the record behind every cell | [ch. 8.7.3](08-crosscutting-concepts.md) |

### 6.4.1 Judging notes
Expand Down
156 changes: 79 additions & 77 deletions docs/architecture/09-architecture-decisions.md

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions docs/decisions/001-the-app-under-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: "001"
status: Accepted
date: 2026-09-12
category: design
supersedes: []
superseded_by: []
---

# ADR-001: The app under test

## Context

Every trial builds the same app from the same spec, then extends it in a change
task, so the app decides what the benchmark can see. It needs an object model a
design can get right or wrong, room to extend, and tests that tell a correct
answer from a near one.

## Decision

The app every trial builds is `tariff`, a small invoicing app on Flask,
rendered on the server with Jinja and HTMX.

## Rationale

- `tariff` has a natural object model, two extension axes and sharp decimal
tests.
- Server-rendered Jinja with HTMX is Flask's home ground.

## Alternatives considered

The apps `tariff` was weighed against. The decision named `tariff`'s
strengths, not a reason against each of the others:

| # | Alternative | Outcome |
| - | ----------- | ------- |
| A | `tariff` | Chosen |
| B | `logsift` | Not chosen as the app under test |
| C | `flowkit` | Not chosen as the app under test |
| D | `ledger` | Not chosen as the app under test |
| E | `convert` | Not chosen as the app under test |

## History

Every change to this decision, oldest first:

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | The app is `tariff`, chosen over `logsift`, `flowkit`, `ledger` and `convert` | Natural object model, two extension axes, sharp decimal tests | solid-ai-templates#1712 |
| 2026-09-12 | Flask stays | Server-rendered Jinja with HTMX is its home ground | solid-ai-templates#1705 |
49 changes: 49 additions & 0 deletions docs/decisions/002-the-arms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
id: "002"
status: Accepted
date: 2026-09-12
category: design
supersedes: []
superseded_by: []
---

# ADR-002: The arms

## Context

An arm is one setting of the context-file knob. Comparing a generated file with
the bare agent alone cannot tell the templates' effect from the effect of
having any file at all. Round 1's reading added a second question: whether the
generated file is too long to add quality.

## Decision

Beside the bare agent and the generated file, the arms have included a
hand-written file and, from round 2, a `short` generated file held to the same
length and the hybrid model, and `short`'s instruction asks the model to
measure every line against the width before answering.

## Rationale

- Only the hand-written arm separates the templates from having any file.
- The owner read round 1 as saying the generated file is too long to add
quality and that a short one can, so length is held fixed and the
hybrid model added.
- Refusing a `short` generation over the width and retrying until one passes
would select the tersest sample, and dropping the width lets a line carry a
paragraph; asking the model to measure every line does neither.

## History

Every change to this decision, oldest first:

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | The hand-written arm runs | Only it separates the templates from having any file | solid-ai-templates#1705 |
| 2026-09-17 | Round 2 holds length fixed and adds the hybrid model | Owner's reading of round 1: the generated file is too long to add quality, and a short one can[^context] | solid-ai-templates#1795 |
| 2026-09-26 | `short`'s instruction asks the model to measure every line against the width before answering | On the round-3 brief two generations in a row were refused, with 1 and then 9 lines over 88 characters; retrying until one passed would select the tersest sample, and dropping the width lets a line carry a paragraph | solid-ai-templates#1767 |

[^context]: This agrees with Anthropic's guidance on context engineering, which
asks for the smallest set of high-signal tokens: [Effective context
engineering for AI
agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents).
64 changes: 64 additions & 0 deletions docs/decisions/003-k-blocks-and-escalation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
id: "003"
status: Accepted
date: 2026-09-12
category: measurement
supersedes: []
superseded_by: []
---

# ADR-003: K, blocks and escalation

## Context

K is the number of blocks a round runs, so the number of trials per arm. Each
block runs every arm once, and a contrast's interval is computed on its K
paired differences. Too few blocks and the interval decides nothing; adding
blocks until an effect turns significant is sampling to significance.

## Decision

A round fixes K before its first trial, at K = 15 with no escalation from
round 5, while a round registered at K = 3 escalates at most once, to K = 5, on
an effect in either direction.

## Rationale

- Three is the smallest set an interval can be computed on, and the bound on
escalation stops sampling to significance.
- An escalation owed only to a favourable effect would lean toward "better".
- Run on round 3's per-trial noise, the report's rules decide almost nothing at
K = 3: H1 is supported in 29 % of rounds when true, and a chance "worse"
turns up in 36 %. At K = 15 those are 73 % and 12 %.
- On round 4's noise, blocks B and C would contradict block A by chance at any
affordable K, so round 5 runs block A alone.

## Design

The rules a round's K follows:

| # | Rule | In practice |
| - | ---- | ----------- |
| 1 | K is registered | Fixed by the round's registration before its first trial |
| 2 | Escalation | Only a round registered at K = 3: one step to K = 5, owed by an effect in either direction on any contrast; a row with no interval triggers nothing |
| 3 | Block order | Each block starts one arm later than the last |
| 4 | One lettered block | Round 5 runs block A alone; blocks B and C wait for a later round |

## Consequences

What the history of this decision left behind:

| Consequence | Effect |
| ----------- | ------ |
| Round 3 stays at K = 3 | Its K = 5 escalation is recorded as unrunnable, since its run root no longer exists |

## History

Every change to this decision, oldest first:

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | K = 3, one bounded escalation to 5 | The smallest set an interval can be computed on; the bound stops sampling to significance | solid-ai-templates#1705 |
| 2026-09-15 | The escalation reads the effect in either direction, on any contrast; a row with no interval triggers nothing | An escalation owed only to a favourable effect would lean toward "better" | — |
| 2026-10-15 | Round 3's K = 5 escalation is recorded as unrunnable, and its report stays at K = 3 | The escalation adds blocks 4 and 5 to round 3's root, which no longer exists; re-running the whole round would not reproduce the three blocks its report read | solid-ai-templates#1767 |
| 2026-10-27 | Round 5 runs block A alone, at K = 15 with no escalation, each block starting one arm later; adherence is held within 8 pp, and H2 reads the mean over pairs of trials. Blocks B and C wait for a later round | The report's rules, run on round 3's per-trial noise, decide almost nothing at K = 3: H1 is supported in 29 % of rounds when true, and a chance "worse" turns up in 36 %. At K = 15 those are 73 % and 12 %. On round 4's noise, B and C would contradict block A by chance at any affordable K | — |
41 changes: 41 additions & 0 deletions docs/decisions/004-the-builder-models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: "004"
status: Accepted
date: 2026-09-12
category: design
supersedes: []
superseded_by: []
---

# ADR-004: The builder models

## Context

The model a trial's agent runs on sets the ceiling every arm works under. A
model far stronger than an adopter's would leave the context file little to
add, and a model from the judge's vendor could be favoured by that judge.

## Decision

Each round names its builder models in its registration, and none comes from
the vendor of the rounds' judge.

## Rationale

- The first choice was what a typical adopter runs, `claude-sonnet-5` at effort
`high`, since a stronger model's ceiling would hide the effect.
- The models are a knob a round sets, not a fixed list.
- A builder from the judge's vendor would bring back the self-preference the
cross-check once answered, and the cross-check no longer runs
([ADR-005](005-the-judge.md)).

## History

Every change to this decision, oldest first. The 2026-09-12 row is the builder
half of that day's decision on models; its judge half is in
[ADR-005](005-the-judge.md):

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | Generator `claude-sonnet-5` at effort `high` | What a typical adopter runs; a stronger model's ceiling would hide the effect | solid-ai-templates#1711 |
| 2026-10-27 | Each round names its builder models in its registration, and none comes from the vendor of the rounds' judge | The models are a knob a round sets, not a fixed list. A builder from the judge's vendor would bring back the self-preference the cross-check once answered, which no longer runs | — |
57 changes: 57 additions & 0 deletions docs/decisions/005-the-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
id: "005"
status: Accepted
date: 2026-09-12
category: judge
supersedes: []
superseded_by: []
---

# ADR-005: The judge

## Context

A judge model scores each blind bundle on the rubric's rows. Its vendor
matters: a judge sharing a vendor with the builder could favour the templates'
style in every arm. Its plan matters too: a round needs three judgings per
trial, and a plan that allows fewer cannot judge a round.

## Decision

The rounds' judge is `gpt-6-astra` through `codex exec` at effort `high`,
alone, three times per trial, with no cross-check.

## Rationale

- A judge from another vendor than the builder answers the self-preference
concern; with a judge from another vendor than every round-5 builder
([ADR-004](004-the-builder-models.md)), that concern is gone.
- The owner's OpenAI plan is raised to cover a round's judgings, which in
rounds 3 and 4 it could not.
- A second judge could only withhold verdicts.

## Design

The cross-check that ran in round 3 and is dropped from round 5, kept for
reading the rounds that used it:

| # | Rule | In practice |
| - | ---- | ----------- |
| 1 | Never averaged | A second judge's scores are never averaged with the rounds' judge |
| 2 | Whole blocks | The cross-check reads whole blocks and reports agreement per judge row |
| 3 | Opposite directions | It withholds a verdict only where the two judges read opposite directions |

## History

Every change to this decision, oldest first. The 2026-09-12 row is the judge
half of that day's decision on models; its builder half is in
[ADR-004](004-the-builder-models.md):

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | Judge `gpt-6-astra` through `codex exec`, effort set explicitly | A different vendor judges | solid-ai-templates#1711 |
| 2026-09-19 | A second judge, Claude, reads the control fixture only | A second vendor's reading of the same trees; never averaged with the rounds' judge | solid-ai-templates#1831 |
| 2026-09-25 | The rounds' judge is `claude-opus-5-5`; `gpt-6-astra` reads a sample as a cross-check | gpt-6-astra's plan allows about thirty judgings a week and a round needs three times as many; Opus 5.5 runs on capacity the owner already pays for | solid-ai-templates#1767 |
| 2026-10-15 | Round 4 is judged by `claude-opus-5-5` alone, without the cross-check | The owner keeps `gpt-6-astra`'s weekly plan free; round 4's thirty build trials would take all of it. The same-vendor caveat round 3 carried stands for round 4 | solid-ai-templates#1903 |
| 2026-10-15 | The cross-check reads whole blocks, reports agreement per judge row, and withholds a verdict only where the two judges read opposite directions | A shared vendor could favour the templates' style in every arm; opposite signs is the disagreement a verdict cannot survive, and a missed confirmation is what the interval already weighs | solid-ai-templates#1903 |
| 2026-10-27 | Round 5 is judged by `gpt-6-astra` through `codex exec` at effort `high` alone, three times per trial, with no cross-check | The owner's OpenAI plan is raised to cover a round's judgings. With a judge from another vendor than every round-5 builder, the same-vendor concern the cross-check answered is gone, and a second judge could only withhold verdicts | — |
37 changes: 37 additions & 0 deletions docs/decisions/006-the-hidden-suite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: "006"
status: Accepted
date: 2026-09-12
category: measurement
supersedes: []
superseded_by: []
---

# ADR-006: The hidden suite

## Context

The hidden suite is the set of acceptance tests every trial is graded by. A
trial that could find the suite would measure the suite, and a suite shaped by
the trials it grades would grade what they happened to build.

## Decision

The hidden suite lives in the private `braboj/tariff-hidden-suite` and is
written and validated before any trial.

## Rationale

- This repository is public, so a suite here is one search away from a future
trial.
- Written afterwards, the suite would be shaped by the first outputs
([ch. 10.6](../architecture/10-quality-requirements.md)).

## History

Every change to this decision, oldest first:

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | The hidden suite lives in the private `braboj/tariff-hidden-suite` | This repository is public, so a suite here is one search away from a future trial | solid-ai-templates#1705 |
| 2026-09-12 | The hidden suite is written and validated before any trial | Written afterwards, it would be shaped by the first outputs ([ch. 10.6](../architecture/10-quality-requirements.md)) | solid-ai-templates#1714, solid-ai-templates#1715 |
50 changes: 50 additions & 0 deletions docs/decisions/007-the-baseline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: "007"
status: Accepted
date: 2026-09-12
category: design
supersedes: []
superseded_by: []
---

# ADR-007: The baseline

## Context

The benchmark compares a release of the templates with what came before it. The
v3.0 split moves templates, so a baseline taken after it could not show what
the move changed. A later question is how a template change is measured at all,
once a contrast pairing trials from different rounds gets no verdict
([ADR-015](015-contrasts-and-verdicts.md)).

## Decision

The baseline runs against the templates at `v2.90.0`, before the v3.0 split,
and a template change runs the baseline and the candidate head to head in the
candidate's round, with one contrast, `candidate − baseline`, and no `none`
arm.

## Rationale

- [ch. 4.2](../architecture/04-solution-strategy.md)'s comparison needs a
baseline older than the move.
- A contrast pairing trials from different rounds gets no verdict, so round 3
as the baseline could decide nothing.
- Two arms answer "is the trim free" at the least cost.

## Consequences

What the head-to-head rule changes for earlier rounds:

| Consequence | Effect |
| ----------- | ------ |
| Round 3 is a reference | It stays a reference without a verdict |

## History

Every change to this decision, oldest first:

| Date | Change | Why | Issue |
| ---- | ------ | --- | ----- |
| 2026-09-12 | The baseline runs against `v2.90.0`, before the v3.0 split moves any template | [ch. 4.2](../architecture/04-solution-strategy.md)'s comparison needs a baseline older than the move | solid-ai-templates#1705 |
| 2026-10-28 | A template change runs the baseline and the candidate head to head in the candidate's round, with one contrast, `candidate − baseline`, and no `none` arm; round 3 stays a reference without a verdict | A contrast pairing trials from different rounds gets no verdict, so round 3 as the baseline could decide nothing. Two arms answer "is the trim free" at the least cost | — |
Loading
Loading