pdir-validar-implementacao

A command that checks an implementation against its original request, such as a GitHub issue, a local specification file, or supplied text. It runs available automated checks and records what was completed.

In plain words
What is it for?
Use it after implementing a change to run linting, type checks, tests, specification checks, and smoke tests, then document the result and update project progress.
Why use it?
It reduces the risk of declaring work finished when it does not match the requested behavior or when tests and other checks still fail.

Command

Part of the pdir-workflow plugin — 7 commands shipped together

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/hmaurus/masterclaude/pdir-validar-implementacao
Clone the repo
git clone --depth 1 https://github.com/hmaurus/masterclaude

Or install pdir-workflow, the plugin that ships this one along with the rest of its 7 commands.

Per session 24 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,030 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.00024 $0.01030
Opus 5 $0.00012 $0.00515
Sonnet 5 $0.00005 $0.00206
Haiku 4.5 $0.00002 $0.00103

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

Security

Grade A, and why

pdir-validar-implementacao 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.

plugins/pdir-workflow/commands/pdir-validar-implementacao.md · 134 lines

How it starts

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

PDIR: Validar Implementação

Valida se a implementação atende à demanda original, documenta o que foi feito e atualiza o progresso do projeto. Pode ser usado após qualquer abordagem de implementação (plan-mode nativo, feature branch, correção manual).

Em qualquer passo, se algo falhar ou faltar informação, informe o erro e pergunte ao usuário como prosseguir.

Processar $ARGUMENTS

Extrair do $ARGUMENTS:

  • Fonte da demanda: identificar o tipo:
    • Número (ex: 42) → Issue do GitHub
    • Caminho de arquivo (ex: docs/projeto/specs/spec-paywall.md) → arquivo local
    • Texto → descrição livre

Se vazio: perguntar ao usuário qual a fonte da demanda.

Instruções

1. Obter Escopo da Demanda

Se Issue GitHub:

gh issue view [número] --json number,title,body,comments

Analisar o body e todos os comentários.

Se arquivo .md: ler o arquivo completo.

Se descrição livre: usar o texto.

2. CI — Checks Automatizados

Consultar package.json, Makefile ou equivalente para identificar os comandos disponíveis. Executar:

  • Lint
  • Type-check
  • Testes

Se algum check falhar, reportar no relatório mas continuar a validação.

3. Spec Check — Verificação contra o Escopo

Reler a fonte da demanda e verificar item por item se cada ponto foi atendido na implementação. Para cada item:

  • Verificar se o código implementa o comportamento descrito
  • Verificar se edge cases mencionados foram tratados

4. Smoke Test — Verificação Visual

Navegar pelas rotas afetadas pela implementação:

  • Verificar se não há erros no console
  • Verificar se o comportamento está correto visualmente
  • Verificar se rotas existentes continuam funcionando

5. Relatório

Validação concluída!

Fonte: [#número - título | arquivo | descrição]

## CI
- Lint: [passou | falhou — detalhes]
- Type-check: [passou | falhou — detalhes]
- Testes: [passou | falhou — detalhes]

## Spec Check
- [item 1]: [atendido | não atendido — detalhes]
- [item 2]: [atendido | não atendido — detalhes]

## Smoke Test
- [rota 1]: [ok | erro — detalhes]
- [rota 2]: [ok | erro — detalhes]

## Resultado
[Tudo ok | Há itens pendentes — ver detalhes acima]

Read the full file on GitHub · 134 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 · 134 lines · 24 tokens per session scan A 873e8c7646d4

Subscribe to this mod's changes

pdir-validar-implementacao is a command published in the GitHub repository hmaurus/masterclaude (2 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 1,030 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.