docs/research/sota-2026-05-22/HORIZON.md
Horizon ID: sota-2026-05-22
Started: 2026-05-21 ~20:00 ET
Auto-stop: 2026-05-22 08:00 ET
Cron: d6e5c473 (*/10 * * * *) — single-tick research contributions running in parallel
| Objective | Description | Primary branch |
|---|---|---|
| A | Keep the cron research loop productive — curate PROGRESS.md between ticks | (main, via PR) |
| B | Build ruview MCP server + CLI (tools/ruview-mcp/, tools/ruview-cli/) | feat/ruview-mcp-cli |
| C | Write ADR-104: ruview MCP/CLI distribution decision record | (same branch as B) |
tools/ruview-mcp/ + tools/ruview-cli/Target: +1h (by ~21:00 ET)
Status: COMPLETE — merged as PR #705 (squash commit 5a6c585aa)
Branch: feat/ruview-mcp-cli-pr (deleted after merge)
Deliverables:
tools/ruview-mcp/package.json — @ruv/ruview-mcp, TypeScript, @modelcontextprotocol/sdktools/ruview-mcp/src/index.ts — minimal MCP server with 5 tool stubstools/ruview-mcp/src/tools/ — one file per tooltools/ruview-cli/package.json — @ruv/ruview-cli + ruview bintools/ruview-cli/src/index.ts — 4-verb CLI stub via yargs/commandertsconfig.json for both packagestools/ruview-shared/ for HTTP client + typesCompletion criteria: npm run build succeeds in both packages, MCP server can be registered with claude mcp add.
ruview_pose_infer + ruview_count_inferTarget: +3h (by ~23:00 ET)
Status: COMPLETE — merged in PR #705 squash (same commit as M1 scaffold)
Wire inference via subprocess to cog binaries (cog-pose-estimation, cog-person-count). MCP tools and CLI subcommands both delegate to the cog binary's health + a synthetic-frame run.
Completion criteria met: ruview_pose_infer returns finite keypoint array (17 COCO keypoints, confidence-gated); ruview_count_infer returns {count, confidence, count_p95_low, count_p95_high}.
ruview_csi_latest + ruview_registry_listTarget: +5h (by ~01:00 ET)
Status: COMPLETE — merged as PR #708 (squash commit ac04ec3df → main 2a2f16a38)
csi-latest.ts: calls validateSensingLatestResponse after every sensingGet; returns {ok:false,warn:true,raw_response,hint} on schema_version mismatch.validate.ts: validates 56×20 CSI window shape + schema_version 2 pin (ADR-101). Provides actionable error messages for schema drift.validate.test.ts: 10 schema tests (valid, null, wrong subcarrier count, wrong frame count, schema_version 3, missing captured_at, window error propagation).ruview_train_countTarget: +7h (by ~03:00 ET)
Status: COMPLETE — implemented in PR #705 + #708; ruview_train_count spawns detached cargo process, returns {job_id, status:"queued"} via UUID; log streamed to ~/.ruview/jobs/<id>.log using fd-based detach (Windows-compatible).
Completion criteria met: returns {job_id, status: "queued"} within 200 ms (detached subprocess, no blocking).
Target: +8h (by ~04:00 ET)
Status: COMPLETE — ADR-104 written and merged in PR #705 (Session 1)
Full ADR covering: problem, design (5 MCP tools + 5 CLI subcommands + library mapping), security (6-row threat table), packaging (npm @ruv/ruview-mcp + @ruv/ruview-cli), distribution, failure modes, acceptance gates.
Completion criteria: ADR file at docs/adr/ADR-104-ruview-mcp-cli-distribution.md, merged to main.
Target: +10h (by ~06:00 ET)
Status: COMPLETE — 16 tests passing across tools.test.ts (6) + validate.test.ts (10). npm test passes. Covers: csiLatest unreachable server, poseInfer missing binary, poseInfer node binary stub, countInfer missing binary, registryList unreachable server, trainCount UUID return, schema validation happy + error paths.
Target: +11h (by ~07:00 ET)
Status: COMPLETE
| Item | PR | Main commit | Status |
|---|---|---|---|
tools/ruview-mcp/ scaffold (6 tools, TypeScript ESM, MCP SDK) | #705 | 5a6c585aa | Shipped |
tools/ruview-cli/ scaffold (6 subcommands, Yargs) | #705 | 5a6c585aa | Shipped |
| ADR-104 (ruview MCP/CLI distribution, 6-row threat table) | #705 | 5a6c585aa | Shipped |
| M2: pose_infer + count_infer wired via cog health subprocess | #705 | 5a6c585aa | Shipped |
| M3: csi-latest schema validation (validate.ts, schema_version 2 pin) | #708 | 2a2f16a38 | Shipped |
| M3: validate.test.ts (10 tests) | #708 | 2a2f16a38 | Shipped |
| M4: train_count detached subprocess + UUID job_id + fd-log | #705 | 5a6c585aa | Shipped |
| M6: 16 passing tests (tools×6 + validate×10) | #708 | 2a2f16a38 | Shipped |
| PROGRESS.md R7+R8 cross-links (Objective A cron curation) | cron | — | Shipped |
| Item | Reason | Next step |
|---|---|---|
ruview_csi_latest with real running sensing-server (live E2E test) | sensing-server not running in CI; graceful WARN path tested instead | Run against cognitum-v0 when fleet is available |
csi tail streaming CLI mode | Requires SSE or polling loop — scope beyond 12h horizon | M3+1 sprint |
Real CSI window inference via window_path (cog run --input) | window_path parameter wired in schema but inference via cog run not implemented | M3+1 sprint |
ruview_registry_list live response (real edge registry) | graceful WARN path tested; no edge registry in local CI | Run against cognitum-v0:9000/edge |
| npm publish to registry | private: true during development per user preference | User triggers: npm publish --access public in each package dir |
# 1. Remove private:true from package.json in each package
# 2. Ensure you are logged in: npm whoami
cd tools/ruview-mcp
npm run build
npm publish --access public # publishes @ruv/ruview-mcp
cd ../ruview-cli
npm run build
npm publish --access public # publishes @ruv/ruview-cli
Both packages are scoped under @ruv/. Publishing requires npm login with an account
that has write access to the @ruv scope, or a token in ~/.npmrc.
All 7 milestones complete. The 12-hour autonomous run produced:
@ruv/ruview-mcp) with 6 tools, schema validation, fail-open pattern, 16 passing tests.@ruv/ruview-cli) with 6 subcommands.Auto-stop: 2026-05-22 08:00 ET. Horizon closed.
The d6e5c473 cron picks threads from PROGRESS.md independently. Rules for safe co-operation:
blocked: <reason> to that thread's section.Current cross-links identified at session start:
| Indicator | Threshold | Current |
|---|---|---|
| Timeline | M1 >2h behind → defer scope | No drift — M1–M6 all complete |
| Scope | MCP server grows beyond 5 tools | No drift — 6 tools (within plan) |
| Approach | MCP SDK incompatible with available node | Resolved — ESM + Jest workaround |
| Dependency | ruvector npm packages not findable | No issue — only @modelcontextprotocol/sdk + zod needed |
| Priority | Cron consuming PROGRESS.md locks | No conflict — cron writes PROGRESS.md, horizon writes HORIZON.md |
Started: Initial read of PROGRESS.md, ADR-100/101/102/103, R5 saliency note. Accomplished:
tools/ruview-mcp/ and tools/ruview-cli/ scaffolded with TypeScript, MCP SDK, Yargs.docs/adr/ADR-104-ruview-mcp-cli-distribution.md written (full depth, 6-row threat table).Started: Context resumed from prior session summary. Branch feat/ruview-mcp-m3-m4 active from main at 6b3589684.
Accomplished:
validate.ts written (validateCsiWindow 56×20 + validateSensingLatestResponse schema_version 2 pin). csi-latest.ts updated to call validator and return structured mismatch error with raw_response. subcarriers field now dynamic (not hardcoded 56).tools.test.ts (6) + validate.test.ts (10). Build clean.2a2f16a38.ruview_train_count (spawns detached cargo process, UUID job_id, log via fd, <200ms) was implemented in the prior session; milestone retroactively marked COMPLETE.