why

A project-context lookup command that answers why a file, code symbol, pattern, or design decision exists.

In plain words
What is it for?
It helps explain the purpose of files and symbols, the reasoning behind implementation choices, and patterns used in the project.
Why use it?
It saves developers from piecing together the answer from architecture notes, coding conventions, reusable code lists, risks, and Git history.

Command

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/vynazevedo/first-plan/why
Clone the repo
git clone --depth 1 https://github.com/vynazevedo/first-plan
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 778 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.00035 $0.00778
Opus 5 $0.00017 $0.00389
Sonnet 5 $0.00007 $0.00156
Haiku 4.5 $0.00003 $0.00078

Measured yesterday against content hash 7116784a8736, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

why 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 yesterday.

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.

commands/why.md · 98 lines

How it starts

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

/fp:why

Query da camada compilada: contexto sobre algo do projeto.

Argumentos

$ARGUMENTS - alvo da consulta. Pode ser:

  • Path de arquivo: .first-plan:why src/auth/jwt.go
  • Símbolo: /fp:why ValidateEmail
  • Padrão: /fp:why "wrapping de erros"
  • Decisão: /fp:why "uso de Bull em vez de BullMQ"

Workflow

Passo 1 - Classificar o argumento

  • Path de arquivo (existe no filesystem) -> consulta sobre arquivo
  • Símbolo (CamelCase, snake_case identificável) -> consulta sobre símbolo
  • Frase entre aspas ou texto livre -> consulta livre

Passo 2 - Buscar evidência na camada

Para path:

  • Em 01-topology/architecture.md - role do arquivo
  • Em 02-conventions/* - exemplos referenciando este path
  • Em 03-reuse/* - se está catalogado como reusável
  • Em 05-risks/* - se está em alguma lista de risco
  • Em 06-rationale/why.md - decisões inferidas
  • Em 01-topology/ownership.md - dono inferido
  • Em 01-topology/activity.md - hot zone? frozen?
  • Git: git log --follow <path> para histórico

Para símbolo:

  • Grep em 03-reuse/*.md - ja catalogado?
  • Grep no projeto: definição + usos
  • Em 02-conventions/* - exemplo de algum padrão?
  • Em 06-rationale/do.md ou dont.md - é um padrão?

Para padrão:

  • Grep em 02-conventions/* - existe regra?
  • Grep em 06-rationale/* - existe rationale?
  • Grep em 08-meta/questions.md - é uma pergunta aberta?

Para decisão:

  • Em 06-rationale/why.md
  • Git log com mensagens relacionadas
  • ADRs em docs/adr/ se existirem

Passo 3 - Sintetizar resposta

Estrutura:

sobre: <argumento>

Resumo:
<1-3 linhas direto ao ponto>

Contexto detalhado:
- Localização: <path:line se aplicável>
- Papel no projeto: <inferido de architecture.md>
- Padrões aplicáveis: <linkar conventions>
- Quem domina: <de ownership.md>
- Histórico relevante: <commits/PRs relacionados>
- Decisões inferidas: <de why.md>

Riscos / cuidados:
<de risks/*.md se aplicável>

Como reusar / chamar:
<de reuse/INDEX.md se aplicável>

Confidence: <baseado nos findings>

Read the full file on GitHub · 98 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. yesterday First seen · 98 lines · 35 tokens per session scan A 7116784a8736

Subscribe to this mod's changes

why is a command published in the GitHub repository vynazevedo/first-plan (23 stars, last pushed 7d ago), licensed MIT. It adds 35 tokens to every session and 778 once invoked, about $0.0002 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.