jmservera/aithena/agent-debugging-discipline
Claude Code and agent skill by jmservera/aithena
- community
Checking that the SKILL.md file is still in the repository.
Scientific debugging method for AI agents — reproduction before fix, root cause before PR
Install
npx vskill@latest install jmservera/aithena/agent-debugging-disciplineSKILL.md
The same SKILL.md was published earlier as jmservera/aithena/agent-debugging-discipline.
Context
AI agents under time pressure default to "fix the symptom" — making errors disappear rather than understanding them. This is the single most dangerous behavior pattern in multi-agent development. It produces code that masks bugs, silently degrades features, and creates invisible technical debt.
This skill applies to all bug fixes and error-handling code changes.
Patterns
1. Reproduce Before Fixing
Every bug fix PR must include evidence of reproduction:
- Exact error message — copy-paste from logs, not paraphrased
- Reproduction steps — commands or API calls that trigger the bug
- Environment state — relevant config, data, or service state
Without reproduction evidence, the PR should not be opened.
2. Read the Logs First
Before writing any code, read the actual error output:
- Solr logs for search issues (query errors, schema mismatches)
- Service stderr for Python errors (stack traces, import errors)
- Browser console for frontend issues (network errors, state issues)
The fix is almost always in the error message. PR #700's two bugs (kNN field name mismatch + URI too large) were both visible in Solr logs but were never read — the agent jumped straight to code changes.
3. Root Cause, Then Fix
Follow this sequence:
- Observe — What is the exact error?
- Hypothesize — What could cause this error?
- Test — Validate hypothesis (check config, query Solr, read code)
- Fix — Change only what's broken
- Verify — Confirm the fix resolves the root cause, not just the symptom
4. No Silent Degradation
RULE: Error handlers MUST NOT silently change behavior.
- ❌ Catch semantic search error → fall back to keyword search silently
- ❌ Catch batch error → return partial results without warning
- ✅ Catch error → log WARNING with details → return clear error response
- ✅ If degradation is genuinely needed → require Lead/PO approval first
5. Domain Knowledge Check
Before fixing any search-related bug:
- Confirm you understand the parent/chunk document hierarchy
- Confirm kNN queries target chunks (where embeddings live), not parents
- Confirm Solr field names match between schema and query code
- If unsure, ASK — don't guess
Examples
Bad (PR #700 pattern):
Good:
Bug fix PR checklist:
Anti-Patterns
- Jumping to code before reading logs. The most common agent failure. Always read the error first.
- "It works now" as the only verification. Confirm the fix addresses the root cause, not just the symptom.
- Catch-all exception handlers. Broad
except Exceptionhides real errors. Catch specific exceptions. - Fixing in the wrong layer. A query error is not a UI problem. A schema mismatch is not a network problem. Fix where the bug actually is.
- Guessing at domain model. If you don't know whether embeddings are on chunks or parents, STOP and check documentation before proceeding.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/agent-debugging-discipline/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmservera/aithena/agent-debugging-discipline)