Ship sprint stories end-to-end
Work through E19/E20 sprint tasks in strict sequence, implement with specialist delegation, verify fully, and mark done.
Prompt
You are implementing E19/E20 sprint stories for ACM-AI — an intelligent Asbestos Containing Material compliance management system.
Read `.ralph/@fix_plan.md` for the current task list.
Read `CLAUDE.md` for project conventions and architecture.
Read `docs/sprint-artifacts/e19-e20-implementation-prompts.md` for per-story detailed implementation instructions.
## Workflow Per Iteration
1. Read `.ralph/@fix_plan.md` — find the next unchecked task `- [ ]`
2. Read the corresponding story file from `docs/sprint-artifacts/` (path is in the task line)
3. Read the matching story section in `docs/sprint-artifacts/e19-e20-implementation-prompts.md` for detailed implementation steps
4. Implement the story following patterns in `CLAUDE.md`
5. Delegate to specialists based on file scope:
- `migrations/`, `api/`, `open_notebook/`, `commands/` → `backend-specialist`
- `frontend/` → `frontend-specialist`
- Mixed stories (backend + frontend): delegate to `backend-specialist` FIRST, then `frontend-specialist` (API before UI)
- Only use specialists when the story touches multiple files/layers; implement simple single-file changes directly
6. Run full verification after all implementation:
```
uv run ruff check .
uv run pytest tests/ -x
cd frontend && npm run lint && npm run build
```
7. If all verification passes:
- Check off the task in `.ralph/@fix_plan.md` (change `- [ ]` to `- [x]`)
- Mark story `done` in `docs/sprint-artifacts/sprint-status.yaml`
- Append a Dev Agent Record to the bottom of the story file:
```
---
## Dev Agent Record
**Implemented:** [date]
**Files changed:** [list key files]
**Tests added:** [list test files]
**Verification:** ruff ✓ | pytest ✓ | lint ✓ | build ✓
```
- Advance the NEXT story in the sequence to `ready-for-dev` in `sprint-status.yaml` (see sequence below)
- Log completion to `docs/sprint-artifacts/party-mode-20260224/progress.md` (create if missing)
- Commit: `feat(STORY-ID): brief description of what was built`
8. If verification fails: fix and retry (max 3 attempts), then output `<promise>BLOCKED</promise>: [reason + error details]`
9. After ALL tasks are `[x]` in `@fix_plan.md` and verification passes: output `<promise>COMPLETE</promise>`
## Story Sequence (STRICT ORDER — one at a time)
```
E19-S1 → E19-S2 → E19-S3 → E19-S4 → E19-S5 → E19-S6 → E19-S7 → E19-S8 (P1)
→ E20-S1 → E20-S2 → E20-S3 → E20-S4
```
When advancing the next story, use this map:
- After E19-S1 done → set `e19-s2-jobs-dashboard: ready-for-dev`
- After E19-S2 done → set `e19-s3-feature-gating: ready-for-dev`
- After E19-S3 done → set `e19-s4-raw-extraction-table: ready-for-dev`
- After E19-S4 done → set `e19-s5-building-review-wizard: ready-for-dev`
- After E19-S5 done → set `e19-s6-acm-schema-mapping-wizard: ready-for-dev`
- After E19-S6 done → set `e19-s7-job-detail-page: ready-for-dev`
- After E19-S7 done → set `e19-s8-conversational-crud-chat: ready-for-dev`
- After E19-S8 done → set `e20-s1-page-boundary-fix: ready-for-dev`
- After E20-S1 done → set `e20-s2-regex-yield-check: ready-for-dev`
- After E20-S2 done → set `e20-s3-not-sampled-capture: ready-for-dev`
- After E20-S3 done → set `e20-s4-e2e-accuracy-validation: ready-for-dev`
## Special Rules
⚠️ **E19-S1 DESTRUCTIVE**: Migration 032 deletes ALL `acm_record` rows and adds `review_status` to `source`. This is expected and approved by the user — proceed without additional confirmation.
⚠️ **E20-S4 GATE**: Do NOT run real PDF extraction for E20-S4 until E20-S1, E20-S2, AND E20-S3 unit tests all pass. Before the extraction run, verify:
```
uv run pytest tests/test_building_inventory*.py tests/test_orchestrator*.py tests/test_acm_extraction*.py -x
```
Only run ONE real extraction on `docs/samplePDF/` to validate. Never re-run unless a specific bug is confirmed unfixed.
💰 **COST AWARENESS**: Never trigger real LLM extraction calls during unit test development. Write all code and tests first, l
claude-code
Source: CoralShades ↗graded A · 85/100 — how grades work (Safety Score v2) →
Similar loops
All product loops →C
/loopProductmedium risk
Drop-point copy loop
Let analytics find the exact moment users give up, then rewrite the words on that one screen.
/loop cadence: weekly. Using the PostHog MCP (read), find the funnel step with the steepest drop-off. Append (step, drop rate, hypotheses) to state-file drop-points.md. Each round, draft rewritten copy/microcopy for the single worst drop screen — draft only, ship nothing to production. Stop after one screen; log analytics errors and stop. Budget: cap $[X]/run. Hard cap: stop after 1 iteration per run.
C
/goalProducthigh risk
Ship P2-2 perception node end-to-end
Take story P2-2 from spec through implementation, Codex dev, and T11 code review until it commits green to fidelity-perception-arc-2026-06-19.
/goal Take Story P2-2 (PNG-grounded PerceptionArtifact + standalone vision node) of Epic P2 from current state through full implementation, testing, and validation. Use spawned bmad-party-mode for the mandatory Tier-3 pre-dev green-light and for any major decision/impasse. Pre-author the spec + Codex dev-prompt; hand dev+test creation to the Codex agent; then run Claude T11 (bmad-code-review 3-lane + remediation + commit + flip done). The goal is accomplished when P2-2 is committed done on branch fidelity-perception-arc-2026-06-19 with the validation gates below all green
C
/loopProductlow risk
Review-mine to roadmap
Compile app-store reviews and support into a roadmap ranked by how much pain each issue causes.
/loop cadence: weekly. Using the app store review APIs [STORES], pull new reviews + support exports. Append (issue, frequency, severity, star-impact) to state-file review-roadmap.md. Each round, re-rank the backlog by pain and draft a one-paragraph problem statement for the top unaddressed item. Write to the file only; change no roadmap tool live. Stop after one; log errors and stop. Budget: cap $[X]/run. Hard cap: stop after 1 iteration per run.