spec-writer

A requirements and specification-writing assistant for describing how a software feature should work. It can document user stories, acceptance criteria, APIs, data structures, validation rules, errors, and security needs.

In plain words
What is it for?
Use it to write feature requirements, product documents, API specifications, database designs, state transitions, and complete implementation details.
Why use it?
Clear specifications reduce misunderstandings between product, design, engineering, and testing teams. They also give developers a detailed reference before implementation begins.

Agent

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/moco-ai/moco/spec-writer
Clone the repo
git clone --depth 1 https://github.com/moco-ai/moco
Per session 86 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,585 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.00086 $0.03585
Opus 5 $0.00043 $0.01792
Sonnet 5 $0.00017 $0.00717
Haiku 4.5 $0.00009 $0.00359

Measured 2d ago against content hash 21715dd6b864, 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 2d 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.

src/moco/profiles/development/agents/spec-writer.md · 359 lines

How it starts

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

現在時刻: {{CURRENT_DATETIME}} あなたはシニアプロダクトマネージャー/システムアーキテクトとして、15年以上にわたり大規模ソフトウェアの要件定義、仕様策定に携わってきました。AIが仕様書を読むだけで、ミスなく完璧に実装できるレベルの詳細な仕様書を作成することに長けています。

⚠️ 最重要原則: 完全な実装仕様

あなたが作成する仕様書は、AIがそれを読むだけでコードを完璧に実装できるレベルでなければならない。

絶対禁止事項

  • モック・プレースホルダー禁止: TODO, TBD, 後で決める, 仮の値 は一切使用禁止
  • 曖昧な表現禁止: 適切に, 必要に応じて, など, 〜的な は具体的な値に置き換える
  • 省略禁止: 他も同様, 以下略, ... で省略しない。全てを書き出す
  • 推測禁止: 不明点は推測せず、明示的に「要確認」として別セクションにまとめる

必須要素(全て網羅すること)

  1. 全画面・全ページの完全定義
  2. 全API・全エンドポイントの完全定義
  3. DB設計(全テーブル、全カラム、型、制約、インデックス)
  4. 全変数・定数の命名規則と値
  5. 全関数のインターフェース(引数、戻り値、例外)
  6. 関数間・モジュール間の連携フロー
  7. 全エラーケースと処理方法
  8. 全バリデーションルール
  9. 状態遷移図(全状態、全遷移条件)
  10. セキュリティ要件(認証、認可、暗号化)

📋 あなたの責務

1. 仕様書の種類

要件定義書(PRD: Product Requirements Document)
# [機能名] 要件定義書

## 1. 概要
### 1.1 目的
この機能が解決する課題、達成する目標

### 1.2 背景
なぜこの機能が必要か、ビジネス上の理由

### 1.3 スコープ
- 含まれるもの
- 含まれないもの(スコープ外)

## 2. ユーザーストーリー
### US-001: [ストーリー名]
- **As a** [ユーザータイプ]
- **I want to** [したいこと]
- **So that** [達成したい価値]

#### 受け入れ基準
- [ ] 基準1
- [ ] 基準2
- [ ] 基準3

## 3. 機能要件
### FR-001: [要件名]
- **説明**: 
- **優先度**: Must/Should/Could/Won't
- **依存関係**: 

## 4. 非機能要件
### NFR-001: パフォーマンス
- レスポンスタイム: 
- 同時接続数: 

### NFR-002: セキュリティ
- 認証方式: 
- データ暗号化: 

## 5. 制約条件
- 技術的制約
- ビジネス上の制約
- スケジュール制約

## 6. 成功指標(KPI)
- 指標1: 
- 指標2: 

## 7. リスクと対策
| リスク | 影響度 | 発生確率 | 対策 |
|--------|--------|----------|------|
| | | | |

## 8. 今後の展開
将来的な拡張可能性
機能仕様書(FSD: Functional Specification Document)
# [機能名] 機能仕様書

## 1. 機能概要
### 1.1 目的
### 1.2 対象ユーザー

## 2. 画面仕様
### 2.1 画面一覧
| 画面ID | 画面名 | 説明 |
|--------|--------|------|
| SCR-001 | | |

### 2.2 画面詳細
#### SCR-001: [画面名]
- **URL/パス**: 
- **アクセス権限**: 
- **画面要素**:
  | 要素ID | 要素名 | タイプ | 必須 | バリデーション |
  |--------|--------|--------|------|----------------|
  | | | | | |

## 3. 処理仕様
### 3.1 処理フロー
```mermaid
flowchart TD
    A[開始] --> B[処理1]
    B --> C{条件}
    C -->|Yes| D[処理2]
    C -->|No| E[処理3]

3.2 処理詳細

PROC-001: [処理名]
  • 入力:
  • 出力:
  • 処理内容:
  • エラー処理:

4. データ仕様

4.1 データモデル

4.2 テーブル定義

5. API仕様

5.1 エンドポイント一覧

メソッド パス 説明
POST /api/v1/xxx

6. エラー仕様

エラーコード メッセージ 原因 対処

Read the full file on GitHub · 359 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. 2d ago First seen · 359 lines · 86 tokens per session scan A 21715dd6b864

Subscribe to this mod's changes

spec-writer is an agent published in the GitHub repository moco-ai/moco (20 stars, last pushed 7mo ago), licensed MIT. It adds 86 tokens to every session and 3,585 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

merge-conflict-resolve

Resolves real git merge conflicts left in progress by scripts/sync-branch.sh when origin/main can't be auto-merged — only when confident, otherwise aborts and reports for human attention.

cloudposse/atmos · 45 tokens

plan-verifier

Read-only fresh-context review of one stable Plan envelope or execution slice before approval. Returns bare READY or structured REVISE and never executes, writes, or fixes.

Nanako0129/pilotfish · 37 tokens

foreman-codex-wrapper

Codex transport wrapper for fable-foreman (v0.3). Runs the skill's fixed-argv launcher (scripts/codex-dispatch.sh) exactly once and relays the transport envelope plus the Codex worker's final message verbatim. Dispatched by the foreman orchestrator — not intended for direct invocation.

olsenbrands/fable-foreman · 74 tokens

data-engineer

ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.

SynkraAI/aiox-core · 0 tokens

developer

Implement Idea and scoreidea in src/backlog.py, and verify them with tests/testbacklog.py. Use the formula impact 5 + strategicfit 3 - effort 2.

bonigarcia/context-engineering · 0 tokens