Signal/docs/ship-status-ledger.md
Kisa 206bf718bd Add readiness verdict engine (kills the false green)
Grade one coverage line's five documentation items on two separated axes the
old code conflated: required_state (from plan_type + payer_rules.json) and
input_state (SUPPLIED | ABSENT). A line is "Clear to Ship" only when EVERY
required item is satisfied by positive evidence — a required item with no data
is NOT_EVALUATED and blocks green, never granted by absence of contradiction.

- plan_type never guessed: None / unmapped / casing-variant -> "Plan Type Needed",
  structurally cannot be green; PECOS/PA sit NOT_EVALUATED while universal items
  (SWO/visit/diagnosis per LCD L33822) still grade.
- Required-ness reads from payer_rules.json (single source of truth), removing
  the latent Python-set-vs-JSON divergence.
- Config-surface fail-safe: a known plan missing/partial in config cannot grade
  green (NOT_EVALUATED), and the green gate checks every item.
- Diagnosis accepts a real ICD-10 code as on-file; only explicit negatives gap.

Additive only: not wired into the live pipeline. 27 tests green (full suite 73),
code-auditor reviewed (H1/H2/M1/M2/M3/M4/L1 fixed).

PROVISIONAL, flagged for Pi/Kisa: gap->label mapping (At Risk/Action Needed/
On Track) and the visit-recency scope boundary (timing layer, not readiness).

Spec: docs/readiness-model-brief-2026-06-23.md section 4

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 00:33:42 -04:00

7.9 KiB
Raw Blame History

Signal — Ship-Status Ledger

Canonical, git-tracked record of what shipped, what didn't, and the reason or dependency for anything outstanding. Both Pi and Claude read and maintain this; Kisa validates. Ship-status never lives only in private memory. Update this on every ship or blocker change. Pairs with context/current-state.md (this = the detailed ledger; current-state = the live ACTIVE/NEXT snapshot).

Status legend: SHIPPED · IN PROGRESS · BLOCKED · NOT STARTED · DEFERRED · PI-SIDE · PARKED


Ledger (as of 2026-06-24)

# Item Owner Status Reason / Dependency Next action
1 Claude-side delegation trigger (dispatch-trigger.sh + settings.json UserPromptSubmit hook + dispatch thresholds) Claude SHIPPED (verified live) none done
2 Audit Finding 1 — hook stdout injection works Claude SHIPPED verified live (marker reached the model) done
3 Audit Finding 2 — $1 bug → read stdin JSON Claude SHIPPED caught + fixed during build done
4 Audit Finding 4 — old+new dispatch rules conflict Claude SHIPPED added clarifying line (kept judgment fallback, marker = evaluate not auto-dispatch) done
5 Convex-Signal spike brief Claude SHIPPED (committed this wrap) Pi designs from it
6 Convex-Signal spike design Pi SHIPPED docs/convex-signal-spike-design-2026-06-24.md. 40h/3-phase plan; Module map + Repository interface + Convex schema + Auth seam (Convex default, Clerk swappable) + Phase 1 (core readiness loop) = what Claude builds first. Claude builds Phase 1 from it
7 signal-convex repo creation Claude (GitHub) + Kisa/token (Forgejo) PENDING Dependency: Pi design + Kisa approval (create once, correctly). Claude can do GitHub via gh; Forgejo has no API token here. after design approved
8 Convex BAA email (plan/cost/signing) Kisa IN PROGRESS Kisa handling Kisa sends
9 Readiness-model build (rename coverage→readiness, rules-to-config, grouping+verdict, device override, require-plan-type, frontend nesting) Claude IN PROGRESS Step 3 SHIPPED 2026-06-26/27 (additive, not yet wired): (a) core/dedup.py grouping (CSVRow→MergedShipment→CoverageLine), 30 tests, auditor-reviewed; (b) core/readiness.py verdict engine — required-vs-input two-axis grading that KILLS the false green (required+absent never satisfied; clear-to-ship only on positive evidence; plan unknown→"Plan Type Needed"; required-ness read from payer_rules.json not Python sets), 27 tests, auditor-reviewed (H1/H2 config-surface false greens + M2/M3/M4 fixed). Added additive plan_type to ShipmentRecord. OPEN for Kisa/Pi: provisional gap→label mapping (At Risk/Action Needed/On Track) + H3 scope boundary (visit recency = timing layer, not readiness verdict — confirm). Remaining: rules-to-addressable-config (citation IDs), patient rollup, device-keyed override+recompute+rollup, require-plan-type enforcement + remove name-guesser/default in the LIVE path, frontend nesting + "plan type needed" UX (→ Pi). Next: hand frontend/label UX to Pi (brief staged); build patient rollup + WIRE orchestration in api/main.py/new pipeline module, NOT inside coverage_calculator (circular import). Each step auditor-reviewed.
10 NocoDB leads / CRM cleanup Claude + Kisa BLOCKED Reason: leads table has no primary key (Signal-base data source bdmhi02nks1pg6g is corrupted — a fresh table there also came up PK-less; content base is healthy). SQLite can't add a PK to a populated table (Route 1 failed). Interim: capture still works (inserts via n8n signal-cgm-lead); the 2 test rows can't be deleted. resolved by the data-platform decision (item 11)
11 Data-platform decision (leads + future PHI backend) Kisa (with Claude/Pi analysis) OPEN Options analyzed: repaired-NocoDB / Supabase Postgres / Neon / AWS (already set up, BAA+RDS+S3 parked) / Convex ($25/mo incl. BAA). Leads = non-PHI (stay outside PHI boundary). Decision informed by the Convex spike. run spike → decide
12 Research-versioning Layer-1 (research-autopush.sh + Stop-hook entry) Claude NOT STARTED Dependency: Pi design exists (docs/research-versioning-design-2026-06-24.md). Lower priority than product. next infra slot
13 signal/docs/ auto-versioning (Audit Finding 5) Claude + Pi NOT BUILT Reason: research-versioning scope excludes signal/docs/. This is why design docs need manual commits. add signal/docs/ to scope
14 Pi research-versioning ext tool_calltool_result (Finding 3) Pi LIKELY DONE Pi state reports persist gap closed (8 file writes this session); confirm it is the tool_result fix Pi confirm
15 Mid-session commit push on clean tree (Finding 6) Claude DEFERRED optional, low risk, adds session-close latency revisit if loss occurs
16 Chief-of-staff sequential-dependency capability (Finding 7) Claude NOT TESTED Dependency: a discovery test with a sequential multi-specialist brief run the test
17 Pi injected-message behavior (Finding 8) Pi NOT TESTED Pi-side test Pi test
18 Skills-as-git-repo (Finding 9) Claude/Pi DEFERRED Phase 2 per workflow-consolidation plan phase 2
19 Website copy + agent-file fixes lead-content / Claude STAGED, not deployed prose rewrites routed to lead-content; BAA wording attorney-gated deploy when ready
20 Signal AIOS product PARKED Activate only on demand-pull + Signal self-sustaining + delegable capacity hold

Timeline / critical path

  1. Next session: (a) Kisa gives the dedup decision → Claude builds the readiness model (item 9). (b) In parallel, Pi designs the Convex-Signal spike from the committed brief (item 6).
  2. After Pi's Convex design: Kisa validates → create signal-convex (item 7) → Claude builds the spike.
  3. Convex spike + BAA terms (item 8) → inform the data-platform decision (item 11) → which resolves the NocoDB leads/CRM fix (item 10).
  4. Infra cleanup (batched in slack): research-versioning Layer-1 + signal/docs/ scope (items 1213, the reason docs need manual commits), then low-priority Findings 6/7/9. Findings 3/8 are Pi-side.
  5. Fixed date: labABLE /pilot-prep Fri 2026-06-26 1:30 PM.

Dependencies summary

  • Readiness build ⟸ Kisa dedup decision.
  • Convex spike build ⟸ Pi design ⟸ committed brief (ready) ; and ⟸ Kisa approval + repo creation.
  • NocoDB/leads fix ⟸ data-platform decision ⟸ Convex spike evidence + BAA terms.
  • Design-doc durability ⟸ signal/docs/ auto-versioning (until built, commit docs manually).

Maintenance

Update this whenever an item ships or a blocker changes. Move shipped items to a ## Shipped (archive) section when the table grows. Both agents reason from this; Kisa validates and redirects.

Design Verification (2026-06-24, Claude)

Pi's dedup design (item 9) and Convex-spike design (item 6) were verified line-by-line. Both are build-ready; fixes applied directly to the design docs:

  • dedup-design-2026-06-24.md: (1) added a separate client-mapped plan_type field, distinct from display payer, so CoverageLine keys on the mapped plan type, never the payer name — the original draft reintroduced the killed plan-type-guessing bug. (2) Fixed merge_quantities to sum across distinct component configs; the old blanket-max dropped quantity in mixed duplicate+split groups (e.g. two [sensor] + one [transmitter] returned 3 instead of 4).
  • convex-signal-spike-design-2026-06-24.md: shipments.orderNumber/hcpcs changed to arrays (post-dedup multi-value); §11 dedup note de-staled to LOCKED; carry-forward note to grade on the mapped planType.
  • Noted, not a blocker: "Convex auth -> Clerk = config-only swap" is optimistic; treat as low-but-nonzero effort (Convex Auth still maturing).