/ _bmad / traceability.md
traceability.md
 1  # Traceability Matrix — Bob
 2  
 3  > Status: Living Document | Last updated: 2026-04-08 (Session 12 audit)
 4  
 5  ## PRD → OpenSpec → Epic → Implementation Status
 6  
 7  | PRD Req | OpenSpec Capability | Epic | Impl Status | Notes |
 8  |---------|---------------------|------|-------------|-------|
 9  | FR-01 | `nix-infrastructure` | Epic 01 | Done | NixOS flake, systemd-boot, TB auto-auth, 3x GPU |
10  | FR-02 | `nix-infrastructure` | Epic 01 | Partial | NixOS config in git; MCP-NixOS evaluated S12: read-only lookup tool, deferred until agents autonomously propose config changes |
11  | FR-03 | `llm-inference` | Epic 02 | Done | Qwen3-32B AWQ via vLLM, TP=2, ~40 tok/s |
12  | FR-04 | `knowledge-store` | Epic 03 | Partial | Oxigraph deployed (14,152 triples: BFO+CCO+family, reloaded S12); Automerge not yet |
13  | FR-05 | `knowledge-graph` | Epic 04 | Done | TrustGraph deployed (44 containers), API :8088, Workbench :8888 Authenticated + Online (API key configured S12). Neo4j for Graphiti working. |
14  | FR-06 | `knowledge-graph` | Epic 04 | Partial | SPARQL query tool in voice pipeline |
15  | FR-07 | `home-awareness` | Epic 05 | Done | HA deployed, HA→NATS bridge, voice tools |
16  | FR-08 | `event-bus` | Epic 05 | Done | NATS JetStream + MQTT bridge |
17  | FR-09 | `voice-stt` | Epic 06 | Done | faster-whisper large-v3 INT8, GPU 2 |
18  | FR-10 | `voice-tts` | Epic 06 | Done | Fish Speech v1.5 (Ray Porter clone) + Kokoro fallback |
19  | FR-11 | `voice-wakeword` | Epic 06 | Done | "hey bob" custom TFLite + Wyoming gate in pipeline |
20  | FR-12 | `voice-diarization` | Epic 06 | Done | diart + CAM++ streaming diarization, 3 speakers enrolled (Session 5) |
21  | FR-13 | `voice-pipeline` | Epic 06 | Done | Pipecat: wake word → STT → LLM → Fish Speech TTS |
22  | FR-14 | `tak-interop` | Epic 07 | Not Started | CoT bridge |
23  | FR-15 | `home-awareness` | Epic 05 | Partial | HA control via voice; All 3 tiers implemented: Tier 1 (5 YAML rules + voice creation), Tier 2 (pattern detection at 3 AM), Tier 3 (LLM anomaly every 6h). Code-reviewed S12: fully implemented, diagnostic-only (no pattern→rule feedback loop). State history in-memory only. Needs: HA→NATS event flow verification, pattern→rule conversion, state persistence. |
24  | FR-16 | `knowledge-store` | Epic 03 | Not Started | CRDT family sync |
25  | FR-17 | `agent-memory` | Epic 04, 12 | Done | Neo4j + Graphiti client; session consolidation + recall_memory tool (Session 9). Auto-context injection at session start (S12-05 Phase 1): speaker ID → Graphiti episodes + calendar events + user profile injected into system prompt. |
26  | FR-18 | `agent-scheduler` | Epic 08, 13 | Done | Cron scheduler + demand-driven dispatch via coordinator (Epic 13) |
27  | FR-19 | `system-sentinel` | Epic 08, 11 | Partial | Sentinel (15-min monitoring) + Home Keeper (hourly health + auto-remediation). Sentinel→Keeper alert bridge wired (S12): critical alerts auto-remediate crashed containers + disk cleanup. 31 containers in SAFE_TO_RESTART. Missing: declarative YAML playbooks, NixOS rollback, dry-run mode, approval gates. |
28  | FR-20 | `daily-coordinator` | Epic 09 | Done | Morning + Evening agents with weather + news headlines + NWS alerts + calendar events (4 ICS feeds, Session 12) |
29  | FR-21 | `knowledge-gardener` | Epic 10 | Done | Nightly consolidation + real-time session storage + 90-day pruning + deduplication (Session 9) |
30  | FR-22 | `daily-coordinator` | Epic 09 | Done | Calendar bridge: 4 ICS feeds (Proton x2, MS365, Google) → NATS → briefings. News aggregator: 7 RSS sources → NATS (Session 12) |
31  | FR-23 | `system-sentinel` | Epic 11 | Partial | Network Discovery agent scans subnets + MAC registry; Device Health agent SSH-checks rig/kairos/reMarkable (Session 10). Lacks full inventory UI. |
32  | FR-24 | `agent-scheduler` | Epic 08, 13 | Done | NATS protocol + coordinator routing + agent dispatch, all verified (Session 9) |
33  | FR-25 | `system-sentinel` | Epic 11 | Not Started | REPL-based diagnostic agents |
34  | FR-26 | `model-tiering` | Epic 13 | Done | Qwen3-8B-AWQ classifier on GPU 2 (:8001) + coordinator NORMAL mode + CoordinatorRouter active in voice pipeline. Fixed Session 11 (ADR-020) |
35  | FR-27 | `distributed-compute` | Epic 11 | Not Started | Household compute orchestration |
36  
37  **Impl Status values**: Done | Partial | In Progress | Not Started | Deferred | Untested
38  
39  ## NFR Verification
40  
41  | NFR | Verification Method | Status | Notes |
42  |-----|---------------------|--------|-------|
43  | NFR-01 | Coordinator latency per tier (3x each) | **PARTIAL PASS** | Deterministic 1ms, Simple 359ms (PASS). Moderate 1458ms, Complex 6366ms (FAIL — tool I/O dominates). Full pipeline estimate: deterministic ~500ms, simple ~860ms within target. |
44  | NFR-02 | SPARQL + Cypher query benchmarks | **PASS** | Oxigraph <10ms (3 queries), Neo4j <650ms (3 queries). All well under 3s target. |
45  | NFR-03 | Prometheus + container uptime check | **CONDITIONAL PASS** | 18h uptime, 0 alerts, 0 excessive restarts. 99.5% requires 30-day observation window. Current evidence consistent with target. |
46  | NFR-04 | Code audit + network config review | **PASS** | All LLM inference local (vLLM on localhost). Zero user data egress. External: weather/RSS/calendar GET only. DNS via local router. |
47  | NFR-05 | Sops + disk + backup encryption audit | **PARTIAL PASS** | Sops: AES-256-GCM (PASS). Disk: no LUKS encryption (FAIL). Restic: not initialized. Backup script password in plaintext. |
48  | NFR-06 | nvidia-smi + simultaneous health checks | **PASS** | 6 GPU services coexist (GPU 0+1: 21.4GB/24GB, GPU 2: 16.9GB/24GB). All respond under concurrent load. 7.1GB free on GPU 2. |
49  | NFR-07 | nix build --dry-run + flake check | **PASS** | Flake evaluates cleanly, 45 NixOS generations available. Fresh install producible from git. |
50  | NFR-08 | Container restart timing + generation count | **PASS** | Container restart: ~10s. 45 NixOS generations for rollback. Single-command rollback available. 19 Docker images cached locally. |
51  | NFR-09 | ~~Power measurement~~ | **REMOVED** | Removed from requirements — not a meaningful constraint for this system. |
52  | NFR-10 | 2 concurrent coordinator requests | **PASS** | 4/4 concurrent requests responded. Deterministic+Simple pair: no penalty. Complex pair: ~2x latency increase (serialization at GPU). |
53  
54  ## Epic Dependency Graph
55  
56  ```
57  Epic 01 (NixOS Infrastructure)
58      ├──→ Epic 02 (LLM Inference)
59      │        ├──→ Epic 04 (Knowledge Graph) ──→ Epic 07 (TAK Interop)
60      │        └──→ Epic 06 (Voice)
61      └──→ Epic 05 (Home Awareness + Event Bus)
62                └──→ Epic 06 (Voice — HA integration)
63  Epic 03 (Knowledge Store) ──→ Epic 04 (Knowledge Graph)
64  Epic 02 + 04 + 06 ──→ Epic 12 (Everything Agent) ──→ Epic 13 (Coordinator + Tiering)
65  ```