Intent
Why this exists
The Claude Code adapter: Genesis launches Claude Code in a Rex tab and its own worktree, with the permission mode always explicit, its session ID and environment stamped, and its status read from hooks, then Rex events, then the process exiting.
Leaves
10 leaves, 10 with evidence
- has evidence
A change set has an optional short title, set with `genesis change new --title` (under about 30 characters), and without one its intent's first clause stands in.
AcceptanceA testscript sets a title, shows it in `change show --json`, refuses an over-long one, and shows the fallback. - has evidence
Genesis launches Claude Code interactively in a new Rex tab, in the change set's own worktree.
AcceptanceA launch opens one Rex tab whose cwd is the worktree, checked through the Rex CLI. - has evidence
A session's Rex tab is named `<repo>: <change set title>`, for example `genesis: Carving keeps IDs`, with no state in it and the step added after ` · ` only when it is not the build step.
AcceptanceA test builds the title for a change set with and without a title and for a build and a review step. - has evidence
The branch `cs/<slug>` and worktree `<repo>.<slug>` are named from the same title.
AcceptanceA test derives the slug, branch and worktree names from one title. - has evidence
`genesis session ls` and `genesis session show <id>` list the sessions Genesis launched with their change set, tab, worktree, permission mode and status.
AcceptanceA testscript launches against a fake Rex and reads both outputs. - has evidence
The Claude Code adapter always passes a permission mode, and a launch with none is refused.
AcceptanceA test shows the launch command carries `--permission-mode` and a launch without one exits non-zero. - has evidence
The adapter starts Claude Code with `--session-id` set to an ID Genesis generates and records.
AcceptanceThe recorded session ID equals the one on the launch command. - has evidence
A session's status comes from Claude Code's hooks first, then the status in Rex's events, then the process exiting.
AcceptanceA test feeds each source alone and in conflict and gets the highest-precedence status. - has evidence
The status is copied into Genesis's own files, never read back from Rex as the record.
Acceptance`genesis session show` reports the last status with Rex stopped. - has evidence
Every agent Genesis launches gets `GENESIS_CHANGE`, `GENESIS_ACTOR` and, when it belongs to a run, `GENESIS_RUN` in its environment.
AcceptanceA test reads the launched environment and finds all three.
Relations
Serves and depends on
Runs
0 runs
No runs
Nothing has run on this change set.
History
Lifecycle
- Proposed
- Accepted
- Landed