Skip to content

Commit ae23403

Browse files
brabojclaude
andauthored
feat(efficacy): register round 5d and make short from round 5's chain (#90)
* docs(rounds): register round 5d, the hand-written file against round 5c Round 5d runs `hand` at K = 15 and three fresh `none` trials as a drift check, and reuses round 5c's `none`. H4 asks whether a person's file improves on none; H5 whether each templates arm holds against it. The CLI is pinned, because it updated itself in the middle of round 5c. Refs #89 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX * feat(efficacy): generate short5, round 3's short from round 5's chain The generator gains short's budget again, 40 lines of 88 characters, stated in the instruction and refused whole when a file is over it. It makes `short5` from the templates at 9086e0ff in the inline model, in a directory of its own so round 3's `short` keeps its file and record. Round 5d now runs `short5` beside `hand` in every block, so H6, `short5` minus `hand`, compares the templates' content with a person's file at one length, paired. Refs #89 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX * feat(efficacy): make short from round 5's chain, in place of round 3's The templates are measured with one version of the benchmark, and an earlier round is re-run from the benchmark at its own commit, so round 3's `short` need not stay beside the new one. `short` is now generated from the templates at 9086e0ff under the same 40 × 88 budget, and the `short5` name is gone. Refs #89 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX * docs(rounds): the report already computes round 5d's H6 Refs #89 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 70b268e commit ae23403

7 files changed

Lines changed: 367 additions & 131 deletions

File tree

‎docs/architecture/05-building-block-view.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependency with its keyword.
1515

1616
| Block | Responsibility | Reads | Writes |
1717
| ----- | -------------- | ----- | ------ |
18-
| `generate_arm.py` | Makes one arm's file once: fixed text, one non-interactive generation from `agents.md`, or the emitter. Scans prompt and output for leaks | `brief.txt`, the templates source | `arms/<arm>/CLAUDE.md`, `generation.json` |
18+
| `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` |
1919
| `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 |
2020
| `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 |
2121
| `progress.py` | Watches a run: one bar per arm, its voided tries, its cost and the trial running, redrawn every 30 s. Read-only | The run records | The console |
@@ -87,7 +87,7 @@ Every arm starts from an empty git repository holding `SPEC.md`. All but
8787
|---|---|---|---|
8888
| `none` | nothing: the bare agent | — | the baseline every file is compared with |
8989
| `full` | the file the interview generates, inline | none | do the templates help as shipped |
90-
| `short` | the file the interview generates, inline, under a budget | ≤ 40 lines, ≤ 88 characters wide | does a short generated file help |
90+
| `short` | one generation from `agents.md`, inline, under a budget | ≤ 40 lines, ≤ 88 characters wide | does a short generated file help |
9191
| `hybrid` | the file the interview generates in its hybrid model, with the templates vendored into the workspace | none | does the model the owner's projects use help |
9292
| `hand` | a hand-written file | ≤ 40 lines | is the effect the templates, or merely having a file |
9393

‎docs/rounds/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ trial of that round has run. The rules every round shares are in
1111
| [Round 5](round-5.md) | 2026-10-26, amended 2026-10-27, 2026-10-28 and 2026-10-29; stopped after its first start | Which way of delivering the rules gives the best and most consistent code |
1212
| [Round 5b](round-5b.md) | 2026-10-29, after round 5 stopped; stopped after its first start | Round 5's question, with a prompt that tells every arm the spec is the approved plan |
1313
| [Round 5c](round-5c.md) | 2026-10-29, after round 5b stopped | Round 5b's question, with each trial's workspace in a pen of its own |
14+
| [Round 5d](round-5d.md) | 2026-10-31, while round 5c ran | Whether a person's short file does what the templates do, at their length and at its own |
1415

1516
## Reports
1617

@@ -27,3 +28,4 @@ repository existed.
2728
| 5 | Stopped 2026-10-29, after four trials | Context file: how the rules are delivered | — |
2829
| 5b | Stopped 2026-10-29, after four trials | Context file: how the rules are delivered | — |
2930
| 5c | Not run yet | Context file: how the rules are delivered | — |
31+
| 5d | Not run yet | Context file: a hand-written one and a 40-line one, against 5c | — |

‎docs/rounds/round-5d.md‎

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Round 5d registration
2+
3+
Registered on 2026-10-31, while round 5c ran and before any round-5d trial ran.
4+
Round 5c keeps its registration as it was when its first trial ran; this one is
5+
a registration of its own.
6+
7+
## 13d. Round 5d: a person's file and a 40-line file, against round 5c
8+
9+
### 13d.1 What it takes from round 5c
10+
11+
Round 5d runs [round 5c's registration](round-5c.md) as it stood at `07d1641`:
12+
block A, the spec at its registered sha256, `claude-sonnet-5` at effort `high`,
13+
round 5b's prompt, the pen, the judge, the scoring and the code size rows, and
14+
the margins of round 5's H1.
15+
16+
Three things differ: the arms, the order, and a reuse of round 5c's `none`.
17+
18+
### 13d.2 The arms
19+
20+
| Arm | Trials | Where they come from |
21+
| --- | --- | --- |
22+
| `hand` | 15, fresh | `tests/efficacy/arms/hand/CLAUDE.md` as it is at `010ee36` |
23+
| `short` | 15, fresh | `tests/efficacy/arms/short/CLAUDE.md`, made for 5d |
24+
| `none` | 3, fresh | The bare agent, as a check on drift |
25+
| `none`, from 5c | 15, reused | Round 5c's `none-1` to `none-15`, scored and read |
26+
27+
**`hand`** is a person's file, written for round 3's brief.
28+
29+
- 39 lines and 1,376 bytes, sha256
30+
`25459854949f648837ac5ef37fca5d7472923b544dffb694cd40f8b8a53ec748`.
31+
- Kept verbatim. It is not edited for round 5's brief.
32+
33+
**`short`** is round 3's arm made again from round 5's chain.
34+
35+
- One generation by `claude-sonnet-5` at effort `high`, in `agents.md`'s inline
36+
model, from the templates at `9086e0ff`, the brief and round 5's roots, with
37+
no interview: the way `inline` was made.
38+
- Held to round 3's budget: at most 40 lines, none over 88 characters. The
39+
generator refuses a file over either bound rather than trimming it.
40+
- 40 lines and 2,173 bytes, sha256
41+
`8abbcf098312e768e5e01fb6266ec230c13877fa71f40a0bc3ec06e89cd63aea`, with its
42+
generation record beside it.
43+
- It replaces round 3's file, made from round 1's templates. An earlier round
44+
is re-run from the benchmark at its own commit, so its files need not stay.
45+
46+
**The reused `none`** comes with round 5c's tool lock, so both rounds are
47+
measured with one ruler.
48+
49+
Why `hand`: it is the only arm that separates the templates from having a file
50+
at all (the decision of 2026-09-12). Round 5 left it out because each of its
51+
arms is made from the templates at `9086e0ff`, and a person's file is not.
52+
53+
Why `short`: round 5c's templates files are 22 to 57 KB, and `hand` is 1.4 KB,
54+
so `hand` against them changes the content and the size at once. `short` and
55+
`hand` sit within a line of each other, so `short` minus `hand` compares the
56+
content at one length, as round 2's `short` minus `hand` did.
57+
58+
### 13d.3 The order
59+
60+
Two runs, in one run root of round 5d's own:
61+
62+
| Run | Arms | Trials, in order |
63+
| --- | --- | --- |
64+
| 1 | `none`, `hand`, `short`, K = 3 | the rotated order, 9 trials |
65+
| 2 | `hand`, `short`, K = 15, from `short-4` | blocks 4 to 15, 24 trials |
66+
67+
- Run 1 starts `none-1`, `hand-1`, `short-1`, and each block starts one arm
68+
later.
69+
- `hand` and `short` share every block, so `short` minus `hand` is paired.
70+
- The fresh `none` trials share blocks 1 to 3 with them, so they see the same
71+
days as the round's start.
72+
- Drift after block 3 goes unchecked for the contrasts with round 5c. The CLI
73+
is pinned (13d.5), which holds the one source of drift known to have moved.
74+
75+
Why the pin: the Claude CLI updated itself from 2.1.312 to 2.1.314 at 03:13 on
76+
2026-10-30, in the middle of round 5c. Round 5c's interleaving spreads that
77+
across its arms. Round 5d runs days later, so nothing would spread a further
78+
update across the two rounds.
79+
80+
### 13d.4 Hypotheses
81+
82+
A contrast with a round 5c arm is unpaired: they never ran in one block. An
83+
unpaired interval is wider than the paired one round 5 sized K on, so at K = 15
84+
a row is harder to show as held.
85+
86+
**The drift check.** Round 5c's `none` stands in for a `none` run beside the
87+
round's arms.
88+
89+
| | |
90+
| --- | --- |
91+
| Measure | each fresh `none` trial against round 5c's 15 |
92+
| Holds | each trial's primary rows sit within the range of 5c's 15 |
93+
| Fails | H4 and H5 read inconclusive, and the report says why |
94+
95+
**H4, a file at all.** A person's short file improves on no file.
96+
97+
| | |
98+
| --- | --- |
99+
| Contrast | `hand` minus round 5c's `none`, unpaired |
100+
| Primary rows | as round 5's H1 |
101+
| Supported | some primary row is better, and none is worse |
102+
| Refuted | any primary row is worse |
103+
| Otherwise | inconclusive |
104+
105+
**H5, the templates against a person's file.** Each templates arm, `inline`,
106+
`hybrid`, `reference` and `skills`, delivers at least what a person's file
107+
delivers.
108+
109+
| | |
110+
| --- | --- |
111+
| Contrast | each templates arm of round 5c, minus `hand`, unpaired |
112+
| Primary rows | as round 5's H1 |
113+
| Supported, per arm | every primary row is held or better |
114+
| Refuted, per arm | any primary row is worse |
115+
116+
**H6, the templates' content at a person's length.** A 40-line file from the
117+
templates delivers at least what a person's file of the same length delivers.
118+
119+
| | |
120+
| --- | --- |
121+
| Contrast | `short` minus `hand`, paired within the block |
122+
| Primary rows | as round 5's H1 |
123+
| Supported | every primary row is held or better |
124+
| Refuted | any primary row is worse |
125+
126+
**Secondary, no verdict:** every metric of [ch.
127+
8.6](../architecture/08-crosscutting-concepts.md) for `hand` and `short`
128+
against round 5c's `none`; `short` against round 5c's `inline`, the same
129+
generation without the budget; the fresh `none` against round 5c's `none`;
130+
cost, turns, tokens and wall time; and the words each arm puts in context on
131+
every turn, beside each 5c arm's.
132+
133+
### 13d.5 Before the first trial
134+
135+
Done with this registration:
136+
137+
- `generate_arm.py` makes `short` under its budget, and refuses a file over it
138+
- `short` is generated and committed with its record
139+
- the harness reads `short` from its new file
140+
- the report already computes H6's contrast, `short` minus `hand`, paired, as
141+
it did for round 2
142+
143+
The harness and the report still gain, each with a self-test:
144+
145+
- K up to 15 for a run of `hand` and `short`, with round 5's spec check; today
146+
a run with no round-5 arm is capped at K = 5 and its spec is not checked
147+
- the Claude CLI pinned at 2.1.314 for the round, with auto-update off and the
148+
version recorded on every trial
149+
- round 5c's `none` trials read with their scores, judgings, security readings
150+
and tool lock, kept apart from round 5d's `none-1` to `none-3`, whose names
151+
they share
152+
- the unpaired contrasts of H4 and H5, and the drift check
153+
154+
### 13d.6 When it runs
155+
156+
After round 5c's last trial is in, scored and judged. Its 33 trials take about
157+
22 hours at round 5c's pace and spend the plan's limit, so the run waits for
158+
the owner's go.
159+
160+
Nothing in this registration changes once a round-5d trial has run.
Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
1-
# tariff — CLAUDE.md
2-
3-
Owner: Imbra Ltd. Pricing and invoicing web app: catalog, discounts, tax, invoices.
4-
Stack: Python 3.12, Flask 3, Jinja, HTMX, SQLite. Tools: uv, ruff, mypy strict, pytest.
5-
Runs locally; no deployment target; nothing reaches the network.
6-
7-
## Structure
8-
- The pricing engine is a library that imports without Flask; Flask is one caller.
9-
- Flask app uses `create_app()`, blueprints, thin routes; logic lives in services.
10-
- Layout is in README.md; do not duplicate it here.
11-
12-
## Personal data (GDPR)
13-
- Customers hold name, email, postal address; invoices name them.
14-
- Support erasure and export of one customer's data; keep invoice totals intact.
15-
- Never log or print personal data; never put it in fixtures, commits or errors.
16-
- One administrator signs in; CSRF on every state-changing request.
17-
18-
## Code
19-
- Money is integer cents or Decimal, never float; timestamps in UTC.
20-
- Errors raised on purpose derive from one package base error.
21-
- Parameterized SQL only; migrations versioned, never edited once merged.
22-
- HTMX endpoints return partials when `HX-Request` is set; 422 on invalid forms.
23-
- Config from environment, validated at startup; `.env` is never committed.
24-
- Names carry meaning; no debug prints, no commented-out code.
25-
26-
## Quality
27-
- Gates: `ruff check`, `ruff format`, `mypy --strict`, `pytest`; all must pass.
28-
- Test the engine without Flask; use a real SQLite file, not a mock.
29-
- Every public function has type hints and a Google-style docstring.
30-
31-
## Git
32-
- Work on a branch, never on `main`; conventional commit prefixes, subject under 80.
33-
- Update README, CLAUDE.md and docs in the same commit as the change.
34-
35-
## Off-limits without an approved plan
36-
- Auth and session code, migrations, `.env*`, and invoice export formats.
37-
- Propose the change with rollback and test coverage first.
38-
39-
<!-- Generated with solid-ai-templates (github.com/braboj/solid-ai-templates) -->
1+
# tariff
2+
Pricing and invoicing web app for Imbra Ltd: catalog, discounts, tax
3+
jurisdictions, customers, invoices. Python 3.12, Flask 3, Jinja, HTMX,
4+
SQLite, uv. One administrator; runs locally only, no deployment target.
5+
The pricing engine is a library another program may import directly.
6+
- Model: inline
7+
## 1. Project
8+
See README.md for the directory map; place code beside its layer.
9+
```bash
10+
uv run flask run # start the app
11+
uv run ruff check . && uv run ruff format --check . # lint
12+
uv run mypy --strict . && uv run pytest # types + tests
13+
```
14+
## 2. Code conventions
15+
- Work on a branch; never commit to `main`. Commit `uv.lock`, never
16+
`.env`, secrets, or build output.
17+
- Off-limits without approval: auth/session code, migrations, `.env*`.
18+
- Parameterize every SQL query; never interpolate input into SQL.
19+
- Store money as integer minor units or `Decimal`, never `float`.
20+
- Hash the administrator's password with bcrypt, scrypt, or Argon2.
21+
- Regenerate the session ID on login; expire idle sessions; set
22+
`HttpOnly`, `Secure`, `SameSite=Lax` cookies.
23+
- Give every state-changing HTMX/form request a CSRF token.
24+
- Encode all template output for context; never bypass autoescaping.
25+
- Run schema changes through a migration with up/down steps; never
26+
edit the SQLite file by hand.
27+
- Never log a customer's name, email, address, or any secret value.
28+
- Classify customer PII (name, email, postal address); export or erase
29+
it on request: hard delete or anonymize, never soft-delete alone.
30+
- Cover pricing, discount, and tax logic with edge-case unit tests.
31+
## 3. Review process
32+
Review in order: security, correctness, clarity, conventions.
33+
- [ ] No secret or PII value in a committed file or log.
34+
- [ ] Every SQL query parameterized; every migration has up/down.
35+
- [ ] Money uses integer minor units or `Decimal`, never `float`.
36+
## 4. Session protocol
37+
- Approver: the repository owner. Tracking: open, no tracker named.
38+
- Release: a tagged commit on `main` after lint, types, tests pass.
39+
- End of session, run in order: `ruff check .`, `mypy --strict .`,
40+
`pytest`; report any that did not run as not run, never as passed.

0 commit comments

Comments
 (0)