apex:debug

Integrates with failure-predictor and git-historian agents to provide historical context. Produces evidence that feeds into the reflection step for continuous learning.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "apex:debug" with this command: npx skills add benredmond/apex/benredmond-apex-apex-debug

Integrates with failure-predictor and git-historian agents to provide historical context. Produces evidence that feeds into the reflection step for continuous learning.

Can operate phase-agnostic: debug sessions can happen at any point in the workflow.

Usage: /apex:debug [task-id] or /apex:debug "error message or description"

Initialize debug session with provided context.

Predict likely failure modes based on historical patterns. Return: Predicted failures with prevention strategies.

Capture evidence:

  • Error messages (exact text)

  • Stack traces (full trace)

  • Logs (relevant entries)

  • Environment state (versions, config)

  • Recent changes (git log)

Record evidence in the task log:

Find: Recent changes, regressions, related fixes. Return: Git intelligence with blame and commit analysis.

Hypothesis 1: [Title]

  • Based on: [Evidence that supports this]
  • Predicts: [What we'd see if true]
  • Test: [How to verify]

Hypothesis 2: [Title]

...

Hypothesis 3: [Title]

...

LIMIT: Maximum 3 concurrent hypotheses. If all 3 fail, revisit evidence before forming new ones.

Binary Search (git bisect):

git bisect start git bisect bad HEAD git bisect good [known-good-commit]

Test each midpoint until culprit found

Run full suite

npm test

Lint check

npm run lint

</validation-commands>

</step>

<step id="6" title="Reflection and learning"> <critical> Without reflection, debugging learnings are lost. This step is MANDATORY. </critical>

<instructions>

  1. Document root cause: Clear explanation of what caused the bug
  2. Document fix: What changed and why
  3. Identify patterns:
    • Did existing patterns help? (update confidence)
    • Discovered new failure mode? (propose new pattern)
  4. Submit reflection: Record a structured reflection with evidence
  5. Update task: Complete debug section </instructions>

<reflection-template>

### Debug Summary
- **Root Cause**: [What actually caused the bug]
- **Fix**: [What we changed]
- **Prevention**: [How to prevent similar bugs]

### Patterns
- **Used**: [Patterns that helped, with outcomes]
- **Discovered**: [New failure modes or fixes]

### Learnings
- [Key insight 1]
- [Key insight 2]

&#x3C;debug>
&#x3C;metadata>
  &#x3C;timestamp>[ISO]&#x3C;/timestamp>
  &#x3C;duration>[Time spent]&#x3C;/duration>
  &#x3C;hypotheses-tested>[N]&#x3C;/hypotheses-tested>
&#x3C;/metadata>

&#x3C;reproduction>
  &#x3C;reproducible>true|false&#x3C;/reproducible>
  &#x3C;steps>[Reproduction steps]&#x3C;/steps>
  &#x3C;minimal-case>[Test case location if created]&#x3C;/minimal-case>
&#x3C;/reproduction>

&#x3C;investigation>
  &#x3C;evidence>
    &#x3C;error-message>[Exact error]&#x3C;/error-message>
    &#x3C;stack-trace>[Relevant portions]&#x3C;/stack-trace>
    &#x3C;related-commits>[Git history findings]&#x3C;/related-commits>
    &#x3C;pattern-matches>[Patterns that matched]&#x3C;/pattern-matches>
  &#x3C;/evidence>

  &#x3C;hypotheses>
    &#x3C;hypothesis id="1" status="confirmed|refuted|untested">
      &#x3C;title>[Hypothesis]&#x3C;/title>
      &#x3C;evidence>[Supporting evidence]&#x3C;/evidence>
      &#x3C;test-result>[What happened when tested]&#x3C;/test-result>
    &#x3C;/hypothesis>
  &#x3C;/hypotheses>
&#x3C;/investigation>

&#x3C;root-cause>
  &#x3C;description>[What actually caused the bug]&#x3C;/description>
  &#x3C;five-whys>[If used, the chain of whys]&#x3C;/five-whys>
&#x3C;/root-cause>

&#x3C;fix>
  &#x3C;description>[What was changed]&#x3C;/description>
  &#x3C;files-modified>[List of files]&#x3C;/files-modified>
  &#x3C;test-added>[New test location]&#x3C;/test-added>
&#x3C;/fix>

&#x3C;reflection>
  &#x3C;patterns-used>
    &#x3C;pattern id="[PAT:ID]" outcome="worked|tweaked|failed">[How it helped]&#x3C;/pattern>
  &#x3C;/patterns-used>
  &#x3C;learnings>
    &#x3C;learning>[Key insight]&#x3C;/learning>
  &#x3C;/learnings>
  &#x3C;prevention>[How to prevent similar bugs]&#x3C;/prevention>
&#x3C;/reflection>
&#x3C;/debug>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

review-plan

No summary provided by upstream source.

Repository SourceNeeds Review
General

execute

No summary provided by upstream source.

Repository SourceNeeds Review
Research

research

No summary provided by upstream source.

Repository SourceNeeds Review