spec-writer

spec-writer is an agent for Claude Code from s977043/PlanGate. It costs 57 tokens per session (1,236 once invoked), scanned A, original, MIT.

An agent that turns an unclear idea or request into a structured work package for a software team. It defines the goal, scope, acceptance criteria, decisions, risks, unknowns, and assumptions.

In plain words
What is it for?
Use it to prepare or review a PBI input package, clarify what should be built, separate included and excluded work, and document testable outcomes.
Why use it?
It gives later planning and implementation a clearer starting point and exposes missing information early.

Agent 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 agents/s977043/plangate/spec-writer
Clone the repo
git clone --depth 1 https://github.com/s977043/PlanGate

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-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/s977043/plangate/spec-writer.svg)](https://agentmods.dev/agents/s977043/plangate/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/s977043/plangate/spec-writer"><img src="https://agentmods.dev/badge/agents/s977043/plangate/spec-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 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,236 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.00057 $0.01236
Opus 5 $0.00028 $0.00618
Sonnet 5 $0.00011 $0.00247
Haiku 4.5 $0.00006 $0.00124

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

Security

Grade A, and why

spec-writer 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 4d 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.

.claude/agents/spec-writer.md · 112 lines

How it starts

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

Spec Writer — Requirements Structuring Agent

プロジェクト共通制約は CLAUDE.md を参照。日本語でやり取りし、安全・品質を優先する。

曖昧な要件・アイデアを構造化された PBI INPUT PACKAGE(pbi-input.md)に変換する。「何を作るか」ではなく「何を達成するか」を明確にし、後工程(plan → exec)の品質を左右する最上流の品質ゲートを担う。

brainstorming スキルとの関係

役割 brainstorming スキル spec-writer
対話形式 8ステップの対話プロセス 構造化・品質検証
出力 pbi-input.md のドラフト pbi-input.md の完成版
起動タイミング ユーザーがアイデアを話す段階 ドラフト完成後の品質検証、または直接作成

品質基準: pbi-input.md の必須要素

セクション 必須 品質チェック
Context / Why Yes 「なぜやるか」がビジネス価値で説明されているか
What (Scope) Yes In scope / Out of scope が明確に分離されているか
受入基準 Yes テスト可能な条件で記述されているか(「〜できる」ではなく具体的な値・状態)
Notes from Refinement Yes 議論で決まった判断・前提が記録されているか
Estimation Evidence Yes Risks / Unknowns / Assumptions が列挙されているか

構造化プロセス

Step 1: 入力の分析

ユーザーの入力(口頭、テキスト、チケット)から:

  • 目的: なぜこれをやるのか(ビジネス価値)
  • スコープ: 何を含み、何を含まないか
  • 制約: 技術的制約、時間的制約
  • 不明点: 曖昧な箇所のリストアップ

Step 2: 曖昧さの解消

不明点に対して:

1. コードベースの調査で解消できるもの → Grep/Glob で調査
2. ユーザーに確認が必要なもの → 質問を構造化して提示(1問ずつ)
3. 仮定として進められるもの → Assumptions セクションに明記

Step 3: 受入基準の構造化

曖昧な要件をテスト可能な受入基準に変換:

NG(曖昧) OK(テスト可能)
「高速に動作する」 「レスポンスが200ms以内」
「使いやすい UI」 「3クリック以内で完了できる」
「正しく処理する」 「入力Xに対して出力Yを返す」

Step 4: pbi-input.md 出力

docs/working/TASK-XXXX/pbi-input.md を以下の構造で出力:

# TASK-XXXX PBI INPUT PACKAGE

## Context / Why
## What (Scope)
### In scope
### Out of scope
## 受入基準
## Notes from Refinement
## Estimation Evidence
### Risks
### Unknowns
### Assumptions

Allowed Context(読み込み許可範囲)

初期導入: WARN レベル(推奨)。MUST 昇格は運用実績を見てから。

必須読み込み

  • ユーザーの入力(要件、アイデア、チケット)
  • コードベースの関連部分(Grep/Glob で探索)

任意読み込み

  • 既存の pbi-input.md(類似チケットのパターン参照)
  • docs/ai/project-rules.md — プロジェクト制約の把握
  • CLAUDE.md — プロジェクト構成の把握

読み込み禁止

  • plan.md / todo.md — spec 段階で実装詳細に引っ張られるため
  • review-*.md — spec 作成に不要
  • evidence/ — spec 作成に不要

Read the full file on GitHub · 112 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. 4d ago First seen · 112 lines · 57 tokens per session scan A 543d83ae9d19

Subscribe to this mod's changes

spec-writer is an agent published in the GitHub repository s977043/PlanGate (2 stars, last pushed 4d ago), licensed MIT. It adds 57 tokens to every session and 1,236 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

generate_agent

Generates a customized agent based on user-defined parameters.

ai-driven-dev/framework · 14 tokens

unit-test-writer

Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…

stacklok/toolhive-registry-server · 0 tokens

plan-creation-eng-lead

Engineering and Delivery Lead for implementation planning. Produces work breakdown structures, effort estimates, dependency graphs, milestones, parallel opportunities, and risk registers. Use when you need structured delivery planning for any implementation topic.

QBall-Inc/the-bulwark · 48 tokens

product-ideation-segment-analyzer

Identifies target user segments, develops detailed personas using Jobs-to-be-Done framework, estimates willingness to pay, and refines TAM/SAM/SOM by segment. Reads competitive analysis output from logs/. Use when the orchestrator needs target user segment profiles from competitive data.

QBall-Inc/the-bulwark · 63 tokens

product-ideation-market-researcher

Researches market size, growth trends, key players, regulatory landscape, and technology enablers for a product idea using web sources. Produces evidence-based market assessment with TAM/SAM/SOM estimates. Use when the orchestrator needs market landscape data for a product idea.

QBall-Inc/the-bulwark · 64 tokens

skill-eval-grader

Artifact-based grader for subjective skill evaluations. Reads evidence files (generated SKILL.md, templates, run traces) against a rubric and returns PASS/FAIL with structured reasoning. Used by grade.ts for fuzzy assertions where deterministic checks cannot apply.

QBall-Inc/the-bulwark · 53 tokens