Fix bug

From edictum-ai/edictum · View interactive version

Fix bug is an AI agent skill from the GitHub repository edictum-ai/edictum. Fix a correctness bug in Edictum. Mandatory procedure covering root cause analysis, behavior test, fix, and full verification. Use for any bug fix touching src/edictum/.

How to use this skill

Skill file

Fix Bug Procedure

Read CLAUDE.md first. Understand the boundary principle (core vs server) and terminology rules before writing code.

Step 1: Understand the bug

Step 2: Root cause analysis

Write down (in your commit message or PR body):

  1. What the code currently does
  2. What it should do
  3. Why the existing tests did not catch it (this identifies the test gap)

Step 3: Write failing behavior test FIRST

Before touching source code, write a test in tests/test_behavior/ that demonstrates the bug.

The test MUST:

Run the test to confirm it fails:

pytest tests/test_behavior/test_{module}_behavior.py -v -k "test_name"

Step 4: Fix the source code

Make the minimal change to fix the bug. Do NOT:

Step 5: Verify the fix

pytest tests/ -v --tb=short
ruff check src/ tests/

The behavior test from Step 3 must now pass.

Step 6: Check regression scope

If the fix changes behavior of a public API parameter:

```bash

pytest tests/test_adapter_parity.py -v

```

Step 7: Docs-code sync check

pytest tests/test_docs_sync.py -v

Step 8: Full verification

pytest tests/ -v && ruff check src/ tests/

ALL must pass before committing.

Step 9: Commit

Do NOT

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.