feat(orchestrator): review staged work as match cards (requirement 012, phases A and B)

Requirement 012 plus its first two phases: the kvb-match skill (match.py add, list, show) feeds the existing review queue, /api/match serves the cards and local-only stale and snapshot posts, and payload files are read only as regular files under /tmp within the sandbox view and 64 KiB. The card at #tasks/match shows face, name, age in days, repository, branch, worktree and files that open while scrolling; right-click or long press marks a line, stale cards cannot be accepted. Accept, reject and the passkey release follow in phase C after the screenshot feedback. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14).

🎯 Fix: 75 %
💥 Break: 8 %
💸 Tokens: 100 %
⏱️ Velocity: 100 %
🛡️ Security: 95 %
🏆 Score: 66
🚦 Gate: ⛔ fix 75 % < 90, break 8 % > 5; security 95 % < 100: ask the operator before the commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-14 21:36:40 +00:00
1 parent a2a03995cb
commit 8bc7209ed1
23 files changed
+1407 -15

No files matched your search

+9 -3
View File
@@ -25,7 +25,9 @@ ITEM = re.compile(r"/api/(asks|decisions)/([0-9a-f]{16})(?:/(allow|deny))?")
ENTRY = re.compile(r"/api/stream/([0-9]{1,12})")
BOARD = re.compile(r"/api/board/([a-z-]{1,32})")
UPLOADS = "/api/uploads"
POSTS = ("/api/asks", UPLOADS, "/api/messages")
MATCH_ROUTE = "/api/match"
MATCH_POSTS = {"/api/match/stale": "match_stale", "/api/match/snapshot": "match_snapshot"}
POSTS = ("/api/asks", UPLOADS, "/api/messages", *MATCH_POSTS)
STORED = {
"page": (".html", "text/html; charset=utf-8", PAGE_CSP),
"files": (".json", "application/json", PLAIN_CSP),
@@ -127,6 +129,8 @@ class Handler(Exchange):
self.answer(lambda: hub.events(self.query()), HTTPStatus.OK)
elif path == "/api/tree":
self.answer(hub.repositories, HTTPStatus.OK)
elif path == MATCH_ROUTE:
self.answer(hub.match_cards, HTTPStatus.OK)
elif path == "/api/resources":
self.answer(lambda: sampled(hub.kept / RESOURCES, hub.span(self.query(), time.time())), HTTPStatus.OK)
elif path == "/api/scores":
@@ -262,9 +266,11 @@ class Handler(Exchange):
"""
if path == "/mcp":
return self.mcp_receiver(host)
if path == "/api/asks":
if path == "/api/asks" or path in MATCH_POSTS:
if self.local(host):
return lambda body: self.answer(lambda: self.server.hub.ask(body), HTTPStatus.CREATED)
hub = self.server.hub
receive = getattr(hub, MATCH_POSTS[path]) if path in MATCH_POSTS else hub.ask
return lambda body: self.answer(lambda: receive(body), HTTPStatus.OK if path in MATCH_POSTS else HTTPStatus.CREATED)
self.send_text(HTTPStatus.FORBIDDEN, "forbidden: local POST with the X-Kvb-Orchestrator header and no foreign origin only")
return None
if RUNNER_ROUTE.fullmatch(path):