본문으로 건너뛰기
cccskills
무료GitHub에 공개

maestro-merge

Merge session worktree branch back to main

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

<purpose> 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). </purpose> <context> $ARGUMENTS -- session ID (or slug) and optional flags.

Terminology: this command uses 'session' throughout. The underlying workflow file (merge.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[].

Flags (--session, --force, --dry-run, --no-cleanup, --continue), merge sequence, artifact sync detail, and conflict handling are defined in workflow merge.md. </context>

<execution> Follow '~/.maestro/workflows/merge.md' completely.

--dry-run short-circuit: execute GATE 1 health check only, display merge preview (files that would change, artifact sync plan), then EXIT before rebase/merge. GATE 2 and GATE 3 are not reached.

Gates (MANDATORY, BLOCKING)

GATE 1: Pre-merge → Git Merge

  • REQUIRED: Registry health check completed (stale entries cleaned or flagged).
  • REQUIRED: Pre-merge rebase successful (worktree has latest main).
  • REQUIRED: worktree state.json schema version matches main state.json version. If mismatch → W004 (suggest running maestro-update in worktree first).
  • BLOCKED if rebase has conflicts: resolve in worktree first (W003).

Note on --force: skips user confirmation for incomplete phase artifacts (W002). Does NOT skip conflict resolution or rebase. Specifically: GATE 1 and GATE 2 are unaffected by --force; GATE 3's artifact completeness check uses --force to bypass the W002 confirmation.

GATE 2: Git Merge → Artifact Sync

  • REQUIRED: Git merge completed without conflicts (or conflicts resolved via --continue).
  • BLOCKED if: merge has unresolved conflicts — do NOT sync artifacts until git merge succeeds (prevents partial state corruption).

GATE 3: Artifact Sync → Completion

  • REQUIRED: All Run artifacts synced to main sessions/{session_id}/runs/.
  • REQUIRED: Artifact registry reconciled (worktree entries merged into main).
  • REQUIRED: Worktree cleaned up OR --no-cleanup flag present.
  • BLOCKED if missing: artifacts not synced or registry not reconciled — main worktree would have incomplete state.
</execution> <completion> ### Knowledge inquiry

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.

Next-step routing

ConditionSuggestion
Next dep-ready sessionroute step analyze through /maestro-next or the canonical receipt-chained session open -> session chain insert --command analyze --arg "<goal>" -> run next flow
</completion>

<error_codes>

CodeSeverityConditionRecovery
E001errorRunning inside a worktreeRun from main worktree
E002errorNo worktree registry foundNothing to merge
E003error--continue but no merge stateStart fresh merge
E004errorNo session ID providedProvide --session <session_id>
W001warningStale registry entries foundAuto-cleaned
W002warningIncomplete artifacts (without --force)Confirm or use --force
W003warningConflict pulling main into worktreeResolve in worktree first
W004warningSchema version mismatch between worktree and mainRun maestro-update in worktree before merge
</error_codes>

<success_criteria>

  • Registry health check passed (stale entries cleaned)
  • Pre-merge rebase successful (worktree has latest main)
  • Git merge completed without conflicts (or conflicts resolved via --continue)
  • All Run artifacts synced to main sessions/{session_id}/runs/
  • Artifact registry reconciled (worktree entries merged into main)
  • Session lifecycle updated (forked_from cleared)
  • Worktree removed and branch deleted (unless --no-cleanup)
  • worktrees.json registry updated (entry removed)
  • worktree-scope.json removed from worktree (even with --no-cleanup, to prevent stale scope detection) </success_criteria>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

maestro

무료

Intent-to-chain planner over the canonical Session/Run lifecycle

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

Quick execution for small tasks — minimal run lifecycle (start + done) with evidence recording. Full LLM capability, scoped to mechanically clear tasks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

Create or sync session worktree for parallel dev

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

Manage editing boundary restrictions

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

Maestro Flow 命令帮助系统。搜索命令、浏览技能、工作流推荐、新手引导。Triggers on "maestro-help", "帮助", "命令", "怎么用", "skill", "workflow", "maestro 怎么用".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

Use when designing, reviewing, refining, fixing, or codifying frontend UI with Maestro's self-contained Impeccable core

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

catlog22/maestro-flow5662026년 10월 15일 업데이트

catlog22의 스킬 모두 보기

이 스킬의 문제 신고