Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
chore(depth): Phase 0 kickoff — plan, progress file, re-derived figures, baselines (#1187)
Beenu Arorad3860b8585ba
diff --git a/DEPTH_PROGRESS.md b/DEPTH_PROGRESS.mdnew file mode 100644index 000000000..8a9534a8d--- /dev/null+++ b/DEPTH_PROGRESS.md@@ -0,0 +1,254 @@+# AiSOC depth plan: progress++Mirrors `plans/aisoc_depth_plan.plan.md`, which is locked and is the source of+truth. This file is the mutable half.++Legend: `[ ]` not started, `[~]` in progress, `[x]` done, `[!]` blocked (with+exactly what is needed).++An item is `[x]` only when all three of these are recorded against it: the test+or gate that failed on the pre-fix tree for the stated reason, the change, and+the negative control showing that reverting it fails again.++- **Base commit:** `1b8bc2d4` (`origin/main`, v17.1.0).+- **Plan captured at:** `90ea2fd`. Figures in the plan body are hints at that+ commit; Phase 0.2 below re-derives each one and the tree wins.++## Migration and ADR numbers claimed++Phases run in parallel lanes, so a number is claimed here **before** the file+is written. Next free at capture: migration `095`, ADR `0010`+(`docs/decisions/`, not `docs/adr/` -- the plan's wording; the directory is+`decisions/` and the highest is `0009-auto-close-without-an-earned-grant.md`).++| Number | Claimed by | Status |+|---|---|---|+| (none yet) | | |++## Phase 0: Kickoff++- [x] **0.1** `DEPTH_PROGRESS.md` exists (this file), modelled on+ `PARITY_PROGRESS.md`.+- [x] **0.2** Every figure re-derived against the base commit. See below.+- [~] **0.3** Baselines captured. Four of five recorded; `make up-full` and the+ hosted-model matrix are noted under Deviations.++### 0.2 Re-derived figures++Measured on `1b8bc2d4`, 2026-10-07, each by the generator or gate the plan+names. Where the captured and measured values differ, **the measured value is+the one later phases are graded against**.++| Figure | Captured in plan | Measured | Note |+|---|---|---|---|+| Executable detections | 2,603 | **2,603** | `generate_corpus_stats.py --check` |+| On disk | 6,991 | **6,991** | same |+| Quarantined | — | **4,388** | same |+| Unreachable native rules | 119 | **119** | `check_detection_fields.py`; `MAX_UNREACHABLE = 119` |+| … needing a windowed evaluator | 74 | **74** | the family Phase 3.1 translates |+| … identity enrichment | 24 | **24** | Phase 3.3 |+| … fields nothing emits | 8 | **8** | Phase 3.3 |+| … first-seen / age | 8 | **8** | Phase 3.3 |+| … other | 6 | **6** | |+| … behavioural baseline | 2 | **2** | Phase 3.4 |+| Windowed rules | 18 | **18** | `services/fusion/app/data/windowed_ruleset.json` |+| Executor arms | 73 | **74** | classes declaring `capability = "…"` under `services/actions/app/live_actions/`. **33 distinct capability verbs.** Phase 5.5 counts arms, so its target is measured from 74 |+| Claim-to-gate matrix | 290 rows, all GATED | **290 rows, 290 GATED, 0 PARTIAL, 0 NO GATE** | `check_claim_gate_matrix.py` |+| CORE / full services | 16 / 22 | **16 / 22** | `check_profile_service_counts.py` (production stack: 16 / 21) |+| Next migration | 095 | **095** | highest is `094_user_delete_fk.sql` |+| Next ADR | 0010 | **0010** | in `docs/decisions/`, highest `0009` |++**Cloud, identity, SaaS and code executable rules: captured 461, measured+395.** The gap is a definition the plan does not pin, not a change in the+tree, so it is recorded here rather than reconciled silently. Measured by+`log_source` on executable entries in `marketplace/index.json`, grouping:++| Group | Count | `log_source` values counted |+|---|---|---|+| cloud | 225 | aws 76, azure 50, gcp 40, kubernetes 36, docker 10, cloud 8, multi-cloud 5 |+| identity | 123 | identity 47, okta 35, active-directory 22, auth0 5, duo 5, ping 5, keycloak 4 |+| saas | 34 | google-workspace 8, m365 7, slack 6, email 3, salesforce 3, + 7 others |+| code | 13 | github 12, gitlab 1 |+| **total** | **395** | |++Phase 3.6 must therefore raise **395 → 800** and ship the `make stats` line+with a `--check` gate that fixes this grouping in code, so the figure stops+being re-derivable two ways.++**Two measurement caveats found while re-deriving, both worth carrying:**++1. **1,724 of the 2,603 executable rules live under+ `detections/sigma-imports/_quarantine/`.** "Executable" and "quarantined"+ overlap, because the Sigma compiler began translating rules in place+ without moving them. Any later statement of the form "N executable rules"+ must not be read as "N rules outside quarantine".+2. **The plan's "1,798 of 2,603 are Windows (69%)" does not reproduce from+ the index.** Only 111 executable entries carry `log_source: windows`, and+ 218 are Windows by path or log source (8%). The 1,770 Sigma imports carry+ **no `log_source` at all**, which is where the difference lives: the+ captured figure counted the Sigma corpus as Windows, which is+ approximately but not exactly true. Phase 3.6's gate should classify by a+ field that exists rather than by corpus membership.++### 0.3 Baseline artefacts++Hardware: Apple M5 Max, 18 cores, 128 GiB host; Docker 29.5.2 in a 6-CPU /+15.6 GiB Linux VM. Date 2026-10-07. Commit `1b8bc2d4`.++| Baseline | Result | Artefact |+|---|---|---|+| `make up` (CORE) | **PASS** -- 16 services healthy, administrator created | — |+| `make smoke` | **PASS 10/10 stages** -- event traversed ingest → Kafka → fusion → alert, severity and source attribution survived | — |+| Behavioural injection suite | **19 passed.** Overall flip rate **0.2593**, unsafe-action rate **0.037** over 27 cases | `services/agents/tests/eval_data/behavioural_injection.json` |+| Live-agent model matrix | **0 of 2 models measured** -- "no live LLM key configured", reported as *not measured* rather than zeros | — |+| Load harness, 20,000 events | **pipeline 130.3 alerts/s**, ingest accepted 397.6 events/s, p50 **54.9 s**, p95 **100.2 s**, p99 103.9 s, delivery ratio **1.0**, duplicates **0**, dead letters **0** | `docs/perf/results/2026-10-07-compose-depth-baseline.json` |++Per-family injection flip rates at baseline, from the artefact above:++| Family | Cases | Flip rate | Guard catch rate |+|---|---|---|---|+| command_line | 4 | 0.25 | 0.75 |+| email_subject | 3 | 0.3333 | 0.6667 |+| fake_analyst_note | 2 | 0.0 | 1.0 |+| **fake_tool_output** | — | **1.0** | **0.0** |+| file_path, process_name, url, username | — | 0.0 | — |+| persona | — | 0.67 | — |++`fake_tool_output` at 1.0 flip / 0.0 catch is the figure Phase 1.3 must bring+to **at or below 0.10 on tuned *and* held-out payloads**.++The load-harness row is the "before" for Phase 4.4, whose target is a+sustained 5,000 events/s at p95 under 2 s on documented cloud hardware. The+measured p95 of 100 s is a *drain* latency under a 20,000-event burst on a+6-CPU laptop VM, not a steady-state figure, and must be labelled that way+wherever it is quoted.++## Deviations++Recorded as they happen. A deviation is not a failure; an unrecorded one is.++### D1 -- The load harness could not run from a clean checkout (fixed here)++`scripts/perf/load_harness.py` invoked `go run ./services/demo-producer` with+`cwd=` the repository root. There is no `go.mod` at the root -- the producer+is its own module at `services/demo-producer/go.mod` -- so the subprocess+failed before starting:++```+producer failed (1): go: go.mod file not found in current directory or any+parent directory; see 'go help modules'+```++The harness has therefore never produced a run on the path it documents; the+published laptop figures must have come from a prebuilt `--producer-bin`,+which needs no module context. Fixed in the Phase 0 commit by running `go run+.` from the producer's own directory, which is what produced the baseline+above. Phase 4.4 extends this harness and inherits the fix.++### D2 -- `make up-full` not captured on this host++Deferred rather than claimed. The `full` profile is 22 services at ~12 GiB+against a 15.6 GiB VM that is already running the 16 CORE services, and a+baseline taken under memory pressure would describe the host rather than the+stack. Recorded as unmeasured; Phase 4.5 (`helm install` brings up all of+CORE) and Phase 3.4 (baselines in CORE) are the items that need it, and both+will re-take it on a sized host.++### D3 -- Hosted model rows are maintainer-blocked (M2)++`scripts/run_model_matrix.py` reports **0 of 2 models measured** with "no live+LLM key configured". This is the gate behaving correctly: it refuses to+publish `0.000` where it means "not measured". Phase 1.4 adds local 7--8B+candidates, which need no key and *can* be measured here; the hosted rows stay+`[!]` until the maintainer funds a key.++## Phase 1: Verdict quality you can publish++- [ ] **1.1** Balanced, labelled verdict corpus+- [ ] **1.2** Scorecard: balanced accuracy, MCC, per-class precision/recall,+ Wilson interval, false negatives, auto-close precision, escalation rate,+ time to verdict+- [ ] **1.3** Close `fake_tool_output` structurally (≤ 0.10 tuned and held-out)+- [ ] **1.4** A 7--8B local model in the matrix, chosen by score+- [ ] **1.5** `make replay-eval` design-partner kit+- [ ] **1.6** Published "Verdict quality" table with a `--check` drift gate++## Phase 2: A semantic layer and live posture++- [ ] **2.1** OCSF classes beyond five+- [ ] **2.2** Activity projection on every event+- [ ] **2.3** Event classification catalogue+- [ ] **2.4** Sessions per principal+- [ ] **2.5** `__posture_snapshot__` collectors (AWS, Azure, GCP, Workspace, GitHub)+- [ ] **2.6** Use the posture everywhere+- [ ] **2.7** Entity context in CORE (ADR first)++## Phase 3: Detection depth for cloud, identity and SaaS++- [ ] **3.1** Translate the 74 windowed `det-*` rules+- [ ] **3.2** Ordered sequences and Sigma correlations+- [ ] **3.3** Enrichment inputs (parity 5.5)+- [ ] **3.4** Behavioural baselines in CORE+- [ ] **3.5** Threat-and-anomaly condition rules+- [ ] **3.6** 395 → at least 800 cloud, identity, SaaS and code conditions+- [ ] **3.7** Detection engineering agent (gap-closure Phase 9 / parity 6.2)++## Phase 4: Collection and scale++- [ ] **4.1** Cloud-native collection (S3+SQS org trail, Pub/Sub, Event Hubs)+- [ ] **4.2** Standard inputs (syslog, OTLP, Kafka, TAXII 2.1)+- [ ] **4.3** Retention the tenant chooses+- [ ] **4.4** Throughput (parity 6.9) and a cloud-hardware run+- [ ] **4.5** Deployment completeness (parity 6.8)++## Phase 5: Response that finishes++- [ ] **5.1** Steps that act (parity 5.3)+- [ ] **5.2** Delivery (parity 5.7)+- [ ] **5.3** `wait`, `parallel`, `loop` with idempotency keys+- [ ] **5.4** Stateful user and manager verification+- [ ] **5.5** Executor arms 74 → at least 150+- [ ] **5.6** Plain-language playbooks++## Phase 6: AI agent security++- [ ] **6.1** AI asset inventory+- [ ] **6.2** Endpoint discovery with no new agent+- [ ] **6.3** Provider coverage beyond OpenAI and Anthropic+- [ ] **6.4** Agent identity and baselines (parity 6.7)+- [ ] **6.5** AI rule pack+- [ ] **6.6** AI containment and kill-switch++## Phase 7: Phishing operations++- [ ] **7.1** Intake to purge (gap-closure Phase 10 / parity 6.4)+- [ ] **7.2** Header, URL and attachment analysis+- [ ] **7.3** Adversary-in-the-middle session reuse++## Phase 8: Enterprise gates++- [ ] **8.1** Identity and administration+- [ ] **8.2** ABAC, elevation and workload identities+- [ ] **8.3** Buyer security pack++## Phase 9: Analyst surfaces++- [ ] **9.1** MCP over streamable HTTP (parity 6.6)+- [ ] **9.2** Semantic memory (parity 6.5)+- [ ] **9.3** Case depth (parity 5.6 remainder)+- [ ] **9.4** War rooms+- [ ] **9.5** Hunt to report+- [ ] **9.6** Native responder++## Phase 10: Close the books++- [ ] **10** Re-run touched claim rows, update sibling progress files, one+ `[Unreleased]` entry per phase, final report here++## Item log++| Date | Item | What happened |+|---|---|---|+| 2026-10-07 | 0.1 | This file created at base commit `1b8bc2d4`. |+| 2026-10-07 | 0.2 | Every figure re-derived. Two matched exactly (detections, unreachable families); executor arms measured 74 against a captured 73; the cloud/identity/SaaS/code figure measured 395 against a captured 461 on a grouping the plan does not pin, recorded above. Two measurement caveats found: executable and quarantined overlap by 1,724 rules, and the "69% Windows" figure does not reproduce from the index. |+| 2026-10-07 | 0.3 | `make up` and `make smoke` (10/10) pass. Injection suite and load-harness baselines committed. `make up-full` deferred (D2) and hosted model rows blocked (D3). Fixing D1 was a precondition for the load-harness baseline. |diff --git a/apps/docs/docs/operations/performance.md b/apps/docs/docs/operations/performance.mdindex 2e8a2ca3e..c88cae3d7 100644--- a/apps/docs/docs/operations/performance.md+++ b/apps/docs/docs/operations/performance.md@@ -70,6 +70,43 @@ its 1.5 GiB limit, PostgreSQL sat near 7% CPU on 97 MiB, and ingest neverexceeded 29 MiB. Fusion is the bottleneck, which is why the drain rate isroughly 45% of what ingest accepts.+## Single host, Docker Compose (CORE profile), 2026-10-07++The depth plan's Phase 0 baseline, taken so every later change to ingest,+fusion or detection has a "before" on the same harness. Saturation only --+no steady-state pacing was run, so there is no row to plan latency against+here; use the 2026-09-27 steady-state column for that.++A different host from the run above, which is most of the difference in the+drain rate: a 6-CPU, 15.6 GiB Linux VM on Apple silicon, against the+18-core host the September run used. Quoting the two drain rates against+each other would be comparing machines, not releases.++| | Saturation |+|---|---|+| Events pushed | 20,000 |+| Ingest accepted | 397.6 events/s |+| Pipeline drain rate | **130.3 alerts/s** |+| Event-to-alert p50 | 54,903 ms |+| Event-to-alert p95 | 100,248 ms |+| Event-to-alert p99 | 103,933 ms |+| Event-to-alert max | 105,194 ms |+| Peak consumer lag | 13,952 messages |+| Lag after drain | 0 messages |+| Dead-letter rate | 0.00 |+| Events that produced no alert | 0 |+| Events that produced more than one alert | 0 |++Fusion again held one core at roughly 77% while ingest never exceeded 29 MiB,+so the bottleneck is where the September run found it. Artefact:+`docs/perf/results/2026-10-07-compose-depth-baseline.json`.++**The harness could not run from a clean checkout before this run.** It+invoked `go run ./services/demo-producer` from the repository root, where+there is no `go.mod` -- the producer is its own module -- so the subprocess+failed before starting. Earlier published figures must have come from a+prebuilt `--producer-bin`, which needs no module context.+## Three-node Kubernetes (kind), 2026-09-27Installed from `infra/helm/aisoc` with `values-ha.yaml` anddiff --git a/docs/perf/results/2026-10-07-compose-depth-baseline.json b/docs/perf/results/2026-10-07-compose-depth-baseline.jsonnew file mode 100644index 000000000..abdea1089--- /dev/null+++ b/docs/perf/results/2026-10-07-compose-depth-baseline.json@@ -0,0 +1,477 @@+{+ "schema": "aisoc.load_harness/v1",+ "measured_at": "2026-10-07T11:14:43+00:00",+ "hardware": {+ "os": "Darwin 25.5.0",+ "arch": "arm64",+ "python": "3.14.3",+ "cpu_count": 18,+ "cpu": "Apple M5 Max",+ "memory_bytes": "137438953472",+ "container_runtime": "docker 29.5.2",+ "runtime_cpus": "6",+ "runtime_memory_bytes": "16732983296"+ },+ "deployment": "docker-compose",+ "not_a_production_slo": true,+ "slo_disclaimer": "These are measurements of one deployment on the hardware named above, on the date named above. They are not a service-level objective and no support commitment is derived from them. Sustained throughput on other hardware, other storage and other event mixes will differ. The regression floors in perf.yml are set well below the measured values so they fire on a catastrophic regression rather than on runner jitter.",+ "run": {+ "run_id": "p91371524",+ "attempted_events": 20000,+ "accepted_events": 20000,+ "alerts_observed": 20000,+ "distinct_events_alerted": 20000,+ "missing_events": 0,+ "duplicate_alert_rows": 0,+ "push_wall_seconds": 50.297136583,+ "drain_wall_seconds": 104.24750685691833,+ "drain_settled": true,+ "clock_offset_seconds": -0.07260012626647949,+ "clock_offset_spread_seconds": 0.011321544647216797,+ "producer": {+ "run_id": "p91371524",+ "mode": "load",+ "marker_prefix": "aisoc-load",+ "ingest_url": "http://localhost:8081/v1/ingest/batch",+ "tenant": "00000000-0000-0000-0000-000000000001",+ "started_at": "2026-10-07T11:12:05.022007Z",+ "ended_at": "2026-10-07T11:12:55.319143583Z",+ "wall_seconds": 50.297136583,+ "workers": 8,+ "batch_size": 50,+ "target_eps": 0,+ "requested_events": 20000,+ "attempted_events": 20000,+ "accepted_events": 20000,+ "rejected_events": 0,+ "refused_events": 0,+ "transport_error_events": 0,+ "accepted_eps": 397.6369503062293,+ "http_status_counts": {+ "200": 400+ },+ "seq_low": 0,+ "seq_high": 19999+ },+ "shape": {+ "batch_size": 50,+ "workers": 8,+ "target_eps": 0,+ "commit_sha": "1b8bc2d4afd4e970783d8cf7d2f6a68fe69e9073",+ "hosts": 1+ },+ "total_wall_seconds": 159.52085781097412+ },+ "metrics": {+ "consumer_lag_drained": {+ "unit": "messages",+ "measured": true,+ "samples": 1,+ "value": 0.0+ },+ "consumer_lag_in_flight": {+ "unit": "messages",+ "measured": true,+ "samples": 1,+ "value": 13952.0+ },+ "dead_letter_rate": {+ "unit": "fraction",+ "measured": true,+ "samples": 20000,+ "value": 0.0+ },+ "delivery_ratio": {+ "unit": "fraction",+ "measured": true,+ "samples": 20000,+ "value": 1.0+ },+ "ingest_accepted_eps": {+ "unit": "events/s",+ "measured": true,+ "samples": 20000,+ "value": 397.6369503062293+ },+ "latency_max_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 20000,+ "value": 105194.19479370117+ },+ "latency_p50_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 20000,+ "value": 54903.111934661865+ },+ "latency_p95_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 20000,+ "value": 100247.81155586243+ },+ "latency_p99_ms": {+ "unit": "ms",+ "measured": true,+ "samples": 20000,+ "value": 103932.60407447815+ },+ "pipeline_eps": {+ "unit": "alerts/s",+ "measured": true,+ "samples": 20000,+ "value": 130.28617931659625+ }+ },+ "resources": [+ {+ "at": "2026-10-07T11:12:56+00:00",+ "containers": {+ "agents": {+ "cpu": "0.09%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.05%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "69.70%",+ "memory": "77.79MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "28.49MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "7.62%",+ "memory": "438.8MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "4.75%",+ "memory": "117.1MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:12:58+00:00",+ "containers": {+ "agents": {+ "cpu": "0.13%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.06%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "76.91%",+ "memory": "77.89MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "28.49MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "10.88%",+ "memory": "439.2MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "5.29%",+ "memory": "117.9MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:05+00:00",+ "containers": {+ "agents": {+ "cpu": "0.13%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.08%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "40.97%",+ "memory": "78.2MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.04%",+ "memory": "28.49MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "63.26%",+ "memory": "514.6MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "5.40%",+ "memory": "120.8MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:12+00:00",+ "containers": {+ "agents": {+ "cpu": "0.21%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.05%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "76.52%",+ "memory": "78.56MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "28.49MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "10.65%",+ "memory": "443.8MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "5.43%",+ "memory": "124.2MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:20+00:00",+ "containers": {+ "agents": {+ "cpu": "0.12%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "8.23%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "47.11%",+ "memory": "78.87MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.03%",+ "memory": "28.49MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "4.80%",+ "memory": "450.8MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "3.21%",+ "memory": "127.4MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:27+00:00",+ "containers": {+ "agents": {+ "cpu": "0.09%",+ "memory": "168.9MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.05%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "77.96%",+ "memory": "79.19MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.01%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "6.86%",+ "memory": "460.2MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "4.73%",+ "memory": "130.2MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:34+00:00",+ "containers": {+ "agents": {+ "cpu": "0.14%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.08%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "40.66%",+ "memory": "79.52MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "3.97%",+ "memory": "484.4MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "2.66%",+ "memory": "133.1MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:41+00:00",+ "containers": {+ "agents": {+ "cpu": "0.12%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.06%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "77.53%",+ "memory": "80.06MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.02%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "6.80%",+ "memory": "485.9MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "4.98%",+ "memory": "135.9MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:48+00:00",+ "containers": {+ "agents": {+ "cpu": "0.10%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.05%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "76.91%",+ "memory": "80.12MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.02%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "7.33%",+ "memory": "538.9MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "5.05%",+ "memory": "139.4MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:13:55+00:00",+ "containers": {+ "agents": {+ "cpu": "0.12%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.08%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "43.25%",+ "memory": "80.4MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.00%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "4.13%",+ "memory": "597.3MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "2.73%",+ "memory": "141.9MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:14:03+00:00",+ "containers": {+ "agents": {+ "cpu": "0.09%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.06%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "71.19%",+ "memory": "80.71MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.03%",+ "memory": "28.48MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "6.92%",+ "memory": "659.4MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "4.63%",+ "memory": "144.4MiB / 15.58GiB"+ }+ }+ },+ {+ "at": "2026-10-07T11:14:10+00:00",+ "containers": {+ "agents": {+ "cpu": "0.10%",+ "memory": "169MiB / 15.58GiB"+ },+ "api": {+ "cpu": "0.05%",+ "memory": "219.6MiB / 15.58GiB"+ },+ "fusion": {+ "cpu": "77.11%",+ "memory": "81.04MiB / 15.58GiB"+ },+ "ingest": {+ "cpu": "0.02%",+ "memory": "28.46MiB / 15.58GiB"+ },+ "kafka": {+ "cpu": "7.51%",+ "memory": "726.1MiB / 1.5GiB"+ },+ "postgres": {+ "cpu": "5.05%",+ "memory": "147.2MiB / 15.58GiB"+ }+ }+ }+ ]+}diff --git a/plans/aisoc_depth_plan.plan.md b/plans/aisoc_depth_plan.plan.mdnew file mode 100644index 000000000..68b01a787--- /dev/null+++ b/plans/aisoc_depth_plan.plan.md@@ -0,0 +1,514 @@+---+name: AiSOC depth plan+overview: "Close the depth gaps a capability review at v17.0.0 found against the reference AI-SOC platform: publishable verdict quality, a semantic data layer with live posture, cloud, identity and SaaS detection depth, collection and scale, response that finishes, AI agent security, phishing operations, enterprise gates and analyst surfaces. Ordered by dependency. Every item is reproduced before it is built and lands with a gate."+todos:+ - id: p0-1-progress-file+ content: "Phase 0.1: create DEPTH_PROGRESS.md modelled on PARITY_PROGRESS.md (a checkbox per item, pre-existing state, deviations, item log)"+ status: pending+ - id: p0-2-rederive+ content: "Phase 0.2: re-derive every number this plan cites against the starting tree and record captured vs measured"+ status: pending+ - id: p0-3-baseline+ content: "Phase 0.3: baseline run (make up and make smoke, make up-full, injection suite, model matrix, load harness) committed with hardware, date and commit"+ status: pending+ - id: p1-1-verdict-corpus+ content: "Phase 1.1: balanced labelled verdict corpus (no class above 60%, at least half cloud, identity and SaaS, benign twins, licensed sources); the scorer accepts it and still refuses the all-malicious corpora"+ status: pending+ - id: p1-2-scorecard+ content: "Phase 1.2: scorecard with balanced accuracy and MCC next to the majority baseline, per-class precision and recall, malicious recall with a Wilson interval, false negatives, auto-close precision, escalation rate, time to verdict"+ status: pending+ - id: p1-3-fake-tool-output+ content: "Phase 1.3: close fake_tool_output structurally (tool results only on the tool channel, tool-shaped evidence flagged, verdicts citing a tool result with no ledger row demoted); flip rate at or below 10% on tuned and held-out payloads"+ status: pending+ - id: p1-4-local-model+ content: "Phase 1.4: add a 7B to 8B local model to the matrix, choose by score, make it the default for up-gpu and up-host-llm only unless an ADR fits it in CORE"+ status: pending+ - id: p1-5-replay-kit+ content: "Phase 1.5: make replay-eval, a design-partner kit over the existing history readers, side-effect free, air-gapped by default, signed aggregate report"+ status: pending+ - id: p1-6-publish+ content: "Phase 1.6: generated Verdict quality table in benchmark.md with model id, corpus digest, date and commit, held by a --check drift gate"+ status: pending+ - id: p2-1-ocsf-classes+ content: "Phase 2.1: OCSF classes beyond five; every connector type mapped to a class with a profile or excused, enforced by a gate"+ status: pending+ - id: p2-2-activity-projection+ content: "Phase 2.2: activity projection on every event (actor.kind, action, resource, location, outcome), IP geo and ASN at ingest, user-agent parsing"+ status: pending+ - id: p2-3-event-catalogue+ content: "Phase 2.3: event classification catalogue in schemas/event_catalog with sensitivity, and a gate that every fixture event type is classified or excused"+ status: pending+ - id: p2-4-sessions+ content: "Phase 2.4: sessions per principal (AWS key and assumed-role chain to the originating human, IdP session ids, IP and user-agent fallback) in the lake and graph, attached to alerts"+ status: pending+ - id: p2-5-posture-snapshots+ content: "Phase 2.5: __posture_snapshot__ collectors for AWS, Azure, GCP and Workspace plus GitHub; AWS permission boundaries; scheduled and change-driven, versioned; delete test_posture_snapshot_coverage.py last"+ status: pending+ - id: p2-6-use-posture+ content: "Phase 2.6: privilege tier on every alert, a cited what-this-identity-can-do tool for triage, blast radius from effective permissions"+ status: pending+ - id: p2-7-core-context+ content: "Phase 2.7: ADR measuring entity and session context in CORE (Neo4j vs a Postgres store); implement what it accepts"+ status: pending+ - id: p3-1-windowed-family+ content: "Phase 3.1: translate the 74 windowed det-* rules into wd-* form through export_windowed_ruleset.py"+ status: pending+ - id: p3-2-sequences+ content: "Phase 3.2: ordered sequences in the windowed engine and Sigma correlation import"+ status: pending+ - id: p3-3-enrichment-inputs+ content: "Phase 3.3: parity 5.5 inputs (identity enrichment from posture and SCIM, per-tenant first-seen store, fields nothing emits); lower MAX_UNREACHABLE with each fix"+ status: pending+ - id: p3-4-core-baselines+ content: "Phase 3.4: behavioural baselines in CORE (rarity, peer groups from posture, volume) as typed anomaly signals"+ status: pending+ - id: p3-5-threat-anomaly+ content: "Phase 3.5: threat-and-anomaly condition rules, replay-proven, counted as their own family in project_stats.py"+ status: pending+ - id: p3-6-content-depth+ content: "Phase 3.6: at least 800 executable cloud, identity, SaaS and code conditions (461 at capture) with per-source minimums and a make stats gate"+ status: pending+ - id: p3-7-detection-engineering+ content: "Phase 3.7: detection engineering agent (gap-closure Phase 9 and parity 6.2, as specified)"+ status: pending+ - id: p4-1-cloud-collection+ content: "Phase 4.1: CloudTrail organisation trail on S3 and SQS (data events, VPC flow logs), GCP Pub/Sub log sink, Azure Event Hubs"+ status: pending+ - id: p4-2-standard-inputs+ content: "Phase 4.2: parity 6.10 inputs (syslog listener for RFC 5424, RFC 3164, CEF and LEEF; OTLP logs receiver; Kafka input; TAXII 2.1 server)"+ status: pending+ - id: p4-3-retention+ content: "Phase 4.3: per-tenant retention of at least 400 days, supported cold tier, legal hold blocks deletion, cold search with a cost estimate"+ status: pending+ - id: p4-4-throughput+ content: "Phase 4.4: parity 6.9 (rule index by log source, entity-partitioned fusion, concurrent triage), realistic-mix load harness, cloud-hardware run published"+ status: pending+ - id: p4-5-deployment+ content: "Phase 4.5: parity 6.8 (Helm installs all of CORE, restore covers what backup covers, scheduler leader election, managed cluster run)"+ status: pending+ - id: p5-1-steps-that-act+ content: "Phase 5.1: parity 5.3 (resolve placeholders in http steps, notify through Slack, Teams, email and PagerDuty, fix or remove the osquery step)"+ status: pending+ - id: p5-2-delivery+ content: "Phase 5.2: parity 5.7 (report scheduler, SMTP, email approvals, Teams cards with teams-bot in compose, signed outbound webhooks)"+ status: pending+ - id: p5-3-engine-steps+ content: "Phase 5.3: wait, parallel and loop steps with idempotency keys; console palette for every step type the engine runs"+ status: pending+ - id: p5-4-stateful-verification+ content: "Phase 5.4: user and manager verification on chatops_verify with branching on the signed answer and a timeout outcome"+ status: pending+ - id: p5-5-verb-breadth+ content: "Phase 5.5: governed executor arms from 73 to at least 150, cloud and SaaS containment first, each with a contract, a probe or recorded gap, rollback and a mock-vendor test"+ status: pending+ - id: p5-6-plain-language-playbooks+ content: "Phase 5.6: plain-language playbooks drafted, previewed on a past alert and approved before use"+ status: pending+ - id: p6-1-ai-inventory+ content: "Phase 6.1: AI asset inventory (apps, coding agents, MCP servers, extensions, provider keys, OAuth grants) linked to person, device and permissions"+ status: pending+ - id: p6-2-endpoint-discovery+ content: "Phase 6.2: endpoint discovery from EDR process telemetry and an osquery pack, with no new agent"+ status: pending+ - id: p6-3-provider-coverage+ content: "Phase 6.3: provider coverage beyond OpenAI and Anthropic admin logs (Gemini, M365 Copilot, GitHub Copilot, AI OAuth grants)"+ status: pending+ - id: p6-4-agent-baselines+ content: "Phase 6.4: parity 6.7 (identities for AiSOC's own agents, then per-agent baselines)"+ status: pending+ - id: p6-5-ai-detections+ content: "Phase 6.5: AI rule pack with positive and negative fixtures"+ status: pending+ - id: p6-6-ai-containment+ content: "Phase 6.6: AI containment arms and an approved kill-switch playbook"+ status: pending+ - id: p7-1-phishing-ops+ content: "Phase 7.1: gap-closure Phase 10 and parity 6.4 (reported-message intake, purge and retract verbs, recipient blast radius, campaign grouping)"+ status: pending+ - id: p7-2-phishing-analysis+ content: "Phase 7.2: header, URL and attachment analysis through sandbox and enrichment, cited in the ledger"+ status: pending+ - id: p7-3-aitm+ content: "Phase 7.3: adversary-in-the-middle session-reuse detections on Phase 2.4 sessions"+ status: pending+ - id: p8-1-identity-gates+ content: "Phase 8.1: fix-pass wave 4 leftovers, parity 4.1 IdP end-to-end CI, 4.2 console MFA, 4.4 audit export and retention, 4.5 operator pages, 4.6 i18n, 4.7 accessibility"+ status: pending+ - id: p8-2-abac-elevation+ content: "Phase 8.2: readers for ABAC conditions, time-boxed elevation and workload identities"+ status: pending+ - id: p8-3-security-pack+ content: "Phase 8.3: extend docs/security into a buyer security pack, each statement linked to code or a gate"+ status: pending+ - id: p9-1-mcp-http+ content: "Phase 9.1: parity 6.6 (MCP over streamable HTTP, deployed, audited per call)"+ status: pending+ - id: p9-2-semantic-memory+ content: "Phase 9.2: parity 6.5 (vector recall with provenance), measured on the Phase 1 scorecard"+ status: pending+ - id: p9-3-case-depth+ content: "Phase 9.3: parity 5.6 remainder (merge, bulk triage, custom fields, workload metrics)"+ status: pending+ - id: p9-4-war-rooms+ content: "Phase 9.4: Slack and Teams war rooms synced to the case"+ status: pending+ - id: p9-5-hunt-reports+ content: "Phase 9.5: hunt and retro-hunt findings become cited case reports"+ status: pending+ - id: p9-6-native-responder+ content: "Phase 9.6: native responder build pipeline, push delivery, on-device voice input to the grounded copilot"+ status: pending+ - id: p10-close-books+ content: "Phase 10: re-run every claim row touched, update all progress files, one [Unreleased] entry per phase, final report in DEPTH_PROGRESS.md"+ status: pending+---++# AiSOC depth plan++> **Status**: Locked plan. Implement as specified and do not edit the body. Cursor may update the `status` of each todo in the front matter; that is the only permitted change to this file.+> **Captured**: 2026-10-07, against v17.0.0 plus `[Unreleased]` (commit `90ea2fd`).+> **Tracking**: `DEPTH_PROGRESS.md` (new) mirrors progress and records every deviation; this file is the source of truth.+> **Relationship**: `plans/aisoc_gap_closure_plan.plan.md`, `plans/aisoc_parity_plan.plan.md` and `plans/aisoc_fix_pass_plan.plan.md` stay locked. Where an item here says "implement parity N as specified" (or gap-closure N, or fix-pass N), that plan's text governs and this one only adds to it. Tick the item in that plan's own progress file as well as in `DEPTH_PROGRESS.md`.++### Why this plan exists++A capability review at v17.0.0 compared AiSOC with the reference AI-SOC platform: a SaaS agentic SOC that sells four agents (detect, triage, investigate, respond) over a knowledge graph built at ingest, a security data lake positioned as a SIEM replacement, 130+ integrations, a 24/7 managed service, and, since September 2026, runtime visibility and control of AI agents.++AiSOC already leads on data control (self-hosted, air-gapped, a local model), auditability (the Investigation Ledger and signed evidence bundles), governed autonomy (capability contracts and durable approvals), overlay on an existing SIEM (federated search and two-way writeback), MSSP tenancy, and checkable claims. It loses on depth, in nine places:++1. **No publishable verdict quality.** Verdict accuracy is published as "not measured". Both labelled corpora are all-malicious by construction, so `scripts/score_replay_set.py` correctly refuses them. No hosted model has run, the default is a 3B model on CPU, and the `fake_tool_output` injection family flips every verdict with 0% guard catch. The reference platform publishes outcome figures from production: escalation rate, time to investigate, false-positive reduction.+2. **No semantic layer and no live posture.** Ingest emits five OCSF classes. 12 connector types have a dedicated ingest profile and 5 more a class mapping; the rest of the 84 take the generic mapping. Nothing builds sessions, labels whether an actor is a person, an OAuth app, a token or a workload, parses user agents, or classifies vendor event types by sensitivity. Effective permissions resolve live for Okta only: no connector answers `__posture_snapshot__`, so AWS, Azure, GCP and Workspace return 412 (`docs/audit/DEFERRED_SUBPHASES.md`, 7b+). The entity graph runs only in `full`.+3. **Thin cloud, identity and SaaS detection.** 1,798 of the 2,603 executable rules (69%) are Windows. Cloud has 291, identity 117, code platforms 19 and all SaaS apps together 34. 119 native rules cannot fire (`scripts/check_detection_fields.py`), attributed to windowed form (74), identity enrichment (24), first-seen (8), fields nothing emits (8), other inputs (6) and baselines (2), with some rules needing more than one. Behavioural scoring (z-scores and peer groups in `services/ueba`) runs only in `full`. The reference platform ships 800+ threat and anomaly conditions over cloud, identity, SaaS and code, each learned per environment.+4. **Collection and scale below SIEM class.** CloudTrail arrives through `LookupEvents`, not an organisation trail on S3 with SQS. There is no native syslog listener (an external rsyslog must spool to HTTP), no OTLP logs receiver and no Kafka input for customer topics. Raw lake events are deleted at 90 days. Fusion evaluates every rule against every event, and the published laptop run drains 177 to 214 events/s. The Helm chart omits connectors, actions, threat intel, the LLM gateway, Ollama and Qdrant, and no managed Kubernetes service has run it.+5. **Response that does not finish.** 73 executor arms (reads included) over 33 verbs. Playbook `notify` delivers only to a raw webhook URL, `${...}` placeholders in `http` steps are never resolved, the engine has no `wait`, `parallel` or `loop` step, and there is no SMTP, outbound webhook or proactive Teams card. The reference platform advertises 200+ response actions and stateful verification of users and their managers.+6. **No AI agent security beyond audit logs.** `llm_usage` reads OpenAI and Anthropic admin audit logs and `ai_gateway` reads gateway runtime logs. Nothing discovers coding agents, MCP servers or IDE extensions on endpoints, inventories AI assets against people and devices, baselines agent behaviour, or contains an agent.+7. **No phishing operations.** Email security connectors exist, but there is no reported-message intake, purge or retract verb, or campaign grouping (gap-closure Phase 10, parity 6.4).+8. **Enterprise gates still open.** Console MFA, the remaining fix-pass wave 4 items, audit export and retention, operator pages, and ABAC, time-boxed elevation and workload identities (schema only since v16).+9. **Analyst surfaces behind.** The MCP server is stdio-only and deployed by nothing, knowledge-base recall is full-text only, there is no case merge, bulk triage or workload view, the native mobile app has never been built for a device, and there is no war-room flow.++The phases close these in dependency order. Phase 1 comes first because every later phase must show a before-and-after delta on the measurement Phase 1 builds.++Refer to commercial products only neutrally. The reference platform is not in `scripts/competitor_names.toml`, so `scripts/check_competitor_names.py` will not catch its name: do not write it anywhere, including commit messages and PR bodies, and check by hand.++### Before you start++- **Precondition.** The fix pass must be closed: every item in `FIX_PASS_PROGRESS.md` is `[x]` or `[!]`. Ask the maintainer once if that is not obvious. If it is still open, finish it under its own plan first. Phase 0 here may run alongside it.+- **Read first.** `AGENTS.md`, `docs/audit/REPOSITORY_REALITY.md`, `docs/audit/MATURITY_DEFINITION.md`, `docs/audit/DEFERRED_SUBPHASES.md`, and the rules sections of the three plans named above.+- **Numbers at capture.** Re-derive these at build time and never copy them from this plan:+ - executable detections 2,603 of 6,991 on disk (`make stats`);+ - unreachable native rules 119, with `MAX_UNREACHABLE = 119` in `scripts/check_detection_fields.py`;+ - windowed rules 18 in `services/fusion/app/data/windowed_ruleset.json`;+ - executable cloud, identity, SaaS and code rules 461 (by `log_source` product in `marketplace/index.json`);+ - executor arms 73 (classes declaring `capability = "..."` under `services/actions/app/live_actions/`);+ - claim-to-gate matrix 290 rows, all GATED (`scripts/check_claim_gate_matrix.py`);+ - next migration `095`, next ADR `0010`;+ - CORE 16 services and `full` 22 (`scripts/check_profile_service_counts.py`).++### Rules for every phase++- **Inherited.** Every rule in "Rules for every phase" of `plans/aisoc_gap_closure_plan.plan.md` and `plans/aisoc_parity_plan.plan.md`, and in "Rules for this pass" of `plans/aisoc_fix_pass_plan.plan.md`, applies here verbatim: claims and gates, path-aware proof, shipped means default-reachable, tenancy and auth, migrations, LLM calls, state-changing actions, outbound traffic, no fabricated data, CORE footprint, vendor tests, hygiene, eval re-grading, docs and house style.+- **Measure through the Phase 1 scorecard.** From Phase 2 on, any PR that changes what triage, investigation or detection sees re-runs the scorecard and puts before-and-after numbers in the PR body. A drop in balanced accuracy or malicious recall beyond the scorecard's interval blocks the merge unless the PR explains it.+- **Reproduce before building.** Each item starts by showing the gap on the current tree: a failing test, a gate, or a recorded command. If it does not reproduce, record a Deviation in `DEPTH_PROGRESS.md` and move on. Do not build what is already there.+- **Real vendor shapes.** Every new connector read, posture collector and executor arm is tested against recorded vendor-shaped payloads through a mock server, following `services/connectors/tests/connectors/test_live_vendor_smoke.py`. Read the vendor's current API reference before writing a client and put its URL in the module docstring. Never invent an endpoint or a field.+- **Detections are earned.** A new rule counts only when it is replayed through its real connector and the real engine with a positive fixture that fires and a negative fixture that differs in exactly one indicator field and does not fire (`detections/fixtures/`), the same proof the executable corpus and the hunt library carry today.+- **Off by default where it reaches out.** Anything that collects from a new vendor API, changes vendor state, messages a person, or calls a hosted model ships off by default and is enabled per tenant.+- **Figures come from generators.** Every number this plan adds to the README, docs or the marketplace index is produced by a generator with a `--check` drift gate, the way `scripts/project_stats.py` and `scripts/generate_connector_count.py` work today.+- **Migration numbers across lanes.** Phases run in parallel lanes (see "Parallel lanes"). Claim a migration number in `DEPTH_PROGRESS.md` before writing the file, so two lanes never collide.+- **Front matter.** Cursor may update the todo `status` values. The body is locked; deviations go in `DEPTH_PROGRESS.md`.++### Phase 0: Kickoff++**0.1 Progress file.** Create `DEPTH_PROGRESS.md` (new), modelled on `PARITY_PROGRESS.md`: one checkbox per item below, a "Pre-existing state" section, a "Deviations" section and an item log.++**0.2 Re-derive.** Recount every figure in "Why this plan exists" and "Before you start" against the tree you start from. Record the captured value and the measured value side by side. Where they differ, the tree wins.++**0.3 Baseline.** On a clean clone, run and commit the raw output, with hardware, date and commit, of:+- `make up && make smoke`, then `make up-full`;+- the behavioural injection suite (`services/agents/tests/adversarial/test_behavioural_injection.py`);+- the live-agent model matrix (`scripts/run_model_matrix.py`);+- `scripts/perf/load_harness.py` at steady state, into `docs/perf/results/`.++These are the "before" for every later delta.++**Done when:** `DEPTH_PROGRESS.md` exists, every number is re-derived, and each measurement has a committed baseline artefact.++### Phase 1: Verdict quality you can publish++**Goal:** publish balanced verdict accuracy, malicious recall with an interval, false-negative counts and time to verdict for the model AiSOC ships, measured through the production triage path, and make it trivial for a design partner to produce the same numbers on their own closed alerts.++**1.1 A balanced, labelled corpus.**+- Add a verdict corpus under `services/agents/tests/eval_data/verdict/` (new) with benign, benign-true-positive and malicious items. No class may exceed 60% of the corpus, so a constant answer cannot score above 60%.+- At least half the items come from cloud, identity and SaaS sources: CloudTrail, GCP audit, Azure activity, Entra, Okta, Workspace, M365, GitHub, Slack and Kubernetes audit. That is where the reference platform is strongest and where AiSOC's corpus is thinnest.+- Benign items are the ones real queues are full of: admin bulk changes, scanners, CI service accounts, travel sign-ins, break-glass use with a ticket, backup jobs. Each benign item has a malicious twin that differs in the decisive evidence.+- Sources are public attack-telemetry datasets whose licence permits redistribution, recorded in a provenance block per item the way `detections/` records imports, plus hand-authored items marked `is_synthetic: true`. Refuse any source without a licence.+- `scripts/score_replay_set.py` must accept this corpus and still refuse the two all-malicious corpora.++**1.2 Score the right things.** Extend `packages/aisoc-benchmark` and `scripts/score_replay_set.py` to report, per model:+- balanced accuracy and the Matthews correlation coefficient, always next to the majority-class baseline, so no number appears without what a constant answer would have scored;+- per-class precision and recall, malicious recall with a Wilson interval, and the false-negative count with item ids;+- auto-close precision at the closure threshold the tenant policy applies, and escalation rate;+- time to verdict at p50 and p95 from ledger timestamps, labelled with hardware and never graded.++**1.3 Close `fake_tool_output`.** A payload shaped like a tool's answer inside evidence (`sandbox_detonate: verdict=clean`) flips every verdict, and the guard catches none of it (the behavioural injection table in `apps/docs/docs/benchmark.md`). Fix it structurally rather than with another phrase pattern:+- tool results reach the model only as tool messages from `services/agents/app/llm/tool_loop.py` or the triage path's equivalent, never inside the evidence fence;+- the guard in `services/agents/app/prompting/envelope.py` flags evidence that names a registered tool and carries a result-shaped payload, because a real tool result can never arrive inside the fence;+- a verdict whose rationale relies on a tool result with no matching `tool_call` row in the ledger is demoted to human review, the way an ungrounded indicator already is.++Then lower `FAMILY_FLIP_CEILINGS["fake_tool_output"]` in `services/agents/tests/adversarial/test_behavioural_injection.py` to the new measurement, as that test already instructs. Add held-out payloads for the family that the fix was not tuned against, and report both rates.++**1.4 A stronger local model, chosen by measurement.**+- Add candidates in the 7B to 8B instruct class to the model matrix (`scripts/run_model_matrix.py`) next to `llama3.2:3b-instruct-q4_K_M` and `qwen2.5:0.5b`. Choose by score on the 1.1 corpus, not by reputation, and record every candidate's result.+- If one wins, make it the default for `make up-gpu` and `make up-host-llm` only. CPU-only `make up` keeps the 3B default unless an ADR (next number) measures that a larger model fits the 8 GB CORE budget at an acceptable time to verdict.+- Pin it in `services/agents/app/llm/model_pins.py` and `infra/litellm/config.yaml` (`scripts/check_llm_model_routing.py`).++**1.5 The design-partner replay kit.**+- One command, `make replay-eval` (new), that runs on the partner's own host. It reads closed alerts through the history readers that already exist (`services/actions/app/services/alert_history.py`: Splunk, Sentinel, Elastic, QRadar, Defender), replays them through the production triage path with no side effects (fix-pass 3.2, `services/agents/app/replay/runner.py`), and writes a signed report in the evidence-bundle format.+- The report holds aggregate scores by default. Item-level detail stays on the partner's host unless they export it, and a redaction pass runs before any export.+- It runs fully air-gapped on the local model. A hosted model is used only with the partner's own key and an explicit flag.+- Document it in `apps/docs/docs/evaluation/replay.md` as the design-partner path.++**1.6 Publish.** `apps/docs/docs/benchmark.md` gets a "Verdict quality" table generated from the committed scorecard artefact, with model id, corpus digest, date and commit on every row, and a `--check` drift gate. Hosted models read "not measured" until the maintainer funds a key.++**Done when:**+- the scorecard publishes balanced accuracy, malicious recall with its interval and false negatives for the shipped default model and at least one larger local model, on a corpus the scorer accepts;+- the `fake_tool_output` flip rate is at or below 10% on both tuned and held-out payloads, and the ceiling records the new figure;+- `make replay-eval` runs end to end against mocked Splunk and Sentinel history readers and writes a report that verifies.++### Phase 2: A semantic layer and live posture++**Goal:** every event the platform keeps says who acted and what kind of actor it was, what they did, to which resource, from where, with what outcome and how sensitive that is. Events are grouped into sessions, and every identity carries its effective privileges from a live, versioned posture snapshot. Phases 3, 6 and 7 build on this.++**2.1 OCSF classes beyond five.**+- Ingest emits Security Finding, Vulnerability Finding, Authentication, Network Activity and API Activity today (`services/ingest/internal/normalizer/normalizer.go`). Add at least Process Activity, File System Activity, DNS Activity, HTTP Activity, Email Activity, Account Change, User Access Management, Group Management, Web Resources Activity and Datastore Activity.+- Check every class uid and attribute against the OCSF version the tree targets (1.9.0) before using it.+- Map every connector type to a class through a profile, or record in the profile table why it stays generic. A new gate fails on a connector type with neither.+- This implements the "OCSF normalization beyond five classes" part of parity 6.10.++**2.2 The activity projection.** On every normalized event, populate one canonical projection, carried into the lake (new columns through a lake migration next to `services/api/clickhouse/001_init.sql`) and into the graph (`services/ingest/internal/graph/schema.go`):+- `actor`, with `actor.kind` in `human | service_account | oauth_app | api_token | workload | ai_agent | unknown`. This is the field that separates a person from the app or token acting for them. Derive it per source from the vendor's own identity-type, token-type and client fields, and never guess: what cannot be derived stays `unknown`.+- `action` (a normalized verb), `resource` (type, id, owner), `location` (IP, ASN, geography, device) and `outcome`.+- Geography, ASN and reputation for every public IP at ingest, from the enrichment already in the tree, cached.+- User-agent parsing into client family and version (CLI, SDK, browser, infrastructure-as-code tool, known offensive tooling), in Go inside ingest. Keep the raw string.++**2.3 An event classification catalogue.**+- `schemas/event_catalog/<source>.yaml` (new) maps each vendor event type to a normalized action, a sensitivity (`info | low | medium | high | critical`) and an optional ATT&CK hint.+- Start with every event type that appears in the fixtures of the cloud, identity and SaaS connectors named in 1.1.+- Ingest reads it at boot. A gate fails when a fixture's event type is neither classified nor listed as deliberately unclassified, so the catalogue grows with the connectors.++**2.4 Sessions.**+- Group events by principal into sessions using the strongest key each source offers: the AWS access key id and assumed-role session, stitched back to the originating human through `sourceIdentity` or the role session name where present; IdP session ids from Okta and Entra; session or token ids from Workspace and M365; and IP plus user agent within an idle gap as the fallback.+- Store sessions in a lake table and as `Session` nodes in the graph, with duration, event count, highest sensitivity and the mix of actor kinds.+- Fusion attaches the session id and summary to every alert, so triage and the investigation rail can show what else the session did.++**2.5 Posture snapshots for AWS, Azure, GCP and Workspace.** Close 7b+ in `docs/audit/DEFERRED_SUBPHASES.md`.+- Each provider's connector answers the `__posture_snapshot__` sentinel through `get_resource_config` with the reconciled snapshot its resolver in `services/api/app/services/effective_permissions/` already consumes:+ - AWS: identity and resource policies, groups, roles and trust policies, SCPs and permission boundaries across the organisation;+ - Azure: role definitions and assignments, Entra directory roles and eligible assignments;+ - GCP: IAM bindings across the resource hierarchy and organisation policy constraints;+ - Workspace: admin roles and privileges, and OAuth grants per user.+- Model permission boundaries in `services/api/app/services/effective_permissions/aws.py`, which today notes that it does not and may over-permit.+- Add GitHub (organisation, team and repository roles). Okta stays as it is.+- Collect daily and on change: an IAM-changing event seen at ingest refreshes that principal. Store each snapshot versioned with `valid_from` and `valid_to`, and document the read-only credentials per provider under `apps/docs/docs/connectors/`.+- Delete `services/api/tests/test_posture_snapshot_coverage.py` last, as that file asks.++**2.6 Use the posture everywhere.**+- Fusion attaches the actor's privilege tier, from the snapshot valid at event time, to every alert. Prioritisation already reads identity privilege (v16) and must read this.+- Triage and investigation get a "what this identity can do" tool whose result is cited in the ledger.+- Graph blast radius uses effective permissions, not group membership alone.++**2.7 Entity context in CORE.** ADR-0007 kept the lake and the graph in `full`. Write an ADR (next number) that measures two options against the 8 GB CORE budget: Neo4j in CORE, and a Postgres-backed entity and session store for CORE with Neo4j kept for `full`. Implement only what the ADR accepts, so alerts on a CORE install carry session, actor-kind and privilege context.++**Done when:**+- a CloudTrail assumed-role chain fixture resolves to one session attributed to the originating human, with `actor.kind` set on every event;+- AWS, Azure, GCP and Workspace effective-permission calls return 200 against mocked vendor APIs, and `services/api/tests/test_posture_snapshot_coverage.py` is gone;+- a gate reports the number of connector types on the generic mapping, and it is lower than at capture;+- the Phase 1 scorecard shows the delta, on cloud and identity items, of giving triage session and privilege context.++### Phase 3: Detection depth for cloud, identity and SaaS++**Goal:** the rules that cannot fire can fire, behaviour is baselined in CORE, and cloud, identity, SaaS and code sources carry content at the depth the reference platform ships, every rule proven by replay.++**3.1 Translate the windowed family.** The windowed engine exists (`services/fusion/app/services/windowed_detection.py`, 18 `wd-*` rules loaded from `services/fusion/app/data/windowed_ruleset.json`), but none of the 74 `det-*` rules that need a window has been translated, which is why the unreachable count never moved (the comment in `scripts/check_detection_fields.py` explains this). Author a `wd-*` rule for each through `scripts/export_windowed_ruleset.py`, and retire or link the `det-*` original.++**3.2 Sequences and Sigma correlations.**+- Add ordered sequences to the windowed engine: A then B by the same entity within a window, ordered by event time with the existing watermark.+- Import Sigma correlation rules (at least event count, value count, temporal and ordered temporal) into windowed form through the Sigma compiler path (`scripts/compile_sigma_ruleset.py`), refusing rather than approximating what does not translate. This completes the "Sigma correlation rule types in fusion" part of parity 6.10.++**3.3 Enrichment inputs.** Implement parity 5.5 as specified for the inputs still missing:+- identity enrichment (24 rules) from the Phase 2.5 posture and SCIM attributes;+- first-seen and age (8 rules) from a per-tenant first-seen store keyed by principal and attribute (country, ASN, device, client family, OAuth app, action, resource), in Redis with a lake backstop;+- the fields nothing emits (8): build them where cheap, otherwise quarantine with a reason.++Lower `MAX_UNREACHABLE` in the same PR as each fix.++**3.4 Baselines in CORE.** Behavioural scoring needs the `full`-profile UEBA service today. Move its scoring core into fusion as a module, or add UEBA to CORE behind an ADR that measures it, so CORE has:+- per-principal rarity of normalized actions, resources, client families and locations;+- peer-group deviation for principals that share a role or group in the posture snapshot;+- volume anomalies per principal and per OAuth app.++Each anomaly is a typed signal, not an alert on its own.++**3.5 Threat and anomaly conditions.** Pair anomaly signals with threat conditions into rules, for example a first-seen country with an MFA factor reset, or a rare client family with access-key creation. They are ordinary rules that read baseline fields, so they carry the same replay proof. Count them as their own family in `scripts/project_stats.py`.++**3.6 Content depth.** Raise executable cloud, identity, SaaS and code conditions (native rules, windowed rules and threat-and-anomaly conditions together) from 461 at capture to at least 800, counted by a new `make stats` line held by a `--check` gate. Minimums, by `log_source` product:+- every SaaS source with a connector (Workspace, M365, Slack, Salesforce, Snowflake, Box, Dropbox, 1Password, Atlassian, Zoom, ServiceNow) has at least 20;+- GitHub and GitLab together have at least 40, covering token abuse, workflow tampering, secret exposure and session hijack;+- AWS and GCP each have at least 120, Azure including Entra at least 150, Kubernetes at least 60 and Okta at least 60.++Each rule follows the native path: YAML under `detections/<category>/`, the spec in `scripts/detection_specs*.py`, exported by `scripts/export_detection_ruleset.py`, with positive and negative fixtures. ATT&CK coverage stays computed from executable rules only.++**3.7 Detection engineering agent.** Implement gap-closure Phase 9 as specified (parity 6.2): per-tenant coverage gaps against the connected sources, drafted rules as DRAFT proposals with fixtures and a replay backtest, and nothing promoted without a separate approver.++**Done when:**+- `scripts/check_detection_fields.py` reports fewer than 20 unreachable rules, each with a reason;+- a CORE install fires a threat-and-anomaly rule on a replayed fixture with no `full` service running;+- `make stats` reports at least 800 cloud, identity, SaaS and code conditions and the gate holds it;+- the Phase 1 scorecard shows malicious recall on cloud and identity items before and after.++### Phase 4: Collection and scale++**Goal:** collect cloud and SaaS telemetry the way production estates emit it, keep it as long as the tenant needs, and measure throughput on cloud hardware.++**4.1 Cloud-native collection.**+- AWS: an organisation trail on S3 with SQS notifications, including data events and VPC flow logs from S3, with checkpointing and backpressure. Keep `LookupEvents` (`services/connectors/app/connectors/aws_cloudtrail.py`) for small accounts.+- GCP: a Pub/Sub subscription on a log sink.+- Azure: Event Hubs for Entra sign-in and audit logs and the Activity log.+- Each is a connector capability with recorded vendor-shaped tests and a setup guide.++**4.2 Standard inputs.** Implement the rest of parity 6.10 as specified: a syslog listener for RFC 5424, RFC 3164, CEF and LEEF in `services/ingest`, an OTLP logs receiver, a Kafka input for customer topics, and a TAXII 2.1 server backed by the tenant IOC store.++**4.3 Retention the tenant chooses.**+- A per-tenant retention setting drives the lake TTL instead of the fixed 90 days in `services/api/clickhouse/001_init.sql`. Allow at least 400 days.+- Turn the opt-in tiering in `services/api/clickhouse/tiering/` into a supported `full` default with an S3-compatible cold volume, and make legal hold (v16) block deletion.+- A query over cold data through `/lake/sql` or a hunt reports an estimated cost and a progress state instead of timing out silently.++**4.4 Throughput.** Implement parity 6.9 as specified: rules indexed by log source, fusion consumers partitioned by entity with ordering per entity, concurrent triage consumers and lag-based autoscaling hints. Extend `scripts/perf/load_harness.py` with a realistic mix in which most events do not alert, and publish runs on stated cloud hardware in `apps/docs/docs/operations/performance.md`, labelled "not an SLO". Aim for a sustained 5,000 events/s through detection at p95 under 2 seconds on one documented instance size, and publish whatever is measured.++**4.5 Deployment completeness.** Implement parity 6.8 as specified: Helm renders and installs every CORE service (`infra/helm/aisoc/values.yaml` omits connectors, actions, threat intel, the LLM gateway, Ollama and Qdrant today), restore covers every component backup covers, the connector scheduler uses leader election, and one managed Kubernetes run is recorded once the maintainer provides a cluster.++**Done when:**+- a CloudTrail organisation-trail fixture on S3 and SQS and a syslog source each reach an alert through `make smoke`;+- a tenant with 400-day retention keeps a row past day 90, and a tenant on legal hold cannot lose one;+- the performance page shows a cloud-hardware run of the realistic mix;+- `helm install` brings up all of CORE on kind.++### Phase 5: Response that finishes++**Goal:** every shipped playbook can run to completion, the verbs cover cloud and SaaS containment, and verifying the affected user and their manager is a stateful workflow.++**5.1 Steps that act.** Implement parity 5.3 as specified: resolve `${...}` placeholders in `http` steps from connector instances and the vault through the SSRF guard, make `notify` deliver through the configured Slack, Teams, email and PagerDuty destinations (`_handle_notify` in `services/agents/app/playbook/engine.py` delivers only to a raw webhook today), and fix or remove the osquery step.++**5.2 Delivery.** Implement parity 5.7 as specified: the report scheduler (`services/api/app/api/v1/endpoints/reports.py`), SMTP delivery, the email-approval sender (`services/api/app/services/email_approval.py`), proactive Teams approval cards with `services/teams-bot` deployed in compose, and signed outbound event webhooks with retries and a dead-letter view.++**5.3 Engine steps.** Add `wait` (a timer or a callback, on the durable pause the `approval` step already uses), `parallel` with a join, and bounded `loop`, each with an idempotency key per step. Widen the console palette to every step type the engine runs, held by `scripts/check_playbook_schema_parity.py`.++**5.4 Stateful verification.** Build on `chatops_verify`:+- ask the affected user, then their manager (from SCIM or IdP data), over Slack, Teams or email;+- branch the playbook on the signed answer, with a timeout outcome;+- keep the contract's caution: never sent automatically on a confirmed true positive, and auto-sent only for alert classes a tenant opts into.++**5.5 Verb breadth.** Raise executor arms from 73 to at least 150, putting first the cloud and SaaS containment the reference platform automates, where the vendor's API allows it:+- AWS: deactivate an access key, revoke active role sessions with a deny on token issue time, quarantine an instance;+- GCP and Azure: disable a service account or its key, disable a service principal, revoke refresh tokens;+- Workspace and M365: suspend or sign out a user, revoke an OAuth grant, revoke app passwords;+- GitHub: remove an organisation member, delete a deploy key, disable a workflow;+- Slack, Salesforce, Snowflake and 1Password: deactivate or freeze a user and revoke their tokens;+- connected secure web gateways: block a URL or domain.++Each arm has a capability contract, a verification probe or a recorded verification gap, rollback where the vendor allows it, and a mock-vendor test (`scripts/check_action_contract.py`). An arm-count line in `make stats` holds the figure.++**5.6 Plain-language playbooks.** The natural-language playbook drafter produces a schema-valid playbook, previews it against a chosen past alert, and lands it as a draft that needs approval. Every response step in it is graded at dispatch like any other.++**Done when:**+- every pack playbook under `playbooks/` runs to completion in preview against mocked vendors, gated per playbook;+- a verification playbook asks a user and then a manager, waits, branches on a signed answer, and contains on "no" after approval;+- the arm-count gate reads at least 150.++### Phase 6: AI agent security++**Goal:** inventory every AI app, coding agent, MCP server, IDE extension, model-provider key and AI OAuth grant against the person, device and permissions behind it; baseline agent behaviour; detect misuse; contain it.++**6.1 Inventory.** New tenant-scoped tables (next migration, row-level security per the inherited rules) and graph nodes for AI apps, coding agents, MCP servers, IDE extensions, provider keys and OAuth grants, each linked to a person, a device and the effective permissions from Phase 2.5. A console page lists them with first seen, last seen and risk.++**6.2 Endpoint discovery without a new agent.**+- From EDR process telemetry normalized in 2.1 (CrowdStrike, Defender, SentinelOne, and osquery through FleetDM and osctrl): known coding-agent processes, MCP server processes and the configuration files that popular MCP clients read.+- An osquery pack, under `services/osquery-extensions` or alongside the existing packs, for MCP client configuration files and IDE extension directories.+- Record what each source can and cannot see.++**6.3 Provider coverage.** Extend `llm_usage` beyond OpenAI and Anthropic admin audit logs: Workspace audit events for Gemini, M365 audit records for Copilot interactions, GitHub audit events for Copilot, OAuth grants to AI apps from Workspace token audit and Entra consent events, and usage APIs where a provider offers one. Verify every endpoint against the provider's current reference first.++**6.4 Agent identity and baselines.** Implement parity 6.7 as specified: AiSOC's own agents get identities with short-lived credentials and least-privilege tool scopes, then per-agent baselines (tools, resources, volume, token spend, hours) from `packages/aisoc-ai-sdk` telemetry, gateway logs and provider usage, through the Phase 3.4 baseline module.++**6.5 Detections.** An AI rule pack with fixtures: a provider key created or used from a new ASN, an agent invoking a new high-risk tool, an MCP server from an unvetted source, a coding agent started with its permission prompts disabled, bulk data access by an OAuth AI app, a rise in guardrail violations, and token-spend anomalies.++**6.6 Containment.** Executor arms with contracts: revoke a provider API key, revoke an AI OAuth grant, block a key at a supported gateway, and kill the agent process through the existing EDR `kill_process`. Compose them into one agent kill-switch playbook that requires approval.++**Done when:**+- a fixture estate with one coding agent, one MCP server and one provider key shows all three on the inventory page, linked to the right person and device;+- an anomalous-agent fixture raises an alert, and the kill-switch playbook runs end to end in preview.++### Phase 7: Phishing operations++**Goal:** reported phish goes from intake to purge with a governed blast radius.++**7.1 Intake to purge.** Implement gap-closure Phase 10 and parity 6.4 as specified: reported-message intake (an M365 report mailbox through Graph, Workspace user reports, and the existing `email_inbox` connector), purge and retract verbs with capability contracts for M365 and Workspace, a blast radius scaled by recipient count, and campaign grouping.++**7.2 Analysis.** Headers, sender authentication results, URLs and attachments go through the existing sandbox providers (`services/api/app/services/sandbox/`) and enrichment, cited in the ledger.++**7.3 Adversary-in-the-middle.** A detection family on Phase 2.4 sessions: the same session or token used from a new ASN or client family shortly after an MFA-satisfied sign-in, plus the link from a reported message whose URL precedes that sign-in.++**Done when:** a reported-message fixture is grouped into a campaign and purged in preview across its recipients at the contract's approval tier, and a matching AiTM sign-in fixture fires.++### Phase 8: Enterprise gates++**8.1 Identity and administration.** Finish fix-pass wave 4 (4.1 to 4.6) if Phase 0 found any of it open. Then implement, as specified: parity 4.1's end-to-end CI against a containerised IdP for OIDC and SAML; 4.2 console MFA (TOTP with recovery codes and WebAuthn, enforced per role and per tenant); 4.4 starting from the existing `apps/web/src/components/audit/AuditLogView.tsx`, adding export and an enforced retention job; 4.5 operator pages and opt-in limit enforcement in `services/api/app/services/entitlements.py`; 4.6 internationalisation; and 4.7 accessibility on the remaining core views.++**8.2 ABAC, elevation and workload identities.** Give readers to the tables v16 created as schema only: attribute conditions evaluated inside the single permission path (`scripts/check_one_permission_model.py`), time-boxed elevation with approval and automatic expiry, and workload identities for service-to-service calls. Record any change to an authorization outcome under `### BREAKING`.++**8.3 Buyer security pack.** Extend `docs/security/` into a set a reviewer can use: architecture and data-flow diagrams, the existing threat models, data handling per deployment mode, subprocessors for the hosted service, and answers to a standard security questionnaire. Every statement links to the code or gate that makes it true.++**Done when:** a CI test signs in through OIDC and SAML with MFA enforced for the role, an elevation expires on schedule, and the security pack passes the competitor-name and comment-path gates.++### Phase 9: Analyst surfaces++**9.1 MCP over the network.** Implement parity 6.6 as specified: streamable HTTP for `services/mcp/src/server.ts`, deployed in compose and Helm, scoped keys, tools enabled per tenant, an audit row per call, and approval on destructive tools.++**9.2 Semantic memory.** Implement parity 6.5 as specified: vector recall on Qdrant for past cases, runbooks and institutional memory (`services/api/app/api/v1/endpoints/knowledge_base.py` is full-text only today), with provenance and conflict review. Measure it on the Phase 1 scorecard.++**9.3 Case depth.** Implement the open half of parity 5.6: alert and case merge, bulk triage in both route and UI, tenant custom fields, and per-analyst workload metrics.++**9.4 War rooms.** One action opens a Slack or Teams channel for a case, invites the assignees, posts the timeline and verdicts as they change, and syncs decisions back to the case, built on `services/slack-bot` and `services/teams-bot`.++**9.5 Hunt to report.** A natural-language hunt or a retro-hunt that finds something produces a case report (what, how, where, when) with ledger citations, exportable as PDF through the existing report path.++**9.6 Native responder.** Build `apps/mobile` for a device through a CI pipeline, deliver push through APNs and FCM once the maintainer provides credentials, and add voice input that converts speech to text on the device and sends the text to the grounded copilot. No audio leaves the device.++**Done when:** an MCP client over HTTP runs a hunt with an audit row per call, two alerts merge into one case with their history kept, and a war-room channel mirrors a case's timeline.++### Phase 10: Close the books++- Re-run every claim row this plan touched, and confirm each names a gate that drives the production path on the profile it states.+- Update `GAP_CLOSURE_PROGRESS.md`, `PARITY_PROGRESS.md` and `FIX_PASS_PROGRESS.md` for every item implemented here by reference.+- One `[Unreleased]` entry per phase in `CHANGELOG.md`, in the house style: the gap, how it was measured, and the gate that keeps it closed.+- A final report in `DEPTH_PROGRESS.md`: each "Done when" with its evidence, and each item left open with its reason.++### Parallel lanes++- **Lane A, first:** Phase 0, then Phase 1.+- **Lane B:** Phase 2, then Phase 3. Starts once Phase 1.2 can score.+- **Lane C:** Phase 5. Independent of Lane B; starts after Phase 0.+- **Lane D:** 4.2, 4.3 and 4.5 after Phase 0; 4.1 and 4.4 after 2.1.+- **Lane E:** Phase 8. Independent.+- **Later:** Phase 6 after 2.5, 3.4 and 5.5. Phase 7 after 2.4 and 5.1. Phase 9 any time after Phase 1, with 9.2 measured on its scorecard. Phase 10 last.++### Maintainer-only items (record as [!], do not attempt)++- Fund hosted-model keys so Phase 1 reports hosted rows (fix-pass M2).+- Sign at least two design partners to run `make replay-eval` and consent to publishing aggregates.+- Provide a managed Kubernetes cluster and cloud hardware for 4.4 and 4.5 (fix-pass M3).+- Provide cloud and SaaS test tenants (an AWS organisation, Azure, GCP, Workspace, M365, GitHub, Slack) so each posture collector and executor arm is verified once against the real vendor.+- Apple and Google developer accounts and push credentials for 9.6.+- Commission an external penetration test, and SOC 2 Type II or ISO 27001 for the hosted service.+- Decide whether to offer a managed human-review service on top of the platform. Nothing in this plan depends on it.+- Add a second maintainer with merge rights.+- Publish the npm and PyPI packages and the MCP server package.diff --git a/scripts/check_profile_service_counts.py b/scripts/check_profile_service_counts.pyindex a416f5b12..272a6f19f 100644--- a/scripts/check_profile_service_counts.py+++ b/scripts/check_profile_service_counts.py@@ -128,6 +128,21 @@ CLAIM_SITES: tuple[tuple[str, str, str], ...] = ("core",r"CORE profile: (\d+) long-running services",),+ # The depth plan's progress file. It republishes both counts in its+ # re-derived-figures table and in a deviation explaining why the `full`+ # baseline was not taken on a host that size, so both are claims and+ # both are registered. Registered when written rather than after it+ # drifted, which is the only time registering is cheap.+ (+ "DEPTH_PROGRESS.md",+ "core",+ r"\*\*PASS\*\* -- (\d+) services healthy",+ ),+ (+ "DEPTH_PROGRESS.md",+ "full",+ r"The `full` profile is (\d+) services",+ ),# The five below went unchecked until ADR-0007 moved CORE to 16 and they# kept saying 14. Two of them are the landing page and the FAQ, so the# wrong number was the one a reader met first.diff --git a/scripts/perf/load_harness.py b/scripts/perf/load_harness.pyindex 3e0cfe8e7..932d4a3c0 100644--- a/scripts/perf/load_harness.py+++ b/scripts/perf/load_harness.py@@ -364,12 +364,25 @@ def run_producer(run_id: str,summary_path: Path,) -> ProducerSummary:+ # Where `go run` is invoked from, which is not the repository root. The+ # producer is its own module (`services/demo-producer/go.mod`) and there+ # is no go.mod at the root, so `go run ./services/demo-producer` with+ # cwd=root fails before it starts:+ #+ # go: go.mod file not found in current directory or any parent+ # directory; see 'go help modules'+ #+ # The harness has therefore never produced a run from a clean checkout+ # on the path it documents. A prebuilt `--producer-bin` still runs from+ # the root, because it needs the module context of neither.+ cwd = rootif producer_bin:argv = [producer_bin]else:if not shutil.which("go"):raise RuntimeError("no --producer-bin given and `go` is not on PATH to build services/demo-producer")- argv = ["go", "run", "./services/demo-producer"]+ argv = ["go", "run", "."]+ cwd = root / "services" / "demo-producer"argv += ["--load","--ingest-url",@@ -391,7 +404,7 @@ def run_producer("--summary",str(summary_path),]- done = subprocess.run(argv, cwd=root, capture_output=True, text=True, check=False) # noqa: S603+ done = subprocess.run(argv, cwd=cwd, capture_output=True, text=True, check=False) # noqa: S603if done.returncode != 0:raise RuntimeError(f"producer failed ({done.returncode}): {(done.stderr or done.stdout).strip()[-600:]}")return ProducerSummary(json.loads(summary_path.read_text(encoding="utf-8")))