aide:refactor -- AIDE: Autonomous Intent-Driven Engineering
- Published
- Source commit
5e7817d
/aide:refactor — Refactor Phase
Agent: This command is orchestrated by the
/aideorchestrator, which delegates to theaide-auditoragent (one per.aidesection) and then toaide-implementoragents for execution.
Audit existing code against the coding playbook and refactor to close convention drift. This is a post-QA phase — it runs on code that already works and already passed QA. The goal is conformance, not new functionality.
This command requires a path argument. It does NOT perform full-app refactoring in one pass. Scope it to a directory (e.g., src/tools/score/) and it will audit every .aide-defined section within that path.
Flow
- Discover sections — run
aide_discoverwith the given path to find all.aidespecs in the subtree - Audit each section — spawn one
aide-auditoragent per.aidespec found. Each auditor:- Reads the implementation
- Consults the coding playbook via
study-playbook - Compares against progressive disclosure conventions
- Produces
plan.aidewith refactoring steps
- Pause for approval — present all plans to the user. Do not proceed until approved
- Execute refactoring — for each approved
plan.aide, delegate toaide-implementoragents (one per numbered step, same as build phase) - Re-validate — delegate to
aide-qaper section to verify the refactoring didn't break spec conformance
Checklist
- Require a path argument — refuse to run without one
- Run
aide_discoverscoped to the provided path - For each
.aidespec found, spawn oneaide-auditoragent - Collect all
plan.aideoutputs and present to user for review - After approval, execute each plan using
aide-implementoragents (one per numbered step) - After all plans are executed, run
aide-qaper section to verify spec outcomes still hold - Report completion with a summary of drift items found, fixed, and verified