GameStack
An Android app for exploring video games from IGDB (the Internet Game Database) and keeping a personal library, built by AI agents inside a harness I designed. Search is built; Game Detail is next.
I decide the product, design the harness and review every change; AI agents write the code and the documents.
AI learning path: 3 of 10 blocks done, 3 in progress. The learning path
Real screens from the emulator. Game data and covers come from IGDB and belong to their owners.
Why it exists#
GameStack is two things built together: an app headed for Google Play, and a harness (the rules, procedures and automatic checks AI agents work inside) that is meant to be taken to other projects.
When serving users more fully and learning that whole path pull apart, learning wins. The rule is written down, because it explains choices that would look odd in a normal product.
Architecture#
One module, MVI over Clean Architecture: presentation reaches data only through domain. A feature owns its code in feature/; what two or more share lives in core/.
core/data/ feature/search/domain/ feature/search/presentation/ - Data
core/data/ - IGDB APIRetrofit · ApicalypseAuthInterceptor Twitch token · adds the token
- DTOs
- GamesRepositoryImplmaps to the domain
- Result of games
- Domain
feature/search/ domain/ - SearchGamesUseCase
- Result
- Presentation
feature/search/ presentation/ - SearchViewModelcancels old searches
- UiState, effects · events go back up
- SearchScreenCompose UI
Read the code
- The search screen draws one
UiStateand sends events up; a failed refresh shows a banner above the results.SearchScreen.kt · l. 151–196 - The contract and the ViewModel: a newer query cancels the search in flight before it waits out the debounce, so an answer to replaced text never lands.SearchContract.ktSearchViewModel.kt · l. 54–72
- SearchGamesUseCase trims the query; a blank one never reaches the API.SearchGamesUseCase.kt · l. 13–17
- The repository maps DTOs to domain models and returns a
Result, rethrowing cancellation.GamesRepositoryImpl.kt · l. 17–24 - The API service posts an Apicalypse query with the text escaped, and leaves the ranking to IGDB.IgdbApiService.kt · l. 21–29
- Authentication adds the Twitch token to every call; a
Mutexmakes callers share one cached token, and without a token the call fails.AuthInterceptor.kt · l. 16–26AuthRepositoryImpl.kt · l. 20–43
Each name opens its file.
How AI was used#
AI agents write the code and the documents. I choose the work, decide what the rules don't settle, and nothing merges without my yes.
How a change moves
- GitHub issue backlog: defects, product, harnessMe
choose it at a triage
AI agentspropose the order
- Spec features, from Game Detail onMe
approve it
AI agentswrite it with OpenSpec, a tool for spec-driven development
- BuildMe
decide what the rules don't settle
AI agentswrite code, tests and documents
Automationpermission rules (deny) block what is off limits
- CommitAI agents
commit the work
Automationcheck the message and the branch name
- ReviewMe
say yes to each round, then decide what needs me
AI agentsa subagent without the author's context reviews with Claude Code's
/code-review; the author checks each finding, fixes in round 1 what needs no decision and reports the rest - Pull requestMe
say yes to opening it
AI agentsopen it; an external bot reviews it once
Automationbuild, test, lint and commit checks
- MergeMe
say yes
AI agentsmerge it
Automationbranch protection holds it until the checks pass
- CheckpointAI agents
write the handoff the next session starts from
The harness, piece by piece
Guides steer the agents before they act; checks catch what they got wrong after. Birgitta Böckeler, Harness engineering
- Blocks
- A hook, a deny rule or a required check stops it.
- Waits for me
- It needs my yes: a permission rule holds pull requests, instructions hold the rest.
- Guides
- The agents read it, and can miss it.
What gets built
- GitHub issues (Waits for me)
pending work is an issue from one of three forms; I choose what comes next at a triage
.github/ISSUE_TEMPLATE/ADR 0038 - OpenSpec (Waits for me)
from Game Detail on, I approve a feature's spec before it is built; in Search's, every scenario names what verifies it: a test or a check on a device
search/spec.md - Human in the loop (Waits for me)
what the rules don't settle waits for my approval, and I confirm every review triage and every merge
CLAUDE.md
- GitHub issues (Waits for me)
What the agents know
- CLAUDE.md and area rules (Guides)
a test holds the standing instructions under 60 lines, and area rules load only when needed: 31% fewer tokens before any task (measured once, Nov 2026)
ClaudeMdBoundTest.kt.claude/rules/ - Skills (Guides)
one procedure per repeatable task, loaded only when needed: each layer's code and tests, device checks, shipping a branch
.claude/skills/ - Decision records (ADRs) (Guides)
each one states what enforces it: a test, a CI check, a setting, or prose only
decisions/README.md - Session handoff (Guides)
a hook opens each session with where the work stands; the checkpoint Skill rewrites the handoff
session-start.shcheckpoint/SKILL.md
- CLAUDE.md and area rules (Guides)
What they may do
- Deny rules (Blocks)
refuse the common ways to skip a git hook, push to main or change branch protection
settings.json - Ask rules (Waits for me)
opening, editing or merging a pull request stops for my yes
settings.json - Memory hook (Blocks)
stops the first write to each agent memory file, so the agent asks whether the lesson belongs in the repo
memory-gate.mjsADR 0066
- Deny rules (Blocks)
What gets reviewed
- Capped review rounds (Waits for me)
local AI rounds before the pull request, each on my yes and capped per branch: real defects per round fell from 3.3 to 2.2 by round 3 (measured once, Nov 2026)
review-round/SKILL.mdPR #209 - Codex, the review bot (Guides)
one external review round on each pull request, as advice
TOOLING.md - Drift trailer (Guides)
the commit that resolves a disagreement between code and documents says which side was fixed
ADR 0033Commit a00cf8c
- Capped review rounds (Waits for me)
What reaches main
- Git hooks (Blocks)
check every commit's message and the branch name, with the script CI runs too
.githooks/ - CI checks (Blocks)
build, test, lint and commit checks on every pull request
gate.ymlcommits.yml - Branch protection (Blocks)
no direct or forced push; a merge waits for green checks and every review thread resolved, and it binds me too
ADR 0028
- Git hooks (Blocks)
ModernNotes is the opposite experiment: I wrote every line by hand, and AI never wrote the code.
ModernNotes case studyThe learning path#
A self-directed path in AI-assisted Android development, updated each time a block closes. Each block is put to work in GameStack, and every step links to where the repo shows it.
3 Completed3 In progress3 Coming upGoalUpdated Nov 26, 2026
- Block 1LLM foundations and AI-assisted researchCompleted
How large language models (LLMs) work, research with checked sources, and GameStack's first spec, later replaced by a living PRD
PRODUCT.md - Block 2Prompting and context engineeringCompleted
Prompting, CLAUDE.md and the first Skills
- CLAUDE.mdCLAUDE.md
- Skills.claude/skills/
- Block 3Spec-Driven DevelopmentIn progress
A drift checklist and human in the loop, running in GameStack
- Drift checklistDRIFT-CHECKLIST.mdADR 0033
- Human in the loopCLAUDE.mdsettings.json
- Block 4AI-assisted UI designCompleted
Four screens and their states, designed and documented
DESIGN.mddocs/project/design/ADR 0042 - Block 5Harness engineering with Claude CodeIn progress
CI gate, ADRs, rules loaded by path, hooks and session handoffs, all running in GameStack
- CI gategate.ymlcommits.yml
- ADRsdocs/project/decisions/
- Rules by path.claude/rules/ADR 0051ADR 0055
- Hooks.claude/hooks/ADR 0045ADR 0066
- Session handoff.claude/skills/checkpoint/ADR 0065
- Block 6Supervising agents: review, subagents and loopsIn progress
A capped AI review loop, every triage confirmed by me
- Block 7Other agents and Android toolingComing up
Claude, Codex and Gemini agents inside Android Studio and from the terminal, and the open standards that make a harness portable
- Block 8AI features inside appsComing up
AI recommendations in GameStack, in the cloud and on device
- Block 9From idea to prototypeComing up
From an idea to a clickable prototype, fast
- Block 10Capstone: my own harness and loopGoal
Where the whole path leads
Key decisions#
ADRs are the repo's architecture decision records.
runCatching around the callrunCatching also catches the cancellation, so every cancelled search flashed the error screen before the next results.Each repository writes out its own try/catch, and a checklist guards the rule, not a test.GamesRepositoryImpl.kt · l. 17–24ADR 0009SharedFlow without replayA one-shot event raised while the screen is being recreated survives instead of being lost in silence.A duplicated event replays when the user returns, so every control that navigates has to be guarded against a double tap.SearchViewModel.kt · l. 42–43SingleClick.ktADR 0011CLAUDE.md stays smallOne long file with every rule, which it used to beEvery line is paid on every turn, and agents follow it less as it grows.An agent sees an area's rules only once it touches a file there.CLAUDE.mdADR 0051Tests#
Unit tests for every layer Search crosses: mapper, query builder, interceptor, both repositories, use case, ViewModel and screen.
- The ViewModel tests run on virtual time. One pins a fixed bug that could show answers to text already replaced: a newer query must cancel the search already on the network.SearchViewModelTest.kt · l. 406–431
- Robolectric is allowed for screen tests only. The first one found a defect no device would show: the double-tap guard swallowed the first click.SearchScreenTest.ktADR 0016
- A regression test counts only after it was seen failing against the code it guards.ADR 0049
- The harness is tested too: its hooks and scripts run their own tests on every pull request.commits.yml
What went wrong, what is missing#
- The first spec fell short.It repeated the stack and mixed product with test work, and it named no user and no bar for release. A living PRD (product requirements document) replaced it: who the app is for, what each capability does, and what must be true before the first release.PRODUCT.md
- The spec process has not built a feature yet.It was adopted after Search, whose spec came after its code; Game Detail is the first feature to go through it.openspec/
- The Twitch client secret is inside the APK.It stays out of git, but the build compiles it in, where anyone with the APK could read it. It blocks the first release; a small proxy is the likely fix (#111).AuthRepositoryImpl.kt · l. 27–30Issue #111
- Not every rule is a mechanism.Most decisions still have a clause that only prose holds, a deny rule matches the common spellings of a command, and the git hooks work only after a Gradle build installs them. Branch protection and the CI checks hold either way.decisions/README.md
- No automated test runs on a device.Gestures, such as pull to refresh, are checked on an emulator by an agent that follows a Skill.verify-screen-on-device/SKILL.md
What comes next#
Where the app goes next, screen by screen, on its way to Google Play.
- SearchCompleted
- Game DetailDesigned
- LibraryDesigned
- HomeDesigned
- RatingsComing up
- On Google PlayGoal
Designed: the screen has an approved mockup, which may still change.
Code links point to commit a70e7d7 (Nov 26, 2026).
Let's talk.
Looking for Senior Android or Android + AI roles. Available now, for remote work or relocation, based in Mexico City (UTC−6): full overlap with US hours and European afternoons.