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

speckit.companion.living-move — команда для Claude Code

Команда speckit.companion.living-move переносит спецификации Speckit между общим каталогом capabilities и папками с кодом, одновременно обновляя реестр проекта.

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

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

Что делает speckit.companion.living-move

Команда перемещает living-спецификации между центральным хранилищем в capabilities/ и колоцированным размещением прямо рядом с кодом. Содержимое файлов и заголовки требований не затрагиваются: идентификатором служит текст заголовка третьего уровня, поэтому внешние ссылки не ломаются.

Процесс разбит на четыре шага. Сначала ассистент показывает планируемые пути и запрашивает подтверждение разработчика. Затем запускается Python-скрипт relocate-capability.py, который перемещает файл спецификации вместе со связанными файлами правил и обновляет реестр living-specs.yml. В конце результат проверяется утилитой resolve-spec-paths.py.

Переносить файлы вручную нельзя. Если путь в реестре разойдётся с файловой системой, резолвер заблокирует чтение всего конфига living-specs.yml, а не одной спецификации.

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

  • перенести спецификацию модуля из общей папки capabilities в папку с кодом
  • перевести все living-спецификации репозитория в централизованный каталог
  • обновить реестр living-specs.yml синхронно с переносом файлов на диске
  • проверить корректность путей спецификаций после реорганизации проекта

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

  • Перенеси спецификацию billing в colocated
  • Перемести все спецификации в central
  • Перенеси модуль tax в colocated и покажи итоговые пути

Как установить speckit.companion.living-move

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

.claude/commands/speckit.companion.living-move.md

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

Вопросы о speckit.companion.living-move

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

Сохраните файл команды по пути .claude/commands/speckit.companion.living-move.md. После этого вызов станет доступен в сессии Claude Code.

Что делает speckit.companion.living-move?

Команда перемещает спецификации между каталогом capabilities и папками с кодом, синхронно обновляя системный реестр living-specs.yml.

Почему нельзя перенести файлы спецификаций вручную?

Ручной перенос нарушает синхронизацию с living-specs.yml. Скрипт выполняет перенос атомарно, тогда как несовпадение путей ломает всю конфигурацию спецификаций проекта.

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

speckit.companion.living-move.md · MIT
---
description: "Move a living spec between central and colocated storage — file, tiers, and registry together (opt-in, reversible)"
---

# Relocate a Living Spec

Move a capability's living spec between the two storage layouts, without hand-editing config or moving files yourself.

- **central** — `capabilities/<capability>/<name>.spec.md`. One folder per capability, holding one spec or several granular ones. A legacy `capabilities/<name>/spec.md` still reads, and moving it centrally renames it to the new shape.
- **colocated** — `<area root>/<name>.spec.md`, sitting next to the code it describes.

Neither is more correct. Colocating makes ownership obvious and the spec travels with the code when it moves; centralizing keeps the whole record readable in one place and survives code being reorganized. Repos commonly end up mixed, and that is a fine outcome.

The move is reversible and loses nothing. A requirement's identity is its `###` heading text *inside* the spec, so nothing outside the file points at its location — there is no id to renumber, no link to fix, no index to rebuild.

## Input

```text
$ARGUMENTS
```

The argument names what to move and where — a capability name and a target layout (`billing to colocated`), or a repo-wide instruction (`everything to central`).

If either is missing, ask. List the capabilities with their current layout so the developer can see what they are choosing between, and never guess at a target layout.

## What to do

### 1. Show what will move, and pause

Resolve the current layout of each named capability and the exact path each spec will land at. Show that before touching anything:

```text
billing        capabilities/billing/billing.spec.md  →  src/billing/billing.spec.md
billing-tax    capabilities/billing/tax.spec.md  →  src/billing/tax/billing-tax.spec.md
```

Add one line only where something would surprise them: a display name that changes (colocated names come from the file stem), a capability that stays central because its globs cover several folders or the whole area, and any `.rules.md` or `.coverage.md` that travels with the spec.

Then ask. One question, one word back. This is the only pause.

### 2. Run the relocation

Use the deterministic helper — it moves the spec and every tier sibling, rewrites the registry, and keeps the two in step:

```bash
python3 .specify/extensions/companion/scripts/relocate-capability.py --name <name> --to <central|colocated> [--spec <path>] [--root .]
```

For a repo-wide move, `--all --to <layout>`.

Pass `--spec` when the derived path was wrong or ambiguous, using the path confirmed at the gate.

Do **not** move files yourself and do **not** hand-edit `living-specs.yml`. The file and the registry must change together: the resolver raises `capability "<name>" is colocated but has no resolvable spec path` and fails the **entire** living-specs config — not just that capability — if they disagree. The helper is atomic and rolls back on failure; a hand-rolled move is not.

Re-running against a capability already in the target layout is a safe no-op.

### 3. Verify

Confirm the resolver agrees with what you just did:

```bash
python3 .specify/extensions/companion/scripts/resolve-spec-paths.py --root . --all --json
```

Each moved capability should report the new `spec` path and the expected location. Then resolve a real file from the capability's area and check it still matches — most-specific-first ordering must be unchanged, since relocation moves the spec, not the globs:

```bash
python3 .specify/extensions/companion/scripts/resolve-spec-paths.py --root . --changed <a file under the area> --json
```

If a capability vanished from the listing, or the config now fails to load, the move and the registry are out of step — report it plainly rather than patching around it.

### 4. Report

Say which capabilities moved and where, which were already in the target layout and skipped, which were left alone because their area root was ambiguous, any display name that changed, and whether the resolver confirmed the result. If tier files moved, list them.

## Boundaries

- **Move, never rewrite.** Spec content is not touched. If a spec needs reshaping, that is a separate job.
- **The registry and the disk move together.** Never leave them disagreeing; a partial move breaks the whole config, not one capability.
- **Only what was named.** Do not opportunistically relocate a capability the developer did not ask about, even when its layout looks inconsistent with the rest.
- **Reversible by construction.** Every move can be run in the opposite direction, and re-running is a no-op.
- **Never fail the host.** A missing capability, an unparseable config, or an ambiguous area root is reported and skipped, not crashed through.

© alfredoperez · MIT · alfredoperez/speckit-companion

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

Все слэш-команды по теме «Тексты и документация» →
speckit-analyze github-spec-kit Скилл speckit-analyze для Claude Code проводит анализ согласованности файлов spec.md, plan.md и tasks.md. Запускается строго в режиме чтения перед началом кодинга. CX Codex +1 1 600установок speckit-checklist github-spec-kit Скилл speckit-checklist генерирует контрольный список для проверки качества требований к новой функциональности. Он нужен ревьюеру, чтобы найти пробелы в спецификации ещё до написания кода. CX Codex +1 1 600установок speckit.implement Chat2AnyLLM Команда speckit.implement выполняет задачи из tasks.md, сверяясь с планом и проектными документами. Она пригодится, когда нужно пройти план реализации по шагам. CX Codex +1 ★ 117звёзд репо speckit.verify Giuseppe Trisciuoglio Команда speckit.verify проверяет готовность реализации по задачам, спецификации, тестам и качеству кода. Запускайте после /speckit.implement. CX Codex +1 ★ 372звёзд репо ns-living-spec nextstage-brasil Скилл ns-living-spec синхронизирует спецификации проекта в каталоге docs/specs/ с кодом. Обновляет доменные требования после закрытия версий или подтверждённых ревью. CX Codex +1 140установок openspec-propose openspec Скилл openspec-propose для Claude Code создаёт полный пакет планирования OpenSpec за один шаг. Он формирует архитектурное решение, дельту спецификаций и задачи без изменения кода. CX Codex +1 4 600установок

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

Весь набор →
release-loop Команда release-loop для Claude Code и Codex проводит пакет изменений через исправления, QA и выпуск релиза. Перед публикацией она собирает отчёт и ждёт одобрения. CX Codex +1 ★ 110звёзд репо bench-wave Команда bench-wave запускает полный цикл бенчмарка для этапа оптимизации pipeline-diet в Speckit Companion и сохраняет метрики в сводную таблицу. Пригодится при замерах скорости и расхода токенов. CX Codex +1 ★ 110звёзд репо speckit.git.feature Команда speckit.git.feature создаёт и переключает на новую Git-ветку для функции из спецификации. Нумерацию и шаблон имени можно задать через конфигурацию проекта. CX Codex +1 ★ 110звёзд репо speckit-git-feature Скилл speckit-git-feature для Claude Code создаёт Git-ветку по описанию задачи внутри проекта Spec Kit и использует его конфигурацию. CX Codex +1 ★ 110звёзд репо publish-mod Команда publish-mod проводит релиз мода Claude Code через marketplace репозитория и готовит материалы для отправки в каталог Anthropic. CX Codex +1 ★ 110звёзд репо speckit.companion.mark-complete Команда speckit.companion.mark-complete для Claude Code помечает активную спеку завершённой через write-context.py. Закрывает спеку вручную без полного слияния. CX Codex +1 ★ 110звёзд репо speckit.constitution Промпт speckit.constitution создаёт или обновляет конституцию проекта в .specify/memory/constitution.md и синхронизирует связанные шаблоны спецификаций. CX Codex GP ChatGPT ★ 110звёзд репо bench-run-all Команда bench-run-all для Claude Code прогоняет один размер через три ячейки, запуская агентов, оценку и сбор результатов. Сравнивает пайплайны Speckit. CX Codex +1 ★ 110звёзд репо

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

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