Originally created by: 5dive-bot
5dive board — the read contract that lets the UI leave coreDIVE-4779 step 1. Decision record: docs/board-contract.md (in this diff).
5dive ui is being extracted into a standalone plugin (5dive-ai/5dive-ui) so an outside developer can fork, run and send a PR to the control plane without cloning 121k lines of core. The port exists (PR 5dive-ai/5dive#1, +1445) and is not installable, for one reason quinn named while grading DIVE-4618: it does not read core through a seam at all. It opens core's private sqlite store and issues five queries naming tasks, agents_org, event_triggers, event_deliveries and ~30 columns — two of them derived expressions (handoff_state, gate_live) that exist nowhere but inside those query strings.
That coupling is a string. Nothing in core can see it break: not a compiler, not declare -F, not a test in either repo. Rename a column and the plugin keeps building, keeps installing, and fails in a browser.
Core owns the DOCUMENT. The plugin owns the PRESENTATION.
$ 5dive board --contract-version
1
$ 5dive board --json | jq -c '.data.contract'
{"name":"5dive.board","version":1}
Contract v1 keys: contract{name,version}, scope, store, host, generated_at, org[], queue[], gates[], flows[], triggers[], deliveries[], stats{} — byte-for-byte what 5dive ui --data and /api/state already served, plus contract.
There is now exactly one producer (_board_state_json): while the in-core UI and the plugin UI both exist they cannot disagree about what a board is, and deleting cmd_ui.sh in step 3 changes nothing for the plugin.
Negotiation is one exec and reads no store. --contract-version prints a bare integer, deliberately answerable on a box whose store is absent, unreadable or mid-migration — those are the boxes where getting the answer wrong costs most. A box too old to carry the verb fails the exec, which is the same answer in the same place. The version moves on a break (field removed, renamed, retyped), never on a growth.
A published read-only SQL view (the shape the row named first) renames the coupling instead of removing it: the plugin still needs the path, the sqlite3 binary, read permission on a 640 root:claude file, and the box's migration state. The fatal part is that a view arrives by a migration an installed box may not have run — the plugin discovers that as no such table in a browser at request time, and the discovery cannot be moved earlier, because asking a view which contract it serves requires already being able to read the store. DIVE-2512's class, fleet-wide. It also cannot carry flows, which is derived in bash after the queries.
A bare schema-version floor over the plugin's own SQL is cheapest and detects drift rather than removing it, leaving the 30-column coupling intact. Its loud-refusal half was kept as --contract-version, on top of the seam rather than instead of it.
The objection this answers out loud: a contributor who wants a new field still PRs core. That is the deliberate trade — a field is a fact about core's data model — while layout, routes, render, styling and interaction are 100% plugin-side. On cost: the plugin spawns sqlite3 five times per request today plus a bash derivation; one board exec replaces all six.
tests/board_contract_unit.sh — 40 arms, 40 pass.
src/ would grade a file the plugin never sees.jq literal, and the likeliest place to forget a key (a consumer on a fresh box is who pays).src/cmd_board.sh and the newest change-log row in docs/board-contract.md disagree.--contract-version falling through to a store read, a second producer restored in cmd_ui.sh, the contract block removed from the document, cmd_board.sh dropped from build.sh. Arm M6 re-verifies the tree was restored afterwards.Regression, all HARNESS-RC=0: build_bundle_self_order_unit, plugin_verb_dispatch_unit, plugin_contract_unit, host_verbs_unit. The pre-push rail ran the 3 changed harnesses green at e56d8e8d.
Live on this box: board --contract-version → 1; board --json and ui --data byte-identical modulo generated_at.
Steps 2–4 are sequenced on the row. Step 2 (plugin installable) cannot be proven until a core release carrying board is on a box — claiming otherwise would be evidence about the instrument, not the product. Step 3 (remove ui from core behind the moved-verb shim) must not land before 2 is proven, or a box loses the UI with nothing to replace it. Step 4 (contributor page + transferring issues 5dive-ai/5dive-ui#2–#1069) needs a gh credential this seat does not have, and is downstream of 2 and 3 anyway — the five issues still name src/cmd_ui.sh, which step 3 deletes.
🤖 Generated with Claude Code
Ticket changed by: 5dive-bot