dare-bugfix-design

A command for investigating an existing software bug and writing a focused repair plan. It records the likely root cause, regression risks, and the smallest proposed set of changes in a Markdown design file.

In plain words
What is it for?
Use it when a bug needs structured diagnosis, reproduction details, affected code locations, root-cause analysis, and a surgical fix plan.
Why use it?
It separates understanding the failure from changing the code. This helps avoid patching only the visible symptom and makes likely side effects explicit before implementation.

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/dewtech-technologies/dare-method/dare-bugfix-design
Clone the repo
git clone --depth 1 https://github.com/dewtech-technologies/dare-method

Made for: Claude Code.

Per session 0 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,152 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.00000 $0.01152
Opus 5 $0.00000 $0.00576
Sonnet 5 $0.00000 $0.00230
Haiku 4.5 $0.00000 $0.00115

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

Security

Grade A, and why

dare-bugfix-design 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.

implementations/claude/.claude/commands/dare-bugfix-design.md · 120 lines

How it starts

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

/dare-bugfix-design

Diagnostica bug em projeto existente e planeja correção cirúrgica via Método DARE. Gera DARE/DESIGN-Bugfix-[Nome].md com causa raiz, riscos de regressão e plano de ação mínimo.

Como usar

/dare-bugfix-design                                  # interativo: pede o relato
/dare-bugfix-design "Login falha quando email tem +" # com descrição direta

Quando usar

  • Usuário relata bug ou comportamento inesperado
  • Bug complexo precisa de planejamento antes de codar
  • Risco de regressão é não-trivial

O que fazer

1. Entender o relato completo

Antes de tocar em código, esclareça:

  • Comportamento atual — o que acontece de errado?
  • Comportamento esperado — o que deveria acontecer?
  • Passos para reproduzir — como você fez aparecer o bug?
  • Logs/stack traces — se houver, peça ao usuário

2. Localizar a área afetada

Identifique controllers, services, queries ou componentes envolvidos no fluxo. Use grep / IDE navigation para chegar nos arquivos mais prováveis.

3. Encontrar a causa raiz (crítico)

Não trate sintoma. Investigue o porquê:

Tipo de causa Exemplos
Lógica de negócio Condição incorreta, cálculo errado, off-by-one
Banco de dados N+1, deadlock, dados inconsistentes, índice ausente
Validação Input não validado, tipo incorreto, edge case (string vazia, NaN, negativo)
Concorrência Race condition, falta de lock, transação isolada errada
Segurança SQL injection, XSS, IDOR, broken auth
Integração Timeout, retry sem idempotência, API externa mudou contrato

4. Avaliar impacto e riscos

  • Quais arquivos precisam mudar?
  • Tem migração/script de DB?
  • O que mais essa correção pode quebrar?
  • Qual o blast radius?

5. Gerar DARE/DESIGN-Bugfix-[Nome].md

Estrutura obrigatória:

# Bugfix Design: [Nome curto e descritivo]

## Descrição do Problema
- **Comportamento Atual:** [o que está acontecendo]
- **Comportamento Esperado:** [o que deveria]
- **Passos para Reproduzir:** [se conhecido]
- **Severidade:** [Crítica / Alta / Média / Baixa]
- **Reportado por:** [usuário / Sentry / monitoramento]

## Diagnóstico da Causa Raiz
[Explicação técnica detalhada do porquê o bug ocorre — referencie linhas de código específicas se possível]

## Análise de Impacto
- **Arquivos a Modificar:** [lista exata]
- **Banco de Dados:** [migração necessária? script de fix de dados?]
- **APIs externas:** [muda contrato com algum cliente/integrador?]
- **Riscos de Regressão:** [o que pode quebrar ao consertar]

## Plano de Ação (Correção Cirúrgica)
1. [Passo 1: ajustar X em arquivo Y]
2. [Passo 2: adicionar teste unitário que falha com o bug e passa com a correção]
3. [Passo 3: validar comportamento em staging]

## Testes Necessários
- **Validation Gates:** [teste novo que reproduz o bug]
- **Testes de Regressão:** [testes existentes a re-rodar]
- **E2E:** [smoke test do fluxo afetado]

## Rollback Plan
[Se a correção quebrar produção, como reverter rapidamente?]

## Próximas Etapas
1. Revisar e aprovar este Bugfix Design
2. Rodar `/dare-blueprint` se a correção for grande, ou ir direto para `/dare-tasks`
3. Se for trivial (< 10 linhas), pular direto para `/dare-execute`

Read the full file on GitHub · 120 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 · 120 lines · 0 tokens per session scan A 77079645c669

Subscribe to this mod's changes

dare-bugfix-design is a command published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,152 tokens. 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.