Files
rune/scripts/admit_wave_presentation.py
Nick ba63d15a6f
CI Pipeline / best-practices (push) Successful in 13s
CI Pipeline / documentation (push) Successful in 13s
CI Pipeline / rust-surface (push) Failing after 24s
Auto-version and Release / release (push) Successful in 25s
CI Pipeline / gitea-offline (push) Successful in 32s
CI Pipeline / go-surface (push) Failing after 48s
CI Pipeline / lint (push) Failing after 1m5s
CI Pipeline / type-check (push) Failing after 1m0s
CI Pipeline / canary (push) Failing after 3m34s
deploy / deploy (push) Failing after 15m31s
CI Pipeline / unit-tests (push) Failing after 39m33s
CI Pipeline / required-checks (push) Failing after 1s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Failing after 5s
admit: wave-presentation contract — the owner-spec'd presentation wave (activity pane, answer presentation, selection, scrollback)
2026-10-22 10:05:06 +01:00

152 lines
6.6 KiB
Python

"""Admission dispatch for wave presentation (the owner's spec'd TUI build).
The presentation wave per docs/openspec/changes/add-native-rune-tui/
spec-activity-pane-and-presentation.md (owner rulings 2026-10-21) plus
Gitea #2530 (bubble breaks + left-align), #2532 (mouse-drag selection +
OSC 52 auto-copy), #2535 (scrollback): (1) THE ACTIVITY PANE — the
bridge strip reborn always-visible, dynamic real-signal state
(thinking/coding/planning/researching/idle), per-activity colour +
animation, runic marks kept with random rune colours, rainbow activity
word, no timestamp, + affordance opening the centered processing
window, tasks-pane mirror; (2) THE ANSWER PRESENTATION — growing speech
bubbles (consecutive prose joins one bubble, left-aligned,
speaker-coloured outline), tables break out full-width bordered, bullet/
step rail presentation outside the bubble, built on D47's markdown
block parse; (3) SELECTION — mouse-drag highlight per pane + auto-copy
via OSC 52 (direct emission, capability detect, honest degrade);
(4) SCROLLBACK — chat history scrollable keyboard + wheel.
approval_ref 'user:presentation spec 2026-10-21 + bedtime factory directive'.
"""
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
from rune import construction_activation as cact # noqa: E402
from rune import construction_admission as cadm # noqa: E402
from rune import construction_mode as cmode # noqa: E402
from rune import scaffold as sc # noqa: E402
ROOT = os.path.join(os.path.dirname(__file__), "..")
OBJECTIVE = (
"Build the owner-spec'd presentation wave: (1) rebuild the bridge "
"strip into the activity pane — make it always visible, drive its "
"state word (thinking/coding/planning/researching/idle) from real "
"dispatch signals, colour and animate each activity differently, "
"keep the runic marks with random rune colours, animate a rainbow "
"activity word, remove the timestamp, add a clickable + that opens "
"a centered window holding the full current-turn processing, and "
"mirror the live activity in the tasks pane; (2) rebuild the "
"answer rendering — grow one speech bubble per consecutive prose "
"run, left-align text, colour bubble outlines by speaker, break "
"tables out of the bubble full-width bordered, render bullet and "
"step lists as rail presentations outside the bubble, and fix the "
"large-answer bubble breakage; (3) add mouse-drag selection to "
"every pane and auto-copy the selection via OSC 52 direct "
"emission with honest degrade; (4) add chat-history scrollback "
"with keyboard paging and mouse wheel"
)
AFFECTED = [
"tui/chatpane/",
"tui/tasks/",
"tui/lanes/",
"tui/face/",
"tui/cmd/rune-tui/",
"tui/runtime/lib/",
"scripts/admit_wave_presentation.py",
]
def main() -> int:
store = os.path.join(ROOT, "store", "scaffold")
scaffold = sc.Scaffold(store, "rune")
md = cmode.classify_mode(
OBJECTIVE,
target_project="rune",
project_exists=True,
affected_surface=AFFECTED,
)
print("classified mode:", md.mode)
need = {
"need_id": "need-wave-presentation",
"objective": OBJECTIVE,
"origin": "worker",
"project": "rune",
"task_ref": "wave-presentation",
"affected_surface": AFFECTED,
"evidence_refs": [
"docs/openspec/changes/add-native-rune-tui/"
"spec-activity-pane-and-presentation.md (the owner's spec)",
"docs/openspec/changes/add-native-rune-tui/"
"dichotomy-routing-table-DRAFT.md",
"tui/chatpane/markdown.go (D47 block parse to build on)",
"tui/tasks/answercodes.go (work stream pattern)",
"Gitea #2530 #2532 #2535",
],
}
act = cact.activate(md, need=need, scaffold=scaffold,
builder="wave-presentation")
print("activated:", act.get("activated"), act.get("mode"))
env = cadm.admit(
act,
objective=OBJECTIVE,
builder="wave-presentation",
affected_surface=AFFECTED,
evidence_refs=need["evidence_refs"],
origin="worker",
task_ref="wave-presentation",
expected_new_entities=[
"tui/lanes (the activity pane: always-visible strip, "
"dynamic real-signal state, per-activity colour + "
"animation, runic marks with random rune colours, rainbow "
"activity word, no timestamp)",
"tui (the + centered processing window, one block per "
"answer; tasks-pane mirror of the live activity)",
"tui/chatpane (growing speech bubbles: consecutive prose "
"joins one bubble, left-aligned, speaker-coloured "
"outline; tables break out full-width bordered; bullet/"
"step rail presentation outside the bubble)",
"tui (mouse-drag selection per pane + OSC 52 auto-copy, "
"direct emission, honest degrade)",
"tui/chatpane (chat-history scrollback keyboard + wheel)",
"tests: red-first suites per part, -race green",
],
expected_runtime_effects=[
"the bridge strip never disappears; its state word, "
"colour and animation reflect the real dispatch (thinking/"
"coding/planning/researching/idle)",
"the + affordance opens a centered window with the full "
"current-turn processing; the activity mirrors in the "
"tasks pane",
"long answers grow one bubble per speech run with tables "
"and lists breaking out; outlines carry the speaker "
"colour; answers never break the bubble",
"mouse drag highlights in panes and copies on release "
"where the terminal allows",
"chat history scrolls with keyboard and wheel",
],
verification_obligations=[
"cd tui && go test ./... -race green (documented "
"pre-existing failures aside); go build + vet + gofmt "
"clean",
"PTY proofs: rainbow word, + window open/close, bubble "
"growth, table breakout, drag-select + copy bytes, "
"scrollback",
"deploy the binary via scripts/build_paired.sh, copy "
"verification/build-id/rune-tui to "
"~/.local/share/rune/bin/rune-tui",
],
approval_ref="user:presentation spec 2026-10-21 + bedtime "
"factory directive",
contract_id="ADMIT-wave-presentation",
project_store=store,
project_id="rune",
)
print(json.dumps(env, indent=2, default=str)[:2400])
if __name__ == "__main__":
raise SystemExit(main())