spec

A command that turns a development task or issue into a structured specification before coding begins. A specification records the problem, requirements, design decisions, and planned work.

In plain words
What is it for?
Use it to prepare an implementation plan from a written task, GitHub issue, or Jira ticket.
Why use it?
It moves important decisions into the planning stage, where misunderstandings are cheaper to fix than after implementation starts. It can read tasks from sources such as GitHub or Jira.

Command for Claude Code

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/xsovad06/sova/spec
Clone the repo
git clone --depth 1 https://github.com/xsovad06/sova

Made for: Claude Code.

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 2,082 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 $0.00014 $0.02082
Opus 5 $0.00007 $0.01041
Sonnet 5 $0.00003 $0.00416
Haiku 4.5 $0.00001 $0.00208

Measured yesterday against content hash dc6528bf8486, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec 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 yesterday.

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.

.claude/commands/spec.md · 275 lines

How it starts

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

Specification

Produce a structured specification document for a task before development starts. Shifts architectural and UX decisions to the cheap planning phase instead of the expensive coding phase.

# Benchmark logging (entry)
bash .claude/benchmark/log.sh "spec_start" "" "" 2>/dev/null || true

Task: $ARGUMENTS

Instructions

Step 1: Fetch the Task

If $ARGUMENTS is a text description (not a number or ticket key), use it directly as the problem statement and skip to Step 2.

Determine the task source by reading sova.toml (if it exists) and checking [task_source] type.

GitHub (default, or no sova.toml):

gh issue view $ARGUMENTS --json number,title,body,labels,milestone

JIRA (task_source.type = "jira"):

jira issue view $ARGUMENTS --plain

Extract: title, description, status, linked/blocked tickets, components.

Save the original description verbatim -- it will be preserved in the spec.

Early exit -- already implemented: if the issue body contains a Research section that concludes the issue is already fully implemented (look for phrases like "already implemented", "already complete", "no remaining work"), write a minimal spec file to .claude/specs/{issue-number}-already-implemented.md with the following content, then stop -- do not explore the codebase or write a full spec:

# Spec: {Issue title}

**Issue**: #{number}
**Status**: approved
**Created**: {YYYY-MM-DD}
**Complexity**: trivial

## Problem

Already implemented per research findings.

## Solution

No changes needed. The research step confirmed this issue is already fully implemented.

Step 2: Read Project Context

Read whatever exists -- skip files that are missing:

  • CLAUDE.md and AGENTS.md for project conventions
  • .claude/rules/architecture.md for component overview and design decisions
  • .claude/agent-memory/cookbook.md for known patterns and past mistakes

Step 3: Explore the Codebase

Based on the issue, identify the affected areas:

  1. Find the modules, files, and functions that will need changes
  2. Read existing patterns in those areas -- match them, don't invent new ones
  3. Identify reusable components, utilities, and test fixtures
  4. Check for related prior work (similar features, relevant tests)
  5. Find the closest precedent -- which prior task or file implements something similar? Note specific file paths and line numbers as the pattern reference.

Read the full file on GitHub · 275 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. yesterday First seen · 275 lines · 14 tokens per session scan A dc6528bf8486

Subscribe to this mod's changes

spec is a command published in the GitHub repository xsovad06/sova (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 14 tokens to every session and 2,082 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-31.