Skip to content

Commit 44cca9d

Browse files
committed
docs(audit): align docs to code ground truth; interface sequence diagrams + 2026-06-11 anomaly register
- remove the phantom ACSP emitter (ServerNostrActor / 31400-31402) from README + docs index -- code ships only the bead-provenance bridge; panel emission is reframed as planned, per agent-control-surface-panels.md - licence badge/section MPL 2.0 -> AGPL-3.0-only (matches LICENSE + Cargo.toml); wire-width claims 24B/28B -> 52-byte WireNodeDataItemV3 with an ADR-061 amendment note; 23 -> 21 actors; Neo4j present-tense claim -> Oxigraph+SQLite; launcher commands -> scripts/launch.sh - ADR-090 triple numbering collision resolved: enterprise-dashboard -> ADR-103, shared-math -> ADR-104 (hexagonal modularisation keeps 090) - new diagram-as-code ledger: docs/diagrams/interface-sequences.md (REST lifecycle, WS binary pipeline, settings round-trip, auth interface -- 5 Mermaid sequence diagrams from code) and 00-anomaly-register-2026-06-11.md (2026-05-28 register re-verified: 12 fixed / 5 partial / 2 open; new findings N1-N9) Ecosystem audit 2026-06-11. Co-Authored-By: jjohare <github@thedreamlab.uk>
1 parent 72bd6ec commit 44cca9d

10 files changed

Lines changed: 659 additions & 42 deletions

README.md

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![Build](https://img.shields.io/github/actions/workflow/status/DreamLab-AI/VisionClaw/ci.yml?branch=main&style=flat-square&logo=github)](https://github.com/DreamLab-AI/VisionClaw/actions)
88
[![Version](https://img.shields.io/github/v/release/DreamLab-AI/VisionClaw?style=flat-square&logo=semantic-release)](https://github.com/DreamLab-AI/VisionClaw/releases)
9-
[![License](https://img.shields.io/badge/License-MPL%202.0-blue?style=flat-square)](LICENSE)
9+
[![License](https://img.shields.io/badge/license-AGPL--3.0-blue?style=flat-square)](LICENSE)
1010
[![Rust](https://img.shields.io/badge/Rust-2021-orange?style=flat-square&logo=rust)](https://www.rust-lang.org/)
1111
[![CUDA](https://img.shields.io/badge/CUDA-13.1-76B900?style=flat-square&logo=nvidia)](https://developer.nvidia.com/cuda-toolkit)
1212
[![Docs](https://img.shields.io/badge/Docs-Diataxis-4A90D9?style=flat-square)](docs/README.md)
@@ -67,34 +67,21 @@ VisionClaw is the knowledge engineering substrate of the **[VisionFlow](https://
6767
```bash
6868
git clone https://github.com/DreamLab-AI/VisionClaw.git
6969
cd VisionClaw && cp .env.example .env
70-
docker-compose --profile dev up -d
70+
./scripts/launch.sh up dev
7171
```
7272

73+
`./scripts/launch.sh up dev` is the canonical launcher. The explicit fallback is `docker compose -f docker-compose.unified.yml --profile dev up -d` (`docker-compose.unified.yml` is the only compose file shipped).
74+
7375
| Service | URL | Description |
7476
|:--------|:----|:------------|
7577
| Frontend | http://localhost:3001 | 3D knowledge graph interface (via Nginx) |
7678
| API | http://localhost:4000/api | REST + WebSocket endpoints (Rust/Actix-web) |
7779
| Solid Pod | http://localhost:8484 | Embedded Solid pod server (solid-pod-rs) |
7880

7981
<details>
80-
<summary><strong>Enable voice routing (LiveKit + whisper + TTS)</strong></summary>
81-
82-
```bash
83-
docker-compose -f docker-compose.yml -f docker-compose.voice.yml --profile dev up -d
84-
```
82+
<summary><strong>Voice routing and multi-user XR overlays</strong></summary>
8583

86-
Adds LiveKit SFU (port 7880), turbo-whisper STT (CUDA), and Kokoro TTS. Requires GPU for real-time transcription.
87-
88-
</details>
89-
90-
<details>
91-
<summary><strong>Enable multi-user XR (Vircadia World Server)</strong></summary>
92-
93-
```bash
94-
docker-compose -f docker-compose.yml -f docker-compose.vircadia.yml --profile dev up -d
95-
```
96-
97-
Adds Vircadia World Server with avatar sync, HRTF spatial audio, and collaborative graph editing.
84+
The voice (LiveKit + whisper + TTS) and Vircadia World Server overlays are not currently shipped as separate compose files. `docker-compose.unified.yml` is the only compose file in the repository; there are no `docker-compose.voice.yml` or `docker-compose.vircadia.yml` overlays to stack on top of it. Any voice/XR services are configured within the unified compose definition or via the host launcher, not by overlaying additional compose files.
9885

9986
</details>
10087

@@ -246,7 +233,7 @@ flowchart LR
246233

247234
### Agent Control Surface Protocol
248235

249-
Agents publish structured Nostr events; the relay routes them; the forum renders decision surfaces; humans respond with cryptographically signed events. The governance audit trail is immutable by construction.
236+
VisionClaw does **not** currently emit governance panels. What ships today is the bead-provenance bridge (`src/services/nostr_bridge.rs`), which republishes kind 30001 bead records as kind 9 Nostr events. The Agent Control Surface Protocol — agents publishing structured panel events that a relay routes, a forum renders as decision surfaces, and humans answer with cryptographically signed responses — is a **planned integration**, not a shipped emitter. The authoritative contract for the panel kinds below lives in [docs/architecture/agent-control-surface-panels.md](docs/architecture/agent-control-surface-panels.md), which states plainly that VisionClaw does not publish panels; emission (kinds 31400/31402 via a future `ServerNostrActor`) is future work.
250237

251238
| Kind | Name | Flow |
252239
|---|---|---|
@@ -257,6 +244,8 @@ Agents publish structured Nostr events; the relay routes them; the forum renders
257244
| 31404 | PanelUpdate | Agent → incremental state diff |
258245
| 31405 | PanelRetired | Agent → retires a control panel |
259246

247+
*(Planned contract — no VisionClaw emitter exists today.)*
248+
260249
### Embodied Agent Loop
261250

262251
Agent actions are not just audited — they are **visibly embodied** in the GPU/XR graph. When an agent acts (on a Solid pod, the knowledge graph, or the ontology), the action crosses the federation boundary and renders as a living event on the agent's actor node:
@@ -456,7 +445,7 @@ flowchart TB
456445
457446
subgraph Server["Rust Backend (Actix-web · Hexagonal · CQRS)"]
458447
Handlers["HTTP/WS Handlers\n(9 ports · 12 adapters)"]
459-
Actors["23 Actix Actors\n(supervised concurrency)"]
448+
Actors["21 Actix Actors\n(supervised concurrency)"]
460449
Services["OWL Ontology Pipeline\n(Whelk-rs EL++)"]
461450
MCP["MCP Tool Server\n(:9500 TCP)"]
462451
end
@@ -540,7 +529,7 @@ flowchart LR
540529
</details>
541530

542531
<details>
543-
<summary><strong>23-Actor supervision tree</strong></summary>
532+
<summary><strong>21-Actor supervision tree</strong></summary>
544533

545534
The backend uses Actix actors for supervised concurrency. GPU actors form a hierarchy: `GraphServiceSupervisor``PhysicsOrchestratorActor``ForceComputeActor`. All actors restart automatically on failure.
546535

@@ -574,7 +563,6 @@ The backend uses Actix actors for supervised concurrency. GPU actors form a hier
574563
| `GitHubSyncActor` | Incremental GitHub sync (SHA1 delta) |
575564
| `OntologyPipelineActor` | Assembler → converter → Whelk pipeline |
576565
| `GraphServiceSupervisor` | Top-level GPU supervision and restart |
577-
| `ServerNostrActor` | Signs and publishes governance events (31400/31402) |
578566
| `AgentMonitorActor` | Agent lifecycle monitoring |
579567

580568
</details>
@@ -730,13 +718,13 @@ See the [Contributing Guide](docs/CONTRIBUTING.md). Check [Known Issues](docs/KN
730718

731719
## License
732720

733-
[Mozilla Public License 2.0](LICENSE)Use commercially, modify freely, share changes to MPL files.
721+
[GNU Affero General Public License v3.0-only](LICENSE)see [LICENSE](LICENSE) for the full text. Network use is distribution: if you run a modified version as a network service, you must offer its complete source to its users.
734722

735723
---
736724

737725
<div align="center">
738726

739-
**VisionClaw is the knowledge engineering substrate of [VisionClaw](https://github.com/DreamLab-AI/VisionClaw), built by [DreamLab AI](https://www.dreamlab-ai.com).**
727+
**VisionClaw is the knowledge engineering substrate of [VisionFlow](https://github.com/DreamLab-AI/VisionFlow), built by [DreamLab AI](https://www.dreamlab-ai.com).**
740728

741729
[VisionClaw Platform](https://github.com/DreamLab-AI/VisionClaw) · [Documentation](docs/README.md) · [Known Issues](docs/KNOWN_ISSUES.md) · [Discussions](https://github.com/DreamLab-AI/VisionClaw/discussions)
742730

docs/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ updated-date: 2026-05-05
1717
```bash
1818
git clone https://github.com/DreamLab-AI/VisionClaw.git
1919
cd VisionClaw && cp .env.example .env
20-
docker-compose --profile dev up -d
20+
./scripts/launch.sh up dev
2121
```
2222

23+
`./scripts/launch.sh up dev` is the canonical launcher; the explicit fallback is `docker compose -f docker-compose.unified.yml --profile dev up -d` (`docker-compose.unified.yml` is the only compose file shipped).
24+
2325
Open [http://localhost:3001](http://localhost:3001) for the 3D graph interface and [http://localhost:4000/api](http://localhost:4000/api) for the REST API. The graph store is the embedded Oxigraph triple store (ADR-11) — there is no separate database browser UI.
2426

2527
Full setup details: [Deployment Guide](how-to/deployment-guide.md)
@@ -40,15 +42,11 @@ See [Sovereign Mesh ADRs](#sovereign-mesh-pod-integration-adr-028-ext-to-adr-052
4042

4143
---
4244

43-
## Agent Control Surface Protocol Integration (2026-05-12)
44-
45-
**Governance bridge between VisionClaw BrokerActor and Forum Kit relay mesh**. Two new server-signed Nostr event kinds:
45+
## Agent Control Surface Protocol Integration (planned)
4646

47-
- **Kind 31400 — PanelDefinition**: `PublishGovernancePanel` registers/updates control panels (ActionInbox, Dashboard, ConfigForm, StatusBoard, ChatBridge) with schema, fields, actions, layout hints. NIP-33 replaceable by `d` tag.
48-
- **Kind 31402 — ActionRequest**: `PublishActionRequest` submits cases for human review with priority, category, structured fields, and agent reasoning.
49-
- **Dual-path enterprise RBAC**: `RequireRole` middleware now supports NIP-98 Schnorr auth (`nip98-auth` feature gate) alongside the existing `X-Enterprise-Role` header path. `Nip98RoleResolver` trait maps verified pubkeys to enterprise roles.
47+
VisionClaw does **not** emit governance panels today. The live Nostr egress is the bead-provenance bridge (`src/services/nostr_bridge.rs`), which republishes kind 30001 bead-provenance records as kind 9 events. There is no `ServerNostrActor` and no 31400/31402 panel emission in the current build.
5048

51-
Source: `src/actors/server_nostr_actor.rs`, `src/middleware/enterprise_auth.rs` | Kinds added to `server_identity.rs` `SUPPORTED_KINDS` and `metrics.rs` `NostrKind` enum.
49+
The Agent Control Surface Protocol — server-signed panel and action-request events bridging an agent broker to a Forum Kit relay mesh — is a **planned integration**. Its contract is defined in [architecture/agent-control-surface-panels.md](architecture/agent-control-surface-panels.md), the authoritative statement that VisionClaw does not publish panels. When implemented, panel emission (kind 31400 PanelDefinition, kind 31402 ActionRequest) would be carried by a future `ServerNostrActor`; the document specifies the kinds, fields, and RBAC model that emitter must satisfy.
5250

5351
---
5452

@@ -220,7 +218,7 @@ Full reference index: [reference/INDEX.md](reference/INDEX.md)
220218
| Reference | Contents |
221219
|-----------|----------|
222220
| [REST API](reference/rest-api.md) | All HTTP endpoints — graph, settings, ontology, auth, pathfinding, Solid |
223-
| [WebSocket Binary Protocol](reference/websocket-binary.md) | Unified binary protocol (24B/node), connection lifecycle, client implementation |
221+
| [WebSocket Binary Protocol](reference/websocket-binary.md) | Unified binary protocol (52 bytes/node, WireNodeDataItemV3), connection lifecycle, client implementation |
224222
| [Graph Schema](reference/neo4j-schema-unified.md) | Graph node/edge types, ontology nodes, Solid Pod records, indexes (Oxigraph/RDF, ADR-11) |
225223
| [Agents Catalog](reference/agents-catalog.md) | Complete catalog of specialist agent skills by domain |
226224
| [Error Codes](reference/error-codes.md) | AP-E, DB-E, GR-E, GP-E, WS-E error code hierarchy with solutions |

docs/adr/ADR-061-binary-protocol-unification.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ anomaly_score, sssp_distance, sssp_parent) move to a separate
2222
type/visibility flag bits move to the JSON init payload at
2323
`/api/graph/data` and are no longer transmitted per frame.
2424

25+
> **Amended:** the shipped frame is the 52-byte `WireNodeDataItemV3`
26+
> (centrality/analytics tail added in 07ebd2e9); the "28 bytes/node, fixed"
27+
> figure above describes the pre-centrality V3 design. See
28+
> `crates/visionclaw-protocol/src/lib.rs:13`.
29+
2530
## Context
2631

2732
ADR-037 ("literal-only, full snapshot of every node's absolute position +

docs/adr/ADR-090-enterprise-dashboard-removal.md renamed to docs/adr/ADR-103-enterprise-dashboard-removal.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# ADR-090: Enterprise Dashboard Removal — Migration to Nostr Forum
1+
# ADR-103: Enterprise Dashboard Removal — Migration to Nostr Forum
2+
3+
> Renumbered from ADR-090 to resolve a number collision with
4+
> ADR-090 (Hexagonal Crate Modularisation), which retains the 090 slot.
25
36
**Status:** Accepted
47
**Date:** 2026-05-15
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# ADR-090 — Shared Math Utilities Extraction
1+
# ADR-104 — Shared Math Utilities Extraction
2+
3+
> Renumbered from ADR-090 to resolve a number collision with
4+
> ADR-090 (Hexagonal Crate Modularisation), which retains the 090 slot.
25
36
| Field | Value |
47
|-------|-------|

docs/analysis-visionclaw-x-understand-anything.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
**Understand-Anything (UA)** is a Claude Code plugin that statically analyzes codebases (and Karpathy-pattern LLM wikis) to produce interactive knowledge graphs. It uses LLM-augmented analysis, language-specific parsers, and a React/ReactFlow 2D dashboard.
1111

12-
**VisionClaw (VC)** is a GPU-accelerated 3D knowledge graph platform that ingests Logseq markdown wikis, stores graph data in Neo4j, runs force-directed physics on CUDA, and renders via Three.js/WebXR in the browser with real-time binary position streaming.
12+
**VisionClaw (VC)** is a GPU-accelerated 3D knowledge graph platform that ingests Logseq markdown wikis, stores graph data in embedded Oxigraph + SQLite (SPARQL triple store; ADR-11), runs force-directed physics on CUDA, and renders via Three.js/WebXR in the browser with real-time binary position streaming.
1313

1414
They solve **adjacent problems at different layers of the stack**: UA excels at *graph construction from source analysis*, VC excels at *GPU-powered real-time graph visualization and Solid-rs pod federation*. The combination would be greater than the sum of parts.
1515

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Anomaly Register — VisionClaw host (ecosystem audit 2026-06-11)
2+
3+
Diagram-driven audit (ruflo mesh: 1 sonnet interface cartographer + 2 opus auditors + 2 opus fixers, Fable queen). Successor to the 2026-05-28 production register (`docs/architecture/diagrams/00-anomaly-register.md` is the older 2026-06-03 settings/GPU register — both retained). Ground-truth map: [interface-sequences.md](interface-sequences.md).
4+
5+
```mermaid
6+
mindmap
7+
root((visionclaw 06-11))
8+
2026-05-28 register
9+
12 FIXED incl S1 SPARQL + D2..D6 docker
10+
5 PARTIAL S2 S3 G1 CL2 CL3
11+
2 OPEN C2 G3
12+
Doc drift
13+
phantom ACSP emitter — FIXED
14+
MPL badge on AGPL repo — FIXED
15+
24B/28B vs 52B wire width — FIXED
16+
ADR-090 triple collision — RENUMBERED
17+
New since 05-28
18+
unauth enrichment decide — FIX IN FLIGHT
19+
82GB stale agent worktrees
20+
11 client files >700 lines
21+
Protocol (open)
22+
three coexisting binary encoders
23+
V4 client header server never emits
24+
```
25+
26+
## 2026-05-28 register re-verification (verdicts with evidence)
27+
28+
**FIXED (12):** S1 (ontology power_user wrap + read-only SPARQL validator), C1 (reclassified — no bus ever wired; direct hexser dispatch), C4 (Neo4j tx defaults gone), C5 (.temp gone; settings_validation_fix.rs is live with 3 importers), G2 (persistent sort buffers + mem::swap), D2 (digest-pinned bases), D3 (fail-fast agent key), D4 (USER appuser), D5 (scoped GPU env), D6 (unwraps removed), CL1 (lazy XR), CL4 (websocket/index.ts 492 lines).
29+
30+
**PARTIAL (5):**
31+
- S2 — `utils/auth.rs:46` still lets `Authenticated` satisfy `WriteGraph`, but every known mutator surface now carries explicit `RequireAuth::power_user()` route wraps. Tighten `has_permission` to finish.
32+
- S3 — old literal `/settings` routes are dead (module disabled at `api_handler/mod.rs:135`), but live `/api/settings/*` GETs use `OptionalAuth` then discard it (`settings_routes.rs:1066`) — reads effectively anonymous.
33+
- G1 — circuit-breaker real and wired (`MAX_CONSECUTIVE_GPU_FAILURES=5` → degraded+halt); CPU fallback remains an intentional warn-stub (GPU mandatory). Fails safe, not over.
34+
- CL2 — `: any` 322 + `as any` 42 = 364 (down from 373).
35+
- CL3 — reconnect/heartbeat timers balanced; binaryProtocol capped at 65536 entries; no remaining leak found.
36+
37+
**STILL-OPEN (2):** C2 settings read-modify-write race (`write_handlers.rs:44→198`, no version guard) — but the whole module is the *disabled* handler path; confirm dead → delete instead of fix. G3 — 3 `#[ignore]` gpu_stability tests on a stale API.
38+
39+
**ACCEPTED:** D1 docker.sock mount is `:ro`, dev-profile-only, explicitly commented.
40+
41+
## New findings since 2026-05-28
42+
43+
| ID | Sev | Where | Finding | Status |
44+
|----|-----|-------|---------|--------|
45+
| N1 | HIGH | `enrichment_proposals_handler.rs:178` + `main.rs:936` | Unauthenticated `POST /api/enrichment-proposals/{id}/decide`; `broker_pubkey` self-asserted from body (default "anon"); persists, broadcasts, triggers writeback — Sybil surface on the broker loop (introduced 023c847b0) | **Fix in flight this sweep** (auth gate matching sibling mutator precedent) |
46+
| N2 | MED | `.claude/worktrees/` | 82 GB / 52 stale `agent-*` worktrees (gitignored). Pollutes grep and disk. | Flagged — operator call before deletion (`git worktree list` then prune + remove stale dirs) |
47+
| N3 | MED | protocol | Three coexisting binary encoders: 28-byte V3F0 (`v3_frame.rs`, unused on the position path), 52-byte V3-extended (`binary_protocol.rs`, actual wire), 6-byte V4 header (client-send only, `frameTypes.ts:8` — server never emits it). Classic parallel-implementation divergence; consolidate or document authority. | Open |
48+
| N4 | LOW | `endpoints.ts:85,350` | Client `updatePhysics` does GET-then-PUT; unified `POST /api/settings` has no JS caller; unknown setting paths silently fall back to localStorage-only. | Open |
49+
| N5 | MED | `optimized_settings_actor.rs:596` | Settings writes don't broadcast to co-present clients (stale until reload). | Open |
50+
| N6 | LOW | `position_updates.rs:742` vs subscribe path | Drag enforces pubkey check; position-stream subscribe doesn't — unauthenticated clients can receive the stream. Decide: public-viz by design, or gate. | Open |
51+
| N7 | LOW | client | 11 files >700 lines (GemNodes 934, InstancedLabels 890, OnboardingWizard 794, settings.ts 780, CommandInput 761…) vs the 500-line project rule. | Open |
52+
| N8 | LOW | code stragglers | Rename debt the docs already match: CUDA loader symbol still `visionflow_unified` (`ptx_loader.rs`), core crate still logs/refers to `webxr` (`visionclaw-protocol lib.rs:16`, RUST_LOG targets). Fix in code, then sweep docs. | Open |
53+
| N9 | INFO | `solid_proxy_handler.rs:1874` | Without `solid-pod-embed` feature all `/solid/*` → 503; client has no guard. `filter_auth.rs:241` Phase-2 SQLite persistence is a stub. | Open |
54+
55+
## Doc drift resolved this sweep
56+
57+
README/docs-README phantom ACSP emitter (`ServerNostrActor`, 31400/31402 — never existed; reframed to the bead-provenance bridge reality per `agent-control-surface-panels.md`); MPL 2.0 badge/section → AGPL-3.0-only; 24B/28B wire-width claims → 52-byte `WireNodeDataItemV3` (+ ADR-061 amendment note); 23→21 actors; dead compose-file commands → `./scripts/launch.sh up dev`; Neo4j present-tense claim → Oxigraph+SQLite; GraphManager hooks-layer note; `src/uri/mod.rs` citations; ADR-090 collision → renumbered ADR-103/ADR-104; self-referential footer.
58+
59+
**Left for operator decision:** ADR-089 (CQRS-bus removal, Proposed) vs the "114 CQRS handlers" headline — reconcile status once the direct-dispatch reclassification (C1) is accepted. XR-domain docs (Vircadia/WebXR→Godot) untouched — in-flight work.

0 commit comments

Comments
 (0)