@staff0rd/assist 0.693.1 → 0.694.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -254,7 +254,7 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
254
254
  - `assist refactor rename file <source> <destination>` - Rename/move a TypeScript file and update all imports (`--apply` to execute)
255
255
  - `assist refactor rename symbol <file> <oldName> <newName>` - Rename a symbol across the project (`--apply` to execute)
256
256
  - `assist refactor extract <file> <functionName> <destination>` - Extract a function and its private dependencies to a new file (`--apply` to execute)
257
- - `assist refactor restructure [root]` - Place every file under `root` (default `src`) by its import graph alone, so re-running on the result makes no moves. Roots (no importers in scope, or imported from outside) sit at `root`; a single-importer file nests in `<importer dir>/<importer basename>/`; a shared file sits directly in the lowest folder common to its importers; cycles stay together; tests sit next to their subject. Dry-run prints the moves, resulting tree, depth statistics and basename collisions (`--apply` to execute)
257
+ - `assist refactor restructure [root]` - Place every file under `root` (default `src`) by its import graph alone, so re-running on the result makes no moves. Roots (no importers in scope, or imported from outside) sit at `root`; a single-importer file nests in `<importer dir>/<importer basename>/`; a shared file sits directly in the lowest folder common to its importers; cycles stay together; tests sit next to their subject. Dry-run prints the moves, resulting tree, depth statistics and basename collisions. `--apply` moves the files, rewrites imports (including `import()`, `import("…")` types and `vi.mock` paths) and removes emptied folders; `--check` lists files that drift from the plan and exits non-zero. Files matching `restructure.ignore` globs are never moved
258
258
 
259
259
  ### Rules
260
260
 
@@ -2,4 +2,7 @@
2
2
  description: Analyze and restructure tightly-coupled files
3
3
  ---
4
4
 
5
- Run `assist refactor restructure --apply $ARGUMENTS`. If it fails, fix all errors and run again until it passes.
5
+ 1. Run `assist refactor restructure $ARGUMENTS` and review the planned moves, resulting tree and depth statistics.
6
+ 2. If it reports basename collisions or occupied targets, resolve them (rename one of the files with `assist refactor rename file`, or add a `restructure.ignore` glob) and re-run until there are no errors.
7
+ 3. Run `assist refactor restructure --apply $ARGUMENTS`, then `assist refactor restructure --check $ARGUMENTS` to confirm the tree matches the plan.
8
+ 4. Run `assist verify` and fix anything the moves broke.