design: a commander is a directory, not a session
Its identity is borrowed — command_hq_sessions.session_id is Claude's transcript id, minted by the CLI as the first turn begins. Verified: the id on the live row has a transcript file on disk. Three problems fall out of that. The working directory is fixed when the session spawns, before the id exists, so there is no point in the current flow where a commander can start in a directory named after itself. The first-turn interlock is a side effect being used as a signal — commanderBlock cannot resolve its paths on turn one, and the skill turns that emptiness into "you must be on your first turn". And losing the conversation loses the commander, because its state lives in the transcript and in a second tree keyed on the same borrowed id. So the platform owns the id, creates the directory first, writes CLAUDE.md into it, and spawns the session there. The transcript id becomes a pointer on the row rather than the thing the commander IS. Nothing waits on the CLI, so the ordering problem stops existing. Two things it buys beyond that. Claude Code reads a CLAUDE.md from the working directory, so the living document needs no mechanism at all and commanderBlock's per-turn injection goes away. And a commander survives its conversation: a dead session can be replaced in the same directory, with its scripts, procedures and record of what it has handled intact. The API does not change. The server just gets to do things in an order that works. Flags the consequence nobody would notice until it bit: the skill's "turn one is orientation, read where you are" assumes cwd is the target. Under this design the commander's own directory is nearly empty and the interesting thing is elsewhere, so that guidance moves with the code or every new commander orients on nothing. One commander exists on this machine and it is not armed, so the migration is cheap now and gets dearer with each one started. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -537,6 +537,10 @@ explaining why it was safe.
|
||||
- `docs/editor-buffer-corruption.md` — an open bug with a trap set for it: background-job output appearing
|
||||
inside a file open in the editor. Read it BEFORE investigating a report of that, and before re-testing
|
||||
anything it already rules out
|
||||
- `docs/commander-directory.md` — **designed, not built**: a commander is a directory, not a session. Why
|
||||
its identity is currently borrowed from Claude's transcript id and what that costs — an ordering problem,
|
||||
a first-turn interlock that is a side effect rather than a signal, and a commander that dies with its
|
||||
conversation. The CLAUDE.md in its own working directory is the living document, for free
|
||||
- `docs/plugin-capabilities.md` — **designed, not built**: a plugin's tasks, skills and affordances are
|
||||
READ where they live, never copied into `capabilities/`. Why copying breaks a forkable repository, why it
|
||||
goes stale on update and survives a disable, and why separate directories beat namespaced paths —
|
||||
|
||||
Reference in New Issue
Block a user