speckit.spex.evolve

speckit.spex.evolve is a command for coding agents from rhuss/cc-spex. It costs 14 tokens per session (3,259 once invoked), scanned A, original, Apache-2.0.

A workflow for resolving differences between a software specification and the code that implements it.

In plain words
What is it for?
It is for analyzing mismatches found during code review, verification, or implementation, then applying the agreed change. It requires the project to be initialized with Spec-kit.
Why use it?
It helps determine whether the specification or the code should change when they no longer describe the same behavior.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rhuss/cc-spex/speckit.spex.evolve
Clone the repo
git clone --depth 1 https://github.com/rhuss/cc-spex

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for speckit.spex.evolve

README.md
[![agentmods](https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex.evolve.svg)](https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex.evolve)
Your own site
<a href="https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex.evolve"><img src="https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex.evolve.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.03259
Opus 5 $0.00007 $0.01630
Sonnet 5 $0.00003 $0.00652
Haiku 4.5 $0.00001 $0.00326

Measured 6d ago against content hash 6265cfe6b24b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

speckit.spex.evolve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

specs/038-neutral-command-vocab/pre-rewrite-snapshot/spex/commands/speckit.spex.evolve.md · 563 lines

How it starts

The opening of the file, as written. The whole thing — 563 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spec Evolution and Reconciliation

Overview

Handle spec/code mismatches through AI-guided analysis and user-controlled evolution.

Specs WILL diverge from code. This is normal and healthy. The question is: which should change?

This skill detects divergence, analyzes the mismatch, recommends resolution, and executes the change.

When to Use

Use this skill when:

  • Code review detects spec/code mismatch
  • Verification finds spec compliance issues
  • Developer explicitly requests evolution
  • Implementation reveals better approach than spec
  • Spec ambiguity discovered during implementation

Auto-triggered by:

  • speckit-spex-gates-review-code (when deviations found)
  • speckit-spex-gates-stamp (when compliance fails)
  • speckit-spex-finish (when verification finds compliance issues)

Don't use this skill when:

  • No mismatch exists (everything compliant)
  • Spec doesn't exist yet -> Use /speckit-specify
  • Multiple specs need consolidation -> Use speckit-spex-spec-refactoring

Prerequisites

Spec-kit must be initialized. If .specify/ directory does not exist, tell the user to run /spex:init first and stop.

Spec Selection

If no spec is specified, discover available specs:

# List all specs in the project
find specs/ -name "spec.md" -type f 2>/dev/null | head -20

If specs found: Present list and ask user to select one using the agent's interactive prompt mechanism.

Example:

Found 2 specs in this project:
1. specs/0001-user-auth/spec.md
2. specs/0002-api-gateway/spec.md

Which spec needs evolution/reconciliation?

If no specs found: Inform user:

No specs found in specs/ directory.

Spec evolution requires an existing spec to evolve.
Use `speckit-spex-brainstorm` or `/speckit-specify` to create one first.

The Process

0. Check Existing Artifacts

Before analyzing or modifying, verify spec-kit artifacts exist:

# Check what artifacts exist for this feature
SPEC_DIR="specs/[feature-dir]"  # Replace with actual spec directory
echo "Checking for existing artifacts..."
[ -f "$SPEC_DIR/spec.md" ] && echo "spec.md exists" || echo "spec.md missing"
[ -f "$SPEC_DIR/plan.md" ] && echo "plan.md exists" || echo "plan.md not present"
[ -f "$SPEC_DIR/tasks.md" ] && echo "tasks.md exists" || echo "tasks.md not present"

Read the full file on GitHub · 563 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 563 lines · 14 tokens per session scan A 6265cfe6b24b

Subscribe to this mod's changes

speckit.spex.evolve is a command published in the GitHub repository rhuss/cc-spex (114 stars, last pushed 17d ago), licensed Apache-2.0. It adds 14 tokens to every session and 3,259 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.