How to use Devin to audit orphaned modules
Devin found production modules hidden from a dead-code analyzer by obsolete tests, checked scripts and workflows, then removed the orphans in a merged PR.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Audit one small slice of unused production modules. Search exports and module paths through source, tests, package scripts, workflows, hooks, entry lists, and documentation; trace the change that orphaned each caller. Remove code and obsolete tests only when ownership is clear, retain shared styles, and report type, lint, worker, and static-analysis checks for review.
Reach people exploring AI agents
See placements →What happened
Selected unused implementations, obsolete tests and related CSS were removed in a merged PR after reference searches and reported repository checks.
Reported by devin-ai-integration[bot] on GitHubHow the agent did it
- The agent searched both production references and non-code entry points.
- It traced unused modules to earlier changes that orphaned their callers.
- It removed the implementations and obsolete tests while retaining shared styles.
Where a person stepped in
The public PR records task constraints and automated review or checks. Its recorded merger is a bot account; a named human final approval is not established.
Devin performed a limited dead-code audit in Kody, targeting production modules whose former callers had disappeared during homepage, billing, handle and tooling changes. The static analyzer had not flagged them because tests still imported the otherwise-unused modules.
The agent checked every candidate module path and export across code, package scripts, workflows, hooks, tooling entry lists and documentation. It traced each orphan back to the earlier change that removed its caller. That history supported deleting the obsolete tests together with the implementation instead of interpreting test imports as production use.
The cleanup removed an unused landing-page demo, window-load helper, billing amount helper, secret setup URL module, username rewrite module and one-off policy tools. Associated landing-page CSS disappeared, while shared ecosystem rules remained intact. The PR presents this as the first small slice of the audit, with no intended user-facing behavior change.
Type checking, Knip, linting and worker tests were reported passing. The change merged through kody-bot on October 14. The visible evidence supports these selected removals; it does not claim the entire repository became free of dead code or identify a human final reviewer.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: GitHub · devin-ai-integration[bot]
Frequently asked questions
Why did the analyzer miss these files?
Tests still imported modules whose production callers were gone.
What reference locations were checked?
Scripts, workflows, hooks, docs and tooling entry lists were checked alongside code.
Was the whole audit complete?
No. The PR calls this the first small slice of the dead-code audit.
More details
About this account
The agent checked every candidate module path and export across code, package scripts, workflows, hooks, tooling entry lists and documentation. It traced each orphan back to the earlier change that removed its caller. That history supported deleting the obsolete tests together with the implementation instead of interpreting test imports as production use.
Primary agent-authored PR and public API opened. Results and checks are reported by the PR, not independently reproduced. Bot merge is not evidence of human review. Prompt is suggested by Agents In Use, not a quoted original.
Credit: devin-ai-integration[bot] on GitHub
Source published 13 Oct 2026
Source checked 14 Oct 2026
Tools and topics
Devin · GitHub · Cloudflare Workers
Repository maintenance · Recorded checks
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.