docs: refresh wiki + cortex/docs/ to match current code (Anthropic SDK, capability-token auth, full WS catalog)
Brought every actively-used .md file in the repo into alignment with
the post-Phase-J codebase. Two parallel agents performed the sweep
after a precise code-fact reconnaissance pass.
Root-level wiki (GitHub Wiki pages)
-----------------------------------
- API-Reference.md: added Authentication subsection (Bearer token at
~/Library/Application Support/Cortex/auth.token, legacy
X-Cortex-Auth-Token fallback, 401 + WWW-Authenticate, X-Cortex-
Request-ID echo); added GET /health, GET /consent/level, POST
/consent/reset, GET /api/projects, POST /api/launch/{name}; fixed
/api/stress-integral and /api/helpfulness/summary response JSON
shapes to match routes.py; added AUTH-first WebSocket handshake
(close code 1011 on pre-AUTH frames); expanded WS message catalog
to all 38 MessageType members (inbound, outbound, LeetCode cues).
- Browser-Extension.md: WS section now reflects AUTH-before-IDENTIFY,
close code 1011, LeetCode cue stream, and the generated-types
boundary (cortex_schemas.d.ts).
- Calibration.md: corrected UserBaselines example JSON to use the
real schema field names from cortex/libs/schemas/state.py.
- Home.md: replaced stale CORTEX_LLM__MODE with CORTEX_LLM__PROVIDER
and named the three Anthropic SDK transports.
- How-It-Works.md: L4 LLM Engine now names Anthropic SDK (Bedrock /
Vertex / direct) + rule-based fallback explicitly.
- Troubleshooting.md: removed obsolete Azure OpenAI and Ollama
sections, added unified LLM provider errors section covering all
three transports + fallback; fixed CORTEX_LLM__MODE crash bullet
to CORTEX_LLM__FALLBACK_MODE.
- README.md: corrected stale test-file count (55 → 120+).
Internal cortex/ docs
---------------------
- cortex/README.md: rewrote step 4 (LLM Engine) for Anthropic SDK +
three transports + logical model tiers (Sonnet 4.6 / Haiku 4.5 /
Opus 4.7) + rule-based fallback; updated ASCII architecture
diagram (Azure/Qwen/Ollama → Anthropic SDK / Bedrock / Vertex /
Direct / AMIP arm sel.); replaced LinUCB bandit description with
AMIP (Adaptive Microrandomized Intervention Policy); rewrote
llm_engine and eval entries in the project structure; added a new
Schema Codegen section explaining the pre-commit/CI drift gate;
added capability-token + AUTH-handshake notes near API Endpoints.
- cortex/docs/architecture.md: L4 line now Anthropic SDK + rule
fallback; added Capability Token subsection under L4/L5 Safety;
expanded Repository Map to cover every current services/ subdir.
- cortex/docs/apis.md: added Authentication subsection, X-Cortex-
Request-ID note, /health optional-auth note, Consent section
(GET /consent/level, POST /consent/reset), AUTH-handshake
subsection, Generated TypeScript Types note, and the full
inbound/outbound/LeetCode WS message catalog.
- cortex/docs/setup.md: replaced Azure/Ollama/rule_based LLM
Options with three Anthropic SDK transports + fallback; verify
snippet now reads llm.provider; Azure LLM errors troubleshooting
bullet replaced with LLM provider errors.
- cortex/docs/deploy_anthropic.md: created (replaces deploy_azure
.md); same 6-step experience flow but for Bedrock / Vertex / Direct.
- cortex/docs/deploy_azure.md: deleted (Azure removed in v0.2.0).
- cortex/docs/adapters.md: aligned CortexAdapter interface
description and sample code with the real protocol in
cortex/libs/adapters/base.py.
- cortex/docs/calibration.md: corrected UserBaselines field names
to match cortex/libs/schemas/state.py (hr_baseline, hrv_baseline,
blink_rate_baseline, …, metric_distributions, circadian_hr_cosinor,
rolling_rebaseline_seconds, ew_decay_half_life_days).
Code is untouched. Audit ledger, .ralph/, .claude/, CHANGELOG, and
CLAUDE.md were intentionally left alone (CHANGELOG follows the
release-boundary convention; CLAUDE.md is already current).