Prompt file imported from alfredocox/Pokemon-Champions-Sim-Planner (
.windsurf/workflows/dev-standards.md). Copyright stays with the author.
Development Standards — Pokémon Champion 2026
These rules apply to every implementation session. Follow them in order before writing any code.
Pre-Implementation Gate
-
Pull latest & check branch — Run
git fetch origin && git statusand readMASTER_PROMPT.mdbefore touching any code. Confirm you are on the correct branch and aware of current progress. -
Read the plan — If a plan file exists in
.windsurf/plans/, read it. If no plan exists, create one before implementing.
Implementation Rules
-
Embedded Systems Logic — Organize all code into well-named functions and classes. Entry points (
main, event handlers, top-level scripts) must be clean orchestrators that call into those functions — no inline business logic inmain. Keep cyclomatic complexity low per function. -
Test-Driven Development (TDD) + Modular — Write or update tests BEFORE implementation. Each module/feature gets its own test file. Follow the RED → GREEN → REFACTOR cycle. Never merge code that breaks existing tests.
-
Precise, Concise Plans — All plans must be:
- Bullet-format, scannable in under 60 seconds
- Each step is a single concrete action (not a paragraph)
- Written so that any AI agent (including free-tier SWE models) can follow and implement precisely
- Include file paths, function names, and acceptance criteria where applicable
Post-Implementation Gate
-
Update MASTER_PROMPT.md — After completing work on a branch, update this file with: what was done, current status, blockers, and open questions. This is the team handoff doc.
-
Verify before push — Run the test suite, confirm no regressions, check that the bundle builds cleanly.
-
No auto-commits/pushes — Never run
git commitorgit pushwithout explicit user approval. Present changes for review first. -
Rebuild bundle after app source changes — If ANY of the following files are modified, the bundle MUST be rebuilt before pushing:
engine.js,data.js,ui.js,style.css,strategy-injectable.js,replay_coach.js,replay_learning.js,move_legality.js,move_support.js,legality.js,index.html,storage_adapter.js,supabase_adapter.js,logger.js,runtime_data.js,generated/pokemon_showdown_legal_data.jsThis is the exact set CI checks in
bundle-freshness-check.yml. When in doubt, rebuild.cd poke-sim && python3 tools/build-bundle.pyThen stage and commit
poke-sim/pokemon-champion-2026.html. CI will fail with "Bundle drift detected" otherwise. -
Update sw.js after app source changes — Any PR that modifies app source files must also update
poke-sim/sw.jsto bump the cache version. Run the release script:chmod +x tools/release.sh && ./tools/release.sh <tag>Or manually bump
CACHE_NAMEinsw.js. CI will fail with "PWA users will receive stale cached files" otherwise.