Diagnozer Cortex — operator console
Live status
Health signals
- loading…
Engine packages
GitHub
Build sequence — Phases 0–4
Ignition stays priority-0; Phase 0–1 run in parallel. Phase 2 GUI gated on ignition milestone or founder call.
Target architecture (engine + adapters)
Law: engine/ is domain-agnostic; vertical logic lives in adapters/<vertical>/.
cortex/adapters/ — <vertical>/ injected config + compliance copy
cortex/data/ — cx_* schema + back-compat views
cortex/api/ — /v1/{graphs,route,governance,models,rag,signals}
cortex/studio/ — Self-Improvement Console + Guide/Tree Studio
Closed RSI loop
Multi-property
Each property = thin adapter + shared engine. Phase 4: MCP (DC-040) + 2nd adapter proof (DC-041).
Ticket queue
Open cortex issues
Review & merge (RUNBOOK §4)
Brain merge checklist — SSOT §2 recipe
Before merging a Cursor draft PR, all five must be true:
- Tests pass —
cortex-cigreen on the PR;make cortex-testpasses locally. - Behaviour unchanged — golden test passes (byte-identical deterministic output).
- Engine stays clean — no dental strings in
cortex/engine/**(CI guard). - Scope only — PR touches only files named in the ticket; importers still work.
- Status updated — SSOT §5 row for that ticket is flipped.
If any fail, comment on the PR — do not merge. Respect the ≤3 open worker-PR cap (§6).
Weekly iteration (RUNBOOK §5)
The rhythm
Phase 1–4 backlog: DC-010 → DC-042 in
BACKLOG.md.
Copy a row into its own ticket file (use DC-002 as template) before launching.
CLI — control surface
make cortex-statusdashboardmake cortex-testengine testsmake cortex-briefdaily briefmake brain-assignmark active ticketmake cortex-status-mirrorrefresh this pagePR cap (RUNBOOK §6)
≤3 open worker PRs — safety brake
Too many half-finished PRs = chaos. make brain-assign refuses when over cap.
Clear stale cursor-worker PRs (DS-031 debt) before queuing new carve-out work.
One-off override: BRAIN_MAX_WORKER_PRS=100 make brain-assign — then clear the backlog.
Open cortex-labelled PRs
Daily brief (RUNBOOK §7)
Suggestions (from status mirror)
- loading…
Brief body
…
loading…
HITL self-improvement console
Signal volume — last 7 days
cx_signals.Proposal inbox — DRAFT only, never auto-applied
Ranked draft edit proposals from the scheduled pass. Select a row for evidence, diff, vote tally, and before/after metrics.
| ID | Proposal | Type | Drift | Votes | Status |
|---|---|---|---|---|---|
| loading… | |||||
Approve · edit · reject
This mirror is read-only by design (production surface). The verifier-gated
approve/reject action runs in the local Cortex studio, which is same-origin with the
control bridge. Clinical/model changes require a verifier code; nothing applies without
hitl_approved — enforced by @cortex/governance.
How the loop stays safe
- Signals — live apps record confusion points, thumbs, clinician corrections (PHI-free).
- Drafts only — scheduled job proposes tree/model improvements; never auto-applies.
- Console — human sees evidence, diff, vote tally; approve / edit / reject in the studio.
- Measure — approved changes versioned with before/after metrics; rollback on regression.
Full write path lands with DC-021 + DC-023 (Track C). Mirror files: data/cortex-proposals.json · data/cortex-signals.json.
Verification checklist
node --testper engine package- Adapter regression — byte-identical deterministic paths
- Studio e2e (Phase 2): signal → proposal → approve → metric; no auto-apply
- API contract tests vs OpenAPI; MCP smoke (Phase 4)
/command/gate console +brain-auditper phase- CI domain-free guard on
engine/**
Honest risks & brand (read-only)
| Risk | Mitigation |
|---|---|
| Worker-PR cap blocks dispatch | DS-031 cleanup; ≤3 open worker PRs |
| Domain leakage into engine/ | CI grep + golden tests + extraction recipe |
| RSI perceived as autonomous | never-auto-apply + HITL console + rollback metrics |
| Phase 2 before ignition | Founder gate; ignition stays P0 |
Working name: Diagnozer Cortex. Shortlist (no picker): Verdict Lattice Aperture
Quick map (RUNBOOK §10)
| Architecture / blueprint | cortex/SSOT.md · BLUEPRINT.md |
| This how-to | cortex/RUNBOOK.md |
| User manual (every screen & button) | cortex/USER_MANUAL.md |
| UX / UI manual (design system) | cortex/UX_UI_MANUAL.md |
| Full task list DC-010→042 | cortex/tickets/BACKLOG.md |
| Active Cursor assignment | .brain/cursor-current.md |
| Ticket prompts | cloudflare-pages/cortex/tickets/DC-###-*.md |
| Status mirror (this page) | cloudflare-pages/data/cortex-status.json |
| Strategy command center | /command/ |
| Tree Studio | /command/tree-editor/ |
| Guide Studio | /command/guide-studio/ |
| RAG Corpus | /command/rag-corpus/ |
| AI Review | /command/ai-review/ |
| Annotate & Approve (vision) | /command/cortex/annotate/ |
| Gate console | /command/ (gates matrix) |
Troubleshooting (RUNBOOK §11)
- brain-assign blocked (open worker PRs). §6 cap — clear stale PRs or
BRAIN_MAX_WORKER_PRS=100 make brain-assignfor a deliberate one-off. - Dashboard looks stale. Run
make cortex-status-mirror, commitdata/cortex-status.json, redeploy. Daily cron does this viacortex-daily-brief.yml. - Studio actions disabled / loading forever. Control bridge not running or token mismatch. Fix:
make cortex-devor startcontrol-server/server.mjs+ studio dev server; verifycurl http://127.0.0.1:7171/health. - Read-only dev fallback. Without bridge, studio loads
cortex-status.json— refresh withmake cortex-status-mirror. - PR changed files outside ticket. Do not merge — revert out-of-scope edits or split to a new ticket.
- Golden test fails after extraction. Behaviour changed — fix extraction to match old deterministic output; do not weaken the test.
- Package test FAILING in cortex-status. Stop merges until
make cortex-testis green.