ワンクリックで
clarify-spec
Full execution protocol for MODE: CLARIFY-SPEC -- resolving spec clarification markers and maintaining spec/planning alignment.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Full execution protocol for MODE: CLARIFY-SPEC -- resolving spec clarification markers and maintaining spec/planning alignment.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Guidelines and non-negotiable engineering invariants for modifying opencode-swarm. Load before architecture, plugin initialization, subprocess, tool registration, plan durability, .swarm storage, runtime portability, session/global state, guardrails/retry, chat/system message hooks, or release/cache changes. Authoritative source: AGENTS.md at the repo root and docs/engineering-invariants.md.
Per-task gate dispatch protocol. Documents single-task attribution plus parseable set-dispatch reviewer/test_engineer rows.
Codex adapter for monitoring and fixing CI failures on opencode-swarm PRs. Use when diagnosing failed checks, fixing `package-check` (npm tarball) failures, resolving quality/lint/format errors, fixing macOS cross-platform file I/O failures, or watching a PR until all checks are green.
Codex adapter for running a rigorous, quote-grounded codebase review or security/QA/accessibility/performance/AI-slop/enhancement audit. Use for full-repo or large-subsystem review reports; not for normal implementation.
Mandatory Codex/Copilot publication adapter for opencode-swarm. Use for every GitHub issue assignment that results in code changes, commits, pushes, draft PRs, PR body edits, PR readying, release notes, or CI closeout. Must be loaded before `git push`, `gh pr create`, `gh pr edit`, or `gh pr ready`. Routes to the single canonical source of truth at `.claude/skills/commit-pr/SKILL.md`.
Codex adapter for the opencode-swarm contribution checklist. Use when preparing user-visible changes, release note fragments, local validation, branch hygiene, PR checklist items, or contribution-policy compliance before publishing work.
| name | clarify-spec |
| audience | swarm-plugin |
| description | Full execution protocol for MODE: CLARIFY-SPEC -- resolving spec clarification markers and maintaining spec/planning alignment. |
This protocol is loaded on demand by the architect stub in src/agents/architect.ts. The architect prompt keeps only activation, action, and hard safety constraints; the full execution details live here.
Activates when: /swarm sdd status reports a single resolved EFFECTIVE spec (non-null) AND it contains [NEEDS CLARIFICATION] markers; OR user says "clarify", "refine spec", "review spec", or "/swarm clarify" is invoked; OR architect transitions from MODE: SPECIFY with open markers.
/swarm sdd status reflects readEffectiveSpecSync, which returns null (NO effective spec) for: no sources at all, multiple competing sources (e.g. openspec/ AND .specify/), multi-feature Spec-Kit without a selected feature, or any other unresolvable state. CLARIFY-SPEC does NOT activate in these null cases — tell the user: "No resolved effective spec exists. Disambiguate with /swarm sdd project --source <source> or --feature <feature>, or run /swarm specify to generate one first." and stop.
CONSTRAINT: CLARIFY-SPEC must NEVER create a spec. Always consult /swarm sdd status to determine the effective spec source before proceeding.
/swarm sdd status (native .swarm/spec.md OR OpenSpec openspec/ OR Spec-Kit .specify/ — read the resolved spec FIRST before making any changes).[NEEDS CLARIFICATION] markers:
the active swarm's sme agent for domain research on ambiguous areas before presenting questions..swarm/spec.md exists): update .swarm/spec.md with the resolution directly..swarm/spec.md): do NOT write .swarm/spec.md — this would silently shadow the non-native source. Instead:
<source>. To persist this resolution as a native spec, run /swarm sdd project first to materialize one, or I can stop here. Proceed?" — if the user consents to project, materialize via /swarm sdd project then write .swarm/spec.md; otherwise stop.[NEEDS CLARIFICATION] marker or vague language with the accepted answer.PLAN if spec is clear, or continue clarifying).CLARIFY-SPEC RULES:
.swarm/spec.md in a non-native (openspec/specify-only) repo — see step 5 source-aware write-back rule..swarm/spec.md that would shadow the effective source.CLARIFY-SPEC handles already-surfaced [NEEDS CLARIFICATION] markers and spec ambiguities — it does not perform open-ended discovery of new uncertainties. The full four-stage clarification funnel (inventory, classify, consult critic, surface) described in the clarify skill applies to MODE: CLARIFY and MODE: PLAN, not here.
However, before surfacing each marker question to the user, CLARIFY-SPEC MUST:
critic_sounding_board with the candidate marker question and surrounding spec context to check whether the question wording can be improved or the item can be resolved from existing context.RESOLVE verdict with a default answer, but that default is not directly supported by user request, spec, or recorded context, classify the item as user_decision rather than self_resolved.UNNECESSARY/DROP from the critic — override to APPROVED/ASK_USER.Critic verdict mapping (see src/agents/critic.ts SoundingBoardVerdict): UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER.
This scoped protocol is lighter than the full funnel because CLARIFY-SPEC starts from known markers rather than open uncertainty inventory, but it still protects against overconfident self-resolution and premature dropping of important questions.