Slowest AI Development Workflow
AI assisted game dev workflow based on this setup
Tools
| Tool | Role |
|---|---|
| Defold editor | scenes, collections, GUI layout, assets, running the game |
| Neovim / Neovide | reading and editing code |
| aider-plus | Aider fork: terminal chat, files added by hand, auto-commit per edit, custom commands |
| GCP Vertex AI | pay-per-token models (a cheap main model, a cheaper one for commit messages) |
| luacheck + LuaJIT | lint and a tiny unit-test runner |
| git | history, squash merges, tags |
Budget: under $1 a day.
Template repo
One repo = one game, started from bitset-template.
<game-repo>/
├── README.md the game's name, pitch, how to run
├── Workflow.md the process, step by step
├── .luacheckrc lint rules (includes .script / .gui_script files)
├── .aider.conf.yml Aider settings for this repo
├── .aiderignore Aider only sees Lua, Defold scripts and Markdown
├── .aider-commands/
│ └── tasks.py /tasks, /plan, /task, /done
├── docs/
│ ├── CONVENTIONS.md short rules Aider reads on every message
│ ├── ARCHITECTURE.md screens, messages, LAN duel, state
│ ├── templates/ DS.md, FS.md, squash-commit.txt
│ ├── design/ DS-NNN-<slug>.md what and why
│ ├── func/ FS-NNN-<slug>.md how
│ └── qa/ sanity.md, regression.md (template checks)
├── tasks/
│ ├── TEMPLATE.md
│ └── T-NNN-k-<slug>.md one Aider message each
├── scripts/
│ ├── test.sh luacheck + unit tests
│ └── finish-feature.sh merge gate + squash merge
└── game/ the Defold project
├── game.project
├── input/
├── kit/ shared kit: screen flow, HUD, game over, save, sound, LAN
├── screens/
│ ├── menu/ bootstrap: start menu, settings, credits
│ ├── solo/ single-player loader
│ ├── remote/ LAN duel loader + lobby
│ ├── main/ the game itself + HUD
│ └── game_over/
├── modules/ game logic: resources, settings, session, duel, ...
├── assets/sounds/ sounds.go + audio
└── test/ run.lua + unit/test_*.lua
Rules:
- Logic in pure Lua modules (
game/modules/); scripts stay thin. - Every constant, address and message id in
modules/resources.lua.
New game:
git clone --depth 1 <bitset-template-url> my-game && cd my-game
rm -rf .git && git init -b main
git add -A && git commit -m "init from bitset-template"
game/game.project: title, android packagegame/modules/resources.lua: name, tagline, save id- replace the demo in
game/screens/main/
Flow
One feature = one design spec → one functional spec → a few tasks → one branch → one squash commit.
AI types only in steps 2 (optional draft), 4 and 6.
Step 1 · Design spec: what and why
docs/templates/DS.md → docs/design/DS-001-<slug>.md. Player language, no file or function names:
-
Summary, need, goal, non-goals: why this feature exists at all.
-
Player stories with acceptance criteria in Given / When / Then form:
- S1: As a player, I want chain reactions so that one good move pays off.
- AC1.1: Given a 3-chain, when it clears, then I score 30.
-
Mechanic rules, tuning, feel and assets.
-
Metrics: event, baseline, target, time window.
-
Success criteria: a ship gate, an outcome, and a kill criterion.
-
One page max; longer = two features.
-
status: approvedbefore anything downstream.
Step 2 · Functional spec: how
docs/templates/FS.md → docs/func/FS-001-<slug>.md. Precise enough that the model never invents a name:
-
Editor prep: the objects and GUI nodes I will create in Defold first.
-
Files: every file a task may touch, with its responsibility.
-
Module APIs: function signatures with LuaLS annotations.
-
Scripts: properties, state on
self, whatinit/on_message/updatedo. -
Message protocol: each message with sender, receiver, payload, trigger.
-
Unit tests (optional) and a QA checklist with one line per acceptance criterion.
-
Optional draft:
/askwith the approved DS (about a cent); edit and approve it yourself. -
Commit both specs on
main:
git add docs/design/DS-001-*.md docs/func/FS-001-*.md
git commit -m "spec(001): cascade scoring"
Step 3 · Branch
git switch -c feat/001-cascade-scoring
Step 4 · Tasks
> /plan FS-001
- Writes
tasks/T-001-k-*.mdfrom the FS andtasks/TEMPLATE.md. - Each task: 1–3 files to edit, read-only context, editor prereqs, verify command, instruction pointing to FS sections, observable “Done when”.
- Order: modules → scripts → GUI. Each task leaves the game running.
- Review, edit, commit the task files. Plan in one sitting; run one task at a time.
Step 5 · Editor prep
FS “Editor prep” checklist, by hand in Defold. Collections, game objects, GUI nodes, atlases: never AI.
Step 6 · One task, one session
$ aider-plus
> /tasks # what is left
> /task T-001-2 # guards, prereqs, context, instruction, verify
> /diff
(Defold: hot reload, play)
> /done T-001-2 # re-runs verify, marks done, commits
> /exit
/taskrefuses on: wrong branch, uncommitted changes, dependency not done, file not in the FS.- It clears the chat, adds only the task’s files, sends the instruction, shows verify output (no auto-fix; fix lint by hand).
- Wrong result:
/undo, sharpen the task text, rerun; or fix by hand and commit. - Aider commits are prefixed with the task id.
Step 7 · Test and QA
-
Manual QA is the main check: FS QA checklist on target devices.
-
Unit tests are optional. Write one only when:
- a quick playtest would not catch the bug (scoring maths, rare win/lose states, save/load)
- the module is shared across games
- a bug was fixed there before
- the AI wrote tricky logic to check against DS numbers
-
Plain LuaJIT, no engine (
game/test/run.lua):
-- game/test/unit/test_duel.lua
local duel = require "modules.duel"
return {
{ "higher score wins", function() assert(duel.outcome(5, 3) == "YOU_WIN") end },
}
./scripts/test.sh # luacheck on all Lua + Defold scripts, then unit tests
Step 8 · Squash and merge
./scripts/finish-feature.sh 001 --check # gate only
./scripts/finish-feature.sh 001 # gate, then merge
- Gate: clean tree, tasks done, FS implemented,
test.shgreen, manual QA confirmed. - Then: tasks → verified, tag
archive/feat-001, squash intomain, prefilled commit message:
feat(001): Cascade scoring
Chains now pay off: each cascade step scores more than the last.
Implements: DS-001, FS-001
Tasks: T-001-1, T-001-2 (archive/feat-001)
Tests: 3 passed, 0 failed, template sanity pass
QA: shekhar, 2026-12-02, Android low-end
Hand fixes: combo label position
AI-assisted-by: deepseek-v4.1-flash
Step 9 · Release
CHANGELOG.mdfromgit log --oneline <last-tag>..HEAD- bump the version in
game.project ./scripts/test.shand a manual QA pass of the release build on each device- bundle with bob (
--variant release), commitrelease: vX.Y.Z, tag it
Step 10 · Measure
- After the DS metric window: add Outcome to the DS (value vs target → keep / tune / kill).
status: measured. Tune or kill = new DS.
Game wiring
Screens are collections loaded through proxies; they only talk through messages:
- End a round the same way solo and LAN:
score_changed, thengame_over {result}to the HUD. - LAN duel: same seed on both phones, one
resultmessage each, higher score wins (modules/duel.lua), PLAY AGAIN = rematch on the same connection. - Live game events: add to
resources.remote.relay_events, send withsession.send, receive asnet_message. - Details:
docs/ARCHITECTURE.md.
Template backports
Shared files: game/kit/, scripts/, docs/templates/, docs/qa/, docs/CONVENTIONS.md, tasks/TEMPLATE.md, .aider-commands/, .luacheckrc. Change in a game → backport the same day:
# in the game: the fix is its own commit, message starts with "template:"
git format-patch -1 <commit> --stdout | git -C ../bitset-template am
# in the template
./scripts/test.sh # plus docs/qa/sanity.md, and an R-NN line in regression.md
Drift check:
diff -rq ../bitset-template/game/kit game/kit
Old games stay as shipped unless they need the fix.