Template
Status: π² (see README Β§status) Owner: Adilet Last updated: YYYY-MM-DD Last verified on production: β
Goal
One sentence: what does this flow accomplish for the user, in plain language.
Actors
- Primary β who initiates and drives the flow
- Secondary β who else gets pulled in (notification recipients, downstream systems)
Preconditions
- Bullet list of state that must exist before the flow can begin.
- Reference seeds, fixtures, or other flows that set up the precondition (e.g. "F-04 has been completed once, so an org and product exist").
Trigger
What action kicks the flow off (a button click, a status transition, a cron tick, an inbound webhook, β¦).
Happy path β step-by-step
| # | Actor | UI surface | Action | API call | DB writes | Side effects | Suggested event |
|---|---|---|---|---|---|---|---|
| 1 | β¦ | β¦ | β¦ | POST β¦ | INSERT INTO β¦ | notification, AI run, β¦ | domain.action |
| 2 | β¦ | β¦ | β¦ | β¦ | β¦ | β¦ | β¦ |
Keep one action per row. If a single user click triggers a fan-out, list the primary write on its own row and the side effects in the rightmost column.
Acceptance criteria
Use Given/When/Then so each row maps to one test case.
- AC-1 β Given β¦, when β¦, then β¦
- AC-2 β β¦
- AC-3 β β¦
Test data / fixtures
What rows need to exist in DB before this test runs. If the baseline seed in Readme is enough, just write "Baseline seed only".
Negative paths
| # | Scenario | Expected behavior |
|---|---|---|
| N-1 | β¦ | β¦ (4xx response, validation message, no DB write) |
| N-2 | β¦ | β¦ |
Manual QA checklist
Discrete, ordered, copy-pasteable into a checklist tracker.
- Step 1
- Step 2
- Verify side effect 1
- Verify side effect 2
Automated test outline
What a Playwright spec covers β not the spec itself, just the shape.
test.describe("F-NN flow name", () => {
test("happy path", async ({ page }) => {
// 1. seed / login as <actor>
// 2. navigate
// 3. click X, fill Y, submit
// 4. assert UI change
// 5. assert DB row via test API
});
test("negative β N-1", ...);
});Code references
- UI:
src/components/... - Pages:
src/app/app/... - API:
src/app/api/... - Hooks:
src/hooks/test-cycles/... - Lib:
src/lib/... - Schema:
src/db/schema.tsβ relevant tables
Events emitted (proposed)
Once telemetry is wired (see Feature Matrix Β§4):
domain.actionβ fired when β¦. Payload:{ key: type, β¦ }.
Open questions / known gaps
- Bullet list of TODOs, design holes, or follow-up flows.