aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-13 16:42:32 -0500
committerCraig Jennings <c@cjennings.net>2026-07-13 16:42:32 -0500
commit3ef55807a23f7dd447ecf9fc34d6512fb3893d6b (patch)
tree95b0319a9de7bd322a236372193572400545df98
parent04c3b29a968d62eac1a4123cf03606fc667c2d14 (diff)
downloadrulesets-3ef55807a23f7dd447ecf9fc34d6512fb3893d6b.tar.gz
rulesets-3ef55807a23f7dd447ecf9fc34d6512fb3893d6b.zip
docs(runtime): session plumbing assessed, no build needed
session-context-path already carries a runtime segment, the anchor cycle is plain files, and self-inject is harness-agnostic with only its payload Claude-shaped. A codex auto-flush is a documented payload variant whose second injected line carries the resume instruction, replacing the SessionStart hook. Wire it when a codex session first wants it.
-rw-r--r--docs/design/2026-07-13-runtime-portability-inventories.org11
-rw-r--r--todo.org4
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/design/2026-07-13-runtime-portability-inventories.org b/docs/design/2026-07-13-runtime-portability-inventories.org
index e04f9cf..b9e8244 100644
--- a/docs/design/2026-07-13-runtime-portability-inventories.org
+++ b/docs/design/2026-07-13-runtime-portability-inventories.org
@@ -63,6 +63,17 @@ What that rule does not carry:
Verdict: no per-skill porting matrix needed. One resolution sentence in the bootstrap entry file (instruction-bootstrap child), optional native registration as an install nicety, flush explicitly excluded.
+* Session plumbing per runtime
+
+Four pieces, examined:
+
+- =session-context-path= is already runtime-aware by design — the =AI_AGENT_ID= shape carries a runtime segment (=host.project.runtime.epoch=) and the resolver is pure bash. Nothing to do.
+- The anchor cycle (suspend entry, startup's interrupted-session recovery, wrap-up's archive rename) is plain files driven by workflow prose. Any agent that reads protocols.org executes it identically. Nothing to do.
+- =self-inject.sh= is harness-agnostic: it types arbitrary strings into a tmux pane. The Claude-bound part is only the *payload* — "/clear" plus a resume line that leans on the SessionStart hook. A Codex auto-flush is a payload variant: the clear command differs (confirm the exact one when wiring) and the second injected line must itself carry the resume instruction ("read .ai/session-context.org and resume") since no hook fires. Arguably simpler than the Claude path.
+- =session-clear-resume.sh= (the SessionStart hook) is Claude-only, and the payload variant above makes it unnecessary off Claude.
+
+Verdict: no build. The flush *skill* stays Claude-official; a codex auto-flush is a documented payload variant to wire the day a codex session actually wants it, not before.
+
* Decisions for Craig
All four approved by Craig, 2026-07-13:
diff --git a/todo.org b/todo.org
index d22eaea..6dd19cd 100644
--- a/todo.org
+++ b/todo.org
@@ -275,8 +275,8 @@ Full mapping in [[file:docs/design/2026-07-13-runtime-portability-inventories.or
*** 2026-07-13 Mon @ 16:39:41 -0500 Launcher runtime flag built — ai --runtime claude|codex
Shipped TDD (new =scripts/tests/ai-launcher-runtime.bats=, 6 tests red→green): =--runtime= flag + =AI_RUNTIME= env on =bin/ai=, runtime→CLI mapping (claude default, codex 1:1 — both take the opening line as a positional prompt), runtime-aware dependency check, =local= reserved with a clear not-wired-yet error (pending the model-floor evaluation), and a =--print-launch= mode as the test seam (prints the pane launch command, no tmux/fzf). Kept small per the 2026-06-24 helper-task caveat — dispatch pre-parse only, no launcher restructure. The Emacs-side equivalent (ai-term multi-LLM) remains .emacs.d's June handoff. Live smoke: correct commands for both runtimes against real projects.
-*** TODO Session plumbing per runtime
-=/flush auto= self-inject types Claude-specific keystrokes (=/clear= + resume line); clear/resume mechanics differ per harness. Also confirm =session-context-path= and the suspend/startup anchor cycle behave identically when a non-Claude agent drives them.
+*** 2026-07-13 Mon @ 16:41:14 -0500 Session plumbing assessed — no build needed
+Analysis in [[file:docs/design/2026-07-13-runtime-portability-inventories.org]] (Session plumbing section). session-context-path is runtime-aware by design; the anchor cycle is plain files any agent drives identically; self-inject.sh is harness-agnostic (only its PAYLOAD is Claude-shaped — a codex auto-flush is a payload variant whose second injected line carries the resume instruction itself, no hook needed); session-clear-resume.sh stays Claude-only and the payload variant obsoletes it off Claude. Wire the codex variant the day a codex session wants it.
*** 2026-07-13 Mon @ 13:34:17 -0500 Memory story confirmed — KB is already the cross-agent store
Details in [[file:docs/design/2026-07-13-runtime-portability-inventories.org]]. Auto-memory stays Claude-owned; non-Claude agents use the org-roam KB + file artifacts (todo/notes/session anchors), all runtime-neutral already. One wording gap: knowledge-base.md's capture-then-promote names harness memory as the capture layer — a one-sentence addition (session log as the capture layer for agents without harness memory) closes it, pending approval in the VERIFY below.