Skip to content

feat: the clipboard bridge -- agent loop without MCP (goal 0099) - #233

Merged
alicoding merged 6 commits into
mainfrom
clipboard-bridge
Aug 18, 2026
Merged

feat: the clipboard bridge -- agent loop without MCP (goal 0099)#233
alicoding merged 6 commits into
mainfrom
clipboard-bridge

Conversation

@alicoding

Copy link
Copy Markdown
Owner

The no-network agent loop for machines where MCP isn't allowed: the clipboard is the transport, an inline JSON Schema is the protocol, and the guardrail taxonomy stays the guard.

OUT: the card page's share rail gains Copy for AI — one JSON envelope (mill/kind/instructions/schema/allowedActions/items) whose inline draft-2020-12 schema IS the reply instruction, restricted to the portable structured-output intersection (subset-guard test pins the keyword vocabulary; kind/action enums are the only runtime injections).

IN: the Quick Panel's existing Apply-from-clipboard row recognizes a mill reply (validated Go-side via the already-vendored santhosh-tekuri/jsonschema v6 — zero new dependencies) and swaps into the review surface: every create is a checkbox row, colliding titles default unchecked with the collision named, the confirm carries its count, and nothing executes before accept. Accepting runs a seeded, user-editable route workflow (ADR-0035: routes are composition) through a new reusable apply-atlas-from-reply node. The correction loop is re-ask-the-source: Copy corrected context re-emits the envelope carrying what failed or what was declined.

The hard cap, in code: clipbridge.MayAutoRun — read-class only; create-class always reviews; replace/delete-class can never auto-run and no configuration can change that. v1 ships two create-class routes (create cards, save note to Scratchpad).

Proofs: 30+ domain/service unit tests (schema subset guard, refusal naming, taxonomy cap, collision annotation, materializer mapping), two seed-registry-proven route workflows with end-to-end executionsvc runs, and e2e for the envelope round-trip, the collision-unchecked accept flow, and the invalid-reply correction copy. Contract document regenerated; fingerprints extended (new goldens at SeedRevision 1). Screenshot-reviewed against the locked review-surface contract.

Goal: docs/goals/0099-clipboard-bridge.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd

alicoding and others added 3 commits August 18, 2026 08:06
…routes, preview/envelope bindings (goal 0099)

domain/clipbridge: the OUT envelope (inline JSON Schema 2020-12,
kind/action enums as the only injection points), ParseReply via the
vendored jsonschema/v6 with named per-failure errors, and the effect-
class taxonomy with the hard cap in code (replace/delete never
auto-runs; the subset-guard test pins the schema vocabulary).
composition: apply-atlas-from-reply (a thin batch node over an
injected materializer) + two seeded routes the Quick Panel runs on
accept, both in the seed-proof registry with end-to-end executionsvc
proofs. atlassvc: PreviewClipbridgeReply (collision-annotated),
CardContextEnvelope (the machine-readable twin of the plain-text
context block), and the materializer (kind-label resolution,
summary-field mapping, Scratchpad note landing). Contract document
regenerated for the new node type; fingerprints extended for the new
goldens (all SeedRevision 1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
…binding; bindings regenerated

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
…ew surface, Copy for AI (goal 0099)

The Quick Panel's Apply-from-clipboard row now recognizes both payload
families (workflow export first, then the mill reply envelope) via a
shared clipboard-door hook, split out to keep QuickPanel under the
500-line cap. A recognized reply swaps the panel into the review
surface (the fourth instance of the preview-dialog language): creates
render as checkbox rows, colliding titles default unchecked with the
collision named, the confirm carries its count, nothing executes
before accept, and the run goes through the seeded route workflow.
The correction loop is re-ask-the-source (Copy corrected context). The
card page's share rail gains Copy for AI, the machine-readable twin of
Copy as context. e2e covers the envelope round-trip, the
collision-unchecked accept flow, and the invalid-reply correction
copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
@alicoding
alicoding enabled auto-merge (squash) August 18, 2026 12:21
Comment thread internal/domain/clipbridge/schema.go Fixed
Comment thread internal/domain/clipbridge/schema.go Fixed
alicoding and others added 3 commits August 18, 2026 08:27
…eQL: unsafe quoting)

The two enum injections now parse the committed literal template and
set the arrays as values -- label content is inert data and can never
alter the document's shape. Regression test pins a hostile label
carrying quotes/refs staying inside its enum string. Both scanner
findings on schema.go resolve at the root rather than by suppression.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
…or the seed union

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
…anced by its JSON items field)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
@alicoding
alicoding merged commit 47ad8aa into main Aug 18, 2026
26 of 27 checks passed
@alicoding
alicoding deleted the clipboard-bridge branch August 18, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants