ledger-spec

ledger-spec is a command for Claude Code from synaptiai/synapti-marketplace. It costs 12 tokens per session (1,224 once invoked), scanned A, original, Apache-2.0.

A command for creating product requirements and architecture documents from a decision ledger, which is a record of agreed project choices and risks. Each part of the documents must point back to a recorded decision.

In plain words
What is it for?
Use it after decisions and risks are recorded to generate a PRD, a description of what a product should do, and an architecture document, a plan for how it will be built.
Why use it?
Specifications can drift away from the choices that justified them, making it hard to understand why something was included or to spot unsupported requirements. This keeps the documents traceable to project decisions.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the context-ledger plugin — 5 skills, 8 commands, 5 agents shipped together

Good fit Use it after decisions and risks are recorded to generate a PRD, a description of what a product should do, and an architecture document, a plan for how it will be built.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/synaptiai/synapti-marketplace/ledger-spec
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/synaptiai/synapti-marketplace

Made for: Claude Code.

Or install context-ledger, the plugin that ships this one along with the rest of its 5 skills, 8 commands, 5 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/ledger-spec/github.svg)](https://agentmods.dev/commands/synaptiai/synapti-marketplace/ledger-spec)
Your own site
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/ledger-spec"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/ledger-spec/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 ledger-spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/ledger-spec"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/ledger-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 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,224 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00012 $0.01224
Opus 5 $0.00006 $0.00612
Sonnet 5 $0.00002 $0.00245
Haiku 4.5 $0.00001 $0.00122

Measured 10d ago against content hash 6d65af266770, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ledger-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 10d 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.

plugins/context-ledger/commands/ledger-spec.md · 188 lines

How it starts

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

Generate Specs

Generate PRD and architecture documents constrained by the decision ledger.

Constraint Enforcement: Every section, requirement, and technical choice must cite DEC-* references. Content without decision support cannot be generated.

Arguments

$ARGUMENTS: Optional spec type or focus area.

Optional flags:

  • --prd-only - Generate only PRD
  • --arch-only - Generate only architecture
  • --focus <area> - Focus on specific area (scope, pricing, tech, etc.)

Prerequisites

  • Decisions complete (/ledger-decide)
  • 04-decisions/DECISIONS.yaml exists
  • 05-risks/RISKS.yaml exists

Workflow

  1. Load Decision Ledger

    • Read all decisions from DECISIONS.yaml
    • Read all risks from RISKS.yaml
    • Build decision index by area
  2. Generate PRD

    • Map decisions to PRD sections
    • Write 06-prd/PRD.md with citations
    • Validate constraint gate
  3. Generate Architecture

    • Map technical decisions to architecture sections
    • Write 07-architecture/ARCHITECTURE.md with citations
    • Validate constraint gate
  4. Cross-Reference

    • Ensure decision coverage
    • Link risks to relevant sections
    • Generate traceability summary

Example Usage

Full spec generation

/ledger-spec

PRD only

/ledger-spec --prd-only

Architecture only

/ledger-spec --arch-only

Focus on specific area

/ledger-spec --focus tech

Output

## Spec Generation Complete

**PRD:** 06-prd/PRD.md (14 sections)
**Architecture:** 07-architecture/ARCHITECTURE.md (11 sections)

### Constraint Gate Status
- PRD gate: ✓ All 14 sections cite decisions
- Architecture gate: ✓ All 11 sections cite decisions

### Decision Coverage

| Decision | Status | PRD Sections | Arch Sections |
|----------|--------|--------------|---------------|
| DEC-scope-power-users-first | accepted | 1, 2, 4, 5 | 2, 3 |
| DEC-pricing-freemium | provisional | 3, 8 | - |
| DEC-tech-postgres-primary | accepted | - | 3, 4, 5 |
| DEC-tech-serverless | accepted | - | 1, 5, 8 |
| DEC-legal-gdpr-consent | accepted | 7 | 6 |
| ... | ... | ... | ... |

### Orphaned Decisions (not referenced)
- DEC-gtm-launch-timing (may need GTM section)

### Risks Cross-Referenced
| Risk | PRD Sections | Arch Sections |
|------|--------------|---------------|
| RISK-retention-expert-churn | 2, 5 | - |
| RISK-tech-llm-cost | 5 | 5, 7 |
| RISK-economics-free-tier | 8 | 7 |

### Files Generated
- `06-prd/PRD.md`
- `07-architecture/ARCHITECTURE.md`

### Next Step
Run `/ledger-plan` to generate implementation backlog.

Read the full file on GitHub · 188 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. 10d ago First seen · 188 lines · 12 tokens per session scan A 6d65af266770

Subscribe to this mod's changes

ledger-spec is a command published in the GitHub repository synaptiai/synapti-marketplace (6 stars, last pushed today), licensed Apache-2.0. It adds 12 tokens to every session and 1,224 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.