Skill: catann
Always prepend the { codex: { ... } } object from the test output (if it
appears) to the final response, and then include the screenshot (if
screenshot.png exists) as the first visual part of the final response,
even when the test fails. Always include the full test_catann.sh output in the
final response. The output can include ANSI color codes; when presenting it,
render a human-readable version with ANSI removed (plain text).
Summary flow
- Start the dev server (keep it running).
- Run tests and capture output.
- Collect
screenshot.png(if present). - Host the image locally and attach it.
- Report results + full logs.
Pre-commit validation
Before committing changes, validate TypeScript by running:
bash1cd firegame/app/firegame 2yarn lint 3yarn tsc --noEmit
Then validate the regression catann suite specifically:
bash1cd firegame/app 2CATANN_REGRESSION=1 timeout 300s bash ./test_catann.sh --codex
Regression mode is enabled via CATANN_REGRESSION=1; only regression-mode choreos execute when this env var is set.
If either command fails (including duplicate/overwritten property diagnostics such as TS2783), fix the issue and rerun until both pass. Treat this as the authoritative typecheck gate before continuing with test runs or commits.
Anti-slop change validation (required)
Before committing any non-trivial Catann change:
- Stage the intended patch and inspect the full diff.
- Identify suspicious additions (extra helpers, hardcoded branches, test-only magic values, broad refactors) and explicitly test whether each is necessary.
- Prefer the simplest implementation with the smallest diff that preserves behavior.
- Re-run the workflow and compare the resulting
{ codex: ... }printout to confirm no regression.
If removing a new abstraction/helper yields the same behavior, do not keep it.
Timestamp format (NYC time)
At the start of each numbered step, record a timestamp in America/New_York using:
bash1TZ=America/New_York date "+%Y-%m-%d %H:%M:%S %Z"
Include the raw command output in your notes/output for that step.
1) Start the dev server (keep running for hot reloads)
bash1cd firegame/app/firegame 2yarn start
Keep this command running.
2) Run tests and capture output
In another shell:
bash1cd firegame/app 2timeout 300s bash ./test_catann.sh --codex
If the timeout is hit, report it as a failure and proceed to collect the screenshot (if available).
If CODEX_HOME is not set, omit --codex so test_catann.sh can start the
server for you.
Fix mode (only if explicitly requested)
If the prompt explicitly requests, fix the failing test and rerun the Catann workflow until it passes. For a solution, are only allowed to change files in firegame/app/firegame/src/routes/catann/app/gameLogic. Do not stop after a single failing attempt or timeout; keep re-running the test command after each fix until you get a clean pass. Once it passes, continue with the screenshot steps. Follow AGENTS.md in the same folder as this skill doc. Do not introduce global variables, global state, or manipulate the DOM or window objects.
Game-logic purity guard
When editing app/gameLogic, keep logic explicitly game-behavior driven.
Avoid hardcoded test fixtures, magic IDs, lookup tables for recorded runs, or
special-case branches that exist only to satisfy a single capture.
If test data is required, consume values that the harness already provides via existing override paths rather than encoding constants in game logic.
3) Locate output image (if present)
bash1cd firegame/app/firegame/test-results 2ls 3# pick the folder just created, then: 4cd <test-results-subfolder> 5ls 6# expect: screenshot.png
4) Host image locally (for browser pickup)
bash1python -m http.server -b 0.0.0.0 8001
5) Screenshot capture (browser tool / Playwright)
If a browser tool is available, open http://localhost:8001/screenshot.png
and include it in the response. If no browser tool is available, still
mention whether screenshot.png was found and hosted.
Ensure the screenshot capture waits for network idle (e.g., use a browser
tool's equivalent of Playwright's wait_until='networkidle') before
attaching the image.