docs: record funnel phases 7-10 delivered — 293 tests, gaps list updated (D16 final)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat/client-detail-redesign
Thomas Joise 5 days ago
parent 953cf1dff8
commit 7862452989

@ -43,7 +43,7 @@ distilled to what applies to HQ. A change that breaks one does not land.
| Append-only audit | Every mutation calls `writeAudit(db, userId, action, entity, id, before, after)` in the **same transaction** as the change. The audit log is append-only — never update or delete rows. Previews and the public share route write nothing. | `audit.ts` |
| Client id is the future tenant id | `client.id` is a client-generated UUIDv7 that becomes `tenant_id` when the cloud tier stands up — same rows, promoted once. Never re-key clients. | `repos-clients.ts` |
| No silent caps | Every list that can grow paginates or warns; never silently truncate. | reports, directory queries |
| Strict TS, green before landing | Strict TypeScript everywhere; `npm run typecheck` and `npm test` both clean before anything lands. Money math is locked by tests — a rounding change without a test change does not land. | `tsc`, vitest (270 tests) |
| Strict TS, green before landing | Strict TypeScript everywhere; `npm run typecheck` and `npm test` both clean before anything lands. Money math is locked by tests — a rounding change without a test change does not land. | `tsc`, vitest (293 tests) |
## Running it
@ -63,7 +63,7 @@ cd apps/hq-web && npm run dev
- Env: `HQ_DATA_DIR` (DB location), `SIMS_PIN_PEPPER` (set once, never change), `HQ_SECRET_KEY`
(before Gmail), `GOOGLE_*` (Gmail), `AWS_*` (Cost Explorer), `HQ_PORT` (default 5182).
- Health check: `GET /api/health``{ ok: true }`.
- Verified state: `npm install` + typecheck clean, 270 tests pass. Exercise real flows end
- Verified state: `npm install` + typecheck clean, 293 tests pass. Exercise real flows end
to end before claiming done.
## Docs (kept in `docs/`)

@ -29,7 +29,7 @@ document and conversation we've had with them.
## Build state (start here)
Working codebase, not a plan. `npm install` + typecheck are clean and **270 tests pass**.
Working codebase, not a plan. `npm install` + typecheck are clean and **293 tests pass**.
Current state and run-vs-pending detail live in **[STATUS.md](STATUS.md)**; the go-live
runbook (server, HTTPS, backups, Gmail/AWS/import wiring, the Postgres switch) is in
**[docs/DEPLOY-HQ.md](docs/DEPLOY-HQ.md)**.

@ -21,9 +21,9 @@ reminders driven by the dated `reminder_schedule` table.
| --- | --- |
| `npm install` | clean |
| `npm run typecheck` (root + workspaces) | clean, no errors |
| `npm test` (`vitest run`) | **270 tests pass across 55 files** |
| `npm test` (`vitest run`) | **293 tests pass across 57 files** |
The 270 figure is the live `vitest run` count measured 2026-07-17, after the
The 293 figure is the live `vitest run` count measured 2026-07-17, after the
quote-to-close funnel slice and its review fixes. Test files live under
`apps/hq/test/` (49 files, including `employees`, `employees-routes`,
`client-owner`, `pipeline`, `quote-followup`, and `reminder-schedule`),
@ -269,15 +269,6 @@ rasterizes for the PDF.
- **AWS cost pull is env-gated** — the scheduled and manual pulls run only when
`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` are configured; otherwise usage
is owner-entered by hand.
- **Funnel spec phases 710 are designed, not built** (see
`docs/superpowers/specs/2026-07-17-quote-to-close-funnel-design.md`): the
one-click `POST /documents/:id/convert-and-send` and proforma
`POST /documents/:id/supersede` endpoints do not exist yet (the underlying
convert guards landed); invoice-overdue escalation still uses the **monthly
bucket** — the dated 7/15/30 `invoice_overdue` cadence row is seeded and
`resolveSchedule` supports it, but the scan does not read it yet; and the
module → client roster (`GET /modules/:id/clients` + CSV export +
owner/manager Notify-all) is not implemented.
- **APEX import is CLI-only** — no web UI for staging/commit.
- **Reminders live on the Dashboard** — there is no standalone reminders page,
and there is no separate documents-list page (documents are reached from the

@ -199,9 +199,11 @@ console users are a small bounded set (single-digit headcount), the count is dis
and nothing is silently truncated, which is the intent of rule 8. If the team ever
grows past a screenful, paginate it like every other list.
**Delivery state (2026-07-17):** phases 16 landed (employee foundation + management
surface, owner plumbing, dated schedule, pipeline chase-list, escalating quote
follow-up) along with the F3/F4 convert hardening. The `convert-and-send` and
`supersede` endpoints, invoice `dN` milestone escalation (scan still uses the monthly
bucket), and the module → client roster (phases 710) are decided here but not yet
implemented — tracked in STATUS.md Known gaps.
**Delivery state (2026-07-17, final):** all ten phases landed. Phases 16 (employee
foundation + management surface, owner plumbing, dated schedule, pipeline chase-list,
escalating quote follow-up) plus the F3/F4 convert hardening, then 710 in the same
day's second pass: one-click `POST /documents/:id/convert-and-send` (guards → one txn
convert+issue → post-commit email), proforma `POST /documents/:id/supersede`, invoice
`dN` milestone escalation (d7/d15/d30 from the dated schedule, F7 highest-only
catch-up), and the module → client roster (`GET /modules/:id/clients` + CSV export +
owner/manager Notify-all with per-recipient audit). Suite at 293 tests / 57 files.

Loading…
Cancel
Save