К основному содержанию
промпт CX Codex GP ChatGPT

speckit.constitution — промпт для Claude Code: что делает и установка

Промпт speckit.constitution создаёт или обновляет конституцию проекта в .specify/memory/constitution.md и синхронизирует связанные шаблоны спецификаций.

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

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

Что делает speckit.constitution

Промпт считывает базовый файл .specify/memory/constitution.md и находит плейсхолдеры вида [PROJECT_NAME] или [PRINCIPLE_1_NAME]. Значения подставляются из диалога или контекста репозитория. Правила формулируются строго через декларативные требования MUST и SHOULD. Для документа рассчитывается семантическая версия: MAJOR при отмене прежних правил, MINOR при добавлении принципов и PATCH при текстовых правках.

После изменения конституции запускается синхронизация связанных файлов. Промпт сверяет шаблоны plan-template.md, spec-template.md, tasks-template.md и команды из .specify/templates/. Наверх файла конституции добавляется отчёт Sync Impact Report, а пользователю выдаётся готовое сообщение для git commit.

Инструкция рассчитана на работу с уже существующим .specify/memory/constitution.md: если файл или структура каталогов отсутствуют, промпт не создаёт новый шаблон с нуля.

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

  • зафиксировать архитектурные принципы команды в Markdown-файле
  • синхронизировать шаблоны спецификаций и задач с новыми правилами
  • рассчитать семантическую версию конституции проекта
  • составить отчёт о влиянии изменений на шаблоны репозитория

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

  • Обнови конституцию проекта: добавь обязательное правило писать тесты перед реализацией
  • Заполни плейсхолдеры в .specify/memory/constitution.md на основе README.md
  • Зафиксируй дату ратификации и подними PATCH-версию конституции

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

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

.claude/commands/speckit.constitution.md

Вопросы о speckit.constitution

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

Сохраните текст промпта в файл .claude/commands/speckit.constitution.md. После этого команду можно запускать прямо в сессии Claude Code.

Что делает speckit.constitution?

Он заменяет токены-заполнители в конституции проекта конкретными формулировками, обновляет номер версии и проверяет согласованность зависимых шаблонов спецификаций.

Как определяется версия конституции?

По правилам SemVer. Несовместимые изменения и удаление правил повышают MAJOR-версию, новые принципы — MINOR, а уточнения формулировок и исправление опечаток — PATCH.

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

speckit.constitution.md · MIT
---
description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
handoffs: 
  - label: Build Specification
    agent: speckit.specify
    prompt: Implement the feature specification based on the updated constitution. I want to build...
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Outline

You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.

Follow this execution flow:

1. Load the existing constitution template at `.specify/memory/constitution.md`.
   - Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
   **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.

2. Collect/derive values for placeholders:
   - If user input (conversation) supplies a value, use it.
   - Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
   - For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
   - `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
     - MAJOR: Backward incompatible governance/principle removals or redefinitions.
     - MINOR: New principle/section added or materially expanded guidance.
     - PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
   - If version bump type ambiguous, propose reasoning before finalizing.

3. Draft the updated constitution content:
   - Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
   - Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
   - Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
   - Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.

4. Consistency propagation checklist (convert prior checklist into active validations):
   - Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
   - Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
   - Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
   - Read each command file in `.specify/templates/commands/*.md` (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
   - Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.

5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
   - Version change: old → new
   - List of modified principles (old title → new title if renamed)
   - Added sections
   - Removed sections
   - Templates requiring updates (✅ updated / ⚠ pending) with file paths
   - Follow-up TODOs if any placeholders intentionally deferred.

6. Validation before final output:
   - No remaining unexplained bracket tokens.
   - Version line matches report.
   - Dates ISO format YYYY-MM-DD.
   - Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).

7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).

8. Output a final summary to the user with:
   - New version and bump rationale.
   - Any files flagged for manual follow-up.
   - Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).

Formatting & Style Requirements:

- Use Markdown headings exactly as in the template (do not demote/promote levels).
- Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
- Keep a single blank line between sections.
- Avoid trailing whitespace.

If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.

If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.

Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.

© alfredoperez · MIT · alfredoperez/speckit-companion

Похожие промпты

Все промпты по теме «Настройка агента: память, контекст, субагенты» →
speckit-constitution github-spec-kit Скилл speckit-constitution ведёт проектную конституцию в .specify/memory/constitution.md: собирает принципы, версионирует правки и не трогает код приложения. CX Codex +1 2 500установок speckit-analyze github-spec-kit Скилл speckit-analyze для Claude Code проводит анализ согласованности файлов spec.md, plan.md и tasks.md. Запускается строго в режиме чтения перед началом кодинга. CX Codex +1 1 600установок speckit.implement Chat2AnyLLM Команда speckit.implement выполняет задачи из tasks.md, сверяясь с планом и проектными документами. Она пригодится, когда нужно пройти план реализации по шагам. CX Codex +1 ★ 117звёзд репо site-md официальный google-labs-code Разбирает описание проекта и собирает .stitch/SITE.md, конституцию для Stitch Build Loop. Запускается в начале проекта, чтобы задать агенту рамки. CX Codex +1 5 200установок policy-enforcer SethGammon Субагент policy-enforcer для Claude Code сверяет планируемое действие с правилами Citadel и возвращает вердикт: разрешить или заблокировать. Archon и Fleet запускают его перед операциями с низкой обратимостью. CX Codex ★ 937звёзд репо communication-style tzachbon Скилл communication-style для Claude Code задаёт правила кратких, структурированных ответов и планов. Помогает быстро просматривать результат без длинных объяснений. CX Codex +1 1установок

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

Весь набор →
speckit-git-feature Скилл speckit-git-feature для Claude Code создаёт Git-ветку по описанию задачи внутри проекта Spec Kit и использует его конфигурацию. CX Codex +1 ★ 110звёзд репо speckit.companion.living-move Команда speckit.companion.living-move переносит спецификации Speckit между общим каталогом capabilities и папками с кодом, одновременно обновляя реестр проекта. 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звёзд репо bench-run-all Команда bench-run-all для Claude Code прогоняет один размер через три ячейки, запуская агентов, оценку и сбор результатов. Сравнивает пайплайны Speckit. CX Codex +1 ★ 110звёзд репо publish-canvas Команда publish-canvas готовит релиз canvas-плагина Copilot: поднимает версию, гоняет тесты, ставит тег canvas-v<X.Y.Z> и обновляет запись в github/awesome-copilot. CX Codex +1 ★ 110звёзд репо bench-replay Команда bench-replay для Claude Code и Codex переигрывает один шаг пайплайна из сохранённого состояния и оценивает эффект изменения. CX Codex +1 ★ 110звёзд репо speckit.tasks Промпт speckit.tasks для Claude Code и Codex собирает из проектных документов план задач tasks.md, упорядоченный по зависимостям и пользовательским историям. Формирует этапы реализации проекта. CX Codex GP ChatGPT ★ 110звёзд репо

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

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