@automaton-labs/aib 0.0.6 → 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 -2
- package/dist/commands/config-output.js +10 -10
- 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 -2
- 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 +4 -4
- 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/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/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/{json/bootstrap.md → bootstrap.bash.md} +214 -392
- package/dist/help/bootstrap.md +101 -137
- package/dist/help/{json/full.md → bootstrap.pwsh.md} +214 -392
- 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/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 +101 -137
- package/dist/help/dsl/bootstrap.pwsh.md +907 -0
- 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/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 +101 -137
- 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/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 +101 -137
- package/dist/help/help-index.md +44 -0
- package/dist/help/help-meta.json +43 -27
- 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/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 +1781 -1570
- 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/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 -8
- 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 -3
- package/dist/shared/types.js +1 -1
- package/dist/tool-runtime/runtime-tools.js +1 -0
- 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/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 -9
- 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 -7
- 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/bootstrap.md
CHANGED
|
@@ -6,12 +6,12 @@ It can inspect symbols, usages, dependencies, duplicates, focused code, and run
|
|
|
6
6
|
aib is designed for agent workflows:
|
|
7
7
|
batch requests, compact text output, session handles, and reusable artifacts.
|
|
8
8
|
|
|
9
|
-
Inline commands omit the aib prefix.
|
|
10
|
-
When you see:
|
|
11
|
-
session
|
|
12
|
-
|
|
13
|
-
Run:
|
|
14
|
-
aib session
|
|
9
|
+
Inline commands omit the aib prefix.
|
|
10
|
+
When you see:
|
|
11
|
+
session clear
|
|
12
|
+
|
|
13
|
+
Run:
|
|
14
|
+
aib session clear
|
|
15
15
|
|
|
16
16
|
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
17
17
|
Stdin Run lines include the aib prefix to avoid confusion.
|
|
@@ -59,7 +59,7 @@ Use normal text search when the question is just text.
|
|
|
59
59
|
|
|
60
60
|
For a first pass in a new codebase, map directories before reading files:
|
|
61
61
|
|
|
62
|
-
tree src depth
|
|
62
|
+
aib inspect tree src --depth 5 --only-dirs --limit 200
|
|
63
63
|
|
|
64
64
|
Start compact for broad scans.
|
|
65
65
|
Use summary, locations, or local graph views first when output could be large.
|
|
@@ -69,10 +69,6 @@ If output hides data and shows `view: aib:res_<id>`, use `aib view ...` to fetch
|
|
|
69
69
|
Compact output is a starting point, not a substitute for needed code.
|
|
70
70
|
Fetch exact code when correctness depends on implementation details.
|
|
71
71
|
|
|
72
|
-
Use prefs when the current phase repeats the same output shape.
|
|
73
|
-
Turn details off when they stop helping.
|
|
74
|
-
Turn them back on when they matter.
|
|
75
|
-
|
|
76
72
|
For mutation commands, set the shell/tool harness timeout to 3 minutes.
|
|
77
73
|
|
|
78
74
|
If a mutation command times out or returns no final output, use:
|
|
@@ -98,7 +94,7 @@ If move/modulePlan imports do not match the repo style, run:
|
|
|
98
94
|
aib help config-setup.import-rules
|
|
99
95
|
|
|
100
96
|
If you are about to change import style across files, add or adopt tsconfig aliases, or clean imports repeatedly, run:
|
|
101
|
-
aib help config-setup.import-normalize
|
|
97
|
+
aib help config-setup.import-normalize imports.normalize
|
|
102
98
|
|
|
103
99
|
If tree/graph output includes known repo noise, run:
|
|
104
100
|
aib help config-setup.excludes
|
|
@@ -193,7 +189,7 @@ Start by creating or selecting your session.
|
|
|
193
189
|
Create it once, then reuse it.
|
|
194
190
|
Do not create a new session for every command or subtask.
|
|
195
191
|
|
|
196
|
-
Session stores saved artifacts
|
|
192
|
+
Session stores saved artifacts and aliases.
|
|
197
193
|
|
|
198
194
|
Prefer short session names:
|
|
199
195
|
aa, tr, qa, a2
|
|
@@ -221,39 +217,6 @@ Reusable index handles look like:
|
|
|
221
217
|
|
|
222
218
|
Pass index handles back to the matching inspect command with `--from-file` or `from` in DSL.
|
|
223
219
|
|
|
224
|
-
Prefs
|
|
225
|
-
|
|
226
|
-
Prefs change defaults for the active session.
|
|
227
|
-
Use them when you want repeated CLI behavior without repeating request fields.
|
|
228
|
-
|
|
229
|
-
Set prefs:
|
|
230
|
-
session prefs set <name> <value> [<name> <value>...]
|
|
231
|
-
|
|
232
|
-
Example:
|
|
233
|
-
session prefs set inspect.graph.hubs false inspect.graph.leaves false
|
|
234
|
-
|
|
235
|
-
Show prefs:
|
|
236
|
-
session prefs get [prefix] [--all]
|
|
237
|
-
|
|
238
|
-
By default, get shows session overrides.
|
|
239
|
-
--all includes defaults.
|
|
240
|
-
prefix filters keys.
|
|
241
|
-
|
|
242
|
-
boolean = true|false
|
|
243
|
-
N = integer
|
|
244
|
-
|
|
245
|
-
Available prefs:
|
|
246
|
-
inspect.code.maxNonEmptyLines N
|
|
247
|
-
inspect.usages.maxLocations N
|
|
248
|
-
inspect.usages.maxCodeBlocks N
|
|
249
|
-
inspect.members.maxItems N
|
|
250
|
-
inspect.members.all boolean
|
|
251
|
-
inspect.graph.hubs boolean
|
|
252
|
-
inspect.graph.entrypoints boolean
|
|
253
|
-
inspect.graph.leaves boolean
|
|
254
|
-
inspect.graph.edges boolean
|
|
255
|
-
inspect.graph.symbolUsage boolean
|
|
256
|
-
|
|
257
220
|
Selectors identify symbols when names are ambiguous.
|
|
258
221
|
Use plain names when they are unambiguous.
|
|
259
222
|
Use selectors when aib reports ambiguity or when different symbol kinds share a name.
|
|
@@ -272,8 +235,9 @@ c-Name class
|
|
|
272
235
|
i-Name interface
|
|
273
236
|
t-Name type
|
|
274
237
|
v-name variable
|
|
275
|
-
e-Name enum
|
|
276
|
-
|
|
238
|
+
e-Name enum
|
|
239
|
+
ns-Name namespace
|
|
240
|
+
m-name method, usually with parent
|
|
277
241
|
p-name property, usually with parent
|
|
278
242
|
|
|
279
243
|
DSL request model:
|
|
@@ -286,9 +250,10 @@ DSL request model:
|
|
|
286
250
|
- For one-off file operations, pass the path directly.
|
|
287
251
|
|
|
288
252
|
Syntax:
|
|
289
|
-
@file <path> default file
|
|
290
|
-
@source <path> default sourceFile for mutations
|
|
291
|
-
|
|
253
|
+
@file <path> default file
|
|
254
|
+
@source <path> default sourceFile for mutations
|
|
255
|
+
@base <dir> default base dir for file mutations
|
|
256
|
+
op arg arg key=value request
|
|
292
257
|
+flag boolean true
|
|
293
258
|
-flag boolean false
|
|
294
259
|
>name save reusable artifact when supported
|
|
@@ -333,16 +298,16 @@ aib help inspect.cycles
|
|
|
333
298
|
Prefer one batch DSL request for related questions.
|
|
334
299
|
|
|
335
300
|
Batch example:
|
|
336
|
-
|
|
337
|
-
Run:
|
|
338
|
-
aib inspect --stdin
|
|
339
|
-
|
|
301
|
+
|
|
302
|
+
Run:
|
|
303
|
+
aib inspect --stdin
|
|
304
|
+
|
|
340
305
|
Input:
|
|
341
306
|
@file @svc/service.ts
|
|
342
307
|
file
|
|
343
308
|
file @svc/serviceB.ts
|
|
344
309
|
members Service
|
|
345
|
-
code entities=[Service.{render,reset},normalize]
|
|
310
|
+
code entities=[Service.{render,reset},normalize,default,IIFE#1]
|
|
346
311
|
code @svc/serviceC.ts ServiceC -ranges
|
|
347
312
|
usages target=@svc/service.ts normalize scope=src detail=loc
|
|
348
313
|
duplicates scope=src/scripts detail=sum limit=20
|
|
@@ -383,8 +348,9 @@ Exported declarations are marked in the output.
|
|
|
383
348
|
It shows what lives in the file before you decide whether to read code.
|
|
384
349
|
|
|
385
350
|
Good for:
|
|
386
|
-
- mapping
|
|
351
|
+
- mapping a file
|
|
387
352
|
- listing top-level declarations
|
|
353
|
+
- seeing default exports, decorators, IIFEs, and runtime calls
|
|
388
354
|
- checking whether a file contains real declarations or mostly re-exports
|
|
389
355
|
|
|
390
356
|
Do not add limit just in case.
|
|
@@ -487,7 +453,7 @@ Use code to fetch exact declarations or members.
|
|
|
487
453
|
It returns focused code without reading the whole file.
|
|
488
454
|
|
|
489
455
|
Good for:
|
|
490
|
-
- reading a known function, class, method, or
|
|
456
|
+
- reading a known function, class, method, declaration, `default`, or `IIFE#N`
|
|
491
457
|
- fetching several related code blocks in one request
|
|
492
458
|
- keeping context focused on code needed for the current task
|
|
493
459
|
|
|
@@ -501,30 +467,30 @@ Defaults: +show +ranges
|
|
|
501
467
|
Use -show for names/ranges only.
|
|
502
468
|
Use -ranges for source without ranges.
|
|
503
469
|
|
|
504
|
-
Run:
|
|
505
|
-
aib inspect --stdin
|
|
506
|
-
|
|
470
|
+
Run:
|
|
471
|
+
aib inspect --stdin
|
|
472
|
+
|
|
507
473
|
Input:
|
|
508
474
|
code @svc/service.ts Service.{render,reset} normalize
|
|
509
|
-
code @svc/serviceB.ts ServiceB.{constructor}
|
|
475
|
+
code @svc/serviceB.ts ServiceB.{constructor} default IIFE#1
|
|
510
476
|
|
|
511
477
|
Inspect Deps
|
|
512
478
|
|
|
513
479
|
Use deps to see what one entity depends on inside its file.
|
|
514
480
|
It separates type-only dependencies from runtime value dependencies.
|
|
515
481
|
|
|
516
|
-
Good for:
|
|
517
|
-
- checking what a symbol may need when moved or extracted
|
|
518
|
-
- spotting nearby types, constants, or helpers tied to one entity
|
|
519
|
-
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
482
|
+
Good for:
|
|
483
|
+
- checking what a symbol may need when moved or extracted
|
|
484
|
+
- spotting nearby types, constants, or helpers tied to one entity
|
|
485
|
+
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
520
486
|
- debugging mutation failures caused by local dependency shape
|
|
521
487
|
|
|
522
488
|
Controls:
|
|
523
489
|
file, entity, entities, parent
|
|
524
490
|
|
|
525
|
-
Run:
|
|
526
|
-
aib inspect --stdin
|
|
527
|
-
|
|
491
|
+
Run:
|
|
492
|
+
aib inspect --stdin
|
|
493
|
+
|
|
528
494
|
Input:
|
|
529
495
|
deps @svc/service.ts entities=[createService,normalize,Service.{render,reset}]
|
|
530
496
|
deps @svc/serviceB.ts ServiceB.{constructor} getConfig
|
|
@@ -599,7 +565,7 @@ scope=src creates a broad reusable map for src.
|
|
|
599
565
|
scope=src/services is cheaper for local work.
|
|
600
566
|
scope=[src/services,src/components] compares known areas without mapping all src.
|
|
601
567
|
|
|
602
|
-
After you understand which graph sections matter, hide the rest with flags
|
|
568
|
+
After you understand which graph sections matter, hide the rest with flags.
|
|
603
569
|
Graph can be noisy; shape it for the current task.
|
|
604
570
|
|
|
605
571
|
Controls:
|
|
@@ -623,8 +589,8 @@ graph from=aib:graph:services-graph focus=[@svc/users.ts,@svc/admins.ts] +symbol
|
|
|
623
589
|
Focus saved graph later:
|
|
624
590
|
inspect graph --from-file aib:graph:services-graph --focus @svc/messages.ts --focus @svc/posts.ts --symbol-usage
|
|
625
591
|
|
|
626
|
-
Inline graph focus can add focus and symbolUsage.
|
|
627
|
-
Use DSL
|
|
592
|
+
Inline graph focus can add focus and symbolUsage.
|
|
593
|
+
Use DSL or request flags to hide sections such as edges/hubs/entrypoints/leaves.
|
|
628
594
|
|
|
629
595
|
Inspect Tree
|
|
630
596
|
|
|
@@ -678,22 +644,32 @@ duplicates scope=@svc detail=loc pathExclude=[src/generated,"**/* copy.ts"] limi
|
|
|
678
644
|
|
|
679
645
|
Mutation
|
|
680
646
|
|
|
681
|
-
Mutation commands change code through TS/IDE
|
|
682
|
-
Successful mutations update affected references and imports.
|
|
683
|
-
|
|
647
|
+
Mutation commands change code and files through TS/IDE-backed operations.
|
|
648
|
+
Successful mutations update affected references and imports.
|
|
649
|
+
|
|
650
|
+
Semantic mutations change TypeScript symbols/declarations.
|
|
651
|
+
File mutations change file layout.
|
|
652
|
+
|
|
684
653
|
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
|
|
685
654
|
|
|
686
|
-
If
|
|
655
|
+
If mutation imports do not match the repo style, run:
|
|
687
656
|
aib help config-setup.import-rules
|
|
688
657
|
|
|
689
|
-
AIB mutations are designed to reduce manual checking.
|
|
690
|
-
Your job is to express the intent in DSL.
|
|
691
|
-
AIB's job is to convert that intent into code changes.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
658
|
+
AIB mutations are designed to reduce manual checking.
|
|
659
|
+
Your job is to express the intent in DSL.
|
|
660
|
+
AIB's job is to convert that intent into code changes.
|
|
661
|
+
|
|
662
|
+
Choose the mutation by intent:
|
|
663
|
+
rename - rename TypeScript symbols
|
|
664
|
+
move toFile - move TypeScript declarations into one file
|
|
665
|
+
modulePlan - split one source file into several modules
|
|
666
|
+
file move toDir - move whole files into directories
|
|
667
|
+
file rename - rename whole files.
|
|
668
|
+
|
|
669
|
+
Do not read all changed files just because a mutation touched them.
|
|
670
|
+
That defeats the purpose of using AIB for mechanical refactors.
|
|
671
|
+
|
|
672
|
+
If the command succeeds, the requested mechanical change was applied.
|
|
697
673
|
After failure or partial success, use the output to decide the next request.
|
|
698
674
|
|
|
699
675
|
When running mutation commands, set the harness timeout to 3 minutes.
|
|
@@ -706,7 +682,7 @@ preview inspect planned edits, then apply by id
|
|
|
706
682
|
apply write a previewed change
|
|
707
683
|
execute write immediately
|
|
708
684
|
|
|
709
|
-
Use execute for routine
|
|
685
|
+
Use execute for routine requests.
|
|
710
686
|
|
|
711
687
|
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.
|
|
712
688
|
Typical examples: a huge modulePlan or refactor batch.
|
|
@@ -809,42 +785,24 @@ move src/service.types.ts: newType
|
|
|
809
785
|
This keeps related mutation intent together:
|
|
810
786
|
rename first, then move the renamed symbols.
|
|
811
787
|
|
|
812
|
-
|
|
788
|
+
File Move and File Rename
|
|
813
789
|
|
|
814
|
-
Use
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
Use importNormalize in aib.json for repeated defaults.
|
|
790
|
+
Use file move/rename when the filesystem layout is the intent.
|
|
791
|
+
Do not change filesystem layout manually.
|
|
818
792
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
- cleaning import style after manual edits or broad refactors
|
|
822
|
-
- applying the same import style to a directory without hand-editing files
|
|
823
|
-
- applying new tsconfig aliases after they are added
|
|
824
|
-
|
|
825
|
-
Controls:
|
|
826
|
-
scope file/dir scope to normalize
|
|
827
|
-
to relative|alias|shortestAlias
|
|
828
|
-
preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
|
|
829
|
-
exclude files, directories, or glob-like patterns to skip
|
|
830
|
-
all show all planned edits; avoid on broad directory scopes
|
|
793
|
+
Focused topics:
|
|
794
|
+
aib help file.move file.rename
|
|
831
795
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
imports.normalize scope=src/core to=alias preferAlias=@features/*
|
|
843
|
-
|
|
844
|
-
With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
|
|
845
|
-
|
|
846
|
-
imports normalize preview @svc
|
|
847
|
-
imports normalize execute @svc
|
|
796
|
+
Layout smell trigger:
|
|
797
|
+
If a directory has many related files sharing a prefix, mixed responsibilities, or files that should be grouped by feature, read:
|
|
798
|
+
aib help recipe.file-layout
|
|
799
|
+
|
|
800
|
+
Imports Normalize
|
|
801
|
+
|
|
802
|
+
Use imports normalize for explicit import-style cleanup.
|
|
803
|
+
|
|
804
|
+
Focused topic:
|
|
805
|
+
aib help imports.normalize
|
|
848
806
|
|
|
849
807
|
JS/TS compatibility
|
|
850
808
|
|
|
@@ -903,30 +861,36 @@ For focused text reads, prefer qr over cat/Get-Content/type, especially when ali
|
|
|
903
861
|
Use shell reads only when piping into shell tooling or qr is unavailable.
|
|
904
862
|
|
|
905
863
|
Controls:
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
-a all; whole file
|
|
864
|
+
h=N head; first N lines
|
|
865
|
+
t=N tail; last N lines
|
|
866
|
+
o=N l=N range; starting line and line count
|
|
867
|
+
all whole file
|
|
911
868
|
|
|
912
|
-
If no window is provided, qr uses
|
|
913
|
-
If
|
|
869
|
+
If no window is provided, qr uses h=80.
|
|
870
|
+
If all is present, it wins over other window flags.
|
|
914
871
|
|
|
915
|
-
|
|
916
|
-
aib qr --stdin
|
|
872
|
+
{{qr.inline.examples}}
|
|
917
873
|
|
|
918
|
-
|
|
919
|
-
qr @scripts/a.txt h=80
|
|
920
|
-
qr @scripts/b.py o=300 l=50
|
|
921
|
-
qr @scripts/c.md t=120
|
|
922
|
-
qr @logs/app.log all
|
|
874
|
+
aib rg
|
|
923
875
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
876
|
+
Run ripgrep through AIB.
|
|
877
|
+
|
|
878
|
+
Regular rg:
|
|
879
|
+
rg <args>
|
|
880
|
+
|
|
881
|
+
AIB rg:
|
|
882
|
+
aib rg -- <args>
|
|
883
|
+
|
|
884
|
+
Everything after `--` is passed as normal ripgrep arguments.
|
|
885
|
+
Use the same args you would pass to `rg`.
|
|
886
|
+
Use normal paths in input. Do not use AIB path aliases here.
|
|
887
|
+
|
|
888
|
+
Examples:
|
|
889
|
+
rg -n "TODO" src/core
|
|
890
|
+
aib rg -- -n "TODO" src/core
|
|
928
891
|
|
|
929
|
-
|
|
892
|
+
rg -n --column "SomeValue" ws/commands ws/config
|
|
893
|
+
aib rg -- -n --column "SomeValue" ws/commands ws/config
|
|
930
894
|
|
|
931
895
|
Need to see TypeScript configs in the repo:
|
|
932
896
|
aib reveal tsconfigs
|