From mst
Pops exactly one action from Gran Maestro workflow queue (.gran-maestro/pending.ndjson), executes the skill with original args, completes or fails it, then exits. Re-entrant entrypoint for mst-loop.
npx claudepluginhub myrtlepn/gran-maestro --plugin mstThis skill uses the workspace's default tool permissions.
**목적**: `.gran-maestro/pending.ndjson` queue에서 다음 action을 하나 pop하여 해당 스킬을 호출한다. 외부 wrapper(`scripts/mst-loop.sh`) 또는 `claude -p "/mst:resume"` 한 줄로 재진입할 수 있는 **단일 진입점**. 세션 교차/재진입/동시 세션에서 디스크 상태(queue)만 보고 다음 action을 결정한다.
Recovers incomplete Claude Code workflows from .gran-maestro snapshots, resumes from last phase, and cleans orphan git worktrees. Activated by keywords like '복구' or /mst:recover.
Resumes interrupted Maestro sessions using existing active-session files and shared phase tracking. Use to continue multi-agent orchestration workflows after interruptions.
Relays interactive workflow execution via memento-workflow MCP server: starts workflows, shows status lines, handles ask_user and prompt actions, submits results in a continuous loop until done.
Share bugs, ideas, or general feedback.
목적: .gran-maestro/pending.ndjson queue에서 다음 action을 하나 pop하여 해당 스킬을 호출한다. 외부 wrapper(scripts/mst-loop.sh) 또는 claude -p "/mst:resume" 한 줄로 재진입할 수 있는 단일 진입점. 세션 교차/재진입/동시 세션에서 디스크 상태(queue)만 보고 다음 action을 결정한다.
.gran-maestro/pending.ndjson queue에서 정확히 한 개의 action만 pop하여 실행한다.auto 필드와 args 내 -a 플래그를 그대로 사용한다. 재판단 금지.resume 경로는 queue entry를 SSoT로 사용합니다. plan.json 또는 tmp/mst-state-{PPID}.json의 next_action.auto_mode 등을 fallback으로 읽어 args를 재조합하지 않습니다. 자율 모드 의도는 enqueue 시점에 queue entry의 auto 필드와 args 내 -a 토큰으로 함께 표현되어야 하며, 이 불변 계약은 scripts/mst_cmds/_common.py::queue_enqueue가 강제합니다 (REQ-639 T01 참조).
complete 또는 fail로 queue 상태를 확정한 뒤 정상 종료한다.args를 수정/재조합하여 Skill 호출queue pop 호출은 정확히 1회.모든 응답의 첫 줄에 아래 마커를 출력한다.
[MST skill=resume step={N}/5 return_to=null][MST skill=resume step=1/5 return_to=null]경로 규칙 (MANDATORY): 이 스킬의 모든
.gran-maestro/경로는 절대경로로 사용합니다. 스킬 실행 시작 시PROJECT_ROOT를 취득하고, 이후 모든 경로에{PROJECT_ROOT}/접두사를 붙입니다.PROJECT_ROOT=$(pwd)
{PLUGIN_ROOT}는 이 스킬의 "Base directory"에서skills/{스킬명}/을 제거한 절대경로입니다. 상대경로(.claude/...)는 절대 사용하지 않습니다.
현재 큐의 머리 entry를 확인한다. 상태를 변경하지 않는다.
python3 {PLUGIN_ROOT}/scripts/mst.py queue peek --json
null 또는 빈 객체: "queue empty — nothing to resume" 알림 후 즉시 종료 (정상 exit).action = {id, skill, args, source_skill, source_id, auto, resource_id, ...} 보관.python3 {PLUGIN_ROOT}/scripts/mst.py queue pop --json
running으로 전이되고 consumed_at 기록됨.id가 일치하는지 확인. 일치하지 않으면 (다른 세션이 중간에 pop) warn 출력 후 재진입 권장 종료.action.skill 필드에 해당하는 Skill 도구를 호출한다. args는 원본 그대로 전달한다 (재조합/수정 금지).
Skill(skill: "{action.skill}", args: "{action.args}")
예시:
action.skill == "mst:request" → Skill(skill: "mst:request", args: "--plan PLN-437 -a")action.skill == "mst:approve" → Skill(skill: "mst:approve", args: "-a REQ-584")action.skill == "mst:agile" → Skill(skill: "mst:agile", args: "--resume AGI-010 -a")AUTO_MODE / -a 전파 규칙:
auto: true이면 args에 -a 또는 --auto가 이미 포함되어 있어야 한다 (enqueue 시점에 호출측이 기록).auto 필드를 재판단하거나 args에 -a를 추가하지 않는다 — 원본 그대로 전달한다.args의 -a를 감지하여 AUTO_MODE를 활성화한다 (기존 스킬 프로토콜 그대로).Step 3의 Skill 호출 결과를 기준으로 queue 상태를 확정한다.
성공 시:
python3 {PLUGIN_ROOT}/scripts/mst.py queue complete --id {action.id} --result "ok" --json
실패 시 (Skill 호출 중 예외 또는 하위 스킬이 명시적 실패 반환):
python3 {PLUGIN_ROOT}/scripts/mst.py queue fail --id {action.id} --error "{요약 메시지}" --json
running 상태로 남아 다음 iteration이 처리할 수 없다.[resume] completed action {id} ({action.skill}) 또는 [resume] failed action {id}: {error}# 무한 루프 (wrapper가 queue count=0 감지 시 break)
bash scripts/mst-loop.sh
# 또는 사용자가 직접 한 번만 호출
claude --dangerously-skip-permissions -p "/mst:resume"
fcntl.flock으로 queue 파일 자체의 원자성은 보장되지만, "동일 REQ에 대해 두 세션이 각각 pop해서 동시 실행" 같은 도메인 레벨 직렬화는 Phase 3에서 lease manager로 해결 예정.fcntl.flock은 로컬 파일시스템에서만 안정. NFS/네트워크 FS는 미지원.Skill() 체이닝은 그대로 작동한다. queue + resume은 외부 재진입 경로이며 인라인 경로를 대체하지 않는다.