en un clic
maestro-merge
Merge session worktree branch back to main
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Merge session worktree branch back to main
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Default interactive entry for development intents — score intent + project state, recommend one atomic step, execute after confirmation. Multi-step intents: stepwise, user-confirmed manual-engine chain, or hand off to /maestro. Never auto-orchestrates
Adaptive lifecycle orchestrator — compose, dispatch ralph-executor agent, evaluate decision, loop
Auto-route intent to optimal command chain — default multi-step closed-loop orchestration; for stepwise interactive execution use /maestro-next
ACO swarm intelligence with modular Workflow composition and adversarial decision gates. Coordinator drives iteration loop; 4 composable Workflow scripts handle exploration, scoring, convergence, and synthesis — each with built-in adversarial patterns.
Unified team skill for architecture optimization. Uses team-worker agent architecture with role directories for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team arch-opt".
Unified team skill for brainstorming team. Uses team-worker agent architecture with role directories for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team brainstorm".
| name | maestro-merge |
| description | Merge session worktree branch back to main |
| argument-hint | --session <session_id> [--force] [--dry-run] [--no-cleanup] [--continue] |
| allowed-tools | ["AskUserQuestion","Bash","Edit","Glob","Grep","Read","Write","teammate"] |
| session-mode | run |
| contract | null |
<required_reading> @~/.maestro/workflows/run-mode.md </required_reading>
Merge a session worktree branch back into main, sync Run artifacts, and reconcile the artifact registry. Two-step: git merge first, artifact sync second (only after git succeeds). $ARGUMENTS -- session ID (or slug) and optional flags.Flags (--session, --force, --dry-run, --no-cleanup, --continue), merge sequence, artifact sync detail, and conflict handling are defined in workflow merge.md.
GATE 1: Pre-merge → Git Merge
GATE 2: Git Merge → Artifact Sync
GATE 3: Artifact Sync → Completion
sessions/{session_id}/runs/.After successful merge, use AskUserQuestion to confirm knowledge persistence:
question: "Merge 完成。是否记录本次工作经验教训?"
options:
- label: "记录经验"
description: "通过 spec add 持久化此次工作的关键洞察"
- label: "跳过"
description: "不记录,直接完成"
User selects "记录经验" → prompt for title/insight, then persist via Skill("spec", "add learning \"<title>\" \"<insight>\" --keywords <kw1>,<kw2> --description \"<summary>\""). User selects "跳过" → proceed to next-step routing.
| Condition | Suggestion |
|---|---|
| Merge complete | Skill({ skill: "manage", args: "status" }) |
| Next dep-ready session | step analyze for session (maestro run prepare --platform pi analyze --session {next-dep-ready-slug} + maestro run create analyze --session {next-dep-ready-slug} --intent "{goal}") |
<error_codes>
| Code | Severity | Condition | Recovery |
|---|---|---|---|
| E001 | error | Running inside a worktree | Run from main worktree |
| E002 | error | No worktree registry found | Nothing to merge |
| E003 | error | --continue but no merge state | Start fresh merge |
| E004 | error | No session ID provided | Provide --session <session_id> |
| W001 | warning | Stale registry entries found | Auto-cleaned |
| W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
| W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
| </error_codes> |
<success_criteria>
sessions/{session_id}/runs/worktrees.json registry updated (entry removed)
</success_criteria>