From e46dd36517bf2da1fcb9e92ddfefea421e0165b0 Mon Sep 17 00:00:00 2001 From: Keysat Date: Fri, 19 Jun 2026 12:54:12 -0500 Subject: [PATCH] Pipeline funnel v2: 4-stage enum + migration 0007 + derived grid signals Collapse the inherited 6-stage opportunity funnel to the locked 4-stage per-investor funnel (lead -> engaged -> diligence -> commitment), terminal at commitment. Migration 0007 remaps existing stage values (outreach/meeting -> engaged, due_diligence -> diligence, committed/funded -> commitment) and archives the stray 'lost' value (the grid row is left intact). Inject read-only existing_investor (total_invested>0), last_activity_at, and staleness (''/'aging'>=30d/'stale'>=60d) into the grid GET, stripped on write. Frontend: 4-stage chip tints + Pipeline board / opp-form / mock on the new enum. The visible desktop existing-investor star + staleness recency column + the Stale saved view are deferred to mobile Phase 3 (data is injected + test-locked now, so that phase stays pure-frontend). Longshot was already retired by prior cleanup -- no-op. Tests: test_pipeline_stages_v2.py (migration remap + derivation boundaries) + updated grid-pipeline-link / soft-delete / nl_query; 36/36 green, render-smoke green, fresh-DB migrate clean. --- AGENTS.md | 9 +- ROADMAP.md | 92 +++++++---- .../0007_pipeline_stages_v2.down.sql | 14 ++ .../migrations/0007_pipeline_stages_v2.sql | 25 +++ backend/nl_query/intents.py | 18 +-- backend/nl_query/test_nl_query.py | 15 +- backend/scripts/seed_synthetic.py | 4 +- backend/server.py | 101 ++++++++++-- backend/test_grid_pipeline_link.py | 29 ++-- backend/test_pipeline_stages_v2.py | 145 ++++++++++++++++++ backend/test_soft_delete_reads.py | 7 +- frontend/index.html | 56 +++++-- 12 files changed, 420 insertions(+), 95 deletions(-) create mode 100644 backend/migrations/0007_pipeline_stages_v2.down.sql create mode 100644 backend/migrations/0007_pipeline_stages_v2.sql create mode 100644 backend/test_pipeline_stages_v2.py diff --git a/AGENTS.md b/AGENTS.md index 639ae2b..1fb8032 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -107,13 +107,14 @@ Subsystem rules live in `docs/guides/` and lazy-load in Claude Code via `.claude ## Current state -_Phase 0 + Phase 1 built; **box + repo live at v0.1.0:94** (`main` ahead by docs/design-only commits since). **The fundraising grid + email capture is the canonical system of record.** Active threads: **mobile-first redesign** (design DONE → implementation planning next) and **W2 NL query** (live; web "Ask" box outstanding). History: git log + `start9/0.4/startos/versions/`; backlog/debt: `ROADMAP.md` / `EVALUATION.md`._ +_Phase 0 + Phase 1 built; **box + repo live at v0.1.0:94** (`main` ahead by docs/design-only commits since). **The fundraising grid + email capture is the canonical system of record.** Active threads: **mobile-first redesign** (design DONE → scoped + **Phase 0 data layer BUILT 2026-06-19**, deploy pending; mobile foundation next) and **W2 NL query** (live; web "Ask" box outstanding). History: git log + `start9/0.4/startos/versions/`; backlog/debt: `ROADMAP.md` / `EVALUATION.md`._ - **Mobile-first redesign — design phase COMPLETE; implementation not started.** This session ran the `/design` round-trip Phase C/D: distilled the Claude Design cloud output ("Venture-CRM mobile redesign") into the contract — `DESIGN.md` §8 (responsive) + §4 (mobile component states) + §3 (15px scale), tokens `mobile` group + `color.light`, provenance + per-surface interaction reference in `design/_imports/2026-06-19/`. **Light theme adopted as a planned, toggle-gated feature** (dark default). Comps are Claude Design **runtime prototypes** — re-author each surface in React against the real API, not drop-in. Process learnings pushed to `standards/guides/design.md`. +- **Mobile implementation — SCOPED 2026-06-19 (plan in `ROADMAP.md` "Mobile-first implementation").** Key finding: the inline-style→CSS "blocker" is **~114 inline styles across the 4 surfaces + shell** (Grid 70 / Reminders 18 / Contacts 17 / Pipeline 7 / shell 2), **not ~1,300** — the app is already majority class-based (1,861-line `