agent-spec

An interactive workflow for developing a feature from a written specification. It creates requirements, an architecture design, and an implementation task list, then waits for approval before executing the work.

In plain words
What is it for?
Use it for larger or complex features that need structured requirements, design review, task breakdown, and parallel implementation work.
Why use it?
It makes feature expectations and technical decisions explicit before implementation begins, reducing misunderstandings and missed requirements.

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/ruizrica/toolkit/agent-spec
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,356 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.00000 $0.01356
Opus 5 $0.00000 $0.00678
Sonnet 5 $0.00000 $0.00271
Haiku 4.5 $0.00000 $0.00136

Measured 3d ago against content hash 4edd94c535ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-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 3d 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.

docs/commands/agent-spec.md · 146 lines

How it starts

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

/agent-spec

Interactive spec-driven development workflow that generates EARS-format requirements, architecture design, and an implementation task breakdown, gates on agent-viewer spec approval, and then executes with parallel agents. Follows the same Kiro pattern as /kiro — the two are kept as sibling entry points so /agent-plan and /agent-spec can be memorised as a pair.

Usage

/agent-spec [feature idea] [--project PATH] [--name SPEC_NAME] [--agent cursor|haiku]

Arguments

Argument Required Description
feature idea Yes Description of the feature to implement
--project PATH No Project path (defaults to current directory)
--name SPEC_NAME No Spec name (defaults to YYYY-MM-DD-<slug>)
--agent cursor|haiku No Agent tier for Phase 4 execution (default: cursor)

Workflow Phases

Four interactive phases; each pauses for AskUserQuestion clarification.

Phase 1 — Requirements

  • Spawns 2 Haiku agents in parallel (domain explorer + constraints discoverer)
  • Generates EARS-format requirements to 1-requirements.md
  • Q&A pause: scope, users, constraints, priorities

Phase 2 — Design

  • Spawns 2 Haiku agents in parallel (architecture designer + API designer)
  • Generates 2-design.md with components, data models, API contracts, error handling
  • Q&A pause: architecture fit, technology choices, trade-offs

Phase 3 — Tasks

  • Spawns 2 Haiku agents in parallel (task decomposer + test planner)
  • Generates 3-tasks.md with phased checklist, dependencies, quality gates
  • Mandatory spec-viewer gateagent-viewer spec --folder ~/.claude/plans/<spec_name> --json must return approved before Phase 4
  • Q&A pause: granularity, order, scope

Phase 4 — Execution

  • Parses tasks into dependency waves
  • Spawns 4 Cursor (or Haiku, with --agent haiku) agents per wave in parallel
  • Enforces TDD (test first)
  • Reports completion summary

Storage

Read the full file on GitHub · 146 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. 3d ago First seen · 146 lines · 0 tokens per session scan A 4edd94c535ec

Subscribe to this mod's changes

agent-spec is a command published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,356 tokens. 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.