Builder.io Patterns for Commandr + DiffViewer
Builder.io’s Agent-Native and Skills repos help our workflow in two concrete ways:- Shared action vocabulary — humans and agents should invoke the same validated actions, whether the trigger is a UI click, tool call, CLI command, MCP call, or runner adapter.
- Inspectable visual artifacts — plans and recaps should become durable review packages, not chat walls.
.agents/ bus. Commandr remains L3 source of truth. DiffViewer remains L5 projection and action UI. Builder.io patterns shape the seams between them.
Layer Mapping
Commandr Contract
Commandr should expose action-like verbs, but every bus mutation must still map to SPEC v0.3 or a future conformance-backed SPEC change.
Rule:
approval_requested, artifact_created, .agents/approvals/*.pending, .denied, and runner workspace paths stay outside SPEC until DiffViewer has a real consumer and Commandr adds conformance checks.
DiffViewer Contract
DiffViewer should implement the Builder.io pattern as a local action dispatcher:.agents/, for example:
Visual Plan Package
Builder.io/visual-plan maps to a pre-implementation package rendered by DiffViewer.
Inputs:
Output:
.diffviewer/artifacts/<task>/plan.md.
Required sections:
Commandr relationship: the plan is not the task packet. The packet remains the work contract; the plan is a rendered aid and can be referenced from
task_progress as a neutral note.
Visual Recap / Review Package
Builder.io/visual-recap maps directly to DiffViewer’s end-of-task review package.
Inputs:
Output:
.diffviewer/artifacts/<task>/review-package.json plus a rendered Markdown/MDX view.
Minimal JSON shape:
Workflow
Implementation Slices
Slice 1: No-SPEC-Change Review Package
Build in DiffViewer only. Acceptance criteria:Slice 2: Action Registry
Add a local dispatcher in DiffViewer. Acceptance criteria:Slice 3: Builder-Style Skills
Package workflows as reusable skills consumed by OpenCode/Claude/Pi/omp. Candidate skills:
Skill rule: a skill may call Commandr commands or write DiffViewer-local artifacts. It must not invent bus files or parse runner-private state as authority.
Slice 4: Future SPEC Artifact References
Only after Slice 1 proves real UI value, consider a Commandr SPEC v0.4 artifact event. Candidate event shape:task_progress notes.
Non-Goals
- Do not replace
.agents/with Agent-Native SQL state. - Do not add
.agents/approvals/*.pendingor denial files. - Do not emit non-SPEC events from Commandr.
- Do not store runner transcripts or LSP caches on the bus.
- Do not make DiffViewer authoritative for lifecycle.
- Do not adopt Builder.io templates wholesale before the local action/artifact seam works.
Related Pages
- Builderio Agent Native — source summary for shared actions and app surfaces.
- Builderio Skills — source summary for visual-plan, visual-recap, watchdog, arbiter, efficient-frontier.
- Commandr — L3 bus and SPEC boundary.
- DiffViewer — L5 UI and Tauri cockpit direction.
- Desktop AI Agent Control Plane — Architecture Synthesis — big-picture 5-layer control plane.
- Agent Skills — portable
SKILL.mdpackaging pattern. - Tool Design for Agents — schemas and recovery-friendly tool contracts.