Signal/context/current-state.md
Kisa bd0009ea10 docs+state: Convex-Signal spike brief + ship-status ledger + session wrap [CC]
- docs/convex-signal-instance-brief-2026-06-24.md: modular, backend-swappable Convex spike brief (separate repo signal-convex)
- docs/ship-status-ledger.md: committed shipped/not-shipped/why ledger, shared with Pi
- context/current-state.md: session wrap (delegation trigger shipped, NocoDB diagnosed, Convex eval)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 13:38:46 -04:00

42 lines
6.8 KiB
Markdown

v:1
# current-state
ACTIVE: Claude SHIPPED + verified the Claude-side delegation trigger (caught + fixed Pi's $1->stdin bug and the Finding-4 dispatch-rule conflict; verified firing live). Diagnosed the NocoDB leads failure: the Signal base's data source is corrupted and creates PK-less tables (capture still works, delete/update don't). Ran a full Convex platform evaluation (Professional $25/dev/mo includes the BAA + HIPAA/SOC2 + daily backups, NOT Enterprise-gated; leads are PII-not-PHI so they stay outside the PHI boundary). Wrote the Convex-Signal spike brief and created a committed ship-status ledger (docs/ship-status-ledger.md).
NEXT (in order): (1) Kisa: dedup decision (same patient + device + DOS under two order numbers -> one worklist line or two?) -> unblocks Claude's readiness-model build. (2) Pi: design the modular Convex-Signal spike from docs/convex-signal-instance-brief-2026-06-24.md (separate repo signal-convex; swappable auth + data layer; reuse the readiness model). (3) Kisa: send the Convex BAA email + /pilot-prep labABLE Fri 2026-06-26 1:30 PM. (4) Claude: build the readiness model once dedup is decided. (5) Claude: research-versioning Layer-1 + add signal/docs/ to its scope (Audit Finding 5 — the reason design docs need manual commits). (6) After Pi's Convex design + Kisa approval: create signal-convex (Claude=GitHub, Forgejo needs Kisa/token), Claude builds the spike. FULL ship-status + reasons/dependencies: docs/ship-status-ledger.md.
## Decisions (last 8)
- 2026-06-24 [CC]: SHIPPED the Claude-side delegation trigger — dispatch-trigger.sh reads stdin JSON (fixed Pi's $1 bug), settings.json UserPromptSubmit hook wired, dispatch SKILL.md thresholds added, Finding-4 clarifying line so old+new dispatch rules don't conflict. Verified live. Audit Findings 1/2/4 (this build) closed; 3/8 Pi-side, 5/6/7/9 research-versioning/phase-2 and non-blocking.
- 2026-06-24 [CC]: NocoDB leads diagnosed — Signal-base data source bdmhi02nks1pg6g is corrupted, creates PK-less tables (old leads + a fresh test table both no-PK; content base healthy). SQLite can't add a PK to a populated table (Route 1 failed). Capture still works (n8n webhook signal-cgm-lead inserts ok); 2 test rows un-deletable. Folded into the platform decision.
- 2026-06-24 [CC]: Convex evaluation (verified). Professional $25/dev/mo includes BAA + HIPAA/SOC2 reports + daily backups (NOT Enterprise). Leads = PII-not-PHI -> outside the PHI/Validated-Cloud boundary. AWS (BAA + RDS/S3 provisioned, parked) = proven fallback; Neon = cheaper managed Postgres. Decision: build a SEPARATE 'Signal on Convex' spike (repo signal-convex), modular + backend-swappable to limit lock-in. Brief: docs/convex-signal-instance-brief-2026-06-24.md.
- 2026-06-24 [CC/Kisa]: Operating principle locked — ship-status + reason/dependency for anything unbuilt lives in git (docs/ship-status-ledger.md), NOT private memory, so Pi + Claude + Kisa all see what shipped and why/why-not. Kisa validates; the two agents reason next steps.
- 2026-06-24 [Pi]: Option B research artifact auto-versioning designed and persisted to docs/research-versioning-design-2026-06-24.md. Pi-side extension (research-versioning.ts) auto-stages research files on write. Skill (research-versioning) added. Content dir (signal/content/blog/) created. Claude builds research-autopush.sh + Stop-hook entry.
- 2026-06-24 [Pi]: Delegation router full design persisted to docs/delegation-router-design-2026-06-24.md (trigger keyword sets + injected text + hook config + dispatch thresholds + Pi-side mirror extension + two process skills). Skills deployed: delegation-discipline + design-review-persist.
- 2026-06-24 [CC]: AIOS-as-a-consulting-business PARKED (pipeline, not ruled out). Signal stays the product; AIOS thinking stays active. Activate only on demand-pull + Signal self-sustaining (~2-3 paying contracts) + delegable capacity. Memory: project_aios_consulting_parked.
- 2026-06-23 [CC]: Readiness model redesign locked. Signal never determines/guesses payer plan type, eligibility, or coverage; client supplies plan type as a required mapped field; every determination cites the rule + client input. Worklist = one record per patient UUID with per-device CoverageLines; verdict from required-vs-supplied. Brief: docs/readiness-model-brief-2026-06-23.md.
## Open Threads (max 5)
- CONVEX-SIGNAL SPIKE (2026-06-24): brief ready (docs/convex-signal-instance-brief-2026-06-24.md); separate repo signal-convex; Pi designs next. Deps: Kisa's Convex BAA email; repo creation post-approval. Goal: prove Convex on the real product, low-risk parallel, before any platform commitment.
- DATA-PLATFORM DECISION (2026-06-24): NocoDB leads broke (no-PK, corrupted source). Options: repaired-NocoDB / Supabase Postgres / Neon / AWS (already set up) / Convex. Leads = non-PHI. Informed by the Convex spike. Interim: capture works; 2 test rows un-deletable.
- READINESS MODEL BUILD: BLOCKED on Kisa's dedup decision. Design ready: docs/readiness-model-brief-2026-06-23.md.
- DELEGATION / RESEARCH-VERSIONING CLEANUP: trigger SHIPPED; remaining = research-versioning Layer-1 + signal/docs scope (Finding 5), low-priority Findings 6/7/9, Pi-side 3/8. Ledger: docs/ship-status-ledger.md.
- LabABLE Meeting Fri 2026-06-26 1:30 PM — /pilot-prep.
## Stack
- Signal: PHI contained in `patient_id` (name, MRN, account #s) — tokenization via RAP-ID/CSP-ID (rotating anonymous ID, not static UUID). Real PHI currently BLOCKED/mock — no active exposure.
- Signal-api: Railway (signal-api-production-91c2). Signal-ui: Vercel (signal-ui-xi.vercel.app). Supabase: itmospnregdyiatbbdwl (JWT key).
- Clerk: production key on Vercel + Railway; frontend auth via clerk.sttilsolutions.com; Google OAuth configured.
- Leads: website form -> n8n webhook (n8n.sttilsolutions.com/webhook/signal-cgm-lead) -> NocoDB (Signal base source corrupted, no-PK; capture works, cleanup blocked). Convex spike + platform decision pending.
- Compliant fallback: AWS BAA signed 2026-05-27, RDS (signal-db) + S3 provisioned, parked. Convex Professional $25/mo = BAA-capable alternative under evaluation.
- TriLane: localhost:8000 (signal/sessions/scale-software). Pi reaches it over HTTP (127.0.0.1:8000); contract in trilane/TRILANE_HTTP_API.md.
- Model for Pi: deepseek/deepseek-v4-flash.
## Tip
State protocol: read = `git pull --rebase` then read this file (warn if Updated > 24h old); write = edit ACTIVE/NEXT, append one author-stamped decision, then commit + push. Full protocol in the `state-sync` skill. Detailed ship-status (what shipped / didn't / why) = docs/ship-status-ledger.md. TriLane = searchable archive, not live state.
## Updated: 2026-06-24 (CC: session wrap. Delegation trigger SHIPPED + verified; NocoDB leads diagnosed; full Convex evaluation ($25/mo Professional incl BAA) + spike brief; ship-status ledger created at docs/ship-status-ledger.md.)