con un clic
maestro-merge
Merge session worktree branch back to main
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Merge session worktree branch back to main
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Manifest-driven knowledge asset generator — converts any structured package into maestro knowhow + spec entries with ref linking. Triggers on "codify-to-knowhow", "style to knowhow", "知识固化".
Check workflow delegation prompts against agent role definitions for content separation violations. Detects conflicts, duplication, boundary leaks, and missing contracts. Triggers on "check delegation", "delegation conflict", "prompt vs role check".
Adversarial review of code quality findings. Challenges insights with counter-evidence, verifies claims against source code, and produces structured verdicts. Triggers on 'insight-challenge', 'challenge finding', '审查发现'.
Quick execution for small tasks (≤1-2 files, no artifact handoff) — minimal run lifecycle (create + complete only) with evidence recording. Can read/write/run any tool, but scoped to tasks completable in a few actions. Not for multi-step workflows or tasks needing downstream gates
Create or sync session worktree for parallel dev
Manage editing boundary restrictions
Basado en la clasificación ocupacional SOC
| name | maestro-merge |
| disable-model-invocation | true |
| description | Merge session worktree branch back to main |
| argument-hint | --session <session_id> [--force] [--dry-run] [--no-cleanup] [--continue] |
| allowed-tools | ["Bash","Edit","Glob","Grep","Read","Write","followup_task","interrupt_agent","list_agents","request_user_input","send_message","spawn_agent","spawn_agents_on_csv","wait_agent"] |
| session-mode | run |
| contract | {"discovery":"self-described","consumes":[],"produces":[]} |
| version | 0.5.55 |
<required_reading>
@/.maestro/workflows/run-mode.md
@/.maestro/workflows/codex-run-mode.md
</required_reading>
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 request_user_input to confirm knowledge persistence:
question: "Merge 完成。是否记录本次工作经验教训?"
options:
- label: "记录经验"
description: "通过 maestro-spec add 持久化此次工作的关键洞察"
- label: "跳过"
description: "不记录,直接完成"
User selects "记录经验" → prompt for title/insight, then recommend /maestro-spec add learning "<title>" "<insight>" --keywords <kw1>,<kw2> --description "<summary>". User selects "跳过" → proceed to next-step routing.
| Condition | Suggestion |
|---|---|
| Merge complete | Recommend /maestro-manage status |
| Next dep-ready session | step analyze for session (maestro run prepare --platform codex 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>