v:1

# current-state

ACTIVE: 2026-06-27. Readiness-model core engines COMMITTED (additive, not yet wired): dedup foundation core/dedup.py (c07d054) + verdict engine core/readiness.py (206bf71); 73 tests green; both code-auditor-reviewed (HIGH config-surface false-green holes found + fixed). Pi's STTIL AIOS architecture map is DONE (STTIL-Vault/Projects/STTIL-AIOS-architecture-map.md, 338 lines). Pi briefed for the readiness worklist UX (STTIL-Vault/Projects/pi-readiness-ux-design-brief-2026-06-27.md). labABLE CRUSH brief SENT 2026-06-27. PRIORITIZATION: Signal active build PAUSES at this clean checkpoint; Claude + Kisa finish the Insight Engine to its July 4 deadline (separate lane/terminal); Pi advances the Signal UX design async.

NEXT (in order): (1) Pi: readiness worklist UX design — brief staged 2026-06-27 (STTIL-Vault/Projects/pi-readiness-ux-design-brief-2026-06-27.md): label semantics, patient→device→doc nesting, "Plan Type Needed" state, plan-type value-mapping at import. (2) Claude (after Pi design + Kisa sign-off — BEHAVIOR CHANGE to live grading): patient rollup + WIRE readiness model into the live pipeline (orchestrate in api/main.py or a new module, NOT inside coverage_calculator — circular import) + rules-to-addressable-config (citation IDs) + remove live name-guesser/default path. (3) Kisa: schedule labABLE follow-up call (CRUSH brief SENT 2026-06-27). (4) Claude: signal-convex repo + Convex spike Phase 1. (5) Claude: research-versioning Layer-1 + add signal/docs/ to scope. NOTE: Signal active build PAUSED until the Insight Engine ships (~July 4 deadline).

[AIOS build status] The map is written. Highest-impact build is the readiness model, NOT AIOS enhancements. AIOS Phase 1 items (reasoning frameworks, Playground, /board skill) are <5 hours total and optional until Signal has customer momentum.

## Decisions (last 8)

- 2026-06-27 [CC]: Readiness engines COMMITTED — c07d054 (dedup foundation) + 206bf71 (verdict engine); code-auditor found + fixed HIGH config-surface false-green holes (a known plan missing from payer_rules.json no longer grades green; the green gate now checks every item); 73 tests green. Pi readiness-UX brief staged. labABLE CRUSH brief SENT. PRIORITIZATION DECISION (Kisa): Signal active build pauses at this checkpoint; Claude + Kisa finish the Insight Engine to its July 4 deadline (separate lane); Pi advances the Signal UX design async. Lanes-clear: one project per terminal/session.
- 2026-06-26 [Pi]: STTIL AIOS architecture map DESIGNED and WRITTEN to STTIL-Vault/Projects/STTIL-AIOS-architecture-map.md (338 lines, 10 sections). 6-layer architecture with per-layer Have/Partial/Gap status, build sequence in 3 phases, and comparison to coach's framework. Kisa is ahead of coach's L2 AIOS in memory breadth, multi-model research, and cross-session state protocol. Highest-impact build remains the Signal readiness model.
- 2026-06-26 [CC]: Readiness-model core engines SHIPPED — dedup.py (250 lines, 30 tests) + readiness.py (286 lines, 27 tests). All 57 tests green. Dedup key = (patient_id, device_type, DOS). Verdict engine kills the false green (required+absent blocks green, plan unknown = Plan Type Needed). Additive only, not yet wired into live pipeline. Remaining: rules-to-config, patient rollup, device override, plan-type enforcement, frontend nesting.
- 2026-06-25 [CC]: labABLE call done (CRUSH/audit-readiness angle). CRUSH brief + verified, 3-model-cross-checked research (Opus agents, Sonnet 4.6, Perplexity Sonar) staged for Kisa to send (Projects/labABLE-CRUSH-brief-2026-06-25.md). Perplexity MCP fixed (BASE_URL=/chat/completions). OpenRouter `ask` multi-model CLI wired. Pi briefed to design the STTIL AIOS map. Display corruption diagnosed as macOS 26.0.1 GPU issue (fix = update to 26.5.1).
- 2026-06-24 [Pi/Kisa]: Dedup decision LOCKED — key = (patient_id, device_type, date_of_service). Order_number is display-only, never in dedup key. Scales to all DMEPOS categories. Dedup design (tiebreakers, quantity merge guard, test cases) at docs/dedup-design-2026-06-24.md. Readiness-model build is UNBLOCKED.
- 2026-06-24 [Pi]: Convex-Signal spike full design persisted to docs/convex-signal-spike-design-2026-06-24.md. Module map with 6 swappable seams (auth, data, readiness, storage, automations, notifications), Repository interface for backend portability, Convex schema (8 tables), Convex-first auth (Clerk swappable), phased 40h/5-day plan. Claude builds Phase 1.
- 2026-06-24 [CC]: SHIPPED the Claude-side delegation trigger — dispatch-trigger.sh reads stdin JSON, settings.json UserPromptSubmit hook wired, dispatch thresholds + Finding-4 clarifier added. Verified live.
- 2026-06-24 [CC]: NocoDB leads diagnosed — Signal-base data source bdmhi02nks1pg6g is corrupted, creates PK-less tables. SQLite can't add a PK to a populated table. Capture still works (n8n webhook); 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. AWS (BAA + RDS/S3, parked) = proven fallback. Decision: build a SEPARATE modular, backend-swappable 'Signal on Convex' spike (repo signal-convex).
- 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.
- 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.

## Open Threads (max 5)

- CONVEX-SIGNAL SPIKE (2026-06-24): design ready (docs/convex-signal-spike-design-2026-06-24.md); separate repo signal-convex; Pi designed. Deps: Kisa's Convex BAA email; repo creation post-approval. Goal: prove Convex on the real product before any platform commitment.
- DATA-PLATFORM DECISION (2026-06-24): NocoDB leads broke (no-PK, corrupted source). Options: repaired-NocoDB / Supabase / Neon / AWS / Convex. Leads = non-PHI. Informed by the Convex spike. Interim: capture works; 2 test rows un-deletable.
- READINESS MODEL BUILD: UNBLOCKED. Dedup decision locked (docs/dedup-design-2026-06-24.md). Ready for Claude to build (top Signal priority).
- labABLE: call DONE 2026-06-25 (CRUSH/audit-readiness). Kisa to send the staged CRUSH brief (Projects/labABLE-CRUSH-brief-2026-06-25.md) + schedule the follow-up call. Internal-only prep at Projects/labABLE-next-call-prep-INTERNAL-2026-06-25.md.
- Pi: design the STTIL AIOS architecture map — DONE (STTIL-Vault/Projects/STTIL-AIOS-architecture-map.md, 338 lines, file written in full). Pi-side frontend nesting + "plan type needed" UX design flagged by Claude as next Pi task.
- READINESS MODEL BUILD: core engines shipped (dedup + verdict, 57 tests). Remaining: rules-to-config citation IDs, patient rollup, device override, plan-type enforcement, frontend nesting. Not yet wired into live pipeline — additive-only.

## 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 (note: investigate output-truncation; may cap output on long design tasks).
- Tooling (Claude side): Perplexity MCP fixed (BASE_URL=/chat/completions); OpenRouter `ask` CLI at ~/scripts/ask.py (key ~/.config/openrouter/key).

## 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-27 (CC: readiness engines committed c07d054+206bf71, auditor-fixed HIGH false-green holes, 73 tests; Pi readiness-UX brief staged; labABLE brief sent. PRIORITIZATION: Signal paused at checkpoint, Claude+Kisa finish Insight Engine to July 4, Pi advances Signal UX async.)
