pf-spec

pf-spec is a command for Claude Code from matheusbrramos/ProductFlow. It costs 15 tokens per session (956 once invoked), scanned A, original, MIT.

A command that creates a Software Design Document, a written plan for how to build a software feature, from an approved Product Requirements Document, which describes what the feature should do.

In plain words
What is it for?
It is for documenting a feature's proposed architecture, components, data flow, integrations, security, performance, observability, tests, and release plan.
Why use it?
It turns product requirements into a technical plan covering architecture, interfaces, security, testing, and rollout before implementation begins.

Command 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 commands/matheusbrramos/productflow/pf-spec
Clone the repo
git clone --depth 1 https://github.com/matheusbrramos/ProductFlow

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/matheusbrramos/productflow/pf-spec.svg)](https://agentmods.dev/commands/matheusbrramos/productflow/pf-spec)
Your own site
<a href="https://agentmods.dev/commands/matheusbrramos/productflow/pf-spec"><img src="https://agentmods.dev/badge/commands/matheusbrramos/productflow/pf-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 956 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.00015 $0.00956
Opus 5 $0.00008 $0.00478
Sonnet 5 $0.00003 $0.00191
Haiku 4.5 $0.00002 $0.00096

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

Security

Grade A, and why

pf-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 5d 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/commands/pf-spec.md · 147 lines

How it starts

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

/pf-spec - Criar Software Design Document

Cria um SDD (Software Design Document) completo a partir de um PRD aprovado, definindo a arquitetura tecnica e decisoes de implementacao.

Entrada

$ARGUMENTS

Se nenhum argumento for fornecido, perguntar qual feature ou PRD usar como base.

Pre-requisitos

  1. PRD aprovado deve existir em docs/prd/
  2. .context/empresa.md deve existir

Se PRD nao existir, orientar a rodar /prd primeiro.

O que fazer

  1. Carregar contexto

    • Ler PRD relacionado
    • Verificar user stories existentes
    • Entender restricoes tecnicas
  2. Criar SDD completo com todas as secoes:

    • Visao Geral (objetivo, escopo, referencias)
    • Contexto e Restricoes (sistema atual, restricoes tecnicas, premissas)
    • Arquitetura Proposta (diagrama, componentes, fluxo de dados)
    • Design Detalhado (por componente: responsabilidades, interface, modelo de dados)
    • Integracao (dependencias internas/externas, contratos de API)
    • Seguranca (autenticacao, autorizacao, criptografia, auditoria)
    • Performance e Escalabilidade (requisitos, estrategia, caching)
    • Observabilidade (metricas, logs, alertas)
    • Testes (estrategia, dados de teste)
    • Plano de Rollout (fases, feature flags, rollback)
    • Riscos Tecnicos (probabilidade, impacto, mitigacao)
    • Decisoes de Design (ADRs)
  3. Garantir rastreabilidade

    • Linkar requisitos do PRD
    • Referenciar user stories
    • Conectar com analise competitiva

REGRAS CRITICAS

  • SDD define O COMO tecnico (arquitetura, tecnologias, APIs)
  • Deve ser consistente com os requisitos do PRD
  • Marcar [NEEDS TECH REVIEW] para decisoes que precisam validacao
  • Nao alterar requisitos definidos no PRD

Output

Criar arquivo: docs/sdd/{feature}.md

Usar template em docs/templates/sdd-template.md

Estrutura do Output

# SDD: [Nome da Feature]

**Versao:** 1.0
**Data:** YYYY-MM-DD
**Status:** Draft | Em Revisao | Aprovado
**PRD Relacionado:** docs/prd/{feature}.md
**Autor:** [nome]

## 1. Visao Geral
### Objetivo
### Escopo
### Referencias

## 2. Contexto e Restricoes
### Contexto do Sistema
### Restricoes Tecnicas
### Premissas Tecnicas

## 3. Arquitetura Proposta
### Diagrama de Alto Nivel
### Componentes Principais
### Fluxo de Dados

## 4. Design Detalhado
### 4.1 [Componente 1]
#### Responsabilidades
#### Interface
#### Modelo de Dados
#### Comportamento

## 5. Integracao
### Dependencias Internas
### Dependencias Externas
### Contratos de API

## 6. Seguranca
### Autenticacao
### Autorizacao
### Criptografia
### Auditoria

## 7. Performance e Escalabilidade
### Requisitos de Performance
### Estrategia de Escalabilidade
### Caching

## 8. Observabilidade
### Metricas
### Logs
### Alertas

## 9. Testes
### Estrategia de Testes
### Dados de Teste

## 10. Plano de Rollout
### Fases
### Feature Flags
### Rollback

## 11. Riscos Tecnicos

## 12. Decisoes de Design (ADRs)

## Historico de Versoes
## Aprovacoes

Read the full file on GitHub · 147 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. 5d ago First seen · 147 lines · 15 tokens per session scan A d1520d0ef454

Subscribe to this mod's changes

pf-spec is a command published in the GitHub repository matheusbrramos/ProductFlow (2 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 956 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.