Alterability. Item: Change Case 1: sow seeds anti-clockwise. Score /5: 5.
Reason: Direction lives only in Render.board as two ternaries that mirror the rows. Sowing order is the same in both directions, so the rules need no direction branch at all.
Kalah TDD study · Part 18 of 29 · Designs
Independent attempts on one locked suite. Score rule fixed first.
Source run full-1 at tdd-experiment c3dd988
Search and validation
What it changes: Breadth. Several starts and the best is kept.
No award in this survey.
One method of the study, from runs full-1. The survey build is the method's single build in run full-1. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
The procedure supplied to the agents. Indented lines run under the line above them.
Family: Search and validation. Idea: Independent attempts on one locked suite. Score rule fixed first. What it changes in the search: Breadth. Several starts and the best is kept.
once:1. Write the shared acceptance tests and lock them with a hash check in CI.2. Fix budget and score up front. Default is green first then mutation score then fewer lines.3. Pick 2 to 4 start strategies such as noun-verb map, smallest-test TDD or functions first.for up to 3 starts, keep the best:4. Run each attempt on its own branch until green or out of budget.5. At half budget drop any attempt passing under half the leader's tests.once:6. Score the finished attempts. If none is green rank by tests passed.7. Keep the winner. Archive the others with a note on what each taught.
Once means one agent runs the steps. Repeat per unit means one agent per unit until no unit is open. Throughout means the rule joins every prompt. For up to n starts means separate attempts with the best kept. The harness does means the harness runs the step without an agent. If names the event that starts a stage, and with adds a rule borrowed from another method. Steps are quoted from args.json with their numbers. Tag: verified.
Figure 18.1
Next: Once: step 2.
Next: Once: step 3.
Next: Up to 3 starts: steps 4 and 5.
Next: Once: step 6.
Next: Once: step 7.
6 stages from the run facts, each checked against its block of the steps above. Details and notes are in the stage table. Tag: recomputed.
Next: Once: step 2.
Next: Once: step 3.
Next: Up to 3 starts: steps 4 and 5.
Next: Once: step 6.
Next: Once: step 7.
Each stage as the run facts list it. Runs as and Note are quoted verbatim and Steps repeats the steps above. Tag: verified.
| Stage | Runs as | Steps | Details | Note |
|---|---|---|---|---|
| Once: step 1 | once: | 1. Write the shared acceptance tests and lock them with a hash check in CI. | none | Lock the acceptance tests with a JUnit test that compares their SHA-256 with recorded values, so ./run.sh test runs the check. |
| Once: step 2 | once: | 2. Fix budget and score up front. Default is green first then mutation score then fewer lines. | none | Write the score rule to SCORE.md and commit it. The harness gives each attempt two halves of up to the cycle limit each, with the drop rule between them. |
| Once: step 3 | once: | 3. Pick 2 to 4 start strategies such as noun-verb map, smallest-test TDD or functions first. | returns starts | Return one line per start strategy in starts. Create no branch or clone, because each start gets its own clone. |
| Up to 3 starts: steps 4 and 5 | for up to 3 starts, keep the best: | 4. Run each attempt on its own branch until green or out of budget. 5. At half budget drop any attempt passing under half the leader's tests. | returns passed | Report passed and total from ./run.sh test on the locked acceptance tests. |
| Once: step 6 | once: | 6. Score the finished attempts. If none is green rank by tests passed. | returns winner | Rank the finished attempts by the score rule in SCORE.md, using the attempt results among the facts below. Pick the winner only among the finished starts. A partial mutation score covers only the mutants its run reached, so when any finished attempt's mutation score is partial, mutation score ranks none of them and the next criterion in SCORE.md decides. When no finished attempt is green, rank them by tests passed, as step 6 says. Write ATTEMPTS.md with each attempt's results, its score and the drop decisions, commit it and return the winning start number. |
| Once: step 7 | once: | 7. Keep the winner. Archive the others with a note on what each taught. | none | The winner is at the local branch winner. First run git restore --source=winner --staged --worktree -- src test and commit, then archive the others in ATTEMPTS.md. |
One build in run full-1.
One survey build from 3 start clones and a final clone. The final clone passed every hidden test in one jump with 3 classes, 5 PMD violations and adjusted mutation 0.873. The 3 starts used 869732 of the method's 1295799 weighted tokens before the final clone began. Tag: recomputed.
The report's class diagram for this design is identical to Figure 18.2 below, so it is shown once. Tag: recomputed.
| Functional mark /15 | 15/15 |
|---|---|
| Hidden pass /76 | 76/76 |
| Unseen pass /69 | 69/69 |
| Strict PMD compliance | fail (5 violations) |
| Mutation score | 103/123, 0 not run, adjusted 103/118 (15 of 20 survivors fail hidden tests) |
| Classes | 3 |
| Simple Constructs /5 | 4 |
| Minimal Duplication /5 | 4 |
| Modular Structure /5 | 4 |
| Problem Alignment (tentative) /5 | 3 |
| Weighted tokens | 1,295,799 |
| Bench median ms | 553 |
Survey tiles place the survey build among the single survey builds. One build per method describes that build and does not rank the methods. Contrast tiles are medians over the replicates. Tag: recomputed.
Best, median and worst order a method's replicates by adjusted mutation, highest first, then lower cost to completion. The median build is the representative. Tag: recomputed.
| Build | multi-start |
|---|---|
| Adjusted mutation | 0.873 |
| Classes | 3 |
| Cost to completion | 1,255,948 |
| Strict PMD violations | 5 |
Figure 18.2
3 classes and 3 links. Tag: recomputed.
Same family comes from the methods doc. Nearest and farthest average the rank differences over adjusted mutation, classes and cost to completion of the survey builds, over the metrics both methods have. Anchor Engineering has no survey build, so the replicate medians of adjusted mutation and classes stand in. Cost to completion leaves out such a method, since costs of a different batch do not compare. Tag: recomputed.
Each clone's own report, as in its REPORT.md.
Branch method/multi-start. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
| Functional mark /15 | 15/15 |
|---|---|
| Hidden pass /76 | 76/76 |
| Unseen pass /69 | 69/69 |
| Acceptance pass /6 | 6/6 |
| Strict PMD compliance | fail (5 violations) |
Recomputed from the grader's grade.tsv and summary.json and from metrics.json. The functional mark follows A02-RUBRIC.md: 2 for the original set with no failure, 3 per other set less one per failure, and 4 when every test passes. A02 is the course assignment whose spec and rubric the experiment uses. STA means anticlockwise and STC clockwise sowing. 6-4 and 7-5 are houses and seeds. A02-RUBRIC.md names the original set "Clockwise 6 Houses 4 Seeds". This page names each set by the spec folder its tests play, so the original set reads STA 6-4. Strict PMD compliance passes when PMD with the starter's kalah_pmd.xml finds no violation in src/ and otherwise fails with the count of distinct violations. The lint sets no minimum priority, so rules of every priority count. It covers src/ only, the scope of the starter's ./run.sh lint. A02-RUBRIC.md awards no marks for PMD, so the functional mark leaves it out.
| Rubric set | Tests | Failures | Marks |
|---|---|---|---|
| Original set, STA 6-4 | testST64SKHHSH_ | 0 | 2/2 |
| STC 6-4 | testSTC64SKHHSH_ | 0 | 3/3 |
| STA 7-5 | testST75SKHHSH_ | 0 | 3/3 |
| STC 7-5 | testSTC75SKHHSH_ | 0 | 3/3 |
| All requirements | all tests | 0 | 4/4 |
| Metric | Value | Tag |
|---|---|---|
| Total lines | 491 (src 213, own tests 278) | recomputed |
| Lines of code | 384 (src 165, own tests 219) | recomputed |
| Classes | 3 | recomputed |
| Methods | 25 | recomputed |
| Fields | 1 | recomputed |
| Bench median ms | 553 | recomputed |
| Bench volume | 100614 inputs, 40083576 output chars | recomputed |
Own tests leave out the starter's two Example tests and their ExampleSpec helper. Classes count top-level, nested and anonymous classes in src/.
| Metric | Value | Tag |
|---|---|---|
| Mutation score | 103/123, 0 not run, adjusted 103/118 (15 of 20 survivors fail hidden tests) | recomputed |
| PMD lines | 5 (5 violations) | recomputed |
| Dependency edges | 3 | recomputed |
| Review scores (superseded) | Alterability 5, Code quality principles 4.1, Test quality 4 | unchecked |
| Tokens | 1,854,970 (input 92, cache creation 207,097, cache read 1,630,667, output 17,114) | recomputed |
| Weighted tokens | 426,067 | recomputed |
| Wall time | 0:21:19 | recomputed |
| Agent time | 0:05:37 | recomputed |
| Agent calls | 6 | recomputed |
| Audit flags | 0 high, 2 low | recomputed |
PMD lines count violations once per file and line. Agent time sums each agent's first to last timestamp, so agents that ran side by side add up. Weighted tokens count input 1, cache creation 1.25, cache read 0.05 and output 5 per token. These are claude-opus-5-5 prices relative to an input token and state no dollar cost. Costs, times and agent calls cover this clone only. The comparison row covers every clone of the method as its count basis states.
A blind reviewer agent scored src/ and test/ from 1, worst, to 5, best, so the scores are unchecked. Reasons are the reviewer's own words, verbatim. This review is superseded by the blind rating of three raters in rating.json, whose medians fill the comparison's principle columns.
Alterability. Item: Change Case 1: sow seeds anti-clockwise. Score /5: 5.
Reason: Direction lives only in Render.board as two ternaries that mirror the rows. Sowing order is the same in both directions, so the rules need no direction branch at all.
Alterability. Item: Change Case 2: 7 houses with 5 seeds. Score /5: 5.
Reason: One ternary in play picks Rules.init(7,5) or (6,4). Every other size comes from Rules.houses(board), so the rules and rendering adapt without further edits.
Code quality principles. Item: 1. Clear Presentation. Score /5: 4.
Reason: Short functions and a tidy play loop read easily. The index arithmetic in store, pitOf and the opposite formula 2*houses-last is terse and asks the reader to recall the layout comment.
Code quality principles. Item: 2. Explanatory Language. Score /5: 4.
Reason: Names such as sow, capture, nextPit and houseSeeds match the domain, and the class comment documents the board layout. pitOf and the bare 0/1 player ints are a little cryptic.
Code quality principles. Item: 3. Consistent Code. Score /5: 4.
Reason: Static helpers taking (board, player, ...) follow one pattern throughout. Kalah.java mixes tab and space indentation from the starter.
Code quality principles. Item: 4. Used Content. Score /5: 4.
Reason: Nearly everything is used. capture returns a boolean that move ignores, and the main stub is kept as given.
Code quality principles. Item: 5. Simple Constructs. Score /5: 4.
Reason: Plain loops, arrays and ternaries. The recursive nextPit is a slightly clever way to skip the opponent store.
Code quality principles. Item: 6. Minimal Duplication. Score /5: 5.
Reason: Layout arithmetic is centralised in Rules helpers reused by Render and Kalah. Row rendering is shared through row and houses with a direction flag.
Code quality principles. Item: 7. Modular Structure. Score /5: 4.
Reason: Clean split into pure Rules, pure Render and IO-driving Kalah. A bare int[] board with static utility classes gives no encapsulation of board invariants.
Code quality principles. Item: 8. Problem Alignment. Score /5: 4.
Reason: Houses, stores, sowing, capture and scoring map directly to Kalah concepts. Players as 0 and 1 and the raw pit array are representation details rather than domain objects.
Test quality. Item: Test quality. Score /5: 4.
Reason: RulesTest pins sowing, store skipping, wraparound, every capture condition, turn passing, game over and scoring with clear names. RenderTest covers both directions and the 7-house layout. Unit tests mostly use only the 6-4 board, and the acceptance set leaves out a few variant/scenario pairs.
0 high and 2 low flags from agent tool calls and the method's commits. Only audit.json lists the low flags.
Method agents wrote the LOG.md cells. Agent-written text is shown verbatim and unchecked. Words such as recomputed inside it are the agent's own and are not tags of this page. Its Measure lines describe measurement during the run. Harness scores were measured separately after the run. Agent text may quote git commit times in the host's local zone. Harness times are UTC. Agent, tokens and seconds are recomputed from transcripts by row time. A dash in Agent means no agent run spans the row.
2026-10-15T23:56:54Z. Step: s1. Unit: shared acceptance tests with SHA-256 lock. Tests added: 11. Cycles: 1. Sha: d646dc2. Agent: multi-start:s1. Tokens: 1115756. Seconds: 228.065.
Actions: Wrote 10 hand-computed acceptance specs under test/acceptance (quit, simple start, extra turn then capture) for all four variants. AcceptanceTest plays them. AcceptanceLockTest hashes them plus AcceptanceTest.java and ExampleSpec.java: red with empty hashes, green once recorded. ./run.sh test: lock green, 10 acceptance and 6 example tests red on the stub as expected. Conflict: the Write and Edit tools strip trailing spaces, so sed added the required space after each prompt, against the standing no-sed rule.
2026-10-15T23:57:18Z. Step: s2. Unit: budget and score rule. Tests added: 0. Cycles: 0. Sha: f4c44ce. Agent: multi-start:s2. Tokens: 122383. Seconds: 20.968.
Actions: Wrote SCORE.md: two halves of up to the cycle limit (15) per attempt, drop under half the leader's passed tests at half budget, rank by green then tests passed then mutation score then fewer src lines then fewer cycles. No code or tests, no checks run since the step names none.
2026-10-15T23:57:38Z. Step: s3. Unit: start strategies. Tests added: 0. Cycles: 0. Sha: 0d9ce4d. Agent: multi-start:s3. Tokens: 125172. Seconds: 18.986.
Actions: Wrote STARTS.md with three starts: noun-verb map, smallest-test TDD from the acceptance specs, functions first on an int array board. No code or tests, no checks run since the step names none. No branches or clones created since each start gets its own clone.
2026-10-16T00:12:56Z. Step: s6. Unit: score finished attempts. Tests added: 0. Cycles: 0. Sha: 059b347. Agent: multi-start:s6. Tokens: 125796. Seconds: 17.17.
Actions: Wrote ATTEMPTS.md. All three starts green with 10 of 10 at both halves, so none dropped. No mutation score partial, so mutation score ranked: start 3 83.7% over start 1 78.5% over start 2 66.9%. Winner start 3. No code or tests and no checks run since the step names none.
2026-10-16T00:13:34Z. Step: s7. Unit: keep winner and archive others. Tests added: 0. Cycles: 0. Sha: f93d543. Agent: multi-start:s7. Tokens: 237171. Seconds: 31.726.
Actions: Restored src and test from local branch winner (start 3, functions first) and committed. Archived starts 1 and 2 in ATTEMPTS.md with what each taught. No tests added and no checks run since the step names none.
The method's measure agent answered its Measure line from LOG.md and git. Agent-written text is shown verbatim and unchecked. Words such as recomputed inside it are the agent's own and are not tags of this page. Its Measure lines describe measurement during the run. Harness scores were measured separately after the run. Agent text may quote git commit times in the host's local zone. Harness times are UTC.
# Measure
Answers the Measure line from LOG.md, git log and ATTEMPTS.md. GAP.md does not exist in this clone.
## Credits and time to first green per attempt
Credits and time are measured by the harness. This clone records neither.
What the clone shows. Each attempt ran in its own clone, so its per-cycle history is not in this git log. ATTEMPTS.md records all three starts green at the first half check, which is at most 15 cycles each by the SCORE.md budget.
| start | strategy | green at first half | credits | time to first green |
|---|---|---|---|---|
| 1 | noun-verb map | yes, 10 of 10 | measured by the harness | measured by the harness |
| 2 | smallest-test TDD | yes, 10 of 10 | measured by the harness | measured by the harness |
| 3 | functions first | yes, 10 of 10 | measured by the harness | measured by the harness |
## Edits to locked tests
Zero, as expected. `git diff d646dc2 HEAD` over test/acceptance, AcceptanceTest.java, AcceptanceLockTest.java and ExampleSpec.java is empty. That covers the kept start 3 code restored in 41bc9e5. Starts 1 and 2 were not merged, and AcceptanceLockTest in each clone fails ./run.sh test on any edit. Both reached green, so their locked files matched the recorded hashes.
## Spread between best and worst score
The score rule ranks by mutation score once all attempts are green.
| key | best | worst | spread |
|---|---|---|---|
| mutation score | start 3, 83.7% | start 2, 66.9% | 16.8 points |
| tests passed | 10 of 10 | 10 of 10 | 0 |
| src lines | start 2, 156 | start 1, 295 | 139 lines |
Green and tests passed gave no spread. All of the ranking spread sits in mutation score.
Branch method/multi-start-1. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
| Functional mark /15 | 15/15 |
|---|---|
| Hidden pass /76 | 76/76 |
| Unseen pass /69 | 69/69 |
| Acceptance pass /6 | 6/6 |
| Strict PMD compliance | fail (3 violations) |
Recomputed from the grader's grade.tsv and summary.json and from metrics.json. The functional mark follows A02-RUBRIC.md: 2 for the original set with no failure, 3 per other set less one per failure, and 4 when every test passes. A02 is the course assignment whose spec and rubric the experiment uses. STA means anticlockwise and STC clockwise sowing. 6-4 and 7-5 are houses and seeds. A02-RUBRIC.md names the original set "Clockwise 6 Houses 4 Seeds". This page names each set by the spec folder its tests play, so the original set reads STA 6-4. Strict PMD compliance passes when PMD with the starter's kalah_pmd.xml finds no violation in src/ and otherwise fails with the count of distinct violations. The lint sets no minimum priority, so rules of every priority count. It covers src/ only, the scope of the starter's ./run.sh lint. A02-RUBRIC.md awards no marks for PMD, so the functional mark leaves it out.
| Rubric set | Tests | Failures | Marks |
|---|---|---|---|
| Original set, STA 6-4 | testST64SKHHSH_ | 0 | 2/2 |
| STC 6-4 | testSTC64SKHHSH_ | 0 | 3/3 |
| STA 7-5 | testST75SKHHSH_ | 0 | 3/3 |
| STC 7-5 | testSTC75SKHHSH_ | 0 | 3/3 |
| All requirements | all tests | 0 | 4/4 |
| Metric | Value | Tag |
|---|---|---|
| Total lines | 620 (src 295, own tests 325) | recomputed |
| Lines of code | 503 (src 233, own tests 270) | recomputed |
| Classes | 7 | recomputed |
| Methods | 35 | recomputed |
| Fields | 10 | recomputed |
| Bench median ms | 611 | recomputed |
| Bench volume | 100614 inputs, 40083576 output chars | recomputed |
Own tests leave out the starter's two Example tests and their ExampleSpec helper. Classes count top-level, nested and anonymous classes in src/.
| Metric | Value | Tag |
|---|---|---|
| Mutation score | 73/93, 0 not run, adjusted 73/86 (13 of 20 survivors fail hidden tests) | recomputed |
| PMD lines | 3 (3 violations) | recomputed |
| Dependency edges | 17 | recomputed |
| Review scores | not measured | unchecked |
| Tokens | 2,631,515 (input 94, cache creation 186,960, cache read 2,442,723, output 1,738) | recomputed |
| Weighted tokens | 364,620 | recomputed |
| Wall time | 0:14:29 | recomputed |
| Agent time | 0:14:27 | recomputed |
| Agent calls | 2 | recomputed |
| Audit flags | 0 high, 0 low | recomputed |
PMD lines count violations once per file and line. Agent time sums each agent's first to last timestamp, so agents that ran side by side add up. Weighted tokens count input 1, cache creation 1.25, cache read 0.05 and output 5 per token. These are claude-opus-5-5 prices relative to an input token and state no dollar cost. Costs, times and agent calls cover this clone only. The comparison row covers every clone of the method as its count basis states.
not measured
0 high and 0 low flags from agent tool calls and the method's commits. Only audit.json lists the low flags.
Method agents wrote the LOG.md cells. Agent-written text is shown verbatim and unchecked. Words such as recomputed inside it are the agent's own and are not tags of this page. Its Measure lines describe measurement during the run. Harness scores were measured separately after the run. Agent text may quote git commit times in the host's local zone. Harness times are UTC. Agent, tokens and seconds are recomputed from transcripts by row time. A dash in Agent means no agent run spans the row.
2026-10-15T23:56:54Z. Step: s1. Unit: shared acceptance tests with SHA-256 lock. Tests added: 11. Cycles: 1. Sha: d646dc2. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote 10 hand-computed acceptance specs under test/acceptance (quit, simple start, extra turn then capture) for all four variants. AcceptanceTest plays them. AcceptanceLockTest hashes them plus AcceptanceTest.java and ExampleSpec.java: red with empty hashes, green once recorded. ./run.sh test: lock green, 10 acceptance and 6 example tests red on the stub as expected. Conflict: the Write and Edit tools strip trailing spaces, so sed added the required space after each prompt, against the standing no-sed rule.
2026-10-15T23:57:18Z. Step: s2. Unit: budget and score rule. Tests added: 0. Cycles: 0. Sha: f4c44ce. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote SCORE.md: two halves of up to the cycle limit (15) per attempt, drop under half the leader's passed tests at half budget, rank by green then tests passed then mutation score then fewer src lines then fewer cycles. No code or tests, no checks run since the step names none.
2026-10-15T23:57:38Z. Step: s3. Unit: start strategies. Tests added: 0. Cycles: 0. Sha: 0d9ce4d. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote STARTS.md with three starts: noun-verb map, smallest-test TDD from the acceptance specs, functions first on an int array board. No code or tests, no checks run since the step names none. No branches or clones created since each start gets its own clone.
2026-10-16T00:09:03Z. Step: s4-5. Unit: attempt 1 first half: noun-verb map. Tests added: 21. Cycles: 10. Sha: 92dda53. Agent: multi-start-1:s4a. Tokens: 2325073. Seconds: 677.874.
Actions: Built House, Store, Player, Board, Sower (sow, extra turn, capture) and Renderer (anti-clockwise, clockwise mirror) one class per cycle with unit tests seen red first, then wired them into play() against the red acceptance tests and added game end scoring against the red full-game examples. Two SowerTest assertions were miscounted and fixed in the test during their cycles. Green after 10 of 15 cycles: ./run.sh test passes all 10 classes, locked acceptance 10 of 10, lock and 6 examples green. Worked in this clone on its current branch as the harness directs, so no separate attempt branch was created.
2026-10-16T00:12:14Z. Step: s4-5. Unit: attempt 1 second half and step 6 score: noun-verb map. Tests added: 0. Cycles: 0. Sha: 92dda53. Agent: multi-start-1:s4b. Tokens: 306442. Seconds: 188.642.
Actions: The attempt was already green when the first half ended, so the second half ran no cycles and changed no code. Re-ran ./run.sh test: 10 of 10 classes pass, locked acceptance 10 of 10, lock and 6 examples green. Scored for step 6: one ./run.sh mutate gave 73/93 (94 mutants, 20 survived, 1 invalid, 0 not run). src/ .java files total 295 lines.
Class diagrams show class names and relations only. A solid line ending in a hollow triangle points to a parent class and a dashed one to an implemented interface. A line with a diamond at the owning class marks a field and a plain arrow a use. Method and field totals are in the tables.
Figure 18.3
7 classes and 21 links. Tag: recomputed.
Start clones have no measure agent, so there is no MEASURE.md.
Branch method/multi-start-2. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
| Functional mark /15 | 15/15 |
|---|---|
| Hidden pass /76 | 76/76 |
| Unseen pass /69 | 69/69 |
| Acceptance pass /6 | 6/6 |
| Strict PMD compliance | fail (5 violations) |
Recomputed from the grader's grade.tsv and summary.json and from metrics.json. The functional mark follows A02-RUBRIC.md: 2 for the original set with no failure, 3 per other set less one per failure, and 4 when every test passes. A02 is the course assignment whose spec and rubric the experiment uses. STA means anticlockwise and STC clockwise sowing. 6-4 and 7-5 are houses and seeds. A02-RUBRIC.md names the original set "Clockwise 6 Houses 4 Seeds". This page names each set by the spec folder its tests play, so the original set reads STA 6-4. Strict PMD compliance passes when PMD with the starter's kalah_pmd.xml finds no violation in src/ and otherwise fails with the count of distinct violations. The lint sets no minimum priority, so rules of every priority count. It covers src/ only, the scope of the starter's ./run.sh lint. A02-RUBRIC.md awards no marks for PMD, so the functional mark leaves it out.
| Rubric set | Tests | Failures | Marks |
|---|---|---|---|
| Original set, STA 6-4 | testST64SKHHSH_ | 0 | 2/2 |
| STC 6-4 | testSTC64SKHHSH_ | 0 | 3/3 |
| STA 7-5 | testST75SKHHSH_ | 0 | 3/3 |
| STC 7-5 | testSTC75SKHHSH_ | 0 | 3/3 |
| All requirements | all tests | 0 | 4/4 |
| Metric | Value | Tag |
|---|---|---|
| Total lines | 278 (src 156, own tests 122) | recomputed |
| Lines of code | 228 (src 131, own tests 97) | recomputed |
| Classes | 1 | recomputed |
| Methods | 11 | recomputed |
| Fields | 0 | recomputed |
| Bench median ms | 192 | recomputed |
| Bench volume | 100614 inputs, 40083576 output chars | recomputed |
Own tests leave out the starter's two Example tests and their ExampleSpec helper. Classes count top-level, nested and anonymous classes in src/.
| Metric | Value | Tag |
|---|---|---|
| Mutation score | 93/139, 0 not run, adjusted 93/130 (37 of 46 survivors fail hidden tests) | recomputed |
| PMD lines | 5 (5 violations) | recomputed |
| Dependency edges | 0 | recomputed |
| Review scores | not measured | unchecked |
| Tokens | 1,714,946 (input 72, cache creation 84,787, cache read 1,626,487, output 3,600) | recomputed |
| Weighted tokens | 205,380 | recomputed |
| Wall time | 0:14:34 | recomputed |
| Agent time | 0:05:36 | recomputed |
| Agent calls | 2 | recomputed |
| Audit flags | 0 high, 0 low | recomputed |
PMD lines count violations once per file and line. Agent time sums each agent's first to last timestamp, so agents that ran side by side add up. Weighted tokens count input 1, cache creation 1.25, cache read 0.05 and output 5 per token. These are claude-opus-5-5 prices relative to an input token and state no dollar cost. Costs, times and agent calls cover this clone only. The comparison row covers every clone of the method as its count basis states.
not measured
0 high and 0 low flags from agent tool calls and the method's commits. Only audit.json lists the low flags.
Method agents wrote the LOG.md cells. Agent-written text is shown verbatim and unchecked. Words such as recomputed inside it are the agent's own and are not tags of this page. Its Measure lines describe measurement during the run. Harness scores were measured separately after the run. Agent text may quote git commit times in the host's local zone. Harness times are UTC. Agent, tokens and seconds are recomputed from transcripts by row time. A dash in Agent means no agent run spans the row.
2026-10-15T23:56:54Z. Step: s1. Unit: shared acceptance tests with SHA-256 lock. Tests added: 11. Cycles: 1. Sha: d646dc2. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote 10 hand-computed acceptance specs under test/acceptance (quit, simple start, extra turn then capture) for all four variants. AcceptanceTest plays them. AcceptanceLockTest hashes them plus AcceptanceTest.java and ExampleSpec.java: red with empty hashes, green once recorded. ./run.sh test: lock green, 10 acceptance and 6 example tests red on the stub as expected. Conflict: the Write and Edit tools strip trailing spaces, so sed added the required space after each prompt, against the standing no-sed rule.
2026-10-15T23:57:18Z. Step: s2. Unit: budget and score rule. Tests added: 0. Cycles: 0. Sha: f4c44ce. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote SCORE.md: two halves of up to the cycle limit (15) per attempt, drop under half the leader's passed tests at half budget, rank by green then tests passed then mutation score then fewer src lines then fewer cycles. No code or tests, no checks run since the step names none.
2026-10-15T23:57:38Z. Step: s3. Unit: start strategies. Tests added: 0. Cycles: 0. Sha: 0d9ce4d. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote STARTS.md with three starts: noun-verb map, smallest-test TDD from the acceptance specs, functions first on an int array board. No code or tests, no checks run since the step names none. No branches or clones created since each start gets its own clone.
2026-10-16T00:00:04Z. Step: s4-5. Unit: attempt 2 first half: smallest-test TDD. Tests added: 0. Cycles: 5. Sha: 2e030c3. Agent: multi-start-2:s4a. Tokens: 1475614. Seconds: 142.066.
Actions: Grew Kalah.java from the locked specs in order. Cycle 1 quit (3/10 acceptance), cycle 2 simple start sowing (6/10), cycle 3 extra turn and capture (10/10). Then example specs: cycle 4 empty house, cycle 5 game end with scores plus a loop refactor. ./run.sh test fully green: lock 1, acceptance 10, examples 6. No duplication called for a class extraction so Kalah.java stays one class. No new test files since the locked specs were the failing tests. Stopped at green after 5 of 15 cycles. Worked in this clone on its current branch as told.
2026-10-16T00:12:20Z. Step: s4-5. Unit: attempt 2 second half and step 6 score: smallest-test TDD. Tests added: 0. Cycles: 0. Sha: 2e030c3. Agent: multi-start-2:s4b. Tokens: 239332. Seconds: 194.124.
Actions: Attempt was already green at the start of this half, so no cycles ran and no code changed. ./run.sh test: lock 1, acceptance 10/10, examples 6, 4 classes run, 0 failed. Scored with one ./run.sh mutate: 93/139 (killed 92, timeout 1, survived 46, not-run 0). src lines 156 in Kalah.java.
Class diagrams show class names and relations only. A solid line ending in a hollow triangle points to a parent class and a dashed one to an implemented interface. A line with a diamond at the owning class marks a field and a plain arrow a use. Method and field totals are in the tables.
Figure 18.4
1 class and 0 links. Tag: recomputed.
Start clones have no measure agent, so there is no MEASURE.md.
Branch method/multi-start-3. Claims carry a tag. Recomputed means redone from source data. Verified means checked against a primary source. Unchecked means written or judged by an agent and not checked.
| Functional mark /15 | 15/15 |
|---|---|
| Hidden pass /76 | 76/76 |
| Unseen pass /69 | 69/69 |
| Acceptance pass /6 | 6/6 |
| Strict PMD compliance | fail (5 violations) |
Recomputed from the grader's grade.tsv and summary.json and from metrics.json. The functional mark follows A02-RUBRIC.md: 2 for the original set with no failure, 3 per other set less one per failure, and 4 when every test passes. A02 is the course assignment whose spec and rubric the experiment uses. STA means anticlockwise and STC clockwise sowing. 6-4 and 7-5 are houses and seeds. A02-RUBRIC.md names the original set "Clockwise 6 Houses 4 Seeds". This page names each set by the spec folder its tests play, so the original set reads STA 6-4. Strict PMD compliance passes when PMD with the starter's kalah_pmd.xml finds no violation in src/ and otherwise fails with the count of distinct violations. The lint sets no minimum priority, so rules of every priority count. It covers src/ only, the scope of the starter's ./run.sh lint. A02-RUBRIC.md awards no marks for PMD, so the functional mark leaves it out.
| Rubric set | Tests | Failures | Marks |
|---|---|---|---|
| Original set, STA 6-4 | testST64SKHHSH_ | 0 | 2/2 |
| STC 6-4 | testSTC64SKHHSH_ | 0 | 3/3 |
| STA 7-5 | testST75SKHHSH_ | 0 | 3/3 |
| STC 7-5 | testSTC75SKHHSH_ | 0 | 3/3 |
| All requirements | all tests | 0 | 4/4 |
| Metric | Value | Tag |
|---|---|---|
| Total lines | 491 (src 213, own tests 278) | recomputed |
| Lines of code | 384 (src 165, own tests 219) | recomputed |
| Classes | 3 | recomputed |
| Methods | 25 | recomputed |
| Fields | 1 | recomputed |
| Bench median ms | 576 | recomputed |
| Bench volume | 100614 inputs, 40083576 output chars | recomputed |
Own tests leave out the starter's two Example tests and their ExampleSpec helper. Classes count top-level, nested and anonymous classes in src/.
| Metric | Value | Tag |
|---|---|---|
| Mutation score | 103/123, 0 not run, adjusted 103/118 (15 of 20 survivors fail hidden tests) | recomputed |
| PMD lines | 5 (5 violations) | recomputed |
| Dependency edges | 3 | recomputed |
| Review scores | not measured | unchecked |
| Tokens | 1,985,773 (input 78, cache creation 158,151, cache read 1,825,405, output 2,139) | recomputed |
| Weighted tokens | 299,732 | recomputed |
| Wall time | 0:14:45 | recomputed |
| Agent time | 0:14:13 | recomputed |
| Agent calls | 2 | recomputed |
| Audit flags | 0 high, 0 low | recomputed |
PMD lines count violations once per file and line. Agent time sums each agent's first to last timestamp, so agents that ran side by side add up. Weighted tokens count input 1, cache creation 1.25, cache read 0.05 and output 5 per token. These are claude-opus-5-5 prices relative to an input token and state no dollar cost. Costs, times and agent calls cover this clone only. The comparison row covers every clone of the method as its count basis states.
not measured
0 high and 0 low flags from agent tool calls and the method's commits. Only audit.json lists the low flags.
Method agents wrote the LOG.md cells. Agent-written text is shown verbatim and unchecked. Words such as recomputed inside it are the agent's own and are not tags of this page. Its Measure lines describe measurement during the run. Harness scores were measured separately after the run. Agent text may quote git commit times in the host's local zone. Harness times are UTC. Agent, tokens and seconds are recomputed from transcripts by row time. A dash in Agent means no agent run spans the row.
2026-10-15T23:56:54Z. Step: s1. Unit: shared acceptance tests with SHA-256 lock. Tests added: 11. Cycles: 1. Sha: d646dc2. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote 10 hand-computed acceptance specs under test/acceptance (quit, simple start, extra turn then capture) for all four variants. AcceptanceTest plays them. AcceptanceLockTest hashes them plus AcceptanceTest.java and ExampleSpec.java: red with empty hashes, green once recorded. ./run.sh test: lock green, 10 acceptance and 6 example tests red on the stub as expected. Conflict: the Write and Edit tools strip trailing spaces, so sed added the required space after each prompt, against the standing no-sed rule.
2026-10-15T23:57:18Z. Step: s2. Unit: budget and score rule. Tests added: 0. Cycles: 0. Sha: f4c44ce. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote SCORE.md: two halves of up to the cycle limit (15) per attempt, drop under half the leader's passed tests at half budget, rank by green then tests passed then mutation score then fewer src lines then fewer cycles. No code or tests, no checks run since the step names none.
2026-10-15T23:57:38Z. Step: s3. Unit: start strategies. Tests added: 0. Cycles: 0. Sha: 0d9ce4d. Agent: -. Tokens: -. Seconds: -.
Actions: Wrote STARTS.md with three starts: noun-verb map, smallest-test TDD from the acceptance specs, functions first on an int array board. No code or tests, no checks run since the step names none. No branches or clones created since each start gets its own clone.
2026-10-16T00:08:32Z. Step: s4-5. Unit: attempt 3 first half: functions first. Tests added: 21. Cycles: 6. Sha: 8cd5d76. Agent: multi-start-3:s4a. Tokens: 1779290. Seconds: 647.405.
Actions: Rules.java holds pure static functions on an int array board (init, nextPit, sow, capture, move, gameOver, score) and Render.java renders it, each with unit tests in RulesTest and RenderTest. Kalah.play wraps them in the IO loop. Deviation: nextPit takes no direction because every example spec sows in the same logical order in both directions, so direction changes only rendering. Cycle 4 went red on a wrong test fixture and was fixed in the test. ./run.sh test fully green after 6 cycles: 38 of 38, locked acceptance 10 of 10 and the lock green. Attempt stopped early at green per SCORE.md.
2026-10-16T00:12:28Z. Step: s4-5. Unit: attempt 3 second half: functions first, then step 6 score. Tests added: 0. Cycles: 0. Sha: 8cd5d76. Agent: multi-start-3:s4b. Tokens: 206483. Seconds: 205.099.
Actions: First half already ended green, so no red-green cycles were needed and no code changed. ./run.sh test green: 38 of 38, locked acceptance 10 of 10 and the lock green. ./run.sh mutate once: score 103/123 (124 mutants, 20 survived, 1 invalid, not-run 0). src/ .java lines: 213 (Rules 93, Render 51, Kalah 69). Final for step 6: green, 10/10, mutation 103/123, 213 src lines, 6 cycles total.
Class diagrams show class names and relations only. A solid line ending in a hollow triangle points to a parent class and a dashed one to an implemented interface. A line with a diamond at the owning class marks a field and a plain arrow a use. Method and field totals are in the tables.
Figure 18.5
3 classes and 3 links. Tag: recomputed.
Start clones have no measure agent, so there is no MEASURE.md.
See Methodology: measures and the Glossary for the terms and table columns this page uses.