Hackorda Docs
Flows

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

#ActorUI surfaceActionAPI callDB writesSide effectsSuggested 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

#ScenarioExpected 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.

On this page