native macOS codings agent orchestrator prowl.onev.cat
Something went wrong. Try again.
3.3 kB
Markdown
063.003 — Anchored Split and prowl create pane (A1) #
Context #
Release R1 needs deterministic split creation for both direct CLI orchestration and the profile launch boundary in A2. The terminal already split a supplied surface for Ghostty actions, but that path returned only a Boolean; the CLI had no pane-creation leaf under the action-first lifecycle grammar.
Change #
WorktreeTerminalState.createSplit(of:direction:initialInput:additionalEnvironment:focusing:)resolves an explicit anchor, returns the created surface UUID, and reports typedSplitCreationErrorfailures.- Existing focused-surface and Ghostty action paths delegate to that primitive.
prowl create pane <pane> --direction right|left|up|downaccepts a pane UUID or currentpN;upmaps to the terminal layer's.topdirection.- The lifecycle handler receives a dedicated
createPaneprovider. The app splits the resolved anchor before changing worktree or tab selection, so mutable UI focus cannot retarget creation. prowl.cli.create.v1remains additive: pane responses includeresource, the resolvedanchor, publicdirection, and createdtarget; tab responses remain unchanged.- Parser, handler, socket/schema, terminal-layer, contracts, user manual, and bundled skill coverage ship together.
Decisions #
- Pane creation inherits the anchor through Ghostty's existing split-surface configuration path; A1 does not add command execution or profile launch behavior.
- The provider selects the created pane only after direct anchored creation succeeds. This preserves normal focused-result behavior without using focus as an input to targeting.
- Bare numeric handles are rejected for the new pane anchor. Only UUIDs and explicit
pNhandles participate in this pane-only grammar. - The anchor stays explicit (review decision 2026-08-22): no caller-pane default, so an unset shell variable fails with
INVALID_ARGUMENTinstead of silently splitting the caller's own pane. Agent self-identification is delivered separately through a per-panePROWL_PANE_IDenvironment variable (its own R1 slice in release-plan.md). - Creating beside a non-visible anchor selects the anchor's worktree and tab, mirroring
create tab; a background placement is deferred to A2's launchplacement. - The
anchorpayload is the pre-split resolution snapshot, so itsfocused/selectedflags describe the state before creation.
Verification #
- Terminal and lifecycle handler suites: 12 tests passed; their RED runs first failed on the missing anchored primitive and pane provider/wire types.
- Parser suite: 5 tests passed; focused create socket/schema coverage: 3 tests passed.
make checkpassed.make build-cliandmake test-cli-smokepassed;make test-cli-integrationpassed 79 tests.make testverified 2,371 tests with zero failures; five dependency-scan warnings remain pre-existing.make build-apppassed with zero warnings and errors.- Live Debug verification created an
upsplit through an isolated socket, confirmed the response anchor/direction/new UUID and list visibility, then closed the created pane successfully.
Refs #
- Slice: 063-A1
- Branch:
feat/cli-create-pane - Issue: #699
- PR: #710