[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76RWZFFZHS9Z501T3PEWJHZ":3,"skill-same:01M76RWZFFZHS9Z501T3PEWJHZ":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M76RWZFFZHS9Z501T3PEWJHZ","specify",null,"Full execution protocol for MODE: SPECIFY -- spec creation, codebase reality checks, SME input, QA gate persistence, and optional council spec review.","AlexanderNarbaev\u002Fagi","AlexanderNarbaev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F33544956?v=4","01M755ZKB1JJ26ZBNZSDJ4C0TV","01M755ZKBX072HZMHVQBWK7MK7",1,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fspecify\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: specify\ndescription: >\n  Full execution protocol for MODE: SPECIFY -- spec creation, codebase reality checks, SME input, QA gate persistence, and optional council spec review.\n---\n\n# Specify Protocol\n\nThis protocol is loaded on demand by the architect stub in src\u002Fagents\u002Farchitect.ts. The architect prompt keeps only activation, action, and hard safety constraints; the full execution details live here.\n\n### MODE: SPECIFY\nActivates when: user asks to \"specify\", \"define requirements\", \"write a spec\", or \"define a feature\"; OR `\u002Fswarm specify` is invoked; OR no `.swarm\u002Fspec.md` exists and no `.swarm\u002Fplan.md` exists.\n\n1. Check if `.swarm\u002Fspec.md` already exists.\n   - If YES (and this is not a call from the stale spec archival path in MODE: PLAN): ask the user \"A spec already exists. Do you want to overwrite it or refine it?\"\n     - Overwrite → ARCHIVE FIRST: read the existing spec, extract version (priority order): (1) from spec heading, look for patterns like \"v{semver}\" or \"Version {semver}\" in the first H1\u002FH2; (2) from package.json version field in project root; create `.swarm\u002Fspec-archive\u002F` directory if it does not exist; copy existing spec.md to `.swarm\u002Fspec-archive\u002Fspec-v{version}.md`; if version cannot be determined, use date-based fallback: `.swarm\u002Fspec-archive\u002Fspec-{YYYY-MM-DD}.md`; log the archive location to the user (\"Archived existing spec to .swarm\u002Fspec-archive\u002Fspec-v{version}.md\"); then proceed to generation (step 2)\n     - Refine → delegate to MODE: CLARIFY-SPEC\n   - If NO: proceed to generation (step 2)\n   - If this is called from the stale spec archival path (MODE: PLAN option 1) — archival was already completed; skip this check and proceed directly to generation (step 2)\n1b. Run CODEBASE REALITY CHECK for any codebase references mentioned by the user or implied by the feature. Skip if work is purely greenfield (no existing codebase to check). Report discrepancies before proceeding to explorer.\n2. Delegate to `the active swarm's explorer agent` to scan the codebase for relevant context (existing patterns, related code, affected areas).\n3. Delegate to `the active swarm's sme agent` for domain research on the feature area to surface known constraints, best practices, and integration concerns.\n4. Generate `.swarm\u002Fspec.md` capturing:\n   - First line must be: `# Specification: \u003Cfeature-name>`\n   - Feature description: WHAT users need and WHY — never HOW to implement\n   - User scenarios with acceptance criteria (Given\u002FWhen\u002FThen format)\n   - Functional requirements numbered FR-001, FR-002… using MUST\u002FSHOULD language\n   - Success criteria numbered SC-001, SC-002… — measurable and technology-agnostic\n   - Key entities if data is involved (no schema or field definitions — entity names only)\n   - Edge cases and known failure modes\n    - `[NEEDS CLARIFICATION]` markers for items where uncertainty could change scope, security, or core behavior, BUT ONLY after running the clarification funnel: (1) inventory all material uncertainties without numeric cap, (2) classify each as self_resolved\u002Fcritic_resolved\u002Fresearch_needed\u002Fuser_decision\u002Fdeferred_nonblocking — **Overconfidence guard:** if the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved`, (3) consult critic_sounding_board with candidate items — critic responds per SoundingBoardVerdict: UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER — **always-surface protection:** always-surface categories must not receive UNNECESSARY\u002FDROP; override to APPROVED\u002FASK_USER, (4) record all resolved items as explicit assumptions in the spec, (5) use markers only for items that survive the funnel (ASK_USER or unresolved after critic consultation). Decision packet format: grouped by category, recommended defaults, blocking vs optional markers, impact of accepting default. Prefer informed defaults over asking\n     - **Important:** If research is ongoing, monitor the timeout configured in `.swarm\u002Fconfig.json` under `research_needed_timeout_ms` (default: 300000ms \u002F 5 minutes). If research does not complete before the timeout expires, automatically reclassify the item to `user_decision` with a note that research was incomplete, then surface it to the user. This prevents the clarification funnel from stalling while waiting for external research.\n 5. Write the spec to `.swarm\u002Fspec.md`.\n5b. **QA GATE SELECTION, PARALLEL CODERS, COMMIT FREQUENCY, AND AUTO_PROCEED (dialogue only).**\nAsk the user which QA gates to enable for this plan, how many parallel coders to use, the commit frequency, and auto_proceed -- do not select on their behalf. Present all four items together as one unified exchange.\n\nPresent the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder count, commit frequency, and auto_proceed as a single user-facing section. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:\n- reviewer (default: ON) -- code review of coder output\n- test_engineer (default: ON) -- test verification of coder output\n- sme_enabled (default: ON) -- SME consultation during planning\u002Fclarification\n- critic_pre_plan (default: ON) -- critic review before plan finalization\n- sast_enabled (default: ON) -- static security scanning\n- council_mode (default: OFF) -- replaces per-task Stage B (reviewer + test_engineer) with the full 5-member council (critic, reviewer, sme, test_engineer, explorer). Requires council.enabled: true in config. (recommended for high-impact architecture, public APIs, schema\u002Fdata mutation, security-sensitive code)\n- hallucination_guard (default: OFF) -- when enabled, mandatory per-phase API\u002Fsignature\u002Fclaim\u002Fcitation verification via critic_hallucination_verifier at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm\u002Fevidence\u002F{phase}\u002Fhallucination-guard.json exists with an APPROVED verdict (recommended for claim-heavy or research-heavy work)\n- mutation_test (default: OFF) -- when enabled, runs mutation testing on source files touched this phase via generate_mutants + mutation_test + write_mutation_evidence at PHASE-WRAP; FAIL verdict blocks phase_complete; WARN is non-blocking (recommended for projects with coverage gaps or safety-critical code)\n- phase_council (default: OFF) -- full 5-member council reviews all work in a phase holistically at phase_complete time. Requires council.enabled: true in config. (recommended for multi-task phases with cross-cutting concerns or high-risk integration)\n- drift_check (default: ON) -- when enabled, mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; compares implemented changes against spec.md intent; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists (recommended for all projects with a specification)\n- final_council (default: OFF) -- when enabled, after all phases complete the architect dispatches the full 5-member council (critic, reviewer, sme, test_engineer, explorer) -- NOT the General Council -- at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This does not require `council.general.enabled`.\n\nAdditionally, present these three sub-items as part of the same exchange:\n- Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.\n- Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.\n- auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking \"Ready for Phase N+1?\"; runtime toggle via \u002Fswarm auto-proceed on|off.\n\nThe user answers all four (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.\n\nIf the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm\u002Fcontext.md` alongside the gate selection:\n```\n## Pending Parallelization Config\n- parallelization_enabled: true\n- max_concurrent_tasks: \u003Cuser's number>\n- council_parallel: false\n- locked: true\n- recorded_at: \u003CISO timestamp>\n```\nIf the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.\n\nIf the user chooses per-task commits, write this section to `.swarm\u002Fcontext.md`:\n```\n## Task Completion Commit Policy\n- commit_after_each_completed_task: true\n- recorded_at: \u003CISO timestamp>\n```\nIf the user keeps the default phase-level behavior, do not write this section.\n\n\u003C!-- BEHAVIORAL_GUIDANCE_START -->\nGATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:\n  ✗ \"I'll use the defaults — they're probably fine\"\n    → WRONG: defaults are not the user's decision. The user must be asked every time.\n  ✗ \"The user didn't mention gates, so defaults are fine\"\n    → WRONG: silence is not consent. The gate dialogue is not optional.\n  ✗ \"I'll handle it in MODE: PLAN after the spec is done\"\n    → WRONG: ## Pending QA Gate Selection must exist in context.md BEFORE save_plan is called.\n      save_plan will reject with QA_GATE_SELECTION_REQUIRED if this section is absent.\n  ✗ \"This feature is simple — gates are obvious\"\n    → WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.\n  ✗ \"I already know which gates are right for this project\"\n    → WRONG: the architect does not configure gates. The user configures gates. Always ask.\n\nMANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.\nYou are BLOCKED until ALL THREE of these conditions are met:\n  (1) The unified gate\u002Fcoders\u002Fcommit\u002Fauto_proceed selection section has been presented to the user in a single message\n  (2) The user has responded (accept defaults OR customized list for all four items)\n  (3) The elected gates, parallel coder config, commit policy, and auto_proceed selection have been written to .swarm\u002Fcontext.md under \"## Pending QA Gate Selection\" (and related sections as applicable)\n\u003C!-- BEHAVIORAL_GUIDANCE_END -->\n\nDo NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Once the user answers, write the elected gates to `.swarm\u002Fcontext.md` under a new section:\n```\n## Pending QA Gate Selection\n- reviewer: \u003Ctrue|false>\n- test_engineer: \u003Ctrue|false>\n- sme_enabled: \u003Ctrue|false>\n- critic_pre_plan: \u003Ctrue|false>\n- sast_enabled: \u003Ctrue|false>\n- council_mode: \u003Ctrue|false>\n- hallucination_guard: \u003Ctrue|false>\n- mutation_test: \u003Ctrue|false>\n- phase_council: \u003Ctrue|false>\n- drift_check: \u003Ctrue|false>\n- final_council: \u003Ctrue|false>\n- recorded_at: \u003CISO timestamp>\n```\nMODE: PLAN will read this section after `save_plan` succeeds and persist via `set_qa_gates`.\n\nGeneral Council advisory input is offered as an early workflow option in MODE: BRAINSTORM (Phase 1b) and MODE: PLAN before `save_plan`, not as a SPECIFY step. If the user wants council input during SPECIFY, they can use `\u002Fswarm council \u003Cquestion>` manually.\n\n7. Report a summary to the user (MUST count, SHALL count, scenario count, clarification markers, elected QA gates) and suggest the next step: `CLARIFY-SPEC` (if markers exist) or `PLAN`.\n\nSPEC CONTENT RULES — the spec MUST NOT contain:\n- Technology stack, framework choices, library names\n- File paths, API endpoint designs, database schema, code structure\n- Implementation details or \"how to build\" language\n- Any reference to specific tools, languages, or platforms\n\nEach functional requirement MUST be independently testable.\nFocus on WHAT users need and WHY — never HOW to implement.\nNo technology stack, APIs, or code structure in the spec.\nEach requirement must be independently testable.\nPrefer informed defaults over asking the user — use `[NEEDS CLARIFICATION]` only when uncertainty could change scope, security, or core behavior.\n\nEXTERNAL PLAN IMPORT PATH — when the user provides an existing implementation plan (markdown content, pasted text, or a reference to a file):\n1. Run CODEBASE REALITY CHECK scoped to every file, function, API, and behavioral assumption in the provided plan. Report discrepancies to user before proceeding.\n2. Read and parse the provided plan content.\n3. Reverse-engineer `.swarm\u002Fspec.md` from the plan:\n   - Derive FR-### functional requirements from task descriptions\n   - Derive SC-### success criteria from acceptance criteria in tasks\n   - Identify user scenarios from the plan's phase\u002Ffeature groupings\n   - Surface implicit assumptions as `[NEEDS CLARIFICATION]` markers\n4. Validate the provided plan against swarm task format requirements:\n   - Every task should have FILE, TASK, CONSTRAINT, and ACCEPTANCE fields\n   - No task should touch more than 2 files\n   - No compound verbs in TASK lines (\"implement X and add Y\" = 2 tasks)\n   - Dependencies should be declared explicitly\n   - Phase structure should match `.swarm\u002Fplan.md` format\n5. Report gaps, format issues, and improvement suggestions to the user.\n6. Ask: \"Should I also flesh out any areas that seem underspecified?\"\n   - If yes: delegate to `the active swarm's sme agent` for targeted research on weak areas, then propose specific improvements.\n7. Output: both a `.swarm\u002Fspec.md` (extracted from the plan) and a validated version of the user's plan.\n\nEXTERNAL PLAN RULES:\n- Surface ALL changes as suggestions — do not silently rewrite the user's plan.\n- The user's plan is the starting point, not a draft to replace.\n- Validation findings are advisory; the user may accept or reject each suggestion.\n","# Specify Protocol\n\nThis protocol is loaded on demand by the architect stub in src\u002Fagents\u002Farchitect.ts. The architect prompt keeps only activation, action, and hard safety constraints; the full execution details live here.\n\n### MODE: SPECIFY\nActivates when: user asks to \"specify\", \"define requirements\", \"write a spec\", or \"define a feature\"; OR `\u002Fswarm specify` is invoked; OR no `.swarm\u002Fspec.md` exists and no `.swarm\u002Fplan.md` exists.\n\n1. Check if `.swarm\u002Fspec.md` already exists.\n   - If YES (and this is not a call from the stale spec archival path in MODE: PLAN): ask the user \"A spec already exists. Do you want to overwrite it or refine it?\"\n     - Overwrite → ARCHIVE FIRST: read the existing spec, extract version (priority order): (1) from spec heading, look for patterns like \"v{semver}\" or \"Version {semver}\" in the first H1\u002FH2; (2) from package.json version field in project root; create `.swarm\u002Fspec-archive\u002F` directory if it does not exist; copy existing spec.md to `.swarm\u002Fspec-archive\u002Fspec-v{version}.md`; if version cannot be determined, use date-based fallback: `.swarm\u002Fspec-archive\u002Fspec-{YYYY-MM-DD}.md`; log the archive location to the user (\"Archived existing spec to .swarm\u002Fspec-archive\u002Fspec-v{version}.md\"); then proceed to generation (step 2)\n     - Refine → delegate to MODE: CLARIFY-SPEC\n   - If NO: proceed to generation (step 2)\n   - If this is called from the stale spec archival path (MODE: PLAN option 1) — archival was already completed; skip this check and proceed directly to generation (step 2)\n1b. Run CODEBASE REALITY CHECK for any codebase references mentioned by the user or implied by the feature. Skip if work is purely greenfield (no existing codebase to check). Report discrepancies before proceeding to explorer.\n2. Delegate to `the active swarm's explorer agent` to scan the codebase for relevant context (existing patterns, related code, affected areas).\n3. Delegate to `the active swarm's sme agent` for domain research on the feature area to surface known constraints, best practices, and integration concerns.\n4. Generate `.swarm\u002Fspec.md` capturing:\n   - First line must be: `# Specification: \u003Cfeature-name>`\n   - Feature description: WHAT users need and WHY — never HOW to implement\n   - User scenarios with acceptance criteria (Given\u002FWhen\u002FThen format)\n   - Functional requirements numbered FR-001, FR-002… using MUST\u002FSHOULD language\n   - Success criteria numbered SC-001, SC-002… — measurable and technology-agnostic\n   - Key entities if data is involved (no schema or field definitions — entity names only)\n   - Edge cases and known failure modes\n    - `[NEEDS CLARIFICATION]` markers for items where uncertainty could change scope, security, or core behavior, BUT ONLY after running the clarification funnel: (1) inventory all material uncertainties without numeric cap, (2) classify each as self_resolved\u002Fcritic_resolved\u002Fresearch_needed\u002Fuser_decision\u002Fdeferred_nonblocking — **Overconfidence guard:** if the default is not directly supported by user request, spec, or recorded context, classify as `user_decision` rather than `self_resolved`, (3) consult critic_sounding_board with candidate items — critic responds per SoundingBoardVerdict: UNNECESSARY→DROP, RESOLVE→RESOLVE, REPHRASE→REPHRASE, APPROVED→ASK_USER — **always-surface protection:** always-surface categories must not receive UNNECESSARY\u002FDROP; override to APPROVED\u002FASK_USER, (4) record all resolved items as explicit assumptions in the spec, (5) use markers only for items that survive the funnel (ASK_USER or unresolved after critic consultation). Decision packet format: grouped by category, recommended defaults, blocking vs optional markers, impact of accepting default. Prefer informed defaults over asking\n     - **Important:** If research is ongoing, monitor the timeout configured in `.swarm\u002Fconfig.json` under `research_needed_timeout_ms` (default: 300000ms \u002F 5 minutes). If research does not complete before the timeout expires, automatically reclassify the item to `user_decision` with a note that research was incomplete, then surface it to the user. This prevents the clarification funnel from stalling while waiting for external research.\n 5. Write the spec to `.swarm\u002Fspec.md`.\n5b. **QA GATE SELECTION, PARALLEL CODERS, COMMIT FREQUENCY, AND AUTO_PROCEED (dialogue only).**\nAsk the user which QA gates to enable for this plan, how many parallel coders to use, the commit frequency, and auto_proceed -- do not select on their behalf. Present all four items together as one unified exchange.\n\nPresent the eleven gates with their defaults (DEFAULT_QA_GATES), parallel coder count, commit frequency, and auto_proceed as a single user-facing section. Offer the user a one-shot choice: accept defaults, or customize. The eleven gates are:\n- reviewer (default: ON) -- code review of coder output\n- test_engineer (default: ON) -- test verification of coder output\n- sme_enabled (default: ON) -- SME consultation during planning\u002Fclarification\n- critic_pre_plan (default: ON) -- critic review before plan finalization\n- sast_enabled (default: ON) -- static security scanning\n- council_mode (default: OFF) -- replaces per-task Stage B (reviewer + test_engineer) with the full 5-member council (critic, reviewer, sme, test_engineer, explorer). Requires council.enabled: true in config. (recommended for high-impact architecture, public APIs, schema\u002Fdata mutation, security-sensitive code)\n- hallucination_guard (default: OFF) -- when enabled, mandatory per-phase API\u002Fsignature\u002Fclaim\u002Fcitation verification via critic_hallucination_verifier at PHASE-WRAP; phase_complete will REJECT phase completion unless .swarm\u002Fevidence\u002F{phase}\u002Fhallucination-guard.json exists with an APPROVED verdict (recommended for claim-heavy or research-heavy work)\n- mutation_test (default: OFF) -- when enabled, runs mutation testing on source files touched this phase via generate_mutants + mutation_test + write_mutation_evidence at PHASE-WRAP; FAIL verdict blocks phase_complete; WARN is non-blocking (recommended for projects with coverage gaps or safety-critical code)\n- phase_council (default: OFF) -- full 5-member council reviews all work in a phase holistically at phase_complete time. Requires council.enabled: true in config. (recommended for multi-task phases with cross-cutting concerns or high-risk integration)\n- drift_check (default: ON) -- when enabled, mandatory per-phase drift verification via critic_drift_verifier at PHASE-WRAP; compares implemented changes against spec.md intent; hard-blocks phase_complete when spec.md exists and drift evidence is missing or REJECTED; advisory-only when no spec.md exists (recommended for all projects with a specification)\n- final_council (default: OFF) -- when enabled, after all phases complete the architect dispatches the full 5-member council (critic, reviewer, sme, test_engineer, explorer) -- NOT the General Council -- at project scope, collects `CouncilMemberVerdict` objects, and calls `write_final_council_evidence`. This does not require `council.general.enabled`.\n\nAdditionally, present these three sub-items as part of the same exchange:\n- Parallel coders (default: 1, range: 1-4) -- how many coders should run in parallel. Parallel coders each run in an isolated git worktree (separate working dir + branch) and merge back automatically, so they never overwrite each other's files -- safe and faster, but only for tasks whose file scopes do NOT overlap. The per-task file scopes that determine a safe parallel count are not known until the plan is finalized, so default to 1 (serial) here; the precise recommendation is made at plan time once the tasks and their scopes exist.\n- Commit frequency (default: phase-level only) -- optional per-task checkpoint commit after each task completion.\n- auto_proceed (boolean, default: false) -- when true, auto-advance to the next phase without asking \"Ready for Phase N+1?\"; runtime toggle via \u002Fswarm auto-proceed on|off.\n\nThe user answers all four (gates, parallel coders, commit frequency, auto_proceed) in one exchange. Wait for the user's response.\n\nIf the user says parallel coders > 1, write a `## Pending Parallelization Config` section to `.swarm\u002Fcontext.md` alongside the gate selection:\n```\n## Pending Parallelization Config\n- parallelization_enabled: true\n- max_concurrent_tasks: \u003Cuser's number>\n- council_parallel: false\n- locked: true\n- recorded_at: \u003CISO timestamp>\n```\nIf the user accepts the default (1), skip writing this section entirely -- serial execution is the default and needs no config.\n\nIf the user chooses per-task commits, write this section to `.swarm\u002Fcontext.md`:\n```\n## Task Completion Commit Policy\n- commit_after_each_completed_task: true\n- recorded_at: \u003CISO timestamp>\n```\nIf the user keeps the default phase-level behavior, do not write this section.\n\n\u003C!-- BEHAVIORAL_GUIDANCE_START -->\nGATE SELECTION IS MANDATORY — these thoughts are WRONG and must be ignored:\n  ✗ \"I'll use the defaults — they're probably fine\"\n    → WRONG: defaults are not the user's decision. The user must be asked every time.\n  ✗ \"The user didn't mention gates, so defaults are fine\"\n    → WRONG: silence is not consent. The gate dialogue is not optional.\n  ✗ \"I'll handle it in MODE: PLAN after the spec is done\"\n    → WRONG: ## Pending QA Gate Selection must exist in context.md BEFORE save_plan is called.\n      save_plan will reject with QA_GATE_SELECTION_REQUIRED if this section is absent.\n  ✗ \"This feature is simple — gates are obvious\"\n    → WRONG: complexity does not exempt this step. Gate selection is mandatory for ALL plans.\n  ✗ \"I already know which gates are right for this project\"\n    → WRONG: the architect does not configure gates. The user configures gates. Always ask.\n\nMANDATORY PAUSE: Do NOT write the spec summary (step 7). Do NOT suggest next steps.\nYou are BLOCKED until ALL THREE of these conditions are met:\n  (1) The unified gate\u002Fcoders\u002Fcommit\u002Fauto_proceed selection section has been presented to the user in a single message\n  (2) The user has responded (accept defaults OR customized list for all four items)\n  (3) The elected gates, parallel coder config, commit policy, and auto_proceed selection have been written to .swarm\u002Fcontext.md under \"## Pending QA Gate Selection\" (and related sections as applicable)\n\u003C!-- BEHAVIORAL_GUIDANCE_END -->\n\nDo NOT call `set_qa_gates` yet — `plan.json` does not exist at this point. Once the user answers, write the elected gates to `.swarm\u002Fcontext.md` under a new section:\n```\n## Pending QA Gate Selection\n- reviewer: \u003Ctrue|false>\n- test_engineer: \u003Ctrue|false>\n- sme_enabled: \u003Ctrue|false>\n- critic_pre_plan: \u003Ctrue|false>\n- sast_enabled: \u003Ctrue|false>\n- council_mode: \u003Ctrue|false>\n- hallucination_guard: \u003Ctrue|false>\n- mutation_test: \u003Ctrue|false>\n- phase_council: \u003Ctrue|false>\n- drift_check: \u003Ctrue|false>\n- final_council: \u003Ctrue|false>\n- recorded_at: \u003CISO timestamp>\n```\nMODE: PLAN will read this section after `save_plan` succeeds and persist via `set_qa_gates`.\n\nGeneral Council advisory input is offered as an early workflow option in MODE: BRAINSTORM (Phase 1b) and MODE: PLAN before `save_plan`, not as a SPECIFY step. If the user wants council input during SPECIFY, they can use `\u002Fswarm council \u003Cquestion>` manually.\n\n7. Report a summary to the user (MUST count, SHALL count, scenario count, clarification markers, elected QA gates) and suggest the next step: `CLARIFY-SPEC` (if markers exist) or `PLAN`.\n\nSPEC CONTENT RULES — the spec MUST NOT contain:\n- Technology stack, framework choices, library names\n- File paths, API endpoint designs, database schema, code structure\n- Implementation details or \"how to build\" language\n- Any reference to specific tools, languages, or platforms\n\nEach functional requirement MUST be independently testable.\nFocus on WHAT users need and WHY — never HOW to implement.\nNo technology stack, APIs, or code structure in the spec.\nEach requirement must be independently testable.\nPrefer informed defaults over asking the user — use `[NEEDS CLARIFICATION]` only when uncertainty could change scope, security, or core behavior.\n\nEXTERNAL PLAN IMPORT PATH — when the user provides an existing implementation plan (markdown content, pasted text, or a reference to a file):\n1. Run CODEBASE REALITY CHECK scoped to every file, function, API, and behavioral assumption in the provided plan. Report discrepancies to user before proceeding.\n2. Read and parse the provided plan content.\n3. Reverse-engineer `.swarm\u002Fspec.md` from the plan:\n   - Derive FR-### functional requirements from task descriptions\n   - Derive SC-### success criteria from acceptance criteria in tasks\n   - Identify user scenarios from the plan's phase\u002Ffeature groupings\n   - Surface implicit assumptions as `[NEEDS CLARIFICATION]` markers\n4. Validate the provided plan against swarm task format requirements:\n   - Every task should have FILE, TASK, CONSTRAINT, and ACCEPTANCE fields\n   - No task should touch more than 2 files\n   - No compound verbs in TASK lines (\"implement X and add Y\" = 2 tasks)\n   - Dependencies should be declared explicitly\n   - Phase structure should match `.swarm\u002Fplan.md` format\n5. Report gaps, format issues, and improvement suggestions to the user.\n6. Ask: \"Should I also flesh out any areas that seem underspecified?\"\n   - If yes: delegate to `the active swarm's sme agent` for targeted research on weak areas, then propose specific improvements.\n7. Output: both a `.swarm\u002Fspec.md` (extracted from the plan) and a validated version of the user's plan.\n\nEXTERNAL PLAN RULES:\n- Surface ALL changes as suggestions — do not silently rewrite the user's plan.\n- The user's plan is the starting point, not a draft to replace.\n- Validation findings are advisory; the user may accept or reject each suggestion.\n",{"name":5,"description":7},"main","7709dc9e5ebd3bd641124ad2a3f6bb053ac2dab6",".opencode\u002Fskills\u002Fspecify",0,"https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev","2026-11-15 04:35:36",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add AlexanderNarbaev\u002Fagi --skill specify",{"tool":36,"command":37},"bunx","bunx skills add AlexanderNarbaev\u002Fagi --skill specify",{"tool":39,"command":40},"pnpm","pnpm dlx skills add AlexanderNarbaev\u002Fagi --skill specify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Fspecify\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M76RZHYHMGE1WP9JBCMNA801","springboot-patterns","Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fspringboot-patterns\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M76RZE6JNZH5HV7Q8JM7R0PN","search-first","Research-before-coding workflow. Search for existing tools, libraries, and patterns before writing custom code. Invokes the researcher agent.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fsearch-first\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M76RZBV42EMQV77H7GMFY4AJ","scholar-evaluation","Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fscholar-evaluation\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M76RZ97GC3XAY48H126C30PM","redis-patterns","Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub\u002Fsub, and connection management for production applications.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fredis-patterns\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M76RZ528FANTKX7Q9XR0CXM7","react-patterns","React 18\u002F19 patterns including hooks discipline, server\u002Fclient component boundaries, Suspense + error boundaries, form actions, data fetching, state management decision trees, and accessibility-first composition. Use when writing or reviewing React components.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Freact-patterns\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M76RZ1244PZQRQV5HBQ4PVYQ","query-patterns","SQL patterns, relational database design, query optimization, transactions, analytics, and dialect-aware best practices.","https:\u002F\u002Fgithub.com\u002FAlexanderNarbaev\u002Fagi\u002Fblob\u002Fmain\u002F.veai\u002Fskills\u002Fquery-patterns\u002FSKILL.md",[],[]]