@automaton-labs/aib 0.0.5 → 0.0.7
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/dist/bin/cli.js +4 -2
- package/dist/commands/apply-module-plan.js +3 -3
- package/dist/commands/background-command.js +2 -0
- package/dist/commands/captured-input.js +1 -2
- package/dist/commands/config-command.js +2 -1
- package/dist/commands/config-output.js +10 -8
- package/dist/commands/control-plane-command.js +1 -0
- package/dist/commands/declaration-command.js +7 -0
- package/dist/commands/declaration-execution-cache.js +1 -0
- package/dist/commands/declaration-format.js +1 -0
- package/dist/commands/declaration-preview-cache.js +2 -0
- package/dist/commands/doctor.js +3 -1
- package/dist/commands/execution-command.js +1 -1
- package/dist/commands/file-command.js +1 -0
- package/dist/commands/file-move-to-dir-execution-cache.js +1 -0
- package/dist/commands/file-move-to-dir-preview-cache.js +2 -0
- package/dist/commands/file-move-to-dir.js +5 -0
- package/dist/commands/file-mutation-runtime.js +1 -0
- package/dist/commands/file-refactor-batch-execution-cache.js +1 -0
- package/dist/commands/file-refactor-batch-preview-cache.js +2 -0
- package/dist/commands/file-refactor-batch.js +5 -0
- package/dist/commands/file-rename-execution-cache.js +1 -0
- package/dist/commands/file-rename-preview-cache.js +2 -0
- package/dist/commands/file-rename.js +5 -0
- package/dist/commands/help-command.js +5 -5
- package/dist/commands/host-command.js +1 -0
- package/dist/commands/inspect-cycles.js +3 -3
- package/dist/commands/inspect-format.js +15 -15
- package/dist/commands/inspect-tree.js +2 -2
- package/dist/commands/inspect.js +12 -12
- package/dist/commands/move-to-file.js +2 -2
- package/dist/commands/ota-command.js +2 -0
- package/dist/commands/quick-read.js +8 -8
- package/dist/commands/refactor-batch.js +4 -4
- package/dist/commands/rename-entities.js +4 -4
- package/dist/commands/result-view.js +6 -5
- package/dist/commands/session-workspace.js +7 -7
- package/dist/commands/worker-command.js +1 -0
- package/dist/config/defaults.js +1 -1
- package/dist/config/env-vars.js +1 -1
- package/dist/config/path-aliases.js +1 -1
- package/dist/config/resolve-command-alias.js +1 -1
- package/dist/config/workspace-root.js +3 -3
- package/dist/content/content-bundle.js +1 -1
- package/dist/dsl/aib-dsl.js +1 -1
- package/dist/dsl/declaration-dsl.js +1 -0
- package/dist/dsl/file-move-to-dir-dsl.js +1 -0
- package/dist/dsl/file-refactor-batch-dsl.js +1 -0
- package/dist/dsl/file-rename-dsl.js +1 -0
- package/dist/help/bootstrap.bash.md +907 -0
- package/dist/help/bootstrap.md +105 -144
- package/dist/help/{json/bootstrap.md → bootstrap.pwsh.md} +216 -397
- package/dist/help/docs/dsl.md +4 -3
- package/dist/help/docs/file.move.md +46 -0
- package/dist/help/docs/file.rename.md +35 -0
- package/dist/help/docs/help-format.md +4 -7
- package/dist/help/docs/inspect.code.md +5 -5
- package/dist/help/docs/inspect.deps.md +7 -7
- package/dist/help/docs/inspect.file.md +2 -1
- package/dist/help/docs/inspect.graph.md +3 -3
- package/dist/help/docs/inspect.md +5 -5
- package/dist/help/docs/mutation.md +23 -13
- package/dist/help/docs/patterns.md +1 -5
- package/dist/help/docs/qr.md +7 -22
- package/dist/help/docs/quick-map.md +1 -0
- package/dist/help/docs/recipe.file-layout.md +15 -0
- package/dist/help/docs/rg.md +22 -0
- package/dist/help/docs/selectors.md +3 -2
- package/dist/help/docs/session.md +1 -1
- package/dist/help/dsl/bootstrap.bash.md +907 -0
- package/dist/help/dsl/bootstrap.md +105 -144
- package/dist/help/{json/full.md → dsl/bootstrap.pwsh.md} +216 -397
- package/dist/help/dsl/docs/dsl.md +4 -3
- package/dist/help/dsl/docs/file.move.md +46 -0
- package/dist/help/dsl/docs/file.rename.md +35 -0
- package/dist/help/dsl/docs/help-format.md +4 -7
- package/dist/help/dsl/docs/inspect.code.md +5 -5
- package/dist/help/dsl/docs/inspect.deps.md +7 -7
- package/dist/help/dsl/docs/inspect.file.md +2 -1
- package/dist/help/dsl/docs/inspect.graph.md +3 -3
- package/dist/help/dsl/docs/inspect.md +5 -5
- package/dist/help/dsl/docs/mutation.md +23 -13
- package/dist/help/dsl/docs/patterns.md +1 -5
- package/dist/help/dsl/docs/qr.md +7 -22
- package/dist/help/dsl/docs/quick-map.md +1 -0
- package/dist/help/dsl/docs/recipe.file-layout.md +15 -0
- package/dist/help/dsl/docs/rg.md +22 -0
- package/dist/help/dsl/docs/selectors.md +3 -2
- package/dist/help/dsl/docs/session.md +1 -1
- package/dist/help/dsl/full.md +105 -144
- package/dist/help/dsl/help-index.md +44 -0
- package/dist/help/dsl/tokens/qr.inline.examples.md +2 -0
- package/dist/help/dsl/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/dsl/topics/dsl.md +4 -3
- package/dist/help/dsl/topics/file.move.md +44 -0
- package/dist/help/dsl/topics/file.rename.md +33 -0
- package/dist/help/dsl/topics/help-format.md +4 -7
- package/dist/help/dsl/topics/inspect.code.md +5 -5
- package/dist/help/dsl/topics/inspect.deps.md +7 -7
- package/dist/help/dsl/topics/inspect.file.md +2 -1
- package/dist/help/dsl/topics/inspect.graph.md +3 -3
- package/dist/help/dsl/topics/inspect.md +5 -5
- package/dist/help/dsl/topics/mutation.md +23 -13
- package/dist/help/dsl/topics/patterns.md +1 -5
- package/dist/help/dsl/topics/qr.md +7 -22
- package/dist/help/dsl/topics/quick-map.md +1 -0
- package/dist/help/dsl/topics/recipe.file-layout.md +13 -0
- package/dist/help/dsl/topics/rg.md +20 -0
- package/dist/help/dsl/topics/selectors.md +3 -2
- package/dist/help/dsl/topics/session.md +1 -1
- package/dist/help/full.md +105 -144
- package/dist/help/help-index.md +44 -0
- package/dist/help/help-meta.json +45 -29
- package/dist/help/index.md +32 -75
- package/dist/help/tokens/qr.inline.examples.md +2 -0
- package/dist/help/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/topics/dsl.md +4 -3
- package/dist/help/topics/file.move.md +44 -0
- package/dist/help/topics/file.rename.md +33 -0
- package/dist/help/topics/help-format.md +4 -7
- package/dist/help/topics/inspect.code.md +5 -5
- package/dist/help/topics/inspect.deps.md +7 -7
- package/dist/help/topics/inspect.file.md +2 -1
- package/dist/help/topics/inspect.graph.md +3 -3
- package/dist/help/topics/inspect.md +5 -5
- package/dist/help/topics/mutation.md +23 -13
- package/dist/help/topics/patterns.md +1 -5
- package/dist/help/topics/qr.md +7 -22
- package/dist/help/topics/quick-map.md +1 -0
- package/dist/help/topics/recipe.file-layout.md +13 -0
- package/dist/help/topics/rg.md +20 -0
- package/dist/help/topics/selectors.md +3 -2
- package/dist/help/topics/session.md +1 -1
- package/dist/host/capabilities.js +1 -0
- package/dist/ide-launch/common.cjs +162 -162
- package/dist/managed-host/extension-vsix-resolver.js +1 -1
- package/dist/managed-host/manage-serve-web-host.cjs +141 -141
- package/dist/managed-host/serve-web-autostart.js +1 -1
- package/dist/managed-host/serve-web-host.cjs +1985 -1660
- package/dist/observability/config.js +1 -1
- package/dist/payloads/read-stdin-json.js +1 -1
- package/dist/rg-wrapper/core.js +6 -0
- package/dist/rg-wrapper/options.js +1 -0
- package/dist/rtk-wrapper/core.js +2 -0
- package/dist/runtime/input-source.js +1 -1
- package/dist/runtime/managed-runtime-provisioning.js +1 -1
- package/dist/runtime/run-command.js +1 -1
- package/dist/selectors/parse-entities.js +1 -1
- package/dist/session/daemon-state.js +2 -0
- package/dist/session/server.js +7 -6
- package/dist/shared/errors.js +14 -13
- package/dist/shared/operations.js +1 -1
- package/dist/shared/protocol.js +1 -1
- package/dist/shared/routes.js +1 -1
- package/dist/shared/stdin-examples.js +1 -0
- package/dist/shared/types.js +1 -1
- package/dist/tool-runtime/runtime-tools.js +1 -0
- package/dist/tracing/trace.js +5 -3
- package/dist/workers/control-plane/aib-control-plane-worker.cjs +80 -0
- package/dist/workers/control-plane/client-config.default.json +3 -0
- package/dist/workers/product-storage.js +1 -0
- package/dist/workers/registry.js +1 -0
- package/extension/vscode-refactor-bridge-extension.vsix +0 -0
- package/package.json +6 -4
- package/runtimes/launcher/linux-x64/aib +0 -0
- package/runtimes/launcher/win-x64/aib.exe +0 -0
- package/runtimes/tools/rg/darwin-arm64/rg +0 -0
- package/runtimes/tools/rg/darwin-x64/rg +0 -0
- package/runtimes/tools/rg/linux-arm64/rg +0 -0
- package/runtimes/tools/rg/linux-x64/rg +0 -0
- package/runtimes/tools/rg/manifest.json +36 -0
- package/runtimes/tools/rg/win32-x64/rg.exe +0 -0
- package/runtimes/tools/rtk/darwin-arm64/rtk +0 -0
- package/runtimes/tools/rtk/darwin-x64/rtk +0 -0
- package/runtimes/tools/rtk/linux-arm64/rtk +0 -0
- package/runtimes/tools/rtk/linux-x64/rtk +0 -0
- package/runtimes/tools/rtk/manifest.json +36 -0
- package/runtimes/tools/rtk/win32-x64/rtk.exe +0 -0
- package/scripts/provision-runtime.cjs +25 -1
- package/dist/help/json/docs/basics.md +0 -15
- package/dist/help/json/docs/config-setup.aliases.md +0 -56
- package/dist/help/json/docs/config-setup.excludes.md +0 -45
- package/dist/help/json/docs/config-setup.import-normalize.md +0 -86
- package/dist/help/json/docs/config-setup.import-rules.md +0 -96
- package/dist/help/json/docs/config-setup.tsconfigs.md +0 -33
- package/dist/help/json/docs/dsl.md +0 -25
- package/dist/help/json/docs/first-setup.md +0 -292
- package/dist/help/json/docs/help-format.md +0 -12
- package/dist/help/json/docs/help-protocol.md +0 -26
- package/dist/help/json/docs/imports.normalize.md +0 -47
- package/dist/help/json/docs/inspect.code.md +0 -41
- package/dist/help/json/docs/inspect.cycles.md +0 -38
- package/dist/help/json/docs/inspect.deps.md +0 -46
- package/dist/help/json/docs/inspect.duplicates.md +0 -65
- package/dist/help/json/docs/inspect.exports.md +0 -40
- package/dist/help/json/docs/inspect.file.md +0 -38
- package/dist/help/json/docs/inspect.graph.md +0 -139
- package/dist/help/json/docs/inspect.imports.md +0 -15
- package/dist/help/json/docs/inspect.md +0 -88
- package/dist/help/json/docs/inspect.members.md +0 -32
- package/dist/help/json/docs/inspect.tree.md +0 -32
- package/dist/help/json/docs/inspect.usages.md +0 -61
- package/dist/help/json/docs/modulePlan.md +0 -73
- package/dist/help/json/docs/move.md +0 -56
- package/dist/help/json/docs/mutation.md +0 -65
- package/dist/help/json/docs/patterns.md +0 -76
- package/dist/help/json/docs/prefs.md +0 -40
- package/dist/help/json/docs/qr.md +0 -37
- package/dist/help/json/docs/quick-map.md +0 -30
- package/dist/help/json/docs/refactor.batch.md +0 -72
- package/dist/help/json/docs/rename.md +0 -47
- package/dist/help/json/docs/reveal.md +0 -30
- package/dist/help/json/docs/selectors.md +0 -23
- package/dist/help/json/docs/session.md +0 -77
- package/dist/help/json/docs/view.md +0 -30
- package/dist/help/json/snippets/agents.md +0 -14
- package/dist/help/json/topics/basics.md +0 -13
- package/dist/help/json/topics/config-setup.aliases.md +0 -54
- package/dist/help/json/topics/config-setup.excludes.md +0 -43
- package/dist/help/json/topics/config-setup.import-normalize.md +0 -84
- package/dist/help/json/topics/config-setup.import-rules.md +0 -94
- package/dist/help/json/topics/config-setup.tsconfigs.md +0 -31
- package/dist/help/json/topics/dsl.md +0 -23
- package/dist/help/json/topics/first-setup.md +0 -290
- package/dist/help/json/topics/help-format.md +0 -10
- package/dist/help/json/topics/help-protocol.md +0 -24
- package/dist/help/json/topics/imports.normalize.md +0 -45
- package/dist/help/json/topics/inspect.code.md +0 -39
- package/dist/help/json/topics/inspect.cycles.md +0 -36
- package/dist/help/json/topics/inspect.deps.md +0 -44
- package/dist/help/json/topics/inspect.duplicates.md +0 -37
- package/dist/help/json/topics/inspect.exports.md +0 -38
- package/dist/help/json/topics/inspect.file.md +0 -36
- package/dist/help/json/topics/inspect.graph.md +0 -137
- package/dist/help/json/topics/inspect.imports.md +0 -13
- package/dist/help/json/topics/inspect.md +0 -86
- package/dist/help/json/topics/inspect.members.md +0 -30
- package/dist/help/json/topics/inspect.tree.md +0 -22
- package/dist/help/json/topics/inspect.usages.md +0 -59
- package/dist/help/json/topics/modulePlan.md +0 -60
- package/dist/help/json/topics/move.md +0 -46
- package/dist/help/json/topics/mutation.md +0 -63
- package/dist/help/json/topics/patterns.md +0 -74
- package/dist/help/json/topics/prefs.md +0 -38
- package/dist/help/json/topics/qr.md +0 -35
- package/dist/help/json/topics/quick-map.md +0 -28
- package/dist/help/json/topics/refactor.batch.md +0 -61
- package/dist/help/json/topics/rename.md +0 -42
- package/dist/help/json/topics/reveal.md +0 -28
- package/dist/help/json/topics/selectors.md +0 -21
- package/dist/help/json/topics/session.md +0 -59
- package/dist/help/json/topics/view.md +0 -28
package/dist/help/docs/dsl.md
CHANGED
|
@@ -10,9 +10,10 @@ DSL request model:
|
|
|
10
10
|
- For one-off file operations, pass the path directly.
|
|
11
11
|
|
|
12
12
|
Syntax:
|
|
13
|
-
@file <path> default file
|
|
14
|
-
@source <path> default sourceFile for mutations
|
|
15
|
-
|
|
13
|
+
@file <path> default file
|
|
14
|
+
@source <path> default sourceFile for mutations
|
|
15
|
+
@base <dir> default base dir for file mutations
|
|
16
|
+
op arg arg key=value request
|
|
16
17
|
+flag boolean true
|
|
17
18
|
-flag boolean false
|
|
18
19
|
>name save reusable artifact when supported
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# File Move
|
|
2
|
+
|
|
3
|
+
Modes: preview/apply or execute.
|
|
4
|
+
Use execute for routine changes.
|
|
5
|
+
Use preview/apply when learning a mutation command or inspecting a large multi-step request before writing files.
|
|
6
|
+
|
|
7
|
+
file move moves whole files into target directories.
|
|
8
|
+
Missing target directories are created automatically.
|
|
9
|
+
|
|
10
|
+
Use it when the filesystem layout is the intent.
|
|
11
|
+
|
|
12
|
+
Move to directory:
|
|
13
|
+
file move toDir preview --stdin
|
|
14
|
+
file move toDir execute --stdin
|
|
15
|
+
file move toDir apply <previewId>
|
|
16
|
+
|
|
17
|
+
Use preview/apply when you want to inspect planned file moves before writing files.
|
|
18
|
+
Use execute when you want to write immediately.
|
|
19
|
+
|
|
20
|
+
Run:
|
|
21
|
+
aib file move toDir execute --stdin
|
|
22
|
+
|
|
23
|
+
Input:
|
|
24
|
+
@base src/svc
|
|
25
|
+
moveToDir facade: ../services/fileA.ts fileB.ts
|
|
26
|
+
moveToDir ../core/services: fileC.ts classes/main/fileD.ts
|
|
27
|
+
|
|
28
|
+
How this resolves:
|
|
29
|
+
../services/fileA.ts resolves to src/services/fileA.ts
|
|
30
|
+
fileB.ts resolves to src/svc/fileB.ts
|
|
31
|
+
facade resolves to src/svc/facade
|
|
32
|
+
../core/services resolves to src/core/services
|
|
33
|
+
moved files keep their basename, not their source subdirectory
|
|
34
|
+
|
|
35
|
+
Resulting files:
|
|
36
|
+
src/svc/facade/fileA.ts
|
|
37
|
+
src/svc/facade/fileB.ts
|
|
38
|
+
src/core/services/fileC.ts
|
|
39
|
+
src/core/services/fileD.ts
|
|
40
|
+
|
|
41
|
+
Rules:
|
|
42
|
+
- @base sets the base directory for source files and target directories.
|
|
43
|
+
- source file paths resolve from @base; cwd-relative paths are accepted when the @base path does not exist.
|
|
44
|
+
- target directories resolve from @base.
|
|
45
|
+
- source paths and target directories may use `..`.
|
|
46
|
+
- file move supports files, not directories.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# File Rename
|
|
2
|
+
|
|
3
|
+
Modes: preview/apply or execute.
|
|
4
|
+
Use execute for routine changes.
|
|
5
|
+
Use preview/apply when learning a mutation command or inspecting a large multi-step request before writing files.
|
|
6
|
+
|
|
7
|
+
file rename renames whole files.
|
|
8
|
+
|
|
9
|
+
Rename files:
|
|
10
|
+
file rename preview --stdin
|
|
11
|
+
file rename execute --stdin
|
|
12
|
+
file rename apply <previewId>
|
|
13
|
+
|
|
14
|
+
Use preview/apply when you want to inspect planned file renames before writing files.
|
|
15
|
+
Use execute when you want to write immediately.
|
|
16
|
+
|
|
17
|
+
Run:
|
|
18
|
+
aib file rename execute --stdin
|
|
19
|
+
|
|
20
|
+
Input:
|
|
21
|
+
@base src
|
|
22
|
+
rename svc/ws-cli.ts->cli.ts svc/ws-command.ts->command.ts
|
|
23
|
+
rename svc/core/opt-build.ts->builder.ts
|
|
24
|
+
|
|
25
|
+
How this resolves:
|
|
26
|
+
- source files resolve from @base;
|
|
27
|
+
- target names without a directory stay beside each source file.
|
|
28
|
+
|
|
29
|
+
Rules:
|
|
30
|
+
- @base sets the base directory for source files.
|
|
31
|
+
- source file paths resolve from @base; cwd-relative paths are accepted when the @base path does not exist.
|
|
32
|
+
- target names without a directory stay beside each source file.
|
|
33
|
+
- target paths with a directory resolve from @base.
|
|
34
|
+
- source paths and target paths may use `..`.
|
|
35
|
+
- file rename supports files, not directories.
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
Inline commands below omit the aib prefix.
|
|
4
4
|
Run them as: aib <command>
|
|
5
5
|
|
|
6
|
-
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
7
|
-
Stdin Run lines include the aib prefix to avoid confusion.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@'
|
|
11
|
-
<input>
|
|
12
|
-
'@ | aib <command> --stdin
|
|
6
|
+
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
7
|
+
Stdin Run lines include the aib prefix to avoid confusion.
|
|
8
|
+
|
|
9
|
+
{{stdin.examples}}
|
|
@@ -4,7 +4,7 @@ Use code to fetch exact declarations or members.
|
|
|
4
4
|
It returns focused code without reading the whole file.
|
|
5
5
|
|
|
6
6
|
Good for:
|
|
7
|
-
- reading a known function, class, method, or
|
|
7
|
+
- reading a known function, class, method, declaration, `default`, or `IIFE#N`
|
|
8
8
|
- fetching several related code blocks in one request
|
|
9
9
|
- keeping context focused on code needed for the current task
|
|
10
10
|
|
|
@@ -21,9 +21,9 @@ Use -ranges for source without ranges.
|
|
|
21
21
|
Prefs:
|
|
22
22
|
inspect.code.maxNonEmptyLines
|
|
23
23
|
|
|
24
|
-
Run:
|
|
25
|
-
aib inspect --stdin
|
|
26
|
-
|
|
24
|
+
Run:
|
|
25
|
+
aib inspect --stdin
|
|
26
|
+
|
|
27
27
|
Input:
|
|
28
28
|
code @svc/service.ts Service.{render,reset} normalize
|
|
29
|
-
code @svc/serviceB.ts ServiceB.{constructor}
|
|
29
|
+
code @svc/serviceB.ts ServiceB.{constructor} default IIFE#1
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Use deps to see what one entity depends on inside its file.
|
|
4
4
|
It separates type-only dependencies from runtime value dependencies.
|
|
5
5
|
|
|
6
|
-
Good for:
|
|
7
|
-
- checking what a symbol may need when moved or extracted
|
|
8
|
-
- spotting nearby types, constants, or helpers tied to one entity
|
|
9
|
-
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
6
|
+
Good for:
|
|
7
|
+
- checking what a symbol may need when moved or extracted
|
|
8
|
+
- spotting nearby types, constants, or helpers tied to one entity
|
|
9
|
+
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
10
10
|
- debugging mutation failures caused by local dependency shape
|
|
11
11
|
|
|
12
12
|
Controls:
|
|
13
13
|
file, entity, entities, parent
|
|
14
14
|
|
|
15
|
-
Run:
|
|
16
|
-
aib inspect --stdin
|
|
17
|
-
|
|
15
|
+
Run:
|
|
16
|
+
aib inspect --stdin
|
|
17
|
+
|
|
18
18
|
Input:
|
|
19
19
|
deps @svc/service.ts entities=[createService,normalize,Service.{render,reset}]
|
|
20
20
|
deps @svc/serviceB.ts ServiceB.{constructor} getConfig
|
|
@@ -5,8 +5,9 @@ Exported declarations are marked in the output.
|
|
|
5
5
|
It shows what lives in the file before you decide whether to read code.
|
|
6
6
|
|
|
7
7
|
Good for:
|
|
8
|
-
- mapping
|
|
8
|
+
- mapping a file
|
|
9
9
|
- listing top-level declarations
|
|
10
|
+
- seeing default exports, decorators, IIFEs, and runtime calls
|
|
10
11
|
- checking whether a file contains real declarations or mostly re-exports
|
|
11
12
|
|
|
12
13
|
Do not add limit just in case.
|
|
@@ -37,7 +37,7 @@ scope=src creates a broad reusable map for src.
|
|
|
37
37
|
scope=src/services is cheaper for local work.
|
|
38
38
|
scope=[src/services,src/components] compares known areas without mapping all src.
|
|
39
39
|
|
|
40
|
-
After you understand which graph sections matter, hide the rest with flags
|
|
40
|
+
After you understand which graph sections matter, hide the rest with flags.
|
|
41
41
|
Graph can be noisy; shape it for the current task.
|
|
42
42
|
|
|
43
43
|
Controls:
|
|
@@ -61,8 +61,8 @@ graph from=aib:graph:services-graph focus=[@svc/users.ts,@svc/admins.ts] +symbol
|
|
|
61
61
|
Focus saved graph later:
|
|
62
62
|
inspect graph --from-file aib:graph:services-graph --focus @svc/messages.ts --focus @svc/posts.ts --symbol-usage
|
|
63
63
|
|
|
64
|
-
Inline graph focus can add focus and symbolUsage.
|
|
65
|
-
Use DSL
|
|
64
|
+
Inline graph focus can add focus and symbolUsage.
|
|
65
|
+
Use DSL or request flags to hide sections such as edges/hubs/entrypoints/leaves.
|
|
66
66
|
|
|
67
67
|
Specialized graph command:
|
|
68
68
|
Run:
|
|
@@ -28,16 +28,16 @@ local import cycles cycles
|
|
|
28
28
|
Prefer one batch DSL request for related questions.
|
|
29
29
|
|
|
30
30
|
Batch example:
|
|
31
|
-
|
|
32
|
-
Run:
|
|
33
|
-
aib inspect --stdin
|
|
34
|
-
|
|
31
|
+
|
|
32
|
+
Run:
|
|
33
|
+
aib inspect --stdin
|
|
34
|
+
|
|
35
35
|
Input:
|
|
36
36
|
@file @svc/service.ts
|
|
37
37
|
file
|
|
38
38
|
file @svc/serviceB.ts
|
|
39
39
|
members Service
|
|
40
|
-
code entities=[Service.{render,reset},normalize]
|
|
40
|
+
code entities=[Service.{render,reset},normalize,default,IIFE#1]
|
|
41
41
|
code @svc/serviceC.ts ServiceC -ranges
|
|
42
42
|
usages target=@svc/service.ts normalize scope=src detail=loc
|
|
43
43
|
duplicates scope=src/scripts detail=sum limit=20
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
# Mutation
|
|
2
2
|
|
|
3
|
-
Mutation commands change code through TS/IDE
|
|
4
|
-
Successful mutations update affected references and imports.
|
|
5
|
-
|
|
3
|
+
Mutation commands change code and files through TS/IDE-backed operations.
|
|
4
|
+
Successful mutations update affected references and imports.
|
|
5
|
+
|
|
6
|
+
Semantic mutations change TypeScript symbols/declarations.
|
|
7
|
+
File mutations change file layout.
|
|
8
|
+
|
|
6
9
|
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
|
|
7
10
|
|
|
8
|
-
If
|
|
11
|
+
If mutation imports do not match the repo style, run:
|
|
9
12
|
aib help config-setup.import-rules
|
|
10
13
|
|
|
11
|
-
AIB mutations are designed to reduce manual checking.
|
|
12
|
-
Your job is to express the intent in DSL.
|
|
13
|
-
AIB's job is to convert that intent into code changes.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
AIB mutations are designed to reduce manual checking.
|
|
15
|
+
Your job is to express the intent in DSL.
|
|
16
|
+
AIB's job is to convert that intent into code changes.
|
|
17
|
+
|
|
18
|
+
Choose the mutation by intent:
|
|
19
|
+
rename - rename TypeScript symbols
|
|
20
|
+
move toFile - move TypeScript declarations into one file
|
|
21
|
+
modulePlan - split one source file into several modules
|
|
22
|
+
file move toDir - move whole files into directories
|
|
23
|
+
file rename - rename whole files.
|
|
24
|
+
|
|
25
|
+
Do not read all changed files just because a mutation touched them.
|
|
26
|
+
That defeats the purpose of using AIB for mechanical refactors.
|
|
27
|
+
|
|
28
|
+
If the command succeeds, the requested mechanical change was applied.
|
|
19
29
|
After failure or partial success, use the output to decide the next request.
|
|
20
30
|
|
|
21
31
|
When running mutation commands, set the harness timeout to 3 minutes.
|
|
@@ -28,7 +38,7 @@ preview inspect planned edits, then apply by id
|
|
|
28
38
|
apply write a previewed change
|
|
29
39
|
execute write immediately
|
|
30
40
|
|
|
31
|
-
Use execute for routine
|
|
41
|
+
Use execute for routine requests.
|
|
32
42
|
|
|
33
43
|
Use preview/apply when you are learning a mutation command, or when one request contains a large multi-step change that you want to inspect before writing files.
|
|
34
44
|
Typical examples: a huge modulePlan or refactor batch.
|
|
@@ -10,7 +10,7 @@ Use normal text search when the question is just text.
|
|
|
10
10
|
|
|
11
11
|
For a first pass in a new codebase, map directories before reading files:
|
|
12
12
|
|
|
13
|
-
tree src depth
|
|
13
|
+
aib inspect tree src --depth 5 --only-dirs --limit 200
|
|
14
14
|
|
|
15
15
|
Start compact for broad scans.
|
|
16
16
|
Use summary, locations, or local graph views first when output could be large.
|
|
@@ -20,10 +20,6 @@ If output hides data and shows `view: aib:res_<id>`, use `aib view ...` to fetch
|
|
|
20
20
|
Compact output is a starting point, not a substitute for needed code.
|
|
21
21
|
Fetch exact code when correctness depends on implementation details.
|
|
22
22
|
|
|
23
|
-
Use prefs when the current phase repeats the same output shape.
|
|
24
|
-
Turn details off when they stop helping.
|
|
25
|
-
Turn them back on when they matter.
|
|
26
|
-
|
|
27
23
|
Use @file only when several following operations share the same file.
|
|
28
24
|
For independent one-off file requests, pass the path directly:
|
|
29
25
|
file @svc/a.ts
|
package/dist/help/docs/qr.md
CHANGED
|
@@ -11,27 +11,12 @@ For focused text reads, prefer qr over cat/Get-Content/type, especially when ali
|
|
|
11
11
|
Use shell reads only when piping into shell tooling or qr is unavailable.
|
|
12
12
|
|
|
13
13
|
Controls:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-a all; whole file
|
|
14
|
+
h=N head; first N lines
|
|
15
|
+
t=N tail; last N lines
|
|
16
|
+
o=N l=N range; starting line and line count
|
|
17
|
+
all whole file
|
|
19
18
|
|
|
20
|
-
If no window is provided, qr uses
|
|
21
|
-
If
|
|
19
|
+
If no window is provided, qr uses h=80.
|
|
20
|
+
If all is present, it wins over other window flags.
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
aib qr --stdin
|
|
25
|
-
|
|
26
|
-
Input:
|
|
27
|
-
qr @scripts/a.txt h=80
|
|
28
|
-
qr @scripts/b.py o=300 l=50
|
|
29
|
-
qr @scripts/c.md t=120
|
|
30
|
-
qr @logs/app.log all
|
|
31
|
-
|
|
32
|
-
Inline:
|
|
33
|
-
aib qr @scripts/a.txt -h 80
|
|
34
|
-
aib qr @scripts/b.py -o 300 -l 50
|
|
35
|
-
aib qr @logs/app.log -a
|
|
36
|
-
|
|
37
|
-
Use stdin for several reads.
|
|
22
|
+
{{qr.inline.examples}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File Layout Recipe
|
|
2
|
+
|
|
3
|
+
Assumption:
|
|
4
|
+
You are changing whole-file layout.
|
|
5
|
+
You are not moving TypeScript declarations or renaming TypeScript symbols.
|
|
6
|
+
|
|
7
|
+
Related topics:
|
|
8
|
+
aib help mutation file.move file.rename
|
|
9
|
+
|
|
10
|
+
If you only need to move files, do not read file.rename.
|
|
11
|
+
If you only need to rename files, do not read file.move.
|
|
12
|
+
|
|
13
|
+
Use focused topic syntax to express the file layout refactor.
|
|
14
|
+
Do not move or rename files manually.
|
|
15
|
+
Use AIB file mutations so references/imports are updated.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# RG
|
|
2
|
+
|
|
3
|
+
aib rg
|
|
4
|
+
|
|
5
|
+
Run ripgrep through AIB.
|
|
6
|
+
|
|
7
|
+
Regular rg:
|
|
8
|
+
rg <args>
|
|
9
|
+
|
|
10
|
+
AIB rg:
|
|
11
|
+
aib rg -- <args>
|
|
12
|
+
|
|
13
|
+
Everything after `--` is passed as normal ripgrep arguments.
|
|
14
|
+
Use the same args you would pass to `rg`.
|
|
15
|
+
Use normal paths in input. Do not use AIB path aliases here.
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
rg -n "TODO" src/core
|
|
19
|
+
aib rg -- -n "TODO" src/core
|
|
20
|
+
|
|
21
|
+
rg -n --column "SomeValue" ws/commands ws/config
|
|
22
|
+
aib rg -- -n --column "SomeValue" ws/commands ws/config
|
|
@@ -4,7 +4,7 @@ Start by creating or selecting your session.
|
|
|
4
4
|
Create it once, then reuse it.
|
|
5
5
|
Do not create a new session for every command or subtask.
|
|
6
6
|
|
|
7
|
-
Session stores saved artifacts
|
|
7
|
+
Session stores saved artifacts and aliases.
|
|
8
8
|
|
|
9
9
|
Prefer short session names:
|
|
10
10
|
aa, tr, qa, a2
|