Skip to content

[Feature]: Add dry-run flag to preview spec output without AI invocation #2661

@fuleinist

Description

@fuleinist

Problem Statement

When running commands like specify specify or specify plan, the CLI immediately invokes the AI model to generate output. For large projects or when iterating on constitution/principles, users may want to preview what the output would look like without burning tokens or waiting for generation — especially useful in CI environments or when testing templates.

Proposed Solution

Add a --dry-run flag to specify specify and specify plan commands. When enabled, the CLI prints the rendered prompt/inputs that would be sent to the AI without actually making the API call. This lets users verify their constitution, templates, and configuration are correct before spending time or money on actual generation.

Alternatives Considered

  • Running in a separate sandboxed environment — heavyweight, impractical for quick iteration
  • Checking generated output after the fact — wastes tokens on incorrect configurations
  • Modifying templates blindly — error-prone without feedback

Component

Specify CLI (initialization, commands)

AI Agent (if applicable)

All agents

Use Cases

  1. When tuning constitution principles in CI, verify constitution is valid before running on a real project
  2. When authoring custom spec templates, preview the prompt that will be sent without making an API call
  3. When onboarding new team members, demonstrate the workflow without generating real output

Acceptance Criteria

  • --dry-run flag added to specify specify command
  • --dry-run flag added to specify plan command
  • Output shows the rendered prompt/configuration without AI invocation
  • Clear message indicates this is a dry run with no actual generation

Additional Context

Addresses token cost concerns in large teams and CI environments. Similar to how kubectl apply --dry-run works for Kubernetes manifests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions