К основному содержанию
команда CX Codex

speckit.companion.auto — команда для Claude Code

Команда speckit.companion.auto для Claude Code и Codex запускает цикл разработки фичи без пауз на подтверждения. Спецификация, план, декомпозиция задач, реализация и сведение идут подряд в автономном режиме.

MIT ★ 110 обновлён 2026-11-10

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/commands/speckit.companion.auto.md
Открыть на GitHub

Что делает speckit.companion.auto

Команда работает в Claude Code и Codex как верхнеуровневый оркестратор пайплайна SpecKit Companion. Вместо ручного подтверждения каждого этапа она последовательно вызывает шаги specify, plan, tasks, implement и converge. Агент выступает дирижёром, а не автором артефактов с нуля: он по очереди исполняет отдельные команды этапов, сохраняя форматирование проектных планов и списков задач.

Перед стартом скрипт выделяет новую директорию для спецификации через mint-spec-dir.py или берёт путь из переменной SPECIFY_FEATURE_DIRECTORY. Чтобы не затереть завершённую фичу, запись в существующую папку со старым spec.md блокируется. Статус выполнения и неизменённый текст запроса пишутся в .spec-context.json через вызовы Python.

Для работы команды в репозитории обязательны Python 3 и вспомогательные скрипты расширения по пути .specify/extensions/companion/scripts/. Если их нет, оркестратор упадёт ещё на шаге штампа времени.

Какие задачи решает

  • Прогнать полный цикл от идеи до кода без ручного подтверждения каждого шага
  • Создать чистую директорию новой спецификации с автоматической нумерацией
  • Зафиксировать исходный запрос разработчика в контексте без искажений
  • Перевести контрольные точки расширений в фоновый режим записи

Примеры запросов агенту

  • /speckit-companion-auto Добавь экспорт отчётов о транзакциях в CSV
  • /speckit-companion-auto Сделай валидацию телефонных номеров при регистрации
  • /speckit-companion-auto Интегрируй отправку вебхуков при смене статуса заказа

Как установить speckit.companion.auto

Вручную: положить файлы

.claude/commands/speckit.companion.auto.md

Вызов — /speckit.companion.auto. Для всех проектов — ~/.claude/commands/

Вопросы о speckit.companion.auto

Как установить speckit.companion.auto в Claude Code?

Сохраните файл команды по пути .claude/commands/speckit.companion.auto.md в вашем проекте.

Что делает speckit.companion.auto?

Команда автоматически прогоняет фазы разработки Companion: генерирует спецификацию, составляет план, создаёт задачи, пишет код и сводит правки воедино.

Почему авторежим запускает отдельные команды, а не пишет код сразу?

Каждый этап формирует свои артефакты — матрицы контрактов, оценки и структурированные задачи. Команда вызывает дочерние команды напрямую, чтобы не потерять эти документы.

Исходный текст

speckit.companion.auto.md · MIT
---
description: "Companion auto — run the whole pipeline hands-off (specify → plan → tasks → implement → converge), no pauses"
---

## User Input

```text
$ARGUMENTS
```

<!-- speckit-companion:part step-start -->
## Record this step's start: before anything else runs

A step's recorded window has to contain the work it claims. Stamping the start partway down the body leaves the extension hooks, and any node above the stamp, outside the window the step later reports. So this is the first instruction in the command, ahead of the hooks.

Let `<step>` be this command's phase and `<status>` its in-progress status: `specify`/`specifying`, `plan`/`planning`, `tasks`/`tasking`, `implement`/`implementing`.

**Which feature directory this step stamps against decides when it stamps.**

- **A step that mints its own feature directory**, meaning any fresh-spec entry point such as `specify` or `auto`, has nothing to stamp against yet. `.specify/feature.json` is this step's *output*: it still points at the **previous** spec, so stamping now would write this run's status onto finished work. Resolve the directory first, then stamp the instant it exists, before any other work in the step.
- **Every other step** reads the feature directory it was given, from the invocation or from `.specify/feature.json`, which by then points at this spec. Stamp immediately, before the extension hooks and before any node.

In both cases the call is the same:

```bash
python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_directory> --step <step> --status <status> --kind start --by extension
```

Add `--at "<dispatch time>"` when the dispatcher printed one; otherwise the script stamps now. Two things keep this honest:

- **Run it, never hand-write it.** The script stamps the real clock and writes atomically. A hand-authored entry in `.spec-context.json` is what corrupts the file.
- **A second start is refused, not reconciled.** History is append-only, so if the extension already seeded this step's start, this call appends nothing and the earlier timestamp stands. Running it is always safe; skipping it loses the window.
<!-- /speckit-companion:part step-start -->

<!-- speckit-companion:part command-spelling -->
## Name every command the way this project registers it

Commands are named in dot form throughout this body, `speckit.companion.plan`, because that is their canonical id, and without a leading slash, because the spelling a host actually registers is not always this one. Claude Code installs `/speckit-companion-plan`. Look at how the commands are installed in this project, under the agent's own commands or skills directory, and use that spelling every time you name one to the developer or dispatch one yourself. A dotted name typed into a host that registered dashes resolves to nothing at all.
<!-- /speckit-companion:part command-spelling -->

## Outline

Run the **entire** Companion pipeline end-to-end and unattended. Walk every step in order, specify → plan → tasks → implement → converge, dispatching the same per-step `speckit.companion.*` commands, never pausing for approval in between, and finish the spec at `status: completed`.
<!-- speckit-companion:phase gather -->
<!-- speckit-companion:node resolve-dir -->
1. **Resolve the feature directory — mint a fresh dir for new work.** Auto is a fresh-spec entry point, exactly like specify. `.specify/feature.json` is an **output**, not an input to reuse: it points at the *previous* spec (frequently already completed), so reusing it would clobber finished work. Pick the target:
   - If the request explicitly names a target path (or `SPECIFY_FEATURE_DIRECTORY` is set), use it.
   - Otherwise derive a 2–4 word short-name from the description and run `python3 .specify/extensions/companion/scripts/mint-spec-dir.py --short-name "<short-name>"`. It creates the next folder, numbered the way this project's `feature_numbering` says and safe against a run started at the same time, points `.specify/feature.json` at it, and prints its path. Never pick the number yourself. The spec file is `<feature_directory>/spec.md`. **Never write into a directory that already contains a feature spec (`spec.md`, or an older `*.spec.md`)** — that's a stale pointer to a prior spec, not this feature.
   For a named target, create `<feature_directory>/` and point `.specify/feature.json` at it by writing `{"feature_directory": "<feature_directory>"}` — that exact key is what the later capture calls resolve the spec through when they run without `--feature-dir`, so any other key silently drops those writes.
   Then stamp the **specify START** as the step-start instruction above directs — the directory now exists, so this is the moment it says to run it, before any other work.

   Right after the stamp, store the request word for word: the user input this command received, exactly as given, never a summary. Pass it on stdin so quotes and line breaks survive:
   ```bash
   python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_directory> --request - <<'COMPANION_REQUEST'
   <the user input, unchanged>
   COMPANION_REQUEST
   ```
   The record keeps the first request it is given, so the description you hand specify later never replaces it.
<!-- /speckit-companion:node resolve-dir -->
<!-- /speckit-companion:phase gather -->
<!-- speckit-companion:phase orchestrate -->
<!-- speckit-companion:node orchestrate -->

## Run the pipeline — every step, no pauses

Run the full Companion pipeline by **invoking each per-step command for real**, in order, without pausing for approval between them. You are the **conductor, not the author**: each step's behavior is defined by its own command body — do **not** write the spec, plan, design docs, task list, or code yourself from scratch. Invoke the command and let *it* do the step the way it's defined.

**This is the rule that makes auto faithful.** A standalone `speckit.companion.tasks` run produces a size-classified spec, a slim plan with its design artifacts (`research.md`, `data-model.md`, `contracts/`), and a wave-structured task list — because those behaviors live *inside* each command. If you improvise the artifacts here instead of invoking the commands, auto silently drops all of that (no sizing, no design docs, a flat task list) and stops matching the manual flow. So: **invoke, don't reproduce.**

1. **Mark the run unattended.** This run has no human watching it. Set `unattended: true` so project checkpoint hooks record-and-continue instead of asking (see the unattended convention below) — write it into `.spec-context.json`:
   ```bash
   python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_directory> --set unattended=true
   ```
   Carry `unattended` forward to every step you dispatch.

2. **Invoke each command in order — actually run it, don't re-enact it.** Use your command/skill invocation tool (the same `speckit.companion.*` command a person would type) for each step, waiting for its full work to finish before starting the next. Each command does its *own* size-classification, artifact generation, and capture — your job is only to call them in sequence and not stop:
   - `speckit.companion.specify <feature description>` — runs the real specify command: classifies size, writes the full spec, persists the size.
   - **Read the verdict before the next dispatch.** When specify returns, read `<feature_directory>/.spec-context.json`. If `size` is `simple`, or its `history` already holds a `tasks` complete, specify folded plan and tasks: the lean `plan.md` and `tasks.md` exist and both steps are recorded. Print `[companion] specify folded plan and tasks; going to implement`, skip the two commands below, and dispatch implement. A re-run of plan or tasks here would only overwrite the lean files and cost the time the fold saved. Any other verdict runs all three.
   - `speckit.companion.plan` — runs the real plan command: the slim plan **plus** `research.md`, `data-model.md`, and `contracts/` (right-sized by the recorded size).
   - `speckit.companion.tasks` — runs the real tasks command: the wave-structured, dependency-ordered task list.
   - `speckit.companion.implement` — runs the real implement command: executes the tasks and journals each finish.
   - `speckit.converge` — the stock converge command: it checks the build against the spec and either completes the spec or appends the unbuilt work as new tasks.
   If your host has no way to invoke another command mid-session, fall back to following each command's body faithfully (read it and do exactly what it specifies — same artifacts, same sizing, same structure); never substitute a quicker improvised version.

3. **Do not pause at review gates.** Where the manual flow would stop and wait for a person at a `gate` (review-spec, review-plan, …), auto instead **records the checkpoint and continues**. Background hooks still fire and review/PR hooks still run — only the human pause is skipped. This is the one behavioral difference from a manual run.

4. **End when converge completes the spec.** After converge, read `<feature_directory>/.spec-context.json`. If `status` is `completed`, the run is done. If converge appended tasks and the status is still `implemented`, dispatch implement and then converge again. Stop after three converge passes, record one concern naming the open tasks, and end at `implemented`. Do not dispatch `speckit.companion.mark-complete`. There is exactly one writer of `completed`: the after-converge hook; never introduce a second.

5. **Degrade gracefully on a one-shot environment.** Auto needs an agent that keeps acting after each step finishes. If your environment runs one command and then stops (a plain / one-shot terminal), you cannot chain the steps yourself: run the first step, record its progress, and stop. The run stays valid and resumable — the remaining steps are triggered the normal one-step-at-a-time way (by the developer or the companion panel). No error; auto simply behaves like the manual flow there.
<!-- /speckit-companion:node orchestrate -->
<!-- /speckit-companion:phase orchestrate -->
<!-- speckit-companion:phase wrap-up -->
<!-- speckit-companion:node handoff -->
<!-- speckit-companion:part timing -->
## Timing: keep `.spec-context.json` honest

Record every boundary by **running the writer script**. Never edit `.spec-context.json` yourself; a hand-authored edit is what corrupts the file. The model is **finish-only**: one finish per task and per substep, its duration the gap back to the previous finish. Never a `start`+`complete` pair for either, which stamps a `0s` tick and measures nothing.

- **Close your own step**, as the last thing you do, after emitting any mandatory after-hook block:

  ```bash
  python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --step <this step> --advance --by ai
  ```

  `--advance` appends the step's complete and flips `status` in one atomic write. It is idempotent and first-writer-wins, so it changes nothing when the after-hook already closed the step, and it is the only thing that closes the step when that hook was printed rather than dispatched. Run it every time, with one exception: **clarify** and **analyze** use `--finish`, which records a boundary without owning a status. **Implement** closes with `--advance` like the other steps and ends at `implemented`; converge completes the spec.

- **One finish per substep, the moment it ends.** Plan records `research` and `design`, tasks records `generate`, implement records `living-review` and `living-fold` when living specs are on. Never two in one batch, never a separate start: a finish measures the gap back to the previous boundary, so several stamped together at the close of a step read as `0s` each and record nothing.

  ```bash
  python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --step <step> --substep <name> --finish --by ai
  ```

- **Closing a task is that task's last action, not a bookkeeping pass you batch later.** Feature dir from `.specify/feature.json`:

  ```bash
  python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --close-task <TaskID> --by ai --did "<one line>" --files "<files>"
  ```

  One call appends the finish with its own real clock, folds it into the panel, and flips that task's box in `tasks.md`. Never hand-edit that box or hand-author per-task JSON, and never write a per-task start. Re-closing is safe. **Batching is a defect the doctor catches**: it names any cluster of finishes stamped seconds apart, because those timestamps record when the batch was written, and history is append-only so it cannot be repaired afterwards. Trust the per-task summaries and their order; the timestamps are best-effort.

  **A fanned-out worker appends only**, because folding is a read-modify-write and two folders contend:

  ```bash
  python3 .specify/extensions/companion/scripts/write-context.py --feature-dir <feature_dir> --task <TaskID> --kind complete --by ai --did "<one line>" --files "<files>" --append
  ```

  The MAIN agent folds each returned result with `--materialize`, one at a time, and once more at a wave join as a backstop.

- **Never write the next step's start.** The next command owns it. Writing it here renders a phantom "Generating <next>…".
<!-- /speckit-companion:part timing -->

<!-- speckit-companion:part unattended -->
## Unattended: the "don't pause" signal

This run is **unattended**: a human is not watching it and cannot answer a prompt. The orchestrator records this by setting `unattended: true` in the dispatched prompt and in `.spec-context.json`, and every step you dispatch carries it forward.

What `unattended: true` means for hooks:

- **Checkpoint `prompt` hooks read it.** A project checkpoint hook ("Continue / Fix / Stop") is authored to check the flag: *if `unattended`, record the checkpoint and continue; otherwise ask the human to proceed.* The hook stays declarative: it does not need to know it is in auto, only that the run is unattended. A hook may still log one line such as `[hook] checkpoint recorded, continuing (unattended)`.
- **Background hooks still fire.** A `background: true` hook (tests, builds, notifications) runs exactly as it would in a manual run. Unattended skips the *human pause*, not the side-effects.
- **Review / PR hooks still run.** Anything that produces an artifact or a review still happens; only the wait-for-a-person gate is bypassed.

If a project has no checkpoint hooks, `unattended: true` has nothing to act on. Set it anyway so any hook added later inherits the contract.
<!-- /speckit-companion:part unattended -->
<!-- /speckit-companion:node handoff -->
<!-- /speckit-companion:phase wrap-up -->

<!-- speckit-companion:part orchestrator -->
## Node hooks: run the project's `before`/`after` inserts

This command is assembled from ordered **nodes**. A project attaches its own work around any node in `.specify/companion.yml`, and you are the runtime. Like the rest of the pipeline it must **never fail the host command**: degrade and continue.

**Find the hooks.** Look up `commands.<this-command>.hooks`, whose `before` and `after` anchors are keyed by a node id from this command's order. Run a node's `before` hooks immediately before its work and its `after` hooks immediately after, several at one anchor in declared order. An absent, empty, malformed or unparseable file means no hooks: run the shipped command unchanged, silently when it is absent and with one short warning when it is broken.

**Hook types:**

- `{ type: command, run: "<shell>" }`: run it with your terminal tool, then continue. Without a terminal tool, report the command you would have run rather than pretending.
- `{ type: prompt, text: "<instruction>" }`: act on the text before moving on.
- `{ type: node, ref: <id> }`: carry out `.specify/companion/nodes/<id>.md` as part of this command. A missing `ref` file is a real misconfiguration: report it and stop rather than silently skipping.

**Background hooks.** Any hook may add `background: true`: start it and continue without waiting, detaching a `command` (`&`, `nohup … &`) and not blocking on a `node` or `prompt`. Report its result whenever it lands. Never background anything that writes `.spec-context.json`, meaning the timing and capture calls: they read-modify-write a shared file, so two at once lose an update. Background is for slow side-effects like a test run or a build, not for bookkeeping.

A hook anchored to a node this run does not include, because a recipe dropped it, warns once and is skipped. A hook whose own work fails is reported and the pipeline continues, unless the failure clearly makes the rest unsafe.
<!-- /speckit-companion:part orchestrator -->

© alfredoperez · MIT · alfredoperez/speckit-companion

Похожие слэш-команды

Все слэш-команды по теме «Настройка агента: память, контекст, субагенты» →
bmad-auto bmad-labs Скилл bmad-auto оркеструет реализацию задач по методологии BMAD: ведёт конвейер историй Phase 4 либо переключается на Quick Flow для точечных правок. CX Codex +1 145установок auto-trigger zhaono1 Скилл auto-trigger описывает цепочки хуков и триггеров между навыками в agent-playbook. Помогает передавать контекст и связывать шаги вроде логирования или ревью. CX Codex +1 707установок graph Yeachan-Heo Скилл graph запускает многошаговые пайплайны как ориентированные графы и после сбоя продолжает работу по журналу с незавершённых узлов. CX Codex +1 285установок speckit-analyze github-spec-kit Скилл speckit-analyze для Claude Code проводит анализ согласованности файлов spec.md, plan.md и tasks.md. Запускается строго в режиме чтения перед началом кодинга. CX Codex +1 1 600установок speckit.tasks Chat2AnyLLM Команда speckit.tasks генерирует tasks.md с пошаговым списком задач для фичи на основе plan.md и spec.md, с разбивкой по пользовательским историям. CX Codex +1 ★ 117звёзд репо speckit.implement Chat2AnyLLM Команда speckit.implement выполняет задачи из tasks.md, сверяясь с планом и проектными документами. Она пригодится, когда нужно пройти план реализации по шагам. CX Codex +1 ★ 117звёзд репо

Из того же набора83

Весь набор →
speckit.analyze Субагент speckit.analyze проверяет согласованность spec.md, plan.md и tasks.md перед началом реализации. Помогает найти пропуски и противоречия после генерации задач. CX Codex +1 ★ 110звёзд репо speckit.implement Субагент speckit.implement, который берёт список задач из tasks.md и выполняет их по порядку, проверяя предусловия, читая артефакты проекта и следуя архитектуре из plan.md. CX Codex +1 ★ 110звёзд репо speckit.specify Промпт speckit.specify превращает текстовое описание фичи в структурированную спецификацию, нумерует ветку Git и создаёт чеклист проверки требований. CX Codex GP ChatGPT ★ 110звёзд репо speckit.converge Субагент speckit.converge сверяет реализацию в коде с требованиями, планом и задачами, а найденную недоделанную работу добавляет в конец tasks.md. Запускается после speckit.implement. CX Codex +1 ★ 110звёзд репо speckit.checklist Промпт speckit.checklist создаёт чеклисты для проверки качества требований к фиче до начала разработки. Помогает найти пробелы в спецификациях. CX Codex GP ChatGPT ★ 110звёзд репо speckit.specify Субагент speckit.specify для Claude Code преобразует описание функции обычным языком в файл спецификации проекта. Фиксирует требования перед составлением технического плана. CX Codex +1 ★ 110звёзд репо shots Скилл shots делает скриншоты и записи расширения VS Code, мода Claude Code в терминале и доски Copilot по скриптам. Когда визуальные проверки и картинки в документации должны обновляться автоматически. CX Codex +1 ★ 110звёзд репо speckit.clarify Субагент speckit.clarify находит пробелы и неясности в спецификации фичи, задаёт до пяти точечных вопросов и сразу вносит ответы обратно в документ. CX Codex +1 ★ 110звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой