maestro-fork

SkillDev tools

Create or sync session worktree for parallel dev

Use maestro-fork in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add maestro-fork and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the maestro-fork skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

maestro-forkStart free

What this skill tells your AI

The instructions your AI receives, as published by catlog22/maestro-flow in .codex/skills/maestro-fork/SKILL.md and read by Ahel’s review.

<required_reading> @/.maestro/workflows/run-mode.md @/.maestro/workflows/codex-run-mode.md </required_reading>

<deferred_reading>

Terminology: this command uses 'session' throughout. The underlying workflow file (fork.md) may use 'milestone' as a legacy alias for 'session'. Treat them as equivalent: --session maps to workflow's -m, state.json.sessions[] maps to state.json.milestones[].

--base <ref>: git ref (branch, tag, or commit hash) to fork from. Default: HEAD.

Modes (Fork / Sync), flags (--session, --base, --sync), session resolution, worktree layout, and artifact scoping are defined in workflow fork.md.

Fork and sync algorithm steps are defined in workflow fork.md.

Gates (MANDATORY, BLOCKING)

Fork mode:

GATE 1: Validation → Worktree Creation

  • REQUIRED: Session resolved from state.json.sessions[] by session_id or intent slug.
  • REQUIRED: No existing active worktree for this session (E008).
  • REQUIRED: Not running inside a worktree (E003).
  • BLOCKED if: session not found (E006), already forked (E008), or running inside worktree (E003).

GATE 2: Worktree Creation → Artifact Copy

  • REQUIRED: Git worktree created with branch (session/{slug}).
  • REQUIRED: Shared .workflow/ files copied (project.md, config.json, specs/).
  • BLOCKED if missing: worktree creation failed or shared files not copied — do not proceed to artifact scoping.

GATE 3: Artifact Copy → Completion

  • REQUIRED: request_user_input confirmation before registry writes — show session scope, worktree path, and state entries to be written. User must confirm or abort.
  • REQUIRED: worktree-scope.json written with session scope (after confirmation).
  • REQUIRED: Scoped state.json written (only this session's data) (after confirmation).
  • REQUIRED: worktrees.json registry updated in main worktree (after confirmation).
  • BLOCKED if missing: scope marker, scoped state, or registry update absent — worktree is unusable without these.

Sync mode:

GATE: Sync → Completion

  • REQUIRED: Git merge main into worktree branch completed.
  • REQUIRED: Shared artifacts re-copied.
  • BLOCKED if: merge has unresolved conflicts or shared artifacts failed to copy.
ConditionSuggestion
Fork completecd {wt.path}, then route step analyze through /maestro-next or the canonical receipt-chained session open -> session chain insert --command analyze --arg "<goal>" -> run next flow
Fork + automatedmaestro delegate "run full lifecycle for session" --cd {wt.path} --mode write
Sync completeResume work in worktree
Sync conflicts foundResolve manually, then retry

<error_codes>

CodeSeverityConditionRecovery
E001errorProject not initializedRun maestro-init first
E002errorNo roadmap foundRoute step roadmap through /maestro-next or the canonical receipt-chained self-start flow
E003errorRunning inside a worktreeRun from main worktree
E004errorNo session ID providedProvide --session <session_id>
E005errorNo sessions defined in state.jsonRoute step roadmap through /maestro-next or the canonical receipt-chained self-start flow
E006errorSession not found in state.json.sessions[]Check available sessions
E007errorNo active worktree for session (--sync)Check worktrees.json
E008errorSession already has active worktreeMerge or cleanup first
</error_codes>

<success_criteria> Fork mode:

  • Session resolved from state.json.sessions[]
  • Git worktree created with branch (session/{slug})
  • Shared .workflow/ files copied (project.md, config.json, specs/)
  • Session artifacts copied (matched by session/milestone name from workflow)
  • worktree-scope.json written with session scope
  • Scoped state.json written (only this session's data)
  • worktrees.json registry updated in main worktree
  • Session lifecycle recorded in worktrees.json registry (fork_sessions entry)
  • Summary displayed with next-step commands

Sync mode:

  • Git merge main into worktree branch
  • Shared artifacts re-copied (project.md, config.json, specs/)
  • Conflicts reported if any </success_criteria>

Signals

GitHub stars
560
Forks
68
Last commit
Sep 2026
Advanced
Item type
skill
Key
maestro-fork
Source
github.com/catlog22/maestro-flow