Commit graph

109 commits

Author SHA1 Message Date
Kisa
f28b5bf39e feat: plan-type enforcement in the live path (plan 02, P5)
Full client-mapped plan_type pipeline: complete header alias set (bare
'plan'/'plan_name' stay payer aliases), value canonicalization map (Medicare
Part B / FFS / MA / Part C / private / employer etc), unrecognized values
grade Plan Type Needed with a hashed once-per-value warning. Once-per-batch
deprecation fence when records lack plan_type (timing guesses from payer,
legacy; readiness never does). CSVImport mapping review gains Plan Type.
All 66 demo/drift fixture CSVs authored with plan_type columns (variant
headers + variant values on the drift corpus); corpus sweep: 66/66 map, 100%
typed. Echo paths canonicalize through the same value map (audit Low fixed).
_normalize_payer and the default config entry remain untouched (Phase 2c,
Kisa-gated). Independent audit: SHIP. 169 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:46:03 -04:00
Kisa
a53728e424 feat: device-keyed staff overrides + recompute contract (plan 02, P4)
Ends the override leak: an SWO/PA save now applies to one device's line, not
every device the patient has. doc_status gains device_type ('' = legacy
patient-scoped row, applies until re-saved); the old unique key is dropped by
introspected name and replaced with the 4-col scope key. Staff overrides now
FEED THE VERDICT (device-scoped, staff wins over the CSV cell) instead of
display-only; visit overrides keep their patient-scoped fan-out via
confirmed_visits. PUT /api/doc-status and /api/confirm-visit accept an
optional echo of the patient's lines and return {lines, rollup_status}
recomputed through the same engine (stateless, no batch rebuild). Frontend
minimal fix: doc-status state and writes keyed patient:device. Independent
audit: SHIP (migration reproduced empirically on both old-key shapes; guard
scoped per its nit). 162 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:36:26 -04:00
Kisa
5ba31fac03 Add attorney-review legal bundle: BAA template v1, cover memo, send-ready docx set
lead-sttil drafted, ops-steward independently reviewed (6 findings fixed).
Entity name corrected to KJF Professional Services LLC dba STTIL Solutions.
Formation state left as attorney question 1. LOI/NDA v3 live in STTIL-Vault/Projects/Legal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:35:21 -04:00
Kisa
bd92126384 feat: patient rollup + nested patients payload (plan 02, P3)
core/rollup.py implements the locked truth table: worst gradeable line wins;
a Plan Type Needed line caps the patient at Action Needed; non-gradeable
lines are displayed but never touch the light; no-graded-lines patients carry
None (no label invented). /api/upload gains additive patients[] (one entry
per patient, nested device lines with doc checklists, citations, timing
flags, dedup display fields) and patient_stats (counts patients, not rows).
Flat records payload untouched until P6. Independent audit: SHIP; its LOW
findings fixed (date coercion on timing keys, empty-rollup guard, severity
divergence documented). 151 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:20:45 -04:00
Kisa
d24340c47a feat: citation rule IDs on every documentation requirement (plan 02, P2)
core/rules.py format-tolerant readers + stable registry (R001-R004 plan-scoped,
R100-R102 universal per LCD L33822). payer_rules.json wrapped in the same
commit as both engine readers (coupling hazard closed). Every DocItem now
cites the rule that decided it; NOT_EVALUATED cites nothing. Independent
audit: SHIP (registry-drift test added per its L2 finding). 138 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:10:52 -04:00
Kisa
242e54e01a state-sync + ledger: P1 readiness wiring shipped and live-verified [CC]
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:03:34 -04:00
Kisa
a3af499c93 feat: wire readiness model into live pipeline (build plan 01, Phase 2a)
Readiness verdicts now ride additively on /api/upload and /api/confirm-visit:
- core/worklist_readiness.py: ReadinessIndex — row-to-line membership resolved
  through the dedup group key (patient_id, device_type, DOS), never re-derived
  from a row's own plan_type (kills a reviewer-reproduced false green)
- RecordOut gains plan_type / readiness_status / readiness_items (additive,
  default None); UploadResponse gains readiness_stats (reconciles with rows)
- Minimal plan_type CSV mapping (client-supplied, lowercased+trimmed, never
  guessed) per the umbrella reactivation plan; full enforcement lands in P5
- Fixes pre-existing record_lookup miss for order-numbered CSVs; fallback
  fields now come from the dedup MergedShipment (latest-non-null, collected
  order numbers) so doc_state and the verdict grade from the same values
- confirm-visit normalizes plan_type identically to the CSV path

Verification: 132 tests green (108 baseline + 24 wiring/regression);
adversarial 3-lens review + refutation pass (7 findings confirmed, all fixed,
regression-locked); independent code-auditor verdict SHIP; Pi E2E 33/33.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 04:52:32 -04:00
Kisa
77395a1112 docs: reactivation plan + FDA CDS exemption memo draft
- docs/build-plans/00-signal-reactivation-plan.md: umbrella re-activation plan
  (two-currency logic, critical path, Week1/Week2/backlog sequence with
  owners+gates, labABLE-vs-Gaboro call, compliance guardrail, 2026-07-06 findings).
- docs/compliance/fda-cds-exemption-memo-DRAFT.md: attorney-review draft (Fable).
  Primary position = Signal is administrative/billing software outside the FD&C
  201(h) device definition; CDS-exemption kept as the secondary argument. Citations
  grounded against current FDA sources (CDS guidance updated 2026-01-29).
  Flags: internal 2026-06-04 whitepaper overstates the CDS claim; attorney of
  record unconfirmed (Bittinger/Nixon vs Clyde Mathes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 12:12:06 -04:00
Kisa
130f0e2518 [CC] nuggets: model routing settled + watcher audit captured; Fable window ends 2026-07-07 09:00
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 11:44:13 -04:00
Kisa
2510774355 state-sync: 2026-07-06 AIOS session (crew memory phase 1 built+verified; UMSIS ruled docs-only). Signal build unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 08:26:28 -04:00
Kisa
da6c242b07 docs: readiness-model build-plan starter templates (wiring + completion)
Captured on Fable before access ends. Two grounded, execute-from starter
templates under docs/build-plans/:
- 01-readiness-model-wiring.md: wire dedup+readiness into the live pipeline
  via a post-process orchestrator (avoids the dedup->coverage_calculator
  circular import); flags that the normalizer does not yet ingest plan_type,
  so every live verdict reads 'Plan Type Needed' until a plan_type column is mapped.
- 02-readiness-model-completion.md: P2-P6 (citation IDs, patient rollup,
  device override, plan-type enforcement, frontend nesting).

Readiness+dedup engine verified 57 tests green (2026-07-06); corrects the
stale '73 tests' figure in current-state.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 05:08:46 -04:00
Kisa
611f6b51c2 state: freshen Cross-Project Bridge to IE wow-core status (bridge-only; Signal still paused at 2026-06-27 checkpoint) [CC]
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:43:31 -04:00
Kisa
a7970bc956 context: migrate VC/pilot relationships from retired auto-memory
Preserves active investor + pilot state (labABLE executed LOI, Robert
Robinson/Gaboro priority path, Puff on hold) into the Signal repo as
the flat auto-memory is retired in favor of the compound + current-state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 18:30:06 -04:00
Kisa
0ba2f2b304 nuggets [Pi] 2026-07-01: freshen Cross-Project Bridge with IE design status + clean IE vocabulary (cross-sights, indicators) 2026-07-01 23:10:03 -04:00
Kisa
9ea8ed7d51 state-sync [Pi] 2026-07-01: freshen Cross-Project Bridge — IE blockers cleared, x-sight approved, Claude building. Signal stays paused at clean checkpoint. 2026-07-01 22:17:23 -04:00
Kisa
13b4267ace [Pi] cross-project bridge: Signal state updated with Insight Engine progress pointer 2026-06-28 19:53:45 -04:00
Kisa
86d8a634da docs: Pi startup-protocol fix — companion brief for Signal-pinned sessions [Pi] 2026-06-28 16:20:48 -04:00
Kisa
49c23f8ba5 state: auto-push current-state.md on session stop [hook] 2026-06-27 22:40:15 -04:00
Kisa
5b1748ed25 design: readiness model Phase 2 build brief for Claude (rules-config, rollup, override, plan-type enforcement) [Pi] 2026-06-27 08:38:39 -04:00
Kisa
7f5ed90bac test: signal-e2e-test skill + E2E black-box test suite (33 tests, all green) [Pi] 2026-06-27 08:24:11 -04:00
Kisa
768a4357a4 context: 2026-06-27 readiness engines committed + IE-priority decision
Merge Pi's parallel update (AIOS map done). Record dedup+verdict commits
(c07d054, 206bf71), auditor-fixed false-green holes, labABLE brief sent, and
the prioritization decision: Signal pauses at this checkpoint while Claude+Kisa
finish the Insight Engine to July 4; Pi advances Signal UX async.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 07:55:26 -04:00
Kisa
4517b0b89f state: 2026-06-26 update — AIOS map designed (Pi), readiness core shipped (CC) [Pi] 2026-06-27 07:45:24 -04:00
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
Kisa
c07d054ca5 Add readiness-model dedup + coverage-line grouping foundation
Group normalized shipment rows into deduped shipments and gradeable
coverage lines (patient -> device -> shipment), the structural fix for the
row-keyed worklist bug (six months of orders no longer = six worklist lines).

- Locked dedup key (patient_id, device_type, date_of_service); order_number
  is display-only. Monthly resupplies stay separate, not duplicates.
- Client-mapped plan_type carried through, never guessed from payer name;
  conflicting plan types in a group route to "plan type needed".
- Quantity merge: sum across distinct component configs, max within a config
  (duplicate guard) with a warning breadcrumb on disagreement.
- CGM gradeable this phase; pumps preserved/displayed but not graded.

Additive only: not yet wired into the live pipeline, grading unchanged.
30 tests green (full suite 46), code-auditor reviewed (M1/M2/L1/L2/L3 fixed).

Design: docs/dedup-design-2026-06-24.md, docs/readiness-model-brief-2026-06-23.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 00:22:01 -04:00
Kisa
e3de616023 context: 2026-06-25 session wrap
labABLE CRUSH brief + cross-checked research staged to send; Perplexity MCP fixed (BASE_URL); OpenRouter ask CLI wired; Pi briefed for STTIL AIOS map; display corruption = macOS 26.0.1 (fix 26.5.1).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 18:03:16 -04:00
Kisa
6f3ce16960 verify+fix: Pi's dedup + Convex-spike designs build-ready [CC]
- dedup: separate client-mapped plan_type (not payer) so CoverageLine never guesses plan type; fix merge_quantities to sum across distinct component configs (blanket-max dropped qty in mixed dup+split groups)
- convex-spike: shipments orderNumber/hcpcs -> arrays (post-dedup multi-value); de-stale dedup note to LOCKED
- ledger: Design Verification section added

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:53:10 -04:00
Kisa
0e5c2f13b7 design+state: dedup decision locked (patient_id+device_type+DOS). Readiness model UNBLOCKED [Pi] 2026-06-24 15:23:05 -04:00
Kisa
04d204e965 design+state: Convex-Signal spike full design (40h/3-phase plan, 6 modular seams, Repository interface, auth seam decision) [Pi] 2026-06-24 13:47:57 -04:00
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
Kisa
d9e7fb71ca review+fix: end-to-end audit found 9 gaps, fixed 3 in scope, filed rest for Claude [Pi] 2026-06-24 10:22:05 -04:00
Kisa
f5a6a5bfcc docs+state: Pi Option B research versioning design delivered, content dir created [Pi] 2026-06-24 10:13:33 -04:00
Kisa
19fa702eeb docs: Pi delegation router design — trigger, thresholds, Pi mirror, 2 skills [Pi] 2026-06-24 01:06:48 -04:00
Kisa
dcc3e67920 state: Pi delegation router design delivered (doc + extension + 2 skills) [Pi] 2026-06-24 01:06:31 -04:00
Kisa
c913a5d994 state: session wrap 2026-06-24 — current-state ACTIVE/Updated for session-brain
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 00:57:00 -04:00
Kisa
9215239867 state: auto-push current-state.md on session stop [hook] 2026-06-24 00:45:12 -04:00
Kisa
bbc01d307f docs(aios): recover Pi's Signal AIOS + Automated Blog plans from session log
Pi made zero file-writes; these plans lived only in its jsonl. Recovered to a
durable doc and logged the audit. Shield persisted (file + TriLane research).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 00:22:41 -04:00
Kisa
9d34b22dab docs(delegation): brief Pi on the delegation router + hybrid skill model
Router brain = existing dispatch skill (no new skill). Trigger = cheap keyword
UserPromptSubmit hook. chief-of-staff conditional, not permanent. Hybrid 3-tier
skill model locked. Pi designs the trigger + thresholds + pi-subagents mirror +
design-review/persist skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 00:16:22 -04:00
Kisa
d285af51fb state: auto-push current-state.md on session stop [hook] 2026-06-23 23:45:57 -04:00
Kisa
0d556d3cdd state: auto-push current-state.md on session stop [hook] 2026-06-23 23:41:40 -04:00
Kisa
00cff7a5f8 feat(workflow): build consolidation foundation from Pi's recovered design
- current-state.md -> v:1 schema (repairs Pi's destructive edit, restores decisions log)
- recover Pi's workflow-consolidation design from session log into a durable doc
- add drift-to-skill governance table
- demote CLAUDE.md embedded state block to a pointer (stops harness re-injecting stale state)
- new shared state-sync skill lives at ~/.claude/skills/state-sync (separate path)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 23:30:56 -04:00
Kisa
93842438fa state(next): hand workflow-consolidation brief to Pi as priority design task
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 22:11:18 -04:00
Kisa
4bfe5d25cf chore(state): clean-start current-state.md, ignore context recovery artifacts, add workflow-consolidation brief for Pi
Commit the previously-uncommitted current-state.md (left dirty by an interrupted
wrap-up), gitignore the heavy context recovery files (screenshot/jsonl/snapshot),
and add the consolidated Pi design brief for the shared-state + workflow cleanup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:22:31 -04:00
Kisa
e3fb7b7594 add readiness-model design brief for pi and update shared context
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 19:53:57 -04:00
Kisa
20e6556afc docs(shield): v2 — HIPAA+GDPR global scope, user's pricing model (free print, $49 PMS integration), Signal Tier 3 bundle, Shield MVP first 2026-06-22 10:14:57 -04:00
Kisa
41388ed0e7 docs(shield): update target customer to small healthcare ops + AI SaaS, add Consent Engine delivery options (GitHub template, hosted, hybrid) 2026-06-22 09:55:52 -04:00
Kisa
9b3e32f3bd feat(shield): add product architecture design draft — positioning, features, pricing, tech stack 2026-06-22 09:04:44 -04:00
Kisa
e2a59ae7a0 docs: sync current-state — trust fixes done, Phase 4 spec'd, Shield recon done, Phase 2 built (Claude) 2026-06-22 09:01:34 -04:00
Kisa
96cbedbf77 docs: correct Shield positioning — standalone compliance, not DMEPOS-specific 2026-06-22 08:36:01 -04:00
Kisa
e0590a0397 docs: sync state — trust fixes done, Phase 4 spec'd, Shield competitor insight planted 2026-06-22 08:17:11 -04:00
Kisa
9a274f6fee feat(build-spec): Phase 4 — support bot foundation spec + trust fixes applied 2026-06-22 08:13:36 -04:00