Feat: Code Undertaker Agent - New Agent Implementation #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
The Dead Code Undertaker
The Undertaker is a dead code detection agent that identifies unused functions, classes, variables, imports, methods and unreachable code across your entire repository using static analysis.
What It Does
Use Case
Dead code accumulates naturally as features are refactored or deprecated. The Undertaker gives teams reliable, data-driven insights to make informed cleanup decisions.
Files Added
agent.toml- Complete agent configurationagent.yaml- YAML format variantREADME.md- Full documentation with examples and best practicesTesting
Tested with a sample project to validate dead code detection accuracy across multiple file types and code patterns. Full testing walkthrough available in the demo video.
Documentation
Complete documentation included in
README.mdwith usage examples, configuration options, confidence scoring rules, and integration guidance.Breaking Changes
None. This is a new agent with no impact on existing functionality.
Demo
See the walkthrough: https://x.com/Slethware/status/1978785991314780402?t=hLnTNGKCapBhVRaxQqnaaQ&s=19
PR Type
Enhancement
Description
Add new "Undertaker" agent for dead code detection with confidence scoring
Implement comprehensive static analysis for unused functions, classes, variables, imports, and unreachable code
Provide dual configuration formats (TOML and YAML) with identical functionality
Include detailed documentation with usage examples, confidence scoring rules, and integration guidance
Diagram Walkthrough
File Walkthrough
README.md
Complete documentation for Undertaker agentagents/undertaker/README.md
agent
agent.toml
Agent configuration in TOML formatagents/undertaker/agent.toml
analysis
min_confidencethreshold andinclude_testsoption
dead code items
agent.yaml
Agent configuration in YAML formatagents/undertaker/agent.yaml
to TOML