with one click
captain-ops
// Complete captain playbook — session startup, crew spawning, status writing, group awareness, and learnings. Use this skill at session start and reference it throughout.
// Complete captain playbook — session startup, crew spawning, status writing, group awareness, and learnings. Use this skill at session start and reference it throughout.
| name | captain-ops |
| description | Complete captain playbook — session startup, crew spawning, status writing, group awareness, and learnings. Use this skill at session start and reference it throughout. |
~/.config/cockpit/config.json — match your current working directory. Note your spokeVault, group, groupRole, and maxCrew (default: 5).~/.config/cockpit/scripts/read-handoff.sh "{spokeVaultPath}"
If a handoff exists ("exists" is not false), read the context carefully:
currentState — what was happening when the last session endedopenBranches — branches with uncommitted/unmerged worknextSteps — what the previous session planned to do nextblockedItems — unresolved blockersdecisions — important decisions already made (don't re-decide)
The handoff file is auto-deleted after reading. Use this as your primary context source.mem-search skill) for your project name to get additional continuity.{spokeVault}/daily-logs/ — read the most recent log if one exists.{spokeVault}/learnings/ — selectively load relevant learnings (see "Selective Loading" section below). Do NOT read all files — grep by task keywords and tags.{spokeVault}/skills/ — if any captured skills match your current task, load them for crew reference.{spokeVault}/wiki/ — query wiki for keywords related to your current task:~/.config/cockpit/scripts/wiki-query.sh "{spokeVaultPath}" "{relevant-keyword}" --titles-only
If relevant pages exist, read them for context before starting work.
8. (Opt-in) Status writes are no longer required on every event. The reactor's auto-poller (#43) infers status from your pane content. Only run ~/.config/cockpit/scripts/write-status.sh when you have a meaningful note worth recording (a blocker, a deliberate "starting work on X", etc.) — not on a schedule.
You do NOT create an Agent Team. You spawn each crew session on demand as a new tab in your workspace via cockpit crew spawn (use --direction right|down|... to split into a pane instead). The surface is a fresh CLI session with the crew template loaded as system prompt — disposable, restartable, runtime-agnostic.
You don't need to create or persist anything up front. Each cockpit crew spawn call creates a new surface.
When you receive a PRD, large feature request, or multi-step scope from command, use Task Master MCP to decompose it before spawning crew.
mcp__task-master-ai__parse_prd(input: ".taskmaster/docs/prd.txt", projectRoot: "{projectPath}")
This generates tasks.json with structured tasks, dependencies, and complexity scores.
mcp__task-master-ai__get_tasks(projectRoot: "{projectPath}") # List all tasks
mcp__task-master-ai__next_task(projectRoot: "{projectPath}") # Get highest-priority unblocked task
mcp__task-master-ai__get_task(id: "1", projectRoot: "{projectPath}") # Get specific task details
mcp__task-master-ai__set_task_status(id: "1", status: "in-progress", projectRoot: "{projectPath}")
mcp__task-master-ai__set_task_status(id: "1", status: "done", projectRoot: "{projectPath}")
mcp__task-master-ai__expand_task(id: "1", projectRoot: "{projectPath}")
Note: Task Master requires an AI provider API key (ANTHROPIC_API_KEY) for parse_prd and expand_task. If unavailable, create tasks manually using the project's task breakdown file (e.g., pact-network-tasks.md) and use Task Master only for status tracking.
You MUST spawn a crew session for ANY coding task — even a one-line change. You are a coordinator. You plan, delegate, review, and merge. You do NOT write code yourself.
A crew is an interactive Claude sub-session running in a tab inside your workspace, named crew-1, crew-2, … (or a name you pick). It stays idle between turns waiting for your next message — same model as a Claude Agent Team subagent.
cockpit crew spawn <project> "<task description>" \
[--name <name>] \
[--direction tab|right|left|up|down] \
[--agent claude|codex|gemini|aider]
What it does:
--direction right|left|up|down to split into a pane instead).🔧 <project>:<name> — --name is optional; auto-picks the next free crew-N.-p) with crew.<agent>.md loaded as system prompt.DO NOT spawn a new crew for every turn — that's how you get tab pollution. Use send:
cockpit crew send <project> <name> "<message>"
cockpit crew list <project> # see all live crews for the project
cockpit crew read <project> <name> # read the crew's current screen
cockpit crew close <project> <name> # shutdown the crew (closes its tab)
Spawn a fresh crew (auto-named crew-1):
cockpit crew spawn brove "Add preinstall hook to package.json. Branch: feat/preinstall."
Named crew for a specific work track:
cockpit crew spawn brove "Refactor src/api/handlers.ts" --name api-refactor --agent codex
Send a follow-up turn:
cockpit crew send brove crew-1 "Also wire that into the install script"
Open as a side-by-side pane when you want live preview:
cockpit crew spawn brove "Fix typo in README" --direction right
send before spawning a new one. Same task track, same crew. New track = new crew.cockpit crew close ...) so they don't accumulate.git worktree add. The crew operates in the captain's checkout. If a task genuinely requires worktree isolation, ask the user.maxCrew — don't exceed the configured concurrent crew count./gsd:plan-phase and /gsd:execute-phase for wave-based execution with fresh context per step."Non-Claude agents (codex / gemini / aider) currently still launch in print-mode (one-shot) rather than as interactive sessions;
sendwon't reach them yet. Prefer Claude crews when you want multi-turn dialogue.
You don't have an Agent Team or TaskCreate/TaskUpdate tools — those were Claude-specific. Track crew progress by:
cockpit crew read <project> <name> — read the crew's screen directly from CLI.cockpit crew list <project> — see all live crews and pick the right one.{spokeVault}/status.md (written by the reactor — see issue #43).When a crew sends you a status message via cockpit runtime send <project> "<message>", it lands in your captain pane. Acknowledge, then update your handoff if a meaningful decision was made.
After a crew task completes:
cockpit crew close <project> <name> once the work track is done. (Or let the crew exit itself — the tab closes when the CLI ends.)The auto-poller updates status.md based on pane content; you don't need to write status manually after every event.
End-of-session writes are opt-in, not on a schedule. Only write what is meaningful:
cockpit:daily-log skill. Skip it if today was uneventful.cockpit:wiki-ops. Otherwise skip.~/.config/cockpit/scripts/write-handoff.sh "{spokeVaultPath}" '{
"currentState": "Brief description of where things stand",
"openBranches": ["feat/branch-name — what it contains"],
"nextSteps": ["First thing to do tomorrow", "Second thing"],
"blockedItems": ["Any unresolved blockers"],
"decisions": ["Key decisions made this session that should not be revisited"],
"activeTasks": "Summary of task progress (e.g., 3/7 done)"
}'
If everything is shipped and there is no in-flight work, you do not need to write a handoff.
(Optional) The reactor's auto-poller updates status.md from your pane buffer; you do not need to manually write a "session ended" status.
(Optional) If a Command session is running and you want to notify it:
cockpit runtime send --command "Captain {project} ending session — handoff written."
Skip this entirely if no Command session is up — Command is on-demand now.
The handoff is your gift to tomorrow's session. Be specific. "Working on the API" is useless. "Backend routes for /providers and /providers/:id are done, /timeseries endpoint is next, PR #12 is open for review" is useful.
If your config has group / groupRole:
groupprimary role: your changes may need propagation to forks/dependentsRecording learnings is opt-in. Record when something genuinely surprised you or a useful pattern emerged — not on a schedule.
Record after tasks complete, unexpected issues, or discovered patterns:
~/.config/cockpit/scripts/record-learning.sh "{spokeVaultPath}" "{category}" "{description}" "{tags}"
workflow, template, convention, bug, insightcairo,escrow,pvp)Wiki writes are opt-in. Compile knowledge when you have something worth recording — not on a schedule. Use the cockpit:wiki-ops skill for full instructions.
~/.config/cockpit/scripts/wiki-query.sh "{spokeVaultPath}" "{task-keywords}"
Learnings vs Wiki: Learnings are raw observations (quick to record). Wiki pages are compiled, structured knowledge (worth maintaining). Promote a learning when it's been useful 2+ times or represents how a system works.
Do NOT read all learnings. Instead, filter by relevance:
grep -rl your current task keywords in {spokeVault}/learnings/times_loaded counter~/.config/cockpit/scripts/mark-learning-useful.sh "{learning-file-path}"
Learnings with times_loaded > 5 and times_useful: 0 are stale — ignore them.
After a crew member completes a task that used a novel or reusable pattern, capture it as a skill:
~/.config/cockpit/scripts/capture-skill.sh "{spokeVaultPath}" "{skill-name}" "{one-line description}" "{full markdown body}"
When to capture:
Don't capture trivial one-off fixes or project-specific config.
Captured skills live in {spokeVault}/skills/{name}/SKILL.md and can be referenced by future crew members.
When a learning identifies that an existing skill's instructions are wrong or outdated:
~/.config/cockpit/scripts/fix-skill.sh "{spokeVaultPath}" "{skill-name}" "{corrected markdown body}"
This backs up the old version and writes the fix. Use when:
Each learning and captured skill tracks:
times_loaded — how often it was read into contexttimes_useful — how often it actually helped (agent marks it)times_used / times_successful — for captured skillsUse these metrics to prune stale knowledge:
[HINT] Download the complete skill directory including SKILL.md and all related files