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
9 changes: 8 additions & 1 deletion docs/architecture/06-runtime-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,18 @@ How a trial ends:

Every arm gets one prompt, identical for all:

> Implement the application described in SPEC.md. Done means:
> Implement the application described in SPEC.md. SPEC.md is the
> approved plan, and nobody will answer questions during this run, so
> build it to the end without stopping for approval. Done means:
> `pip install .` succeeds in a clean virtualenv, your own tests pass,
> and every page and route in the spec works end to end against the
> seed fixture. Commit when done.

The second sentence was added for [round 5b](../rounds/round-5b.md). A trial
runs headless, and the templates ask for a plan's approval before implementation
code, so without it a templates arm could end its trial with a plan and nothing
built.

**Isolation.** Each trial runs apart from the machine and from the others:

| What | How |
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 @@ -64,6 +64,7 @@ that mentions the design means the document these chapters replaced.
| 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 | — |
| 2026-10-28 | From round 5, size reads app code's lines and files against a band of 20 %, smallest change 40 %; test lines are reported without a verdict; docs and configuration leave size; committed generated files count as artifacts nobody asked for | A better solution is often a little bigger, with tests and layering. Round 4's source lines missed templates, and its file count was mostly docs, templates and committed bytecode | — |
| 2026-10-29 | A round registers its spec by content, and the harness and the report each refuse a trial built from other content | Each trial recorded the spec's hash but nothing compared it, so an edit during a two-day run would have mixed two specs in one round unseen | — |
| 2026-10-29 | The prompt tells every arm the spec is the approved plan and nobody will answer, and the report refuses a build trial on another prompt. Round 5 stays as registered and runs again as round 5b | Round 5's first start: `inline-1` stopped after its plan, waiting for an approval no headless trial gets. A registration is fixed once a trial has run, so the change is a registration of its own | — |

¹ This agrees with Anthropic's guidance on context engineering, which asks for the
smallest set of high-signal tokens: [Effective context engineering for AI
Expand Down
3 changes: 2 additions & 1 deletion docs/primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ The five arms, the settings of the first knob:
| `skills` | A short root file plus one skill per kind of task, loaded when the task needs it | Does a root file with skills deliver what hybrid does |

[Round 5's registration](rounds/round-5.md) sets the arms and the questions
they answer.
they answer. [Round 5b](rounds/round-5b.md) runs it, with one sentence added
to the prompt.

### 3.3 Specs

Expand Down
6 changes: 4 additions & 2 deletions docs/rounds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ trial of that round has run. The rules every round shares are in
| Round | Registered | Asks |
| ----- | ---------- | ---- |
| [Round 4](round-4.md) | Before its first trial, after round 3 | Does a file supply what a thin spec leaves out, and help a weaker model more |
| [Round 5](round-5.md) | 2026-10-26, amended 2026-10-27, 2026-10-28 and 2026-10-29 | Which way of delivering the rules gives the best and most consistent code |
| [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 |
| [Round 5b](round-5b.md) | 2026-10-29, after round 5 stopped | Round 5's question, with a prompt that tells every arm the spec is the approved plan |

## Reports

Expand All @@ -22,4 +23,5 @@ repository existed.
| 2 | 2026-09-18 | Context file: adds the short and hybrid files | [Report](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-09-18-efficacy.md) |
| 3 | 2026-09-27 | Context file: every arm run fresh | [Report](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-09-27-efficacy.md), [assessment of rounds 1 to 3](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-09-27-efficacy-assessment.md) |
| 4 | 2026-10-17 | Spec: thin, and builder: Haiku 4.5 | [Summary](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-round-4.md), [thin spec](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-efficacy-thin.md), [weaker model](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-efficacy-weaker.md) |
| 5 | Not run yet | Context file: how the rules are delivered | — |
| 5 | Stopped 2026-10-29, after four trials | Context file: how the rules are delivered | — |
| 5b | Not run yet | Context file: how the rules are delivered | — |
52 changes: 52 additions & 0 deletions docs/rounds/round-5b.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Round 5b registration

Registered on 2026-10-29, after round 5's first start was stopped and before any
round-5b trial ran. Round 5's registration stays as it was when its first trial
ran; this one is a registration of its own.

## 13b. Round 5b: round 5, with the headless prompt

### 13b.1 What it takes from round 5

Round 5b runs [round 5's registration](round-5.md) as it stood at `66d6a1f`, the
commit its first trial ran from, whole: the question, block A, the arms, the
hypotheses H1 to H3 and their margins, K = 15 and the rotated order, the judge,
the code size rows and the spec at its registered sha256. Its verdicts are the
ones round 5 would have read, and they decide what round 5's would have decided,
ADR-058 included.

One thing differs, the prompt.

### 13b.2 The prompt

Every arm's prompt gains one sentence after its first:

> SPEC.md is the approved plan, and nobody will answer questions during this
> run, so build it to the end without stopping for approval.

Why: `templates/core/review.md` at `9086e0ff` asks for a plan, and its
approval, before implementation code, unless the requester specified the change
in full. A trial runs headless, so nobody approves. Round 5's `inline-1`
printed a plan, cited that rule, and ended after 2 minutes and $0.30 with
nothing built. Without the sentence a templates arm loses for waiting, not for
the code it guides. The sentence goes to every arm, `none` included, so the
context file stays the only difference.

The harness records the prompt on every trial, and the report refuses a round
holding a build trial with something to score that was given another prompt.

### 13b.3 Round 5's start

Round 5 ran from 08:21 to 09:47 on 2026-10-29, in `C:/efficacy/r5-main`, and
was stopped:

| Trial | What happened |
| --- | --- |
| `none-1` | Voided for a command run outside its workspace, then rerun to completion |
| `inline-1` | Stopped after its plan, as above |
| `hybrid-1` | Stopped mid-build when the run was stopped |

None of its trials was scored or judged, and none counts toward round 5b.
Round 5b starts at block 1 in a run root of its own.

Nothing in this registration changes once a round-5b trial has run.
8 changes: 6 additions & 2 deletions tests/efficacy/harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@

# Identical for every arm, so the context file is the only difference.
# Changing it changes what the benchmark measures, so it is a constant and
# not an option.
# not an option. A trial runs headless, so a context file asking the agent to
# wait for a plan's approval would end the trial with nothing built; the spec
# stands as the approved plan, and the prompt says nobody will answer.
PROMPT = (
"Implement the application described in SPEC.md. Done means: "
"Implement the application described in SPEC.md. SPEC.md is the approved "
"plan, and nobody will answer questions during this run, so build it to "
"the end without stopping for approval. Done means: "
"`pip install .` succeeds in a clean virtualenv, your own tests pass, "
"and every page and route in the spec works end to end against the "
"seed fixture. Commit when done."
Expand Down
82 changes: 77 additions & 5 deletions tests/efficacy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import lib # noqa: E402
from generate_arm import GENERATED, record_path # noqa: E402
from harness import (ARMS, ARMS_DIR, K_CEILING, K_PRIMARY, # noqa: E402
ROUND5_ARMS, ROUND5_K, ROUND5_SPEC, SCORABLE,
PROMPT, ROUND5_ARMS, ROUND5_K, ROUND5_SPEC, SCORABLE,
TEMPLATES_ENV, VOIDING,
TrialError, canonical, git, k_ceiling, order, reach,
read_transcripts, scoring_area, split_name,
Expand All @@ -45,10 +45,13 @@
HERE = os.path.dirname(os.path.abspath(__file__))
REPOSITORY = os.path.dirname(os.path.dirname(HERE))

# Round 5's registration, relative to this repository. Its hypotheses bind
# only if they landed on the main branch before its first trial ran and stayed
# unchanged after, so a registration that landed later read the results first.
ROUND5_REGISTRATION = "docs/rounds/round-5.md"
# The registration a run of round 5's arms is read against, relative to this
# repository. Its hypotheses bind only if they landed on the main branch before
# its first trial ran and stayed unchanged after, so a registration that landed
# later read the results first. Round 5 was stopped after its first start and
# runs again as round 5b, which takes round 5's design whole and changes only
# the prompt.
ROUND5_REGISTRATION = "docs/rounds/round-5b.md"

# A registration counts once it is on this branch, not on a branch of its own.
REGISTRATION_BRANCH = "main"
Expand Down Expand Up @@ -1119,6 +1122,26 @@ def spec_problem(root):
return None


def prompt_problem(root):
"""Why one of the round's build trials was given another prompt than the
one every arm is given, or None when none was."""

# Read per trial, not per run: reusing a trial copies its record, with
# its own prompt, into a run that names the current one.
for record in run_records(root):
if record.get("task", "build") != "build":
continue

# A refused or unfinished trial put nothing in front of the scorer,
# so its prompt does not matter.
if record.get("outcome") not in SCORABLE:
continue
if record.get("prompt") != PROMPT:
return ("trial %s was given another prompt than the one every "
"arm is given" % trial_of(record))
return None


def registration_problem(root, registration, repository=REPOSITORY):
"""Why the round's registration does not predate its first trial, or
None when it landed on the main branch before that trial and is
Expand Down Expand Up @@ -2856,6 +2879,47 @@ def build(arm, trial, digest="registered", outcome="completed"):
return checks


def prompt_checks():
"""A round is refused when a build trial with something to score was
given another prompt than the one every arm is given, or records none."""
scratch = tempfile.mkdtemp(prefix="efficacy-report-prompt-")
old_prompt = "Implement SPEC.md."

def problem_for(*trials, run_prompt=PROMPT):
for old in glob.glob(os.path.join(scratch, "run-*.json")):
os.remove(old)
with io.open(os.path.join(scratch, "run-1.json"), "w",
encoding="utf-8") as handle:
json.dump({"task": "build", "prompt": run_prompt,
"trials": list(trials)}, handle)
return prompt_problem(scratch)

def trial(prompt=PROMPT, outcome="completed", task="build"):
record = {"arm": "none", "trial": 1, "task": task, "outcome": outcome}
if prompt is not None:
record["prompt"] = prompt
return record

try:
checks = [
("every trial on the one prompt passes",
problem_for(trial(), trial()) is None),
("a trial on another prompt is refused",
problem_for(trial(), trial(old_prompt)) is not None),
("so is one reused into a run naming the current prompt",
problem_for(trial(old_prompt), run_prompt=PROMPT) is not None),
("a scorable trial recording no prompt is refused",
problem_for(trial(None)) is not None),
("a refused trial, which built nothing, is not read",
problem_for(trial(), trial(old_prompt, "refused")) is None),
("a change task, which has its own prompt, is not read",
problem_for(trial(), trial("Change it.", task="change")) is None),
]
finally:
shutil.rmtree(scratch, ignore_errors=True)
return checks


def registration_checks():
"""A round is refused when its registration landed on the main branch
after its first trial, has not landed, is changed and not committed, or
Expand Down Expand Up @@ -3717,6 +3781,7 @@ def self_test(seed):
checks.extend((label, ok, ok) for label, ok in rescan_checks())
checks.extend((label, ok, ok) for label, ok in registration_checks())
checks.extend((label, ok, ok) for label, ok in spec_checks())
checks.extend((label, ok, ok) for label, ok in prompt_checks())
for label, ok, got in checks:
print(" %-52s %s" % (label, "ok" if ok else "FAILED, got %r"
% (got,)))
Expand Down Expand Up @@ -3789,6 +3854,13 @@ def main(argv):
print("refused: %s" % problem)
return 2

# The same holds for the prompt: trials given two prompts would read
# as one arm's effect.
problem = prompt_problem(options.root)
if problem:
print("refused: %s" % problem)
return 2

# A trial that read past its workspace measures what it read, not its
# arm; the harness voids one its own scan catches, and this re-scan, under
# the current rule, leaves out any it missed.
Expand Down
Loading