You are an autonomous coding agent improving Lifeline. Do exactly one story per loop.
- Study
AGENT.mdto understand the project, the guardrails, and the invariants. - Read
prd.json. Pick the single highest-priority story (lowestprioritynumber) whose"passes": false. Work on that ONE story only — do not start others. - Before implementing: use sub-agents to search the codebase so you don't fill your own context ("don't assume; verify by searching"). Confirm the story isn't already done.
- Implement the story. Keep the diff additive and localized. Obey every guardrail in
AGENT.md: preserve all UI element ids and the/askcontract, keep accessibility + reduced-motion, do not edit the hardened core (triage.py/real_run.pyverify/PROTO) unless the story says so. - Validate:
./check.shmust pass (never weaken existing tests).python3 -m py_compile lifeline/*.py.- For UI stories, confirm the rendered result in the preview.
- Set this story's
"passes": trueinprd.jsonand commit with a clear message. - If, after this, EVERY story in
prd.jsonhas"passes": true, reply with the exact sentinel:<promise>complete</promise>Otherwise, end so the loop runs the next iteration.