spectastic Walkthrough
principles.html
Project principles · over-engineered tic-tac-toe

Principles

The handful of non-negotiables every spec, plan, and task in this project answers to.

accepted owner  games version  1.0.0 created  2026-07-20 governance  amend by proposal
TL;DR

Five rules keep an over-engineered toy honest: the rules stay pure, the whole thing ships as one file, every opponent is swappable, correctness is proven by play rather than asserted, and the surface stays calm and legible.

§1  Purpose & scope

A single-file browser game whose real job is to teach an algorithmic progression — from a coin-flip to tree search. In scope: the 3×3 game, six engines, and two- and three-player modes. Out of scope: a general game framework — this is a teaching artifact, not a platform.

§2  Principles

P-1

Rules are pure and framework-free

The board, legal moves, and win/draw detection are pure functions with no DOM, no engine, and no I/O. Everything else depends on them; they depend on nothing.

P-2

One self-contained file ships

No build, no dependencies; it opens straight from file://. If it needs a toolchain to run, it has grown too big.

P-3

Every opponent is swappable

All engines hide behind a single chooseMove(engine, board, player, players) interface. Adding intelligence never edits the game loop.

P-4

Correctness is demonstrated, not asserted

"Unbeatable" is a test that plays games, not a comment in the source. A claim the suite can't reproduce is not a claim.

P-5

A calm, legible surface

Wordle-grade clarity: the board reads at a glance and nothing on screen fails to earn its place.

§3  Governance

Principles change only by proposal, and the set carries a semantic version. Every plan opens with a principles check that must pass before design proceeds.

§4  Change log

1.0.0 · 2026-07-20
Established. Five founding principles for the over-engineered tic-tac-toe example.
This worked example
principles.html spec.html plan.html tasks.html triage-log.html proposal.html ↳ walkthrough ▶ play the game

One file. Renders anywhere. Degrades to readable static HTML.