v:1
# current-state

ACTIVE: Claude Code is implementing the workflow-consolidation build from Pi's recovered design. Live: this v:1 state schema, a shared `state-sync` skill, the demoted CLAUDE.md state block, and the drift-to-skill governance doc. Pending Kisa review: the auto-commit/push Stop hook (must be scoped to current-state.md, NOT `git add .`) and the global CLAUDE.md / Pi AGENTS.md startup edits.
NEXT (agent, in order): (1) Claude: finish workflow-consolidation — scope + wire the Stop hook (current-state.md only), edit global CLAUDE.md + Pi AGENTS.md startup to pull+read current-state.md and drop redundant reads, decide MCP parity. (2) Claude: build the readiness model from Pi's design (rename coverage->readiness, rules-to-config, patient/line/shipment grouping + verdict, device-keyed override+recompute, require-plan-type + remove guesser, frontend nesting). (3) Claude: review Pi's AIOS + Automated Blog plans and recommend.

## Decisions (last 8)
- 2026-06-24 [CC]: Recovered Pi's workflow-consolidation design from its session log (Pi finalized it in chat but never wrote it to a file) to docs/workflow-consolidation-design-2026-06-24-pi-recovered.md. Built v:1 state schema + state-sync skill + governance doc; demoted CLAUDE.md embedded state block. Corrected Pi's Stop hook to scope to current-state.md, not `git add .`.
- 2026-06-24 [Pi]: Workflow consolidation design completed (v:1 schema, read/write + commit/push protocol, Stop-hook automation, skills + MCP parity, drift-to-skill table, universal git versioning). Ready for Claude implementation.
- 2026-06-23 [CC]: Workflow-consolidation brief handed to Pi (architect-reviewed); clean-start commit of current-state.md, context recovery artifacts gitignored, pushed to Forgejo + GitHub.
- 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. "coverage" renamed "readiness". Brief: docs/readiness-model-brief-2026-06-23.md.
- 2026-06-23 [Pi]: RAP-ID/CSP-ID architecture proposed to reconcile rotating anonymous patient ID with persistent worklist. SaaS web app hosted by STTIL; client holds Real-ID to CSP-ID map; HIPAA host (Validated Cloud) still required.
- 2026-06-23 [Pi]: Shield architecture designed (standalone compliance product, tiered deployment, AI Consent Addendum). Ready for Claude build or refinement.
- 2026-06-23 [CC]: DNSSEC verified live. Website agent-file compliance fixes staged locally (removed outreach wording, banned >25% stat, exposed pricing, SWO term fixed) — NOT deployed; prose rewrites routed to lead-content.
- 2026-06-22 [CC]: Build Spec Phase 2 built; Clerk prod migration complete (pk_live on Vercel + JWKS on Railway). Phase 4 (support bot foundation) spec by Pi ready for build.

## Open Threads (max 5)
- WORKFLOW CONSOLIDATION (2026-06-24): building from Pi's recovered design. Remaining: Stop hook (Kisa review), global CLAUDE.md + Pi AGENTS.md startup edits, MCP parity, optional skills-as-git-repo. Design: docs/workflow-consolidation-design-2026-06-24-pi-recovered.md; brief: docs/workflow-consolidation-brief-2026-06-23.md.
- READINESS MODEL BUILD (2026-06-23): Pi's build design ready; Claude builds the rename + rules-to-config + grouping/verdict sequence. Brief: docs/readiness-model-brief-2026-06-23.md.
- SIGNAL AIOS & AUTOMATED BLOG PLANS (2026-06-23): Pi refined with Granola insights; Claude to review and recommend.
- LabABLE Meeting Fri 2026-06-26 1:30 PM — /pilot-prep.
- Website copy: brief lead-content for human-page rewrites (extract eligibility/coverage language); deploy staged agent-file fixes; 6-year retention doc fix. BAA wording attorney-gated.

## Stack
- Signal: PHI contained in `patient_id` (name, MRN, account #s) — tokenization via RAP-ID/CSP-ID (rotating anonymous ID, not static UUID).
- 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.
- 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. TriLane = searchable archive, not live state.

## Updated: 2026-06-24 (CC: recovered Pi's workflow-consolidation design from its session log and built the foundation — v:1 schema, state-sync skill, governance doc, demoted CLAUDE.md state block. Pending Kisa review: scoped Stop hook + global startup edits. NEXT: finish consolidation, then readiness-model build.)
