(root) CLAUDE.md
Multi-project portfolio for the [&] Protocol ecosystem. Contains the protocol spec, reference implementations, portfolio company sites, and three active codebases.

ProjectAmp2

Multi-project portfolio for the [&] Protocol ecosystem. Contains the protocol spec, reference implementations, portfolio company sites, and three active codebases.

Canonical status reference

Before starting non-trivial work, read `/home/travis/ProjectAmp2/STACK_COMPLETION.md` — it is the authoritative answer to "where are we on stack completion right now?" It lists every product's version, test count, deployment status, and spec completeness. Update it when you ship something.

Active codebases (where real code lives)

  • graphonomous/ — Elixir/OTP continual learning engine + MCP server + npm package

  • WebHost.Systems/ — Node.js monorepo: Supabase backend + Vite/React/Supabase Auth frontend

  • AmpersandBoxDesign/ — [&] Protocol spec, JSON schemas, Elixir reference impl, npm/Python SDKs

  • bendscript.com/ — BendScript Protocol: graph-first document format with typed inline link facets (v0.1 draft spec; previous SvelteKit + Supabase canvas/KAG product archived under bendscript.com/old_scrap/v1/)

  • PRISM/ — OS-009 PRISM Elixir/OTP benchmark engine (Fly.io deploy, 6 machines)

  • PULSE/ — OS-010 PULSE manifest standard (schemas/, manifests/, docs/)

  • AmpersandBoxDesign/box-and-box/box-and-box, the [&] governance kernel: Node ESM pure-library package (zero runtime deps), 118 enforced property-tested laws + 3 declared-open. See "Arithmetic ladder" below.

Spec-driven development workflow

Each portfolio company has a docs/spec/ folder containing the authoritative spec that drives implementation. When building or modifying code, always read the relevant spec first:

  • graphonomous/docs/spec/README.md — Graphonomous engine spec (the source-of-truth for graphonomous/ code)

  • WebHost.Systems/docs/spec/README.md — WebHost.Systems master spec (plus numbered section files and ADRs in the same dir)

  • agentelic.com/docs/spec/README.md — Agentelic product spec

  • agentromatic.com/docs/spec/README.md — Agentromatic deliberation engine spec

  • delegatic.com/docs/spec/README.md — Delegatic governance spec

  • deliberatic.com/docs/spec/README.md — Deliberatic protocol spec

  • opensentience.org/docs/spec/README.md — OpenSentience runtime spec

  • specprompt.com/docs/spec/README.md — SpecPrompt standard spec

  • bendscript.com/docs/spec/README.md — BendScript Protocol v0.1 draft (graph-first document format)

  • opensentience.org/docs/spec/README.md — OpenSentience research protocols spec

  • geofleetic.com/docs/spec/README.md — GeoFleetic spatial intelligence spec

  • ticktickclock.com/docs/spec/README.md — TickTickClock temporal intelligence spec

  • fleetprompt.com/docs/spec/README.md — FleetPrompt agent marketplace spec

  • runefort.com/docs/spec/README.md — RuneFort spatial cognition visualization spec

AmpersandBoxDesign uses prompts/ instead of docs/spec/:

  • AmpersandBoxDesign/prompts/PROTOCOL_PROMPT.md — the implementation prompt used to generate [&] Protocol code

  • AmpersandBoxDesign/prompts/GRAPHONOMOUS_PROMPT.md — autonomous codebase traversal prompt for Graphonomous MCP

  • AmpersandBoxDesign/prompts/KAPPA_BUILD_PROMPT.md — κ cyclicity detection implementation guide (v2)

  • AmpersandBoxDesign/prompts/KAPPA_DELIBERATOR_PROMPT.md — deliberation loop triggered by κ routing

  • AmpersandBoxDesign/prompts/ATTENTION_ENGINE_PROMPT.md — proactive attention engine (survey → triage → dispatch)

  • AmpersandBoxDesign/prompts/MODEL_TIER_PROMPT.md — hardware-adaptive tier budgets (local_small, local_large, cloud_frontier)

BendScript v1 (the previous SvelteKit/Supabase canvas/KAG product) is archived. Its implementation prompts now live under bendscript.com/old_scrap/v1/prompts/ and are historical only. The current BendScript direction is a protocol spec; no implementation prompts exist yet.

Some projects also have old_scrap/ dirs with previous spec versions — these are historical, not authoritative.

Note: graphonomous.com/ is the marketing site; the Graphonomous spec lives in graphonomous/docs/spec/ alongside the codebase.

Shared Supabase data layer

All [&] ecosystem products share a single Supabase instance with per-product PostgreSQL schemas. One supabase start runs the entire data layer.

  • ampersand-supabase/ARCHITECTURE.md — master architecture spec (schemas, auth, deployment topologies)

  • ampersand-supabase/config.toml — shared PostgREST config exposing all product schemas

  • ampersand-supabase/migrations/ — all migrations, namespaced by number range:

  • 000–009 — shared core (amp.*: profiles, workspaces, members, entitlements)

  • 010–019kag.* (BendScript)

  • 020–029webhost.* (WebHost.Systems)

  • 030–039fleet.* (FleetPrompt)

  • 040–049geo.* (GeoFleetic)

  • 050–059temporal.* (TickTickClock)

  • 060–069orchestrate.* (AgenTroMatic)

  • 070–079govern.* (Delegatic)

  • 080–089agentelic.* (Agentelic)

  • 090–099rune.* (RuneFort)

  • 100–109spec.* (SpecPrompt)

Products that do NOT use Supabase: Graphonomous (embedded SQLite), Deliberatic (in-memory), OpenSentience (ETS). SpecPrompt uses Supabase in registry mode only (filesystem mode is git-based, no DB).

Running locally

supabase start           # starts full ecosystem DB + Auth + Edge Functions
supabase db reset        # re-apply all migrations + seed
supabase stop            # shut down

Everything else

  • *.com/ and *.org/ directories are marketing sites (static HTML) with specs as described above

  • _build/, deps/, mix.lock are Elixir build artifacts from graphonomous (root-level)

Build commands

graphonomous (Elixir)

cd graphonomous
mix deps.get
mix compile --warnings-as-errors
mix test
mix format --check-formatted

WebHost.Systems (Node.js)

cd WebHost.Systems
npm install
npm run dev          # Vite dev server
npm run typecheck
npm run lint

AmpersandBoxDesign (Elixir reference impl)

cd AmpersandBoxDesign/reference/elixir/ampersand_core
mix deps.get
mix escript.build
./ampersand validate ../../../examples/infra-operator.ampersand.json

Conventions

  • Elixir code uses mix format style

  • TypeScript uses ESLint + Prettier

  • Commits should be clear and focused (see AmpersandBoxDesign/CONTRIBUTING.md)

  • Do not commit secrets, API keys, or credentials

  • EXLA is included in graphonomous deps for fast neural embeddings (requires LD_LIBRARY_PATH=/opt/cuda/lib64; falls back gracefully)

  • graphonomous MCP uses a vendored anubis_mcp patch in vendor/anubis_mcp

Browser testing (ALL ProjectAmp2 projects)

Default browser automation tool: `agent-browser` (the anthropic-skills:agent-browser skill / agent-browser CLI).

This applies repo-wide — graphonomous/, WebHost.Systems/, AmpersandBoxDesign/, bendscript.com/, PRISM/, PULSE/, and every *.com/ / *.org/ marketing site.

Use agent-browser for:

  • Navigating pages, filling forms, clicking, taking screenshots

  • Scraping / extracting data from rendered pages

  • Testing web apps, login flows, SPAs

  • Exploratory testing, dogfooding, QA, bug hunts

  • Automating Electron desktop apps (VS Code, Slack, Discord, Figma, etc.)

  • Cloud browser providers (Vercel Sandbox microVMs, AWS Bedrock AgentCore)

Prefer agent-browser over:

  • mcp__Claude_in_Chrome__* (Claude in Chrome MCP)

  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__* (chrome-devtools MCP)

  • mcp__Claude_Preview__* for browser-level testing (preview_* is still fine for dev-server management and HMR; use agent-browser once a server is running and you want real browser interaction)

  • Any ad-hoc Playwright / Puppeteer / Selenium scripts

Bootstrap pattern for any session doing browser work:

agent-browser skills get core --full    # load the core skill
agent-browser open <url>                # navigate
agent-browser snapshot                  # a11y-tree snapshot (preferred over screenshot for assertions)
agent-browser screenshot                # visual proof when sharing with the user

Exception: if a task is narrowly about Chrome DevTools-specific features (Lighthouse audits, performance traces, heap snapshots), the chrome-devtools MCP may be used — but default to agent-browser for everything else.

A graphical VM is NOT browser work — use QEMU directly

For anything running inside a PARKVPS guest (the T&R distro, RRABBIT on the road, a greeter, a boot menu), do not reach for a browser. QEMU hands over both directions:

python3 PARKVPS/vpsd/vps.py screenshot tr4 /tmp/g.ppm   # the framebuffer
magick /tmp/g.ppm /tmp/g.png                            # no python PIL on this box
python3 PARKVPS/vpsd/vps.py type tr4 driver @tab driver @ret

This reaches what ssh cannot see at all — the display manager before anyone has logged in, a session that failed to start, an X server on the wrong VT. ssh tells you what a shell says is true; screenshot shows you the screen.

The T&R / RRABBIT / RAVIO local stack

These four run together and are easy to confuse. All are in the root .claude/launch.json; `RRABBIT/docs/RUNBOOK.md` is the authoritative runbook (port map, the probes that settle arguments, the traps).

  • 8911 npm run m0 — RRABBIT from source (vite, HMR)

  • 8912 npm run proxy — compositor-proxy, native applications

  • 8913 RRABBIT/bridge.py — the built shell + tubes; this is what the distro ships

  • 8905 PARKVPS/vpsd/api.py — the machines; /desktop/<name> shows a guest's screen

  • 8890 RAVIO/bridge.py — the sky road; its MACHINES rail (gear P) frames 8905

Two traps that have each cost a session: tools/proxy.sh defaults --allow-origin to 8911, so testing the built shell on 8913 needs RRABBIT_ALLOW_ORIGIN=http://127.0.0.1:8913 or the launch fails with a CORS error that reads like the proxy being down; and restart the proxy between page reloads, because a proxy session outlives the page and a reload silently joins a session whose client is gone.

Graphonomous session policy (ALL ProjectAmp2 sessions)

Treat Graphonomous MCP as the always-on memory and learning loop for every chat session in this repository — regardless of which subdirectory the task is in. Graphonomous is the shared knowledge substrate for the entire [&] ecosystem.

Adopt this internal policy at session start:

"Graphonomous-first memory loop is active."

Required prompt/context wiring

Skills live in ampersand-plugins as Claude Code skills. Reference docs are mirrored in graphonomous/docs/skills/.

Load at session start (or before first non-trivial action):

  1. graphonomous/docs/skills/SKILLS.md (index + machine architecture)

  2. graphonomous/docs/skills/bootstrap.md (session initialization)

Recommended full load for complex sessions:

  • graphonomous/docs/skills/retrieve.md

  • graphonomous/docs/skills/learn.md

  • graphonomous/docs/skills/deliberate.md

  • graphonomous/docs/skills/consolidate.md

  • graphonomous/docs/skills/goals.md

  • graphonomous/docs/skills/attention.md

  • graphonomous/docs/skills/workflows.md

  • graphonomous/docs/skills/store.md

  • graphonomous/docs/skills/belief.md

  • graphonomous/docs/skills/review.md

Default loop (every non-trivial task)

Graphonomous v0.4 exposes 5 loop-phase machines (down from 29 individual tools). Each machine maps to a phase of the closed memory loop:

  1. Retrieveretrieve(action: "context", query: "...") before reasoning

  2. Route — check topology.routing; if "deliberate", run route(action: "deliberate", ...)

  3. Actact(action: "store_node", ...) to mutate the graph

  4. Learnlearn(action: "from_outcome", ...) to close the feedback loop

  5. Consolidateconsolidate(action: "run") at session boundaries

This applies whether you're working in graphonomous/, WebHost.Systems/, AmpersandBoxDesign/, bendscript.com/, or any portfolio site spec.

Dual-loop architecture

When PRISM (OS-009) benchmarks Graphonomous, both closed loops interlock — 5 Graphonomous machines + 6 PRISM machines = 11 tools total, down from 76. See AmpersandBoxDesign/prompts/DUAL_LOOP_MACHINES.md and PRISM/docs/DUAL_LOOP_MACHINES.md (which now also covers triple-loop nesting via PULSE).

Three-protocol stack: [&] + PULSE + PRISM

OS-010 PULSE is the temporal algebra that lets every loop in the [&] portfolio declare its phases, cadence, nesting, substrates, invariants, and cross-loop signal connections in a single JSON file (<loop>.pulse.json). Together with [&] (structural composition) and PRISM (diagnostic measurement), they form the three-protocol stack:

  • [&] composes capabilities (*.ampersand.json) — structural

  • PULSE declares loops + circulation (*.pulse.json) — temporal — see PULSE/schemas/pulse-loop-manifest.v0.1.json

  • PRISM measures loops over time (BYOR benchmark) — diagnostic

Every portfolio product declares its own loop topology in a "PULSE Loop Manifest" section of <project>/docs/spec/README.md. Reference manifests live in PULSE/manifests/ (graphonomous, prism, agentromatic). PRISM does not require a separate file — it reads any system's PULSE manifest directly to discover phases, signatures, and substrates.

The five canonical PULSE phase kinds — retrieve, route, act, learn, consolidate — match the Graphonomous machine architecture exactly. The six canonical cross-loop tokens (as of PULSE v0.1.1) — TopologyContext, DeliberationResult, OutcomeSignal, ReputationUpdate, ConsolidationEvent, SurpriseSignal — flow through CloudEvents v1 envelopes between loops. SurpriseSignal was added in v0.1.1 for OS-011 (Embodiment Protocol) forward-model-prediction-error emission.

When working in any subdirectory, treat the local PULSE Loop Manifest as authoritative for that project's loop topology. Cross-loop integrations should reference manifest connections, not hard-coded coupling.

Arithmetic ladder / box-and-box (the governance kernel)

box-and-box (at AmpersandBoxDesign/box-and-box/) is the [&] governance kernel — an eight-rung modality ladder, each rung a small algebra with stated laws:

  1. alethic (value) — what can happen · 2. axiological (score) — how to rank · 3. deontic (norm/govern) — what's allowed · 4. temporal (supervise) — safe over time · 5. reflexive — may the rules change (entrenched ring-0 core) · 6. epistemic — do we know enough · 7. strategic — who can ensure it · 8. resource — can we afford it (affine ledger).

One composing bridge (bridge.mjs) runs floor-then-gradient: `feasible ▸ permitted ▸ best` over an un-weakenable safety floor; every verdict ships a certificate. 118 enforced property-tested laws + 3 declared-open (103 kernel + 15 compose/CC2 — 14 suite + 1 anchor; node test/laws.mjs && node test/compose-laws.mjs, 2000 trials each). Both suites now derive their printed totals; do not hand-type a law count anywhere, that is exactly how the published and printed numbers drifted apart before. The 3 open gaps (CP5/CP6/CP7, the Value.pi carrier) print FALSIFIED in red by design and the build fails if one starts passing. Invariant Arithmetic (the prior opensentience.org/invariant-arithmetic.html + the TS port in workbench/app/src/lib/ia/) is rungs 1–2 of this same ladder.

Important — the 8 rungs are orthogonal to PULSE's 5 phase kinds. Do NOT claim a 1:1 mapping. The rungs govern a single decision (a one-shot verdict: may this action proceed, and is it best?); PULSE's retrieve/route/act/learn/consolidate sequence a loop over time. The kernel governs what is allowed to happen at a phase — it is not itself a set of phases. The package is pure library, code only (no bundled HTML); the rung "living-paper" pages + interactive playground.html (64 laws wired client-side — the old "64 of 116" denominator is superseded by the derived 118, and the 64 itself has not been re-counted) are website content at opensentience.org/ root; conformance is published at ampersandboxdesign.com/laws.html.

Hard requirements

  • Do not skip retrieval habitually — prior context likely exists for most tasks

  • Do not fabricate causal provenance, outcomes, or coverage signals

  • Do not inflate confidence indiscriminately

  • Respect act/learn/escalate routing from goal coverage decisions

  • Store cross-project learnings (e.g., spec decisions that affect multiple apps) as semantic nodes with appropriate edges

Open in the interactive atlas