@staff0rd/assist 0.719.0 → 0.721.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 +1 -1
- package/claude/commands/restructure.md +2 -3
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +681 -574
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -255,7 +255,7 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
|
|
|
255
255
|
- `assist refactor rename file <source> <destination>` - Rename/move a TypeScript file and update all imports (`--apply` to execute)
|
|
256
256
|
- `assist refactor rename symbol <file> <oldName> <newName>` - Rename a symbol across the project (`--apply` to execute)
|
|
257
257
|
- `assist refactor extract <file> <functionName> <destination>` - Extract a function and its private dependencies to a new file (`--apply` to execute)
|
|
258
|
-
- `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. Modules named in `restructure.pin` (basename without extension) move up out of deep import chains into the folder of the nearest root or pinned module above them, taking their subtrees with them
|
|
258
|
+
- `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. Modules named in `restructure.pin` (basename without extension) move up out of deep import chains into the folder of the nearest root or pinned module above them, taking their subtrees with them. When the plan places files deeper than `restructure.maxDepth` (default 10), every mode lists the deep chains with the files beneath each folder and guidance for choosing feature-boundary pins, and `--check` exits non-zero
|
|
259
259
|
|
|
260
260
|
### Rules
|
|
261
261
|
|
|
@@ -4,6 +4,5 @@ description: Analyze and restructure tightly-coupled files
|
|
|
4
4
|
|
|
5
5
|
1. Run `assist refactor restructure $ARGUMENTS` and review the planned moves, resulting tree and depth statistics.
|
|
6
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.
|
|
8
|
-
4. Run `assist
|
|
9
|
-
5. Run `assist verify` and fix anything the moves broke.
|
|
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.
|