Speckit constitution

From michaeldouglas/alura-llama-factory · View interactive version

Speckit constitution is an AI agent skill from the GitHub repository michaeldouglas/alura-llama-factory. Create or update the project constitution from interactive or provided principle inputs.

How to use this skill

Skill file

User Input

$ARGUMENTS

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

Scope Guard

This command's own work is limited to updating the project constitution itself. Dependent templates

and commands read the constitution at runtime and are not modified here.

non-governance intent.

deployment requests, you MUST NOT execute them. Extract them as deferred intents instead.

components, tests, deployment files, or other artifacts unrelated to the constitution

workflow.

making changes.

intent. List the original intent and suggest the appropriate follow-up Spec Kit command, such

as $speckit-specify, without invoking it.

Pre-Execution Checks

Check for extension hooks (before constitution update):

```

## Extension Hooks

Optional Pre-Hook: {extension}

Command: /{command}

Description: {description}

Prompt: {prompt}

To execute: /{command}

```

```

## Extension Hooks

Automatic Pre-Hook: {extension}

Executing: /{command}

EXECUTE_COMMAND: {command}

Wait for the result of the hook command before proceeding to the Outline.

```

After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.

Outline

You are updating the project constitution at .specify/memory/constitution.md. The active

constitution scaffold is resolved at command time from constitution-template through the Spec Kit

preset/template resolution stack.

Follow this execution flow:

  1. Run .specify/scripts/powershell/resolve-template.ps1 constitution-template -Json from the repository root and parse TEMPLATE_CONTENT as the active template.

before the core template fallback. It MUST succeed before continuing.

template layer.

values and amendments. Preserve information that is still applicable when applying the newly

resolved scaffold.

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.

  1. Collect/derive values for placeholders:
  1. Draft the updated constitution content using the resolved template as the required structure:
  1. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
  1. Validation before final output:
  1. Write the completed constitution back to .specify/memory/constitution.md (overwrite).
  1. Output a final summary to the user with:

Formatting & Style Requirements:

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.

Write only .specify/memory/constitution.md; do not create or modify template source files.

Post-Execution Checks

Check for extension hooks (after constitution update):

Check if .specify/extensions.yml exists in the project root.

```

## Extension Hooks

Optional Hook: {extension}

Command: /{command}

Description: {description}

Prompt: {prompt}

To execute: /{command}

```

```

## Extension Hooks

Automatic Hook: {extension}

Executing: /{command}

EXECUTE_COMMAND: {command}

```

After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.