<progress_context>
Use Read tool: docs/progress.md (first 50 lines)
Check for recent refactoring context that might inform duplicate detection scope. </progress_context>
Duplicate Detection Workflow
Run the 5-phase duplicate detection process using the duplicate-detector research agent.
Process
- •Spawn the duplicate-detector agent with the current codebase scope
- •Present consolidated results — grouped by domain with confidence ratings
- •Offer consolidation plan — suggest which duplicates to merge and into what
Execution
Spawn the duplicate-detector agent:
code
Agent: ${CLAUDE_PLUGIN_ROOT}/agents/research/duplicate-detector.md
Pass the codebase scope (default: full codebase, or user-specified path).
After Detection
Present results in this format:
markdown
## Duplicate Detection Results ### High Confidence (≥90%) | Function A | Function B | Domain | Recommendation | |-----------|-----------|--------|---------------| | formatDate() in utils/date.ts | formatTimestamp() in helpers/time.ts | Date formatting | Consolidate into formatDate() | ### Medium Confidence (70-89%) [Same table format] ### Low Confidence (50-69%) [Same table format — mention these but don't recommend action]
Ask the user which duplicates they want to consolidate, then offer to create a plan.
<progress_append> After running duplicate detection, append to progress journal:
markdown
## YYYY-MM-DD HH:MM — /arc:dedup **Task:** Duplicate detection **Outcome:** Found X duplicate groups (Y high confidence, Z medium) **Scope:** [path or "full codebase"] **Next:** Consolidate [N] duplicate groups ---
</progress_append>