Version: v0.2 Status: Review Owners: Foundation / Cortex Last Updated: 2026-03-25 Change Type: additive Migration Required: yes Depends On: Semantic Airgap, External Cognition Gateway, Partner-Fit Engine, Strategy Twin Supersedes: none Superseded By: none
Give the Cortex session a concrete Python-owned implementation backlog grounded in the Foundation-V2 codebase and the new shared specs.
Per the house rules: - Codex session owns C++ and FMIE-native/runtime work - Cortex session owns Python module and Python service changes - Triton Front-end session owns Swift work
Add a Python service/module that enforces the Semantic Airgap before any frontier-model egress.
Target integration points:
- /mnt/Storage-1/worktrees/Foundation-V2/packages/answerer-py/src/answerer/__init__.py
- /mnt/Storage-1/worktrees/Foundation-V2/packages/aristotle-client-py/src/aristotle_client/__init__.py
- /mnt/Storage-1/worktrees/Foundation-V2/packages/deepthink-client-py/src/deepthink_client/__init__.py
- /mnt/Storage-1/worktrees/Foundation-V2/services/haystack-pipeline/src/haystack_pipeline/components/answer_generator.py
- /mnt/Storage-1/worktrees/Foundation-V2/services/haystack-pipeline/src/haystack_pipeline/generator.py
- /mnt/Storage-1/worktrees/Foundation-V2/packages/triton-router-py/src/triton_router/__init__.py
Create the canonical outbound model gateway and move provider calls behind it.
Suggested target package:
- /mnt/Storage-1/worktrees/Foundation-V2/packages/external-cognition-gateway-py/
Extend shared Python types to include:
- DisclosurePolicy
- DisclosureTransform
- TaskPacket
- ExternalInferenceReceipt
- ReasoningImport
- trust status / trust score fields
Target:
- /mnt/Storage-1/worktrees/Foundation-V2/packages/foundation-shared/src/foundation_shared/types.py
Implement the first Python service/module for partner ranking using:
- Hermophylax corp profiles
- opportunity candidates
- contradiction structures
- governed brief signals
Targets:
- /mnt/Storage-1/worktrees/Foundation-V2/services/hermophylax-py/
- /mnt/Storage-1/worktrees/Foundation-V2/services/foundation-api/src/foundation_api/intelligence.py
- new package or service under Foundation-V2
Implement persistent strategy state and update rules.
Likely targets:
- /mnt/Storage-1/worktrees/Foundation-V2/services/foundation-orchestrator-py/
- /mnt/Storage-1/worktrees/Foundation-V2/services/foundation-api/src/foundation_api/intelligence.py
- new shared twin package/service
Cortex work should not be considered complete until: - no canonical direct frontier-model call paths remain outside the gateway - all imported reasoning has receipts and trust metadata - partner-fit ranking can run locally without external reasoning - strategy twin stores belief and contradiction state over time
The Cortex sovereign layer spec (v0.3) is now aligned with the canonical Cortex spec (v2.1). Implementation priorities:
Build the Cortex observer agent with 8-hour systemd timer cycle.
Target:
- /mnt/Storage-1/worktrees/Foundation-V2/agents/cortex/ (codebase)
- /mnt/Storage-1/worktrees/Foundation-V2/deploy/cortex/ (systemd units)
- /mnt/Storage-1/worktrees/Foundation-V2/deploy/circuit-breaker/ (external watchdog)
- /mnt/Storage-1/worktrees/Foundation-V2/runtime/cortex/ (runtime state)
Sensors to implement: - kb-health, qdrant-health, service-health, crawl-freshness, grounding-quality - autoresearch-status, self-learn-ledger, eval-health, token-and-quota - contrastive-health, external-models, external-ecosystem, external-research - disclosure-risk (airgap packet counts, denied exports, trust scores, contradiction rates) - receipt-integrity (commitment hashes, trust labels, surrogate registry consistency)
Cortex must respect the three observability scopes: - Scope A (unrestricted): metrics, stats, counts, telemetry, receipts, commitments - Scope B (unrestricted): entity-level derived summaries, route distributions, crawl yields - Scope C (Tier 3, operator approval): raw tenant media/docs/queries, raw task packets
Implementation: Cortex data readers must tag every read with its scope. Scope C reads trigger an Approved Audit View request flow.
When Cortex calls Anthropic for her own strategic reasoning, those calls must go through the Semantic Airgap. No VIP lane. - Cortex strategic prompts are mostly Scope A data (aggregate metrics, public external sources) — the airgap will rarely block - But the boundary must exist structurally — Cortex cannot be hardcoded to bypass disclosure policy
Standalone external watchdog process. ~50 lines. No LLM, no dependencies.
- Runs every 5 minutes on its own systemd timer
- Lives in deploy/circuit-breaker/ — Cortex has no write access
- Checks: action count, API spend, cycle duration, snapshot growth, config integrity, write scope
- Kill: remove active.lock + SIGTERM. Only operator/systemd can restart.
What Cortex needs from FMIE (via governed views): - Media Passport metadata (provenance hashes, authenticity labels, transform history) — Scope A - Perception quality metrics (extraction confidence, OCR quality, STT accuracy) — Scope A - FMIE service health (throughput, queue depth, error rates) — Scope A - Transform-ready derived view availability (Cortex knows views exist, doesn't read raw content) — Scope B
What Cortex provides to FMIE (via peer-to-peer intelligence): - KB coverage gaps that FMIE perception could fill (e.g., "12 scanned PDFs have no OCR") - Quality signals from downstream (e.g., "FMIE v0.41 docs have 15% higher grounding than v0.37") - Strategic intel on new perception models from external scouting
Contract: FMIE should expose a health/stats endpoint that Cortex's disclosure-risk and receipt-integrity sensors can poll. Format: JSON, same pattern as existing Foundation service health endpoints.
Start with Semantic Airgap + External Cognition Gateway. Those unblock the rest of the architecture and close the biggest V2 privacy gap. Then build Cortex Phase 1 (observer) with governed observability baked in from day one.