refine — команда для Claude Code: уточнение требований
Команда refine задаёт один раунд вопросов по спецификации или задаче и выясняет только то, что может изменить реализацию. Режим research вместо вопросов изучает документацию и связанные материалы.
MIT ★ 730 обновлён 2026-10-29
/plugin marketplace add gmickel/flow-next
/plugin install flow-next@flow-nextЧто делает refine
Передайте refine ID спецификации, ID задачи или путь к файлу. Команда запускает скилл flow-next-refine: он проводит один раунд уточнений, а ответы фокусирует по желанию на бизнесе, технической стороне или другой теме через --scope. Флаг --scope=research запускает отдельный режим без вопросов: он собирает сведения из документации и связанных источников и добавляет раздел Resolved via Research после проверки изменений.
Флаги --docs и --no-docs включают или отключают работу с глоссарием и записями решений; режим также может определяться по материалам проекта. Для --scope=research повторный запуск пропускается, если результаты уже есть, а --force запускает его заново. Обратите внимание: команда сохраняет критерии приёмки с R-ID без перенумерации, а изменённые разделы показывает перед чтением результата.
В Claude Code установите плагин flow-next командами ниже. Для Codex путь команды — ~/.codex/prompts/refine.md.
Какие задачи решает
- уточнить требования к спецификации одним раундом вопросов
- сфокусировать вопросы на бизнес- или технических решениях
- найти изменения API и библиотек в документации
- зафиксировать термины и решения в материалах проекта
- повторно провести исследование спецификации с
--force
Примеры запросов агенту
- Уточни задачу
fn-1-add-oauth, задавая вопросы только о решениях для бизнеса. - Проведи исследование спецификации
fn-1-add-oauthбез вопросов. - Проверь технические требования в
specs/auth.mdс флагом--tech.
Как установить refine
1Через маркетплейс плагинов
/plugin marketplace add gmickel/flow-next/plugin install flow-next@flow-next2Вручную: положить файлы
.claude/commands/refine.mdВызов — /refine. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/refine.mdВызов — /prompts:refine. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/refine.prompt.mdВручную: положить файлы
.gemini/commands/refine.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о refine
Как установить refine в Claude Code?
Выполните /plugin marketplace add gmickel/flow-next и затем /plugin install flow-next@flow-next. Файл команды указан как .claude/commands/refine.md.
Что делает команда refine?
Она запускает один раунд уточняющих вопросов по спецификации, задаче или файлу. С --scope=research вместо вопросов исследует документацию и связанные сведения.
Можно ли ограничить вопросы одной темой?
Да. Передайте --scope=<lens> с нужной темой; --biz и --tech — сокращения для бизнес- и технического фокуса. Для исследования без вопросов используйте --scope=research.
Исходный текст
refine.md · MIT
--- name: refine description: Refine a spec, task, or spec file - one question pass that asks only what would change the build, optionally focused by a free-text scope lens, or a read-only research pass argument-hint: "[spec ID, task ID, or file path] [--scope=<lens> | --scope=research | --biz | --tech] [--docs | --no-docs] [--strategy | --no-strategy] [--force]" disable-model-invocation: true --- # IMPORTANT: This command MUST invoke the skill `flow-next-refine` The ONLY purpose of this command is to call the `flow-next-refine` skill. You MUST use that skill now. **User input:** $ARGUMENTS Pass the user input to the skill. The skill handles the interview and the research pass. ## Optional flags ### Scope - `--scope=<lens>` — optional free-text lens: `business`, `technical`, `qa`, `security`, or any other audience. Refine runs one interview either way; the lens focuses the questions on that audience's decisions, and each answer is written to the section it belongs in. No lens means no filter, and refine never asks which scope to run. - `--biz` — alias for `--scope=business`. - `--tech` — alias for `--scope=technical`. - `--scope=research` — runs no questions. Dispatches the read-only docs, practice, docs-gap, and memory scouts (github when `scouts.github` is on) over the spec's or task's surface and writes a `## Resolved via Research` section (one sub-block per scout: library versions, changed APIs, gotchas, docs that must change, memory that applies, each with its source) through the same read-back approval. Observably skipped, with the reason printed and nothing written, when the section already exists or plan's scout findings are already on the spec's tasks; `--force` reruns it; a spec that now names a library the plan never saw reruns it scoped to that delta. Sections no answer belongs in come back byte-for-byte, and the read-back names every section the session changed. R-IDs in `## Acceptance Criteria` are append-only — never renumbered, never replaced. ### Doc-aware - `--docs` — force doc-aware mode on. The pass reads the nearest-ancestor `GLOSSARY.md` and `.flow/memory/knowledge/decisions/`, surfaces glossary conflicts, sharpens overloaded terms via `flowctl glossary add`, and writes decision entries via `flowctl memory add --track knowledge --category decisions ...` when the three-criteria gate passes. If no `GLOSSARY.md` exists yet, the first resolved term lazy-creates one at the repo root. - `--no-docs` — force doc-aware mode off, even when `GLOSSARY.md` or decision entries exist. - `--strategy` / `--no-strategy` — force the strategy-aware gate independently of `--docs` / `--no-docs`. Without an explicit flag, `--docs` / `--no-docs` cascades to strategy. Without any doc-aware flag, the mode autodetects: it activates when `GLOSSARY.md` has at least one defined term (`flowctl glossary list --json` reports `total_terms > 0`) OR `.flow/memory/knowledge/decisions/` has at least one entry OR `STRATEGY.md` has populated sections. An empty `# Glossary` husk left behind after the last term is removed does not trip autodetect. The scope lens is orthogonal to doc-aware — both combine freely (e.g., `--scope=business --docs`). Examples: - `/flow-next:refine fn-1-add-oauth` — one interview, no lens, autodetect doc-aware - `/flow-next:refine fn-1-add-oauth --biz` — the same interview, focused on the product owner's decisions - `/flow-next:refine fn-1-add-oauth --scope=qa` — focused on what QA decides (what counts as done, which failures matter) - `/flow-next:refine fn-1-add-oauth --scope=business --docs` — business lens with doc-aware mode forced on - `/flow-next:refine fn-1-add-oauth --no-docs` — force doc-aware off - `/flow-next:refine fn-1-add-oauth --scope=research` — external-docs pass; no questions; skipped when the section or plan's findings already exist - `/flow-next:refine fn-1-add-oauth --scope=research --force` — rerun the external-docs pass and replace the section
© Gordon Mickel · MIT · gmickel/flow-next