一键导入
merge-readiness
Post-task merge readiness gate with a state-backed explanation report and human explainability quiz
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Post-task merge readiness gate with a state-backed explanation report and human explainability quiz
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Install or refresh oh-my-claudecode for plugin, npm, and local-dev setups from the canonical setup flow
Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly
Claude-Codex-Gemini tri-model orchestration via /ask codex + /ask antigravity (or gemini), then Claude synthesizes results
OMC agent catalog, available tools, team pipeline routing, commit protocol, and skills registry. Auto-loads when delegating to agents, using OMC tools, orchestrating teams, making commits, or invoking skills.
CLI-team runtime for claude, codex, gemini, antigravity, grok, or cursor workers in tmux panes when you need process-based parallel execution
N coordinated agents on shared task list using Claude Code implicit agent teams
基于 SOC 职业分类
| name | merge-readiness |
| aliases | understanding-gate |
| description | Post-task merge readiness gate with a state-backed explanation report and human explainability quiz |
| argument-hint | [--quick|--standard|--deep] [--from-diff|--from-artifacts] <change summary or artifact path> |
<Use_When>
<Do_Not_Use_When>
/deep-interview/ralph, /team, or /autopilot/review or the relevant review workflow
</Do_Not_Use_When><Why_This_Exists> Real delivery is not only code that works. Teams need to understand why a change exists, what changed, what was deliberately not done, which risks were considered, and what future maintainers should believe about the change. This workflow makes that understanding explicit before merge approval is requested. Passing this gate never means the change is approved or merged; it only means a human can explain it. </Why_This_Exists>
<Depth_Profiles>
--quick): small/local changes; correctness threshold >= 0.70; max 3 MCQs; required dimensions: why / change / risk--standard, default): normal feature/bugfix; correctness threshold >= 0.80; max 5 MCQs; required dimensions: why / change / tradeoff / risk / team--deep): high-risk, architectural, security, or cross-module changes; correctness threshold >= 0.90; max 8 MCQs (redundancy across all five dimensions)If no flag is provided, use Standard. Thresholds and round counts are canonical in src/hooks/merge-readiness/mcq.ts and must stay in sync with this file.
</Depth_Profiles>
<Execution_Policy>
paused and do not claim merge readiness.blocked..omc/state/merge-readiness-state.json (session-scoped under .omc/state/sessions/<sessionId>/). Do not write this file directly.checkMergeReadiness) is not wired to the Stop hook, so an active gate does not block the session. It does not perform or approve a Git merge.
</Execution_Policy>{{ARGUMENTS}}, depth profile, source mode (--from-diff|--from-artifacts), and derive a task slug. --from-pr is unsupported; this workflow uses local evidence only.test|spec|qa|verify|validation)review|risk|security|readiness|verdict).omc/plans/, .omc/specs/, .omc/interviews/, .omc/artifacts/, .omc/logs/, and relevant mode state artifacts (canonical {mode}-state.json files under .omc/state/ that record a real run)Call the merge_readiness_start tool with the change summary to seed state (the runtime parses the --quick/--deep profile (--standard is the default when neither flag is present; it is not a parsed token)). State shape:
{
"active": true,
"current_phase": "merge-readiness",
"phase": "content",
"profile": "standard",
"threshold": 0.80,
"max_rounds": 5,
"required_dimensions": ["why", "change", "tradeoff", "risk", "team"],
"questions": [],
"answers": [],
"awaiting_content": true,
"readiness_score": 0,
"result": "pending"
}
awaiting_content is true until the AI submits the generated doc + MCQs via merge_readiness_set_content.
Generate, from the actual diff + evidence (not templates):
correctOptionId + optional rationale):
Submit them with merge_readiness_set_content (requires an active gate from merge_readiness_start; it errors if no gate is active). Do not write the state JSON or invoke internal runtime functions. Invalid content is rejected with recoverable validation errors. The validated content is persisted in the authoritative session state.
Use merge_readiness_report to render the five sections, evidence, quiz progress, readiness, and merge boundary directly from state. It is read-only and does not create a file. Correct answers and rationales remain hidden until the attempt is complete; cancellation or override reveals only answered questions.
The Merge Boundary must say: "Passing means the human can explain the change. It does not approve merge, replace tests, replace review, or accept risk."
/merge-readiness --override <reason> is accepted only when the MCP server launcher injects an authenticated principal in OMC_MERGE_READINESS_AUTHENTICATED_PRINCIPAL and includes that exact principal in the comma-separated OMC_MERGE_READINESS_MAINTAINERS allowlist. The caller-provided session_id selects the state record only; it is never override authority and is not recorded as override_owner.
Present each MCQ one-per-round via AskUserQuestion with the option ids/text as choices, then record the human’s selection with the merge_readiness_record_answer tool (questionId + optionId). The runtime scores it objectively and either advances to the next question or finalizes the gate (pass / paused / blocked).
Cover these dimensions before passing (quick = why/change/risk only):
Forbidden question types:
The runtime computes:
readiness_score = correctness rate = (correct answers) / (answered answers), in [0, 1]Gate results:
pass: all required MCQs answered AND correctness rate >= threshold AND required dimensions coveredpaused: all required MCQs answered but correctness rate below threshold (or required dimension uncovered)blocked: missing minimal evidence (no diff/change signal)Thresholds: quick 0.70 / standard 0.80 / deep 0.90.
Persist these fields in the terminal session state and inspect them with merge_readiness_report:
If pass:
If paused:
/merge-readiness.If blocked:
<Tool_Usage>
merge_readiness_start to initialize the gate, merge_readiness_set_content to submit the report + MCQs, merge_readiness_record_answer to record each selection, and merge_readiness_report to render the current audit record. Use state read/status/clear only for .omc/state/merge-readiness-state.json; never use generic state write to submit quiz content. state_clear routes merge-readiness through cancellation and preserves terminal state; pass the current session_id to avoid cancelling concurrent quizzes.
</Tool_Usage><Escalation_And_Stop_Conditions>
cancelled state and stop.blocked.paused.pass.
</Escalation_And_Stop_Conditions><Final_Checklist>
pass, paused, blocked, overridden, or cancelled/deep-interview
-> /omc-plan or /ralplan
-> /ralph, /team, or /autopilot
-> /ultraqa and review
-> /merge-readiness
-> human merge approval
Autopilot may call this workflow after QA/validation when configured:
{
"autopilot": {
"mergeReadiness": true
}
}
autopilot.understandingGate is a deprecated compatibility alias for autopilot.mergeReadiness.
Task: {{ARGUMENTS}}