Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage a v3 Session — inspect status/resume-view, review knowledge candidates, complete, archive/unarchive
.claude/skills/catlog22-maestro-session-manage/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 279% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 234% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 119% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 186% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 206% | 0% |
<required_reading> @~/.maestro/workflows/run-mode.md @~/.maestro/workflows/codex-run-mode.md </required_reading>
If any required file above was not expanded into context by the host, or its content is no longer in context, Read it explicitly before executing any step.
<purpose> Manage the lifecycle of a v3 Session (session/3.0) through its read-only projections, knowledge governance, and explicit lifecycle transitions.
Session completion (maestro session complete) is part of the default Run loop — Ralph S_DONE, the orchestrator run loop, and Companion all execute it when the chain turns terminal. This command is the management surface: inspection, knowledge candidate review/promotion, and the explicit transitions the default loop does not perform (--complete for manual pipelines, --archive/--unarchive for optional freezing).
Run completion already stages accepted decisions, locked constraints, and explicit maestro knowledge stage entries. This command reviews those receipts; it does not re-extract the same artifacts or write project knowledge through a second path. </purpose>
<context> $ARGUMENTS -- optional session ID and action flags.
Actions (first match wins; default = inspect): | Flag | Effect | |------|--------| | (none) | Inspect: session status + session resume-view projection | | --complete | Readiness check → knowledge reconciliation → fenced maestro session complete → DAG progression | | --archive | Fenced maestro session archive (only from completed/failed; optional freeze) | | --unarchive | Fenced maestro session unarchive (only from archived; returns to open) | | --knowledge | Knowledge review/promotion only — no lifecycle mutation |
Shared flags: | Flag | Effect | Default | |------|--------|---------| | --session <id> | Target session (slug or full ID) | active_session_id | | -y / --yes | Auto mode — skip confirmations | false | | --skip-knowledge | With --complete: leave candidate backlog pending | false | </context>
<v3_lifecycle_reference>
open ──complete──> completed ──archive──> archived ──unarchive──> open
│
└──fail──> failed ──archive──> archived
Permissions: open = all mutations; completed/failed/archived = none.--complete requires: no running Run, every chain step completed/skipped with evidence, no open decision gate (escalated gates pass as recorded concerns).--archive is optional: a completed Session identity stays durable either way; archived Sessions cannot host new Runs until --unarchive.run-response/1.2 envelope with an immutable transition receipt; never edit runtime-owned protocol JSON.</v3_lifecycle_reference>
<execution>
--session flag or active_session_idmaestro session status --session {session_id} --json — capture status, orchestration_revision, activity_revision, active_run_idsmaestro session status --session {session_id} --json and maestro session resume-view --session {session_id} --jsonopenDecisions from the ResumeMap), pending publications, and nextActionsmaestro run decide; active runs → let the Run loop finish; completed → offer --archive; archived → offer --unarchive; open with terminal chain → offer --complete--complete) — manual-pipeline terminal stepNote: maestro-next suggests --complete when 'Tests green + active session'. Orchestrated flows (Ralph/orchestrator/Companion) complete the Session themselves; use this action only when driving the pipeline manually.
2a. Readiness check
open (a completed/archived Session needs no completion; archived requires --unarchive first)active_run_ids empty; all runs sealed)session status → decisions[]; open gates block session complete with DECISION_GATE_BLOCKED). If open gates exist → run maestro run decide <point> --verdict proceed|fix firstreview step first")2b. Knowledge reconciliation (skip to 2c with --skip-knowledge)
maestro knowledge review {session_id} --json. Treat its Run ledgers, reconciliation policies, diversified matches, and candidate IDs as authoritative; do not rescan outputs to recreate candidates. Use --refresh only when the review reports missing or stale source receiptscited, validated, and contradicted are explicit Run relationsreview_required candidates cannot be promoted--skip-knowledge, report the pending/promoting/review-required/suppressed counts and continue. The backlog and reconciliation receipts remain durable after completionmaestro knowledge review {session_id} --resolve <candidate-id> --as duplicate|related|conflict|supersede|unique [--target <knowledge-id>] --reason "<reason>". A target must come from that candidate's evidence-backed matchesrequest_user_input: question: "以下知识候选项值得晋升到项目知识库吗?" options:
maestro knowledge promote {session_id} --allmaestro knowledge promote {session_id} --candidate <candidate-id> for each selection (comma-separated compatibility remains supported)-y may run --all, which promotes all eligible candidates (observed-only emits a warning) and skips review-required and suppressed candidates. It MUST NOT auto-resolve a candidate without explicit user selection--as supersede and then promote it; promotion creates the successor and links the evolution chain. For coexisting valid rules, confirm related or conflict as appropriate. Never direct-write a candidate that was already promoted successfully2c. Complete the Session
orchestration_revision captured in Step 0 (re-read if any mutation happened since)maestro session complete command from run-mode.md, supplying the exact session_id, --actor, --expected-orchestration-revision, and --json2d. DAG progression
state.json.sessions[] — find sessions that became dep-ready (all depends_on sealed) question: "Session {slug} 已完成。推荐激活下一个 session: {next-slug},是否确认?" options:
active_session_id to selected session--archive) — optional freezecompleted or failed (an open Session must --complete or fail first; archived is already archived)orchestration_revision:maestro session archive --session {session_id} --actor {actor_id} [--evidence <ref> ...] --expected-orchestration-revision {orchestration_revision} --json
run-response/1.2 receipt (status: archived, revision incremented). Archived Sessions reject all mutations (create_run/advance_chain/transition_run/add_evidence/decide) until --unarchive--unarchive) — return to openarchivedmaestro session unarchive --session {session_id} --actor {actor_id} [--evidence <ref> ...] --expected-orchestration-revision {orchestration_revision} --json
status: open). The Session accepts Runs and chain mutations again; extend it with maestro session chain insert ... and maestro run next--knowledge)Run Step 2b (Knowledge reconciliation) without any lifecycle mutation. Leave the Session status unchanged.
</execution>
<completion>
=== SESSION {ACTION RESULT} ===
Session: {session_id}
Action: {inspect|complete|archive|unarchive|knowledge}
Status: {open|completed|archived|failed} (orchestration_revision {n})
Knowledge: {promoted_count} promoted, {pending_count} pending, {review_required_count} review required, {suppressed_count} suppressed
Next dep-ready: {next_slug or "none (DAG complete)" or "n/a"}
--- STATUS ---
Status: DONE| Condition | Suggestion | |-----------|-----------| | Next session activated | route step analyze through /maestro-next or the canonical receipt-chained session open -> session chain insert --command analyze --arg "<goal>" -> run next flow | | Session archived, later extension needed | maestro-session-manage --session {session_id} --unarchive | | Knowledge candidates pending | maestro knowledge review {session_id} | | Knowledge health review needed | /maestro-knowledge audit | </completion>
<error_codes> | Code | Severity | Condition | Recovery | |------|----------|-----------|----------| | E001 | error | Session not found | Check state.json.sessions[] / maestro session list --json | | E002 | error | Session already completed / archived | Nothing to do; use inspect or --unarchive | | E003 | error | Active runs exist | Complete or seal pending runs first | | E004 | error | Critical gates failed | Run verify/review to resolve | | E005 | error | ORCHESTRATION_REVISION_CONFLICT on archive/unarchive | Re-read session status, retry with fresh revision and new request-id | | E006 | error | Open decision gate blocks session complete | maestro run decide <point> --verdict proceed\|fix | | W001 | warning | No knowledge candidates found | Proceed | | W002 | warning | No verify/review run in session — gate check skipped | Consider running verify before completing | | W003 | warning | Candidate backlog left pending | Review later with maestro knowledge review {session_id} | | W004 | warning | Reconciliation review remains unresolved | Completion may continue; promotion stays blocked until maestro knowledge review --resolve | </error_codes>
<success_criteria>
session status before any mutationopen; archive only from completed/failed; unarchive only from archived)maestro knowledge review (or deliberately skipped)maestro knowledge promote--actor, --expected-orchestration-revision, --json) and the transition receipt was verified--complete)</success_criteria>
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 8,714 | 8,871 | +2% | 1 | 1 | 0% | 703 | 3,399 | +383% | 0 | 0 | — |
case-02 | fail→fail | 19,160 | 13,136 | -31% | 1 | 1 | 0% | 2,371 | 3,615 | +52% | 0 | 0 | — |
case-03 | fail→fail | 21,408 | 7,513 | -65% | 1 | 1 | 0% | 2,289 | 3,356 | +47% | 0 | 0 | — |
case-04 | fail→pass | 17,823 | 14,291 | -20% | 1 | 1 | 0% | 1,267 | 4,804 | +279% | 0 | 0 | — |
case-05 | pass→pass | 9,843 | 7,537 | -23% | 1 | 1 | 0% | 1,420 | 4,300 | +203% | 0 | 0 | — |
case-06 | fail→pass | 8,956 | 11,115 | +24% | 1 | 1 | 0% | 1,434 | 4,791 | +234% | 0 | 0 | — |
case-07 | fail→pass | 13,722 | 12,770 | -7% | 1 | 1 | 0% | 1,949 | 4,262 | +119% | 0 | 0 | — |
case-08 | fail→pass | 10,199 | 8,236 | -19% | 1 | 1 | 0% | 1,514 | 4,329 | +186% | 0 | 0 | — |
case-09 | fail→pass | 17,779 | 8,453 | -52% | 1 | 1 | 0% | 1,483 | 4,531 | +206% | 0 | 0 | — |
case-10 | fail→pass | 18,726 | 6,382 | -66% | 1 | 1 | 0% | 1,432 | 4,029 | +181% | 0 | 0 | — |
case-11 | fail→fail | 36,191 | 9,528 | -74% | 1 | 1 | 0% | 4,706 | 3,385 | -28% | 0 | 0 | — |
case-12 | fail→fail | 9,701 | 9,396 | -3% | 1 | 1 | 0% | 1,430 | 3,381 | +136% | 0 | 0 | — |
case-13 | fail→pass | 7,581 | 2,894 | -62% | 1 | 1 | 0% | 1,053 | 3,364 | +219% | 0 | 0 | — |
case-14 | pass→pass | 9,881 | 8,048 | -19% | 1 | 1 | 0% | 1,451 | 4,256 | +193% | 0 | 0 | — |
case-15 | fail→pass | 33,566 | 4,747 | -86% | 1 | 1 | 0% | 3,311 | 3,590 | +8% | 0 | 0 | — |
case-16 | fail→pass | 7,942 | 6,227 | -22% | 1 | 1 | 0% | 1,005 | 3,631 | +261% | 0 | 0 | — |
case-17 | fail→pass | 13,507 | 22,254 | +65% | 1 | 1 | 0% | 1,957 | 3,946 | +102% | 0 | 0 | — |
case-18 | fail→pass | 20,647 | 4,015 | -81% | 1 | 1 | 0% | 2,110 | 3,503 | +66% | 0 | 0 | — |
case-19 | pass→pass | 8,507 | 7,735 | -9% | 1 | 1 | 0% | 1,205 | 4,087 | +239% | 0 | 0 | — |
case-20 | fail→fail | 10,761 | 8,270 | -23% | 1 | 1 | 0% | 1,605 | 3,270 | +104% | 0 | 0 | — |
case-21 | fail→fail | 35,443 | 11,086 | -69% | 1 | 1 | 0% | 2,669 | 3,441 | +29% | 0 | 0 | — |
case-22 | pass→pass | 20,637 | 10,964 | -47% | 1 | 1 | 0% | 2,018 | 5,130 | +154% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 15 counted toward the lift figure. The other 7 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 15 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.