Refactor Architecture
refactor-architecturePreview and apply refactoring operations to your project architecture data. Scan files, move paths, rename texts, patch entries, merge files, and remove references with a dry-run mode before committing.
Instructions
Preview or apply in-repo refactor sync to architector data (no workspace access). Default dryRun=true. Workflow: (1) scan with file/text to list hits, (2) build 1-3 mutation ops, (3) dryRun preview, (4) apply with dryRun=false and confirm=true. Mutations: move-file, replace-path-prefix, rename-text, patch-entry, merge-files, remove-file-ref. Orphan entries with empty refs.files and no entryIds are deleted. Does not change module names or dataFlow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID (defaults to normalized workdir) | |
| operations | Yes | Refactor operations (max 10 per call) | |
| scope | No | Optional filter: moduleName, kinds, tags | |
| dryRun | No | Preview only (default true). Set false with confirm=true to apply | |
| confirm | No | Required true when dryRun=false | |
| limit | No | Max changes/hits per page (default 15, max 50) | |
| offset | No | Pagination offset (default 0) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | ||
| summary | Yes | ||
| stats | Yes | ||
| hits | No | ||
| changes | Yes | ||
| warnings | Yes | ||
| offset | Yes | ||
| hasMore | Yes |