
One self-contained HTML file. No install, no build. Desktop and mobile.
Controls: ← → move · ↑/X rotate CW · Z rotate CCW · ↓ soft drop · Space hard drop · C/Shift hold · P/Esc pause. Touch: on-screen buttons + swipe gestures.
Features: 7-bag randomizer · SRS rotation with wall kicks · ghost piece · hold + next preview · line-clear particles & flash · level/speed curve · WebAudio SFX with mute toggle · high score via localStorage · start / pause / game-over screens · neon CRT styling.
This is not a toy snippet. It is a complete Tetris game, about 56 KB, generated with GitPilot and built through an auditable contract workflow.
Every step is recorded in EVIDENCE.md. What makes the result trustworthy is not a promise — it is the process: each batch was bound by a Matrix Builder contract, constrained to a single allowed file, validated with mb check, and approved only when it stayed in scope.
GitPilot touched only frontend/index.html, every single batch.
Each batch ran the same loop:
mb next → mb prompt --coder gitpilot → gitpilot generate → mb check → immutable Matrix Commit
GitPilot handled the implementation work batch by batch, while Matrix Builder defined the scope, generated the contract, validated the output, and blocked anything that failed the checks.
| # | Batch | What GitPilot added | Size | Matrix Commit |
|---|---|---|---|---|
| 1 | Foundation | 10×20 board, 7 colored tetrominoes, render loop, gravity, lock, 7-bag | 11 KB | mc-e5da1ec40b74 |
| 2 | Controls + rotation | move/soft/hard drop, SRS rotation + wall kicks, lock delay, DAS | 20 KB | mc-ed8f08a81d49 |
| 3 | Lines + scoring | line clears, scoring, levels/speed, next preview, hold | 28 KB | mc-1e2903a575aa |
| 4 | Juice | ghost piece, particles + flash, WebAudio SFX, mobile touch, responsive layout | 44 KB | mc-11c9835f1a93 |
| 5 | States + polish | start/pause/game-over, high score via localStorage, a11y, credit | 56 KB | mc-c186f714b6a1 |
$ mb timeline
Tetris Under Contract v1.0.0
Batch 01 Foundation ✓ mc-e5da1ec40b74
Batch 02 Controls and SRS rotation ✓ mc-ed8f08a81d49
Batch 03 Line clears, scoring, levels … ✓ mc-1e2903a575aa
Batch 04 Juice: ghost, particles, sound … ✓ mc-11c9835f1a93
Batch 05 Game states, high score, polish ✓ mc-c186f714b6a1
Every batch returned MATRIX_STATUS: approved score=100. Full transcript in EVIDENCE.md.
pip install agent-generator gitcopilot crewai
# Configure GitPilot with your preferred provider and model.
export GITPILOT_PROVIDER=your-provider
export GITPILOT_MODEL=your-model
export GITPILOT_API_KEY=your-api-key
mb init "A polished neon Tetris game, single self-contained HTML file" --quality standard
for batch in foundation controls scoring juice states; do
mb next "$batch" # plan a scoped batch
mb prompt --coder gitpilot # render the contract
gitpilot generate -m "$(cat coder-prompts/gitpilot.md) + current file + batch spec" -o .
mb check frontend/index.html # validate, fail-closed
done
tetris-under-contract/
├── frontend/index.html ← the whole game, generated with GitPilot
├── EVIDENCE.md ← the 5-batch run: sizes, verdicts, commits
├── coder-prompts/gitpilot.md ← the contract-bound GitPilot prompt
├── .gitpilotrules ← repo guardrails for GitPilot
├── .mb/ ← the Matrix Bundle: blueprint + 5 batches + 5 commits
├── .github/workflows/contract.yml ← CI: re-runs `mb check`, then deploys to Pages
└── README.md
This repository demonstrates AI-assisted software generation under contract.
GitPilot produced the implementation, but the work was governed by Matrix Builder:
mb checkThe result is a playable browser game with a traceable build history: five batches, one file, zero out-of-scope edits.
mb CLI → ruslanmv/agent-generator