spec-compound

spec-compound is a command for Claude Code from ronronner02/codepilot-agent. It costs 8 tokens per session (15,092 once invoked), scanned B, original, MIT.

A command that runs the Spec-First knowledge-capture workflow. Spec-First is a process for documenting project knowledge before or after implementation.

In plain words
What is it for?
Use it to run the project's knowledge-capture process from the command line.
Why use it?
It provides a repeatable way to capture knowledge instead of leaving it only in conversations or memory.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Good fit Use it to run the project's knowledge-capture process from the command line.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ronronner02/codepilot-agent/spec-compound
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.

Clone the repo
git clone --depth 1 https://github.com/ronronner02/codepilot-agent

Made for: Claude Code.

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 spec-compound

README.md
[![agentmods](https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-compound/github.svg)](https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-compound)
Your own site
<a href="https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-compound"><img src="https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-compound/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spec-compound

Your own site · 80×15
<a href="https://agentmods.dev/commands/ronronner02/codepilot-agent/spec-compound"><img src="https://agentmods.dev/badge/commands/ronronner02/codepilot-agent/spec-compound.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 15,092 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00008 $0.15092
Opus 5.5 $0.00003 $0.06037
Sonnet 5.5 $0.00002 $0.03018
Haiku 4.5 $0.00001 $0.01509

Measured 1mo ago against content hash 292de0126e42, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

spec-compound scanned grade B with 1 finding 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 700 "$SCRATCH_DIR"
.claude/commands/spec-compound.md · 770 lines

How it starts

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

Command support root: .claude/spec-first/workflows/spec-compound. Treat it as the loaded skill directory whenever this inlined workflow refers to SKILL_DIR or the directory containing SKILL.md.

spec-compound

Document a recently solved problem through role-based research; use parallel subagents only when dispatch is explicitly authorized and callable, otherwise run the same roles inline or serially.

Purpose

Captures problem solutions while context is fresh, creating structured documentation in docs/solutions/ with YAML frontmatter for searchability and future reference. Authorized dispatch can parallelize read-only research; correctness does not depend on it.

Why "compound"? Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.

Workflow Contract Summary

  • 输入: 一个最近解决且已有可回源验证的单一问题,或该问题带来的 durable project vocabulary。
  • 输出: docs/solutions/ 下带 provenance、适用范围与失效条件的 learning,以及必要时对 CONCEPTS.md 的局部补充。
  • 硬出口: 问题尚未解决、验证证据不足、一次请求包含多个独立 learning、目标 repo/source owner 不明确,或 promotion gate 不满足时不得写入 durable knowledge。
  • 权威: 当前 source/test/log 和已验证 outcome 决定可沉淀事实;LLM 判断复用价值;只有 orchestrator 可写知识资产,dispatch 不授予 mutation。
  • 消费者: 后续 spec-plan、spec-work、spec-debug、spec-code-review 与项目维护者。

Usage

spec-compound                            # Document the most recent fix
spec-compound [brief context]            # Provide additional context hint
spec-compound mode:headless              # Non-interactive run for automations
spec-compound mode:headless [context]    # Non-interactive run with context hint

One learning per run. The workflow's grounding, overlap detection, and cross-referencing all assume a single solved problem. When a session produced multiple distinct learnings, run the skill once per learning, sequentially — each run grounds fresh against the tree. Do not batch several learnings through one run and stitch cross-references between the drafts afterward; drafting-context numbering ("Learning 3") leaking into written docs is the failure this rule prevents.

Read the full file on GitHub · 770 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. 1mo ago First seen · 770 lines · 8 tokens per session scan B 292de0126e42

Subscribe to this mod's changes

spec-compound is a command published in the GitHub repository ronronner02/codepilot-agent (0 stars, last pushed 1mo ago), licensed MIT. It adds 8 tokens to every session and 15,092 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.