1.9 KiB
1.9 KiB
WORKFLOW.md — How the agent should work
The loop (repeat for every step)
- Orient: read
STATUS.md→ find the next unchecked step. - Scope: read only the docs named in that phase heading.
- Plan: write a 3–6 line plan (files to create/edit, what to test).
- Build small: one file or function at a time. Don't write the whole phase in one go.
- Verify: run
npm test, and start the server and hit the endpoint withcurl(or a test) before moving on. - Record: tick the step, update Project Health, add a Session Log line, list new Known Issues.
- Re-orient: go back to 1.
Definition of Done (per step)
- Code is in the right folder per ARCHITECTURE.md
- Inputs validated; errors return the standard error shape (API.md)
- At least one test covers the happy path and one covers a failure path
npm testis green- No leftover
console.logdebugging; no commented-out code blocks - STATUS.md updated
When something breaks
- Read the full error message and stack trace.
- Reproduce with the smallest possible command or test.
- Change one thing at a time. Re-run.
- If stuck after 3 genuine attempts: log it under Known Issues with what you tried, then move to a step that isn't blocked.
Things that waste time — avoid
- Rewriting working files "to clean them up".
- Adding libraries to dodge writing 10 lines of code.
- Building UI polish before the API works.
- Inventing game mechanics not in GAME_DESIGN.md (add to Stretch Goals instead).
- Editing earlier migrations after they've been run. Add a new migration.
Editing files
- Prefer targeted edits over regenerating whole files.
- After editing, re-read the changed region to confirm it is what you intended.
- Never delete the user's
data/*.dbunless a step says to.
Commit style (if git is in use)
phase.step: short description — e.g. 1.2: add authService register/login.