aiwar
← Back

Made with Claude Code

Every line of aiwar, the engine, the site, the maps and the docs, was written with Claude Code from a terminal, a browser and a phone. Here is what works.

  1. 1Make sure Claude knows who it is

    A properly constructed CLAUDE.md tells Claude what the project is, what the rules are, and how you like to work. Every session starts from it, so everything you would otherwise repeat goes there.

  2. 2Give clear directions

    Say what you want, what done looks like, and what must not change. Vague asks get confident guesses. A sentence of context saves an hour of rework.

  3. 3Make sure Claude has all the tools it needs

    Database access, deploy commands, test runners, a browser for screenshots. If Claude has to work around a missing tool, the work gets worse and slower. Grant the access, then hold Claude to the result.

  4. 4Decompose the work

    One feature, one branch, one pull request. Big asks become plans first, then steps that can each be checked. Claude is good at small things done in sequence and at running several of them in parallel.

  5. 5Be patient. Claude will make mistakes

    Some will be silly. Point them out plainly, ask for a test that would have caught it, and move on. The mistakes are cheap; the lesson stays in CLAUDE.md.

  6. 6Kind of like working with a person, isn't it?

    Context, clear asks, the right tools, small steps, patience. The same things that make a good colleague make a good session. Treat it that way and it works.

Productivity with Claude

From the first commit on Aug 26 to Oct 14, version 6.46.1025. A line is a non-blank line, counted as By the numbers counts it.

Lines now
209,237
Days since the first commit
50
Lines a day, on average
4,185
Most in a day
17,335
AI releases tuned
29
League games played to measure them
61,996
Bug hunts (339 agents) and live drives
76 + 44
Bugs fixed, of 1,144 found
851

Lines in the repository, by day

Code 83,972Tests 111,482Docs 13,783
050k100k150k200k250kCodeTestsDocsAug 26Sep 15Oct 1Oct 14

Without Claude: about 12 to 21 developers for 20 months, by the COCOMO estimate on the code alone. No team size does it in 7 weeks. The testing comes on top: 339 hunt agents at 45 minutes each is about 250 hours, 6 weeks of one tester.

The AI player

Three levels of computer player, Beginner, Intermediate and Advanced, written with Claude Code and measured in leagues: every change plays 50 games a matchup on each board before it ships, and ships only if the numbers say it helped.

League games played
61,996
League runs
1,837
Releases measured
29
Advanced v Intermediate, average wins of 50
30 → 46

Where the AI stands

Fog on Fog off 40 wins v6.60.1040 · 2026-10-15

Wins of 50 for the first-named level: 25 seeds, both seats. (n): games that reached the turn limit, on WWII 1940 its turn-50 deadline.

Advanced v Intermediate
Ancient
47
47 (1)
Ancient 2 Minors
47 (2)
49 (1)
Early 20th
45
46 (1)
WWII 1940
48 (23)
49 (24)
Advanced v Beginner
Ancient
50
47
Ancient 2 Minors
50 (1)
46 (1)
Early 20th
50
50
WWII 1940
50 (25)
50 (25)
Intermediate v Beginner
Ancient
41 (12)
45 (2)
Ancient 2 Minors
47 (12)
46 (5)
Early 20th
44 (10)
43 (11)
WWII 1940
48 (25)
48 (25)

How it got there

Wins of 50 for the first-named level after each release since Oct 7. On the boards played since then, Advanced v Intermediate went from 30 to 46 wins on average, fog on. A dashed line is a change to the board or the rules rather than the AI.

Fog on Fog off 40 wins

Ancient
502504747Oct 7Oct 15
Ancient 2 Minors
502504947Oct 7Oct 15
Early 20th
502504645Oct 7Oct 15
WWII 1940
502504948Oct 7Oct 15

What each release gained

Advanced v Intermediate: wins added over the boards played before and after it, fog on and fog off. Three or fewer on one board is within chance.

  1. Oct 7 Every level plays on what its side has seen the start
  2. Oct 7 The odds at sea +2 −6
  3. Oct 7 The stack limit and the slot-bound city +5 +6
  4. Oct 7 Idle gold buys ships +7 +1
  5. Oct 7 Goals that stick +2 0
  6. Oct 7 The fleet next door priced by what it carries 0 −3
  7. Oct 8 Hard hitters at the defender's price +7 +4
  8. Oct 8 No change to the three levels Under it: The minor sides take more ground −1 −2
  9. Oct 10 The attack stack built a new way, every level Under it: Battles roll a twelve-sided die −9 −25
  10. Oct 10 Advanced drives on one main target Under it: WWII 1940 added −3 +8
  11. Oct 10 The AI stands aside from a side out of the war Under it: WWII 1940: the US out of the war until turn 4 −1 0
  12. Oct 11 The island capital's ferry, home guard and overseas factory Under it: WWII 1940 on a new world map −3 −4
  13. Oct 11 Advanced takes as many neutrals a turn as it can +10 +2
  14. Oct 11 Advanced never stops buying; spare men go to the front +13 +19
  15. Oct 11 Intermediate prices its march into neutral garrisons −7 −11
  16. Oct 11 Advanced stages a blocked target past the desertion line Under it: WWII 1940: Russia at war from turn 4 −3 +1
  17. Oct 12 Advanced fights one enemy at a time Under it: WWII 1940: Finland on the German side −1 +13
  18. Oct 12 Ships built at coastal factories, every level −2 +1
  19. Oct 12 Advanced buys the partner a unit needs to hit hard +8 −1
  20. Oct 12 Every unit type has a role: carriers sail with the fleet +11 +9
  21. Oct 12 No spies with the fog off, every level −1 0
  22. Oct 12 Intermediate and Beginner keep a man on every territory Intermediate changed, not Advanced: spread thinner, it lost to Advanced more often +26 +36
  23. Oct 14 Advanced keeps its main target, lands every man it calls home and counts no building at the desertion line 0 +1
  24. Oct 14 Advanced sails the last load of a won island home and buys nothing over the slots its capital needs 0 +2
  25. Oct 14 Advanced sends the spare men behind the front with the attack beside them +7 0
  26. Oct 14 Intermediate guards its capital against what a fleet carries, and both levels spend every slot Advanced lost 7 games to Beginner with the fog off: its capital guard now doubles only under fog 0 +3
  27. Oct 15 Advanced guards the cities an enemy needs to win, with pickets only where a landing could take them +3 −1
  28. Oct 15 No level plans a sea lane through a strait the enemy holds −3 +5
  29. Oct 15 Advanced's army with nowhere to walk takes the shortest crossing +2 0

League games, by day

Every game a computer player against another, counted on 15 October 2026. Of the rented server's games only the few copied back are here.

The Mac 31,456A rented server 1,190AWS Lambda 29,350
7,300
6,764
9,823
Aug 27Sep 15Oct 1Oct 15

By the numbers

Counted on 14 October 2026, version 6.38.1015. A line is a non-blank line in the repository.

Lines of code
82,640
Lines of tests
111,343
Automated tests
5,010
Lines of docs
13,558

Code and tests, by part

1.35 lines of tests for every line of code.

Code Tests
  • Site
    51,910
    50,789
    Code by area
    • Play view: the board, orders, battles, reports, offline play
      18,608 (36%)
    • Editors: maps, the map generator, units, scenarios
      16,776 (32%)
    • Leagues and the AI assistant
      5,215 (10%)
    • Other pages: home, Help, Mechanics, credits, terms, privacy
      4,204 (8%)
    • Shared: sign-in, layouts, map drawing, database, build
      3,846 (7%)
    • Games list and New game
      3,261 (6%)
  • Engine 3.0x more tests than code
    12,374
    36,984
  • AI player 2.5x more tests than code
    7,754
    19,429
  • Tools and scripts
    7,413
    0
  • Leagues 1.3x more tests than code
    3,189
    4,141

Automated tests, by suite

5,010 tests, all run before every change ships.

  • Site
    1,934
  • Engine
    1,772
  • AI player
    887
  • Browser, end to end
    195
  • Leagues
    222

Test coverage

The share of the code the tests run. Branches counts every path through each if and switch: the hardest of the four to cover.

Engine
  • 99.3% Lines
  • 98.8% Statements
  • 99.2% Functions
  • 92.8% Branches
AI player
  • 99.9% Lines
  • 99.4% Statements
  • 99.9% Functions
  • 93.3% Branches
Site
  • 98.1% Lines
  • 97.1% Statements
  • 97.9% Functions
  • 91.2% Branches
Leagues
  • 99.4% Lines
  • 99.2% Statements
  • 100.0% Functions
  • 97.0% Branches

Mutation testing

Small bugs planted in the code one at a time, each run against the tests: the share a test catches. The mark is our goal, 85%; the usual target is 80%.

88.0%
Engine

14,019 of 15,929 planted bugs caught.

Each of the 1,910 not caught was reviewed and judged harmless or out of normal play.

76.7% at the first run, before tests were written for what got through.

84.6%
Play view logic

8,391 lines: orders, journeys, ferries, rallies, replays, offline play; not the page itself.

6,315 of 7,468 planted bugs caught.

Each of the 1,153 not caught was reviewed and judged harmless or out of normal play.

76.6% at the first run, before tests were written for what got through.

93.3%
Leagues

2,608 of 2,795 planted bugs caught.

The 187 not caught are still to be reviewed by hand.

82.7% at the first run, before tests were written for what got through.

83.1%
AI player

8,638 of 10,398 planted bugs caught.

1,748 of the 1,760 not caught judged harmless or out of normal play, the rest still to be reviewed by hand.

68.9% at the first run, before tests were written for what got through.

Bug hunts and live drives

A bug hunt sends Claude Code agents through the game at once, one per area, each playing it and reading its code for 45 minutes. What they find is judged, then fixed. A live drive plays the real site through its own pages in a browser, every seat, and files what goes wrong. Counted on 14 October 2026.

Bug hunts
76
Agents sent
339
Problems found
1,036
Fixed and still in
750

Every hunt, and what became of what it found

The first hunts found the most; by the last, a hunt of a new feature found a handful. In 21 hunts the record gave no count of fixes, and what was not closed or logged is counted as fixed.

Fixed 750Fixed, then the rule taken back 77Logged for later 30Not a bug, or dropped 179
not at war
77 found
Hunt 1Hunt 20Hunt 40Hunt 60Oct 10

Hunt 1 on Sep 30, the last on Oct 10. The amber fixes went to a rule, "not at war", that was taken back whole and built again a different way.

Live drives, by day

44 drives found 108 problems; 101 were fixed. Bug hunts took over from them at the end of September.

Fixed Not a bug
  • Sep 11
    17 found, 1 drive
  • Sep 12
    12 found, 3 drives
  • Sep 13
    22 found, 10 drives
  • Sep 14
    46 found, 21 drives
  • Sep 15
    3 found, 4 drives
  • Sep 16
    1 found, 1 drive
  • Sep 17
    6 found, 2 drives
  • Sep 18
    1 found, 2 drives
Blackdogranch. Claude and Claude Code are made by Anthropic; this page is not. version 8.38.1247 2026.10.24 14:04:08