Slowest AI Development Workflow Setup
This is the slowest AI development workflow, and the setup notes below were written by Claude.
0. Prerequisites
Tools to install: Placeholders used below: <PROJECT_ID> (GCP project ID), <FORK_URL> (your aider fork), <game-repo>, <game>.
- git
- uv, plus Python 3.12 through uv
- luacheck (Lua linter, on
PATH) - jq (section 6.5)
- gcloud CLI, only if already installed (section 2.5)
- Neovide
- Defold editor
Paths used in this manual:
| What | Path |
|---|---|
| Aider fork | ~/bitsetgames/aider/github-source/aider-plus |
| Service-account key | ~/bitsetgames/gcp/aider-vertex.json |
| Global Aider config | ~/.aider.conf.yml, ~/.aider.model.settings.yml |
| Analytics state / local log | ~/.aider/analytics.json, ~/.aider/events.jsonl |
| Game repos | ~/bitsetgames/<game-repo> |
1. aider-plus fork
1.1 Clone
mkdir -p ~/bitsetgames/aider/github-source && cd ~/bitsetgames/aider/github-source
git clone <FORK_URL> aider-plus && cd aider-plus
1.2 Add files
| File | Content |
|---|---|
aider/plus.py | the latest plus.py (hooks, /commands, LiteLLM error tolerance, gcloud isolation, Defold scripts as Lua, lint without auto-fix) |
requirements/requirements-vertex.txt | google-cloud-aiplatform |
requirements/litellm-overrides.txt (optional) | litellm==1.111.0, certifi, anyio, aiohttp, importlib-metadata (one per line) |
todo.txt | trim list (voice, file watching, update checks, crash reports, onboarding) |
1.3 pyproject.toml
[project.scripts]
aider = "aider.main:main"
+aider-plus = "aider.plus:main"
@@
playwright = { file = "requirements/requirements-playwright.txt" }
+vertex = { file = "requirements/requirements-vertex.txt" }
1.4 Commit trailer wording (aider/repo.py, around line 252)
- commit_message_trailer = f"\n\nCo-authored-by: aider ({model_name}) <[email protected]>"
+ commit_message_trailer = f"\n\nCo-authored-by: aider ({model_name})"
1.5 Install
uv venv --python 3.12
uv pip install -e ".[vertex]"
# newer LiteLLM instead:
# uv pip install -e ".[vertex]" --override requirements/litellm-overrides.txt
.venv/bin/aider-plus --version
1.6 Activate the venv (each new terminal, before cd to a game repo)
source ~/bitsetgames/aider/github-source/aider-plus/.venv/bin/activate
aider-plus --version
1.7 Commit
git add -A && git commit -m "aider-plus: launcher, vertex extra, commit trailer"
2. GCP Vertex AI
2.1 Project (Cloud console)
- Create project
<PROJECT_ID>, link billing. - APIs & Services → enable Vertex AI API (
aiplatform.googleapis.com).
2.2 Service account
- IAM & Admin → Service Accounts → Create → name
aider-vertex. - Role: Vertex AI User (shown as Agent Platform User). No other roles.
aider-vertex→ Keys → Add key → Create new key → JSON.
mkdir -p ~/bitsetgames/gcp
mv ~/Downloads/<PROJECT_ID>-*.json ~/bitsetgames/gcp/aider-vertex.json
chmod 600 ~/bitsetgames/gcp/aider-vertex.json
git -C ~/bitsetgames/gcp rev-parse --show-toplevel # must print an error
2.3 Models (Model Garden)
| Model | Action |
|---|---|
| DeepSeek V4.1 Flash | model card → Enable → accept terms |
| Gemini 3.1 Flash-Lite | nothing (Gemini needs no enabling) |
2.4 Spending limits
- Billing → Budgets & alerts → monthly budget, alerts at 50 / 90 / 100%.
- IAM & Admin → Quotas & system limits → filter each model → lower per-minute limits.
2.5 Remove gcloud fallback
gcloud auth application-default revoke
gcloud auth revoke --all
Verify (all must pass):
gcloud auth list # No credentialed accounts.
ls ~/.config/gcloud/application_default_credentials.json # No such file
echo "$GOOGLE_APPLICATION_CREDENTIALS"; echo "$CLOUDSDK_CONFIG" # both empty
cd ~/bitsetgames/aider/github-source/aider-plus
env -u GOOGLE_APPLICATION_CREDENTIALS NO_GCE_CHECK=True \
.venv/bin/python -c "import google.auth; print(google.auth.default())" # DefaultCredentialsError
2.6 Key rotation (every few months): create new key → update vertex_credentials path (section 3.2) → delete old key. Leak: delete the key in the console.
3. Aider configs (global)
3.1 ~/.aider.conf.yml
+model: vertex_ai/deepseek-ai/deepseek-v4.1-flash-maas
+weak-model: vertex_ai/gemini-3.1-flash-lite
+edit-format: diff
+auto-commits: true
+suggest-shell-commands: false
+map-tokens: 1024
+check-update: false
+notifications: true
+set-env:
+ - VERTEXAI_PROJECT=<PROJECT_ID>
+ - VERTEXAI_LOCATION=global
3.2 ~/.aider.model.settings.yml (from the downloaded .aider.model.settings.yml)
- vertex_credentials: /home/YOU/.secrets/aider-vertex.json
- vertex_project: PROJECT_ID
+ vertex_credentials: /Users/shekhar/bitsetgames/gcp/aider-vertex.json
+ vertex_project: <PROJECT_ID>
vertex_location: global
Entries in the file:
| Model | edit_format | weak_model_name | extra_params |
|---|---|---|---|
vertex_ai/gemini-3.1-flash-lite | diff-fenced | — | &personal_vertex |
vertex_ai/deepseek-ai/deepseek-v4.1-flash-maas | diff | vertex_ai/gemini-3.1-flash-lite | *personal_vertex |
Rules: full path in vertex_credentials (~ is not expanded); every model used is listed, including the weak model.
3.3 Check loaded config
aider-plus --verbose --exit 2>&1 | head -30 # Config File (...) sections, model, weak_model
4. Neovim / Neovide
4.1 init.lua
+vim.filetype.add({ extension = {
+ script = "lua", gui_script = "lua", render_script = "lua", editor_script = "lua",
+} })
+
+vim.o.autoread = true
+vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold" }, { command = "checktime" })
4.2 Launch
cd ~/bitsetgames/<game-repo> && neovide .
Window layout: Neovide (your code) · Defold editor (scenes, assets) · terminal with aider-plus at the repo root.
5. Defold project repo
5.1 Create
mkdir -p ~/bitsetgames/<game-repo>/{docs,game-src}
cd ~/bitsetgames/<game-repo> && git init
Defold editor → New Project → Empty → location ~/bitsetgames/<game-repo>/game-src/<game>.
5.2 Structure
<game-repo>/
├── .gitignore
├── .aiderignore
├── .luacheckrc
├── .aider.conf.yml
├── docs/
│ └── CONVENTIONS.md
└── game-src/
└── <game>/
├── .gitignore (Defold's, keeps /.internal and /build)
├── game.project
├── input/
└── main/
5.3 game-src/<game>/.gitignore (Defold’s) — check it contains:
/.internal
/build
5.4 .gitignore (repo root)
+.aider*
+!.aider.conf.yml
+!.aiderignore
+.env
5.5 .aiderignore (allowlist; no !*/ line)
+*
+!*.lua
+!*.script
+!*.gui_script
+!*.render_script
+!*.editor_script
+!*.md
+!.luacheckrc
5.6 .luacheckrc
+std = "luajit"
+max_line_length = false
+unused_args = false
+exclude_files = { "game-src/*/build/**", "game-src/*/.internal/**" }
+globals = { "init", "final", "update", "fixed_update", "on_message", "on_input", "on_reload" }
+read_globals = {
+ "go", "gui", "msg", "vmath", "hash", "hash_to_hex", "pprint", "sys", "render", "resource",
+ "sound", "sprite", "factory", "collectionfactory", "collectionproxy", "label", "physics",
+ "particlefx", "timer", "http", "json", "window", "buffer", "image", "zlib", "crash",
+ "profiler", "model", "tilemap", "camera", "socket", "html5",
+}
5.7 docs/CONVENTIONS.md
+# Conventions
+- Engine: Defold. Scripts are Lua (.script, .gui_script, .lua modules).
+- Communicate between game objects with msg.post; don't call other scripts directly.
+- Script properties: go.property; per-instance state lives on `self`.
+- Tuning numbers live in balance.lua tables, never hard-coded in scripts.
+- Never edit .collection/.go/.gui/.atlas files or game.project; tell me what to change in the editor instead.
+- Keep changes minimal; don't refactor code I didn't ask about.
5.8 .aider.conf.yml (repo root; merges with ~/.aider.conf.yml)
+read:
+ - docs/CONVENTIONS.md
+lint-cmd:
+ - "lua: luacheck --no-color"
5.9 Commit
rm -rf .aider.tags.cache.v4
git add -A && git commit -m "Defold project + Aider setup"
5.10 New script (each time)
- Defold editor → New → Script → attach to a game object → save.
git add -A && git commit -m "Add <name>.script"- Aider:
/add game-src/<game>/main/<name>.script→ describe the logic.
6. PostHog analytics and local events
6.1 PostHog → Project settings → copy Project API key (phc_…) and host (https://us.i.posthog.com or https://eu.i.posthog.com).
6.2 ~/.aider.conf.yml
-analytics-disable: true
+analytics-posthog-host: https://us.i.posthog.com
+analytics-posthog-project-api-key: phc_<key>
+analytics-log: /Users/shekhar/.aider/events.jsonl
6.3 ~/.aider/analytics.json (keep uuid)
- "permanently_disable": true,
- "asked_opt_in": true
+ "permanently_disable": false,
+ "asked_opt_in": false
6.4 Verify, then opt in
aider-plus --verbose --exit | grep -i posthog # host + phc_ key, not None
aider-plus --analytics # answer Y (Ctrl+C to abort; N disables permanently)
6.5 Check events
- PostHog → Activity:
launched,repo,auto_commits,cli session,command_add,message_send_starting,message_send. - Local:
tail -3 ~/.aider/events.jsonl
jq -s '[.[] | select(.event=="message_send") | .properties.cost] | add' ~/.aider/events.jsonl
6.6 Insights (event message_send)
| Insight | Measure | Breakdown |
|---|---|---|
| Spend | sum of cost, per day | main_model |
| Context size | average prompt_tokens | — |
| Edit formats | count | edit_format |
| Errors | count of message_send_exception | — |
7. Verification and test session
7.1 Model routing (from any folder)
aider-plus --model vertex_ai/gemini-3.1-flash-lite --message "reply ok" --no-git
aider-plus --model vertex_ai/deepseek-ai/deepseek-v4.1-flash-maas --message "reply ok" --no-git
Then: console → aider-vertex → Keys → key shows recent use.
7.2 Startup check (repo root)
Main model: vertex_ai/deepseek-ai/deepseek-v4.1-flash-maas with diff edit format, infinite output
Weak model: vertex_ai/gemini-3.1-flash-lite
Git repo: .git with N files
Repo-map: using 1024 tokens, auto refresh
Added docs/CONVENTIONS.md to the chat (read-only).
7.3 Test session
cd ~/bitsetgames/<game-repo>
git switch -c aider-smoke-test
aider-plus
> /map # only .lua / .script files, with functions
> /run luacheck game-src # lint output
> /add game-src/<game>/main/<name>.script
> <one-line change request> # edit applied + commit
Defold editor → File → Hot Reload → play.
> /diff # last change
> /undo # reverts the Aider commit
> /drop
> /clear
> /exit
git log -3 --oneline
git switch main && git branch -D aider-smoke-test
7.4 Every task
- Commit own work; save in Defold.
/add1–3 files → instruction.- Hot reload → play → keep or
/undo. /drop→/clear.
7.5 Commands
| Command | Use |
|---|---|
/add <file> | editable file |
/read-only <file> | context, not editable |
/ask <question> | discussion, no edit |
/diff | last change |
/undo | revert last Aider commit |
/tokens | context size and cost |
/map | repo map as sent |
/run <cmd> | add command output to chat |
/drop, /clear, /reset | remove files / history / both |
8. Troubleshooting
| Symptom | Fix |
|---|---|
| ”No LLM model was specified” / OpenRouter prompt | add model: and weak-model: to ~/.aider.conf.yml (3.1); check with --verbose --exit |
VERTEXAI_PROJECT: Not set warnings | add set-env block (3.1) |
Repo-map: using 4096 tokens | add map-tokens: 1024 (3.1) |
| “default credentials were not found” | vertex_credentials path wrong or key missing (3.2) |
| 403 | model not enabled in Model Garden, or service-account role missing (2.2, 2.3) |
| 404 | wrong model ID or region |
| 429 | quota; raise in IAM & Admin → Quotas |
/map shows game.project or editor files | .aiderignore allowlist (5.5); no !*/ line |
.script files listed without functions | latest plus.py; rm -rf .aider.tags.cache.v4 |
Scripts missing from /map | not committed: git status --short game-src |
| ”Lint errors left for you to fix” | expected (plus.py); fix by hand |
| Analytics opt-in question | Ctrl+C to abort; N disables permanently (reset in 6.3) |
| After upgrading LiteLLM | rerun 7.1 for every model |