@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.
Files changed (247) hide show
  1. package/dist/bin/cli.js +4 -2
  2. package/dist/commands/apply-module-plan.js +3 -3
  3. package/dist/commands/background-command.js +2 -0
  4. package/dist/commands/captured-input.js +1 -2
  5. package/dist/commands/config-command.js +2 -2
  6. package/dist/commands/config-output.js +10 -10
  7. package/dist/commands/control-plane-command.js +1 -0
  8. package/dist/commands/declaration-command.js +7 -0
  9. package/dist/commands/declaration-execution-cache.js +1 -0
  10. package/dist/commands/declaration-format.js +1 -0
  11. package/dist/commands/declaration-preview-cache.js +2 -0
  12. package/dist/commands/doctor.js +3 -2
  13. package/dist/commands/execution-command.js +1 -1
  14. package/dist/commands/file-command.js +1 -0
  15. package/dist/commands/file-move-to-dir-execution-cache.js +1 -0
  16. package/dist/commands/file-move-to-dir-preview-cache.js +2 -0
  17. package/dist/commands/file-move-to-dir.js +5 -0
  18. package/dist/commands/file-mutation-runtime.js +1 -0
  19. package/dist/commands/file-refactor-batch-execution-cache.js +1 -0
  20. package/dist/commands/file-refactor-batch-preview-cache.js +2 -0
  21. package/dist/commands/file-refactor-batch.js +5 -0
  22. package/dist/commands/file-rename-execution-cache.js +1 -0
  23. package/dist/commands/file-rename-preview-cache.js +2 -0
  24. package/dist/commands/file-rename.js +5 -0
  25. package/dist/commands/help-command.js +5 -5
  26. package/dist/commands/host-command.js +1 -0
  27. package/dist/commands/inspect-cycles.js +3 -3
  28. package/dist/commands/inspect-format.js +15 -15
  29. package/dist/commands/inspect-tree.js +2 -2
  30. package/dist/commands/inspect.js +12 -12
  31. package/dist/commands/move-to-file.js +2 -2
  32. package/dist/commands/ota-command.js +2 -0
  33. package/dist/commands/quick-read.js +4 -4
  34. package/dist/commands/refactor-batch.js +4 -4
  35. package/dist/commands/rename-entities.js +4 -4
  36. package/dist/commands/result-view.js +6 -5
  37. package/dist/commands/worker-command.js +1 -0
  38. package/dist/config/defaults.js +1 -1
  39. package/dist/config/env-vars.js +1 -1
  40. package/dist/config/path-aliases.js +1 -1
  41. package/dist/config/resolve-command-alias.js +1 -1
  42. package/dist/content/content-bundle.js +1 -1
  43. package/dist/dsl/aib-dsl.js +1 -1
  44. package/dist/dsl/declaration-dsl.js +1 -0
  45. package/dist/dsl/file-move-to-dir-dsl.js +1 -0
  46. package/dist/dsl/file-refactor-batch-dsl.js +1 -0
  47. package/dist/dsl/file-rename-dsl.js +1 -0
  48. package/dist/help/{json/bootstrap.md → bootstrap.bash.md} +214 -392
  49. package/dist/help/bootstrap.md +101 -137
  50. package/dist/help/{json/full.md → bootstrap.pwsh.md} +214 -392
  51. package/dist/help/docs/dsl.md +4 -3
  52. package/dist/help/docs/file.move.md +46 -0
  53. package/dist/help/docs/file.rename.md +35 -0
  54. package/dist/help/docs/inspect.code.md +5 -5
  55. package/dist/help/docs/inspect.deps.md +7 -7
  56. package/dist/help/docs/inspect.file.md +2 -1
  57. package/dist/help/docs/inspect.graph.md +3 -3
  58. package/dist/help/docs/inspect.md +5 -5
  59. package/dist/help/docs/mutation.md +23 -13
  60. package/dist/help/docs/patterns.md +1 -5
  61. package/dist/help/docs/qr.md +7 -22
  62. package/dist/help/docs/quick-map.md +1 -0
  63. package/dist/help/docs/recipe.file-layout.md +15 -0
  64. package/dist/help/docs/rg.md +22 -0
  65. package/dist/help/docs/selectors.md +3 -2
  66. package/dist/help/docs/session.md +1 -1
  67. package/dist/help/dsl/bootstrap.bash.md +907 -0
  68. package/dist/help/dsl/bootstrap.md +101 -137
  69. package/dist/help/dsl/bootstrap.pwsh.md +907 -0
  70. package/dist/help/dsl/docs/dsl.md +4 -3
  71. package/dist/help/dsl/docs/file.move.md +46 -0
  72. package/dist/help/dsl/docs/file.rename.md +35 -0
  73. package/dist/help/dsl/docs/inspect.code.md +5 -5
  74. package/dist/help/dsl/docs/inspect.deps.md +7 -7
  75. package/dist/help/dsl/docs/inspect.file.md +2 -1
  76. package/dist/help/dsl/docs/inspect.graph.md +3 -3
  77. package/dist/help/dsl/docs/inspect.md +5 -5
  78. package/dist/help/dsl/docs/mutation.md +23 -13
  79. package/dist/help/dsl/docs/patterns.md +1 -5
  80. package/dist/help/dsl/docs/qr.md +7 -22
  81. package/dist/help/dsl/docs/quick-map.md +1 -0
  82. package/dist/help/dsl/docs/recipe.file-layout.md +15 -0
  83. package/dist/help/dsl/docs/rg.md +22 -0
  84. package/dist/help/dsl/docs/selectors.md +3 -2
  85. package/dist/help/dsl/docs/session.md +1 -1
  86. package/dist/help/dsl/full.md +101 -137
  87. package/dist/help/dsl/help-index.md +44 -0
  88. package/dist/help/dsl/tokens/qr.inline.examples.md +2 -0
  89. package/dist/help/dsl/tokens/stdin.examples.bash.md +8 -0
  90. package/dist/help/dsl/tokens/stdin.examples.pwsh.md +8 -0
  91. package/dist/help/dsl/tokens/stdin.examples.with-qr.bash.md +12 -0
  92. package/dist/help/dsl/tokens/stdin.examples.with-qr.pwsh.md +12 -0
  93. package/dist/help/dsl/topics/dsl.md +4 -3
  94. package/dist/help/dsl/topics/file.move.md +44 -0
  95. package/dist/help/dsl/topics/file.rename.md +33 -0
  96. package/dist/help/dsl/topics/inspect.code.md +5 -5
  97. package/dist/help/dsl/topics/inspect.deps.md +7 -7
  98. package/dist/help/dsl/topics/inspect.file.md +2 -1
  99. package/dist/help/dsl/topics/inspect.graph.md +3 -3
  100. package/dist/help/dsl/topics/inspect.md +5 -5
  101. package/dist/help/dsl/topics/mutation.md +23 -13
  102. package/dist/help/dsl/topics/patterns.md +1 -5
  103. package/dist/help/dsl/topics/qr.md +7 -22
  104. package/dist/help/dsl/topics/quick-map.md +1 -0
  105. package/dist/help/dsl/topics/recipe.file-layout.md +13 -0
  106. package/dist/help/dsl/topics/rg.md +20 -0
  107. package/dist/help/dsl/topics/selectors.md +3 -2
  108. package/dist/help/dsl/topics/session.md +1 -1
  109. package/dist/help/full.md +101 -137
  110. package/dist/help/help-index.md +44 -0
  111. package/dist/help/help-meta.json +43 -27
  112. package/dist/help/index.md +32 -75
  113. package/dist/help/tokens/qr.inline.examples.md +2 -0
  114. package/dist/help/tokens/stdin.examples.bash.md +8 -0
  115. package/dist/help/tokens/stdin.examples.pwsh.md +8 -0
  116. package/dist/help/tokens/stdin.examples.with-qr.bash.md +12 -0
  117. package/dist/help/tokens/stdin.examples.with-qr.pwsh.md +12 -0
  118. package/dist/help/topics/dsl.md +4 -3
  119. package/dist/help/topics/file.move.md +44 -0
  120. package/dist/help/topics/file.rename.md +33 -0
  121. package/dist/help/topics/inspect.code.md +5 -5
  122. package/dist/help/topics/inspect.deps.md +7 -7
  123. package/dist/help/topics/inspect.file.md +2 -1
  124. package/dist/help/topics/inspect.graph.md +3 -3
  125. package/dist/help/topics/inspect.md +5 -5
  126. package/dist/help/topics/mutation.md +23 -13
  127. package/dist/help/topics/patterns.md +1 -5
  128. package/dist/help/topics/qr.md +7 -22
  129. package/dist/help/topics/quick-map.md +1 -0
  130. package/dist/help/topics/recipe.file-layout.md +13 -0
  131. package/dist/help/topics/rg.md +20 -0
  132. package/dist/help/topics/selectors.md +3 -2
  133. package/dist/help/topics/session.md +1 -1
  134. package/dist/host/capabilities.js +1 -0
  135. package/dist/ide-launch/common.cjs +162 -162
  136. package/dist/managed-host/extension-vsix-resolver.js +1 -1
  137. package/dist/managed-host/manage-serve-web-host.cjs +141 -141
  138. package/dist/managed-host/serve-web-autostart.js +1 -1
  139. package/dist/managed-host/serve-web-host.cjs +1781 -1570
  140. package/dist/payloads/read-stdin-json.js +1 -1
  141. package/dist/rg-wrapper/core.js +6 -0
  142. package/dist/rg-wrapper/options.js +1 -0
  143. package/dist/rtk-wrapper/core.js +2 -0
  144. package/dist/runtime/input-source.js +1 -1
  145. package/dist/runtime/run-command.js +1 -1
  146. package/dist/selectors/parse-entities.js +1 -1
  147. package/dist/session/daemon-state.js +2 -0
  148. package/dist/session/server.js +7 -8
  149. package/dist/shared/operations.js +1 -1
  150. package/dist/shared/protocol.js +1 -1
  151. package/dist/shared/routes.js +1 -1
  152. package/dist/shared/stdin-examples.js +1 -3
  153. package/dist/shared/types.js +1 -1
  154. package/dist/tool-runtime/runtime-tools.js +1 -0
  155. package/dist/workers/control-plane/aib-control-plane-worker.cjs +80 -0
  156. package/dist/workers/control-plane/client-config.default.json +3 -0
  157. package/dist/workers/product-storage.js +1 -0
  158. package/dist/workers/registry.js +1 -0
  159. package/extension/vscode-refactor-bridge-extension.vsix +0 -0
  160. package/package.json +6 -4
  161. package/runtimes/launcher/linux-x64/aib +0 -0
  162. package/runtimes/launcher/win-x64/aib.exe +0 -0
  163. package/runtimes/tools/rg/darwin-arm64/rg +0 -0
  164. package/runtimes/tools/rg/darwin-x64/rg +0 -0
  165. package/runtimes/tools/rg/linux-arm64/rg +0 -0
  166. package/runtimes/tools/rg/linux-x64/rg +0 -0
  167. package/runtimes/tools/rg/manifest.json +36 -0
  168. package/runtimes/tools/rg/win32-x64/rg.exe +0 -0
  169. package/runtimes/tools/rtk/darwin-arm64/rtk +0 -0
  170. package/runtimes/tools/rtk/darwin-x64/rtk +0 -0
  171. package/runtimes/tools/rtk/linux-arm64/rtk +0 -0
  172. package/runtimes/tools/rtk/linux-x64/rtk +0 -0
  173. package/runtimes/tools/rtk/manifest.json +36 -0
  174. package/runtimes/tools/rtk/win32-x64/rtk.exe +0 -0
  175. package/dist/help/json/docs/basics.md +0 -15
  176. package/dist/help/json/docs/config-setup.aliases.md +0 -56
  177. package/dist/help/json/docs/config-setup.excludes.md +0 -45
  178. package/dist/help/json/docs/config-setup.import-normalize.md +0 -86
  179. package/dist/help/json/docs/config-setup.import-rules.md +0 -96
  180. package/dist/help/json/docs/config-setup.tsconfigs.md +0 -33
  181. package/dist/help/json/docs/dsl.md +0 -25
  182. package/dist/help/json/docs/first-setup.md +0 -292
  183. package/dist/help/json/docs/help-format.md +0 -9
  184. package/dist/help/json/docs/help-protocol.md +0 -26
  185. package/dist/help/json/docs/imports.normalize.md +0 -47
  186. package/dist/help/json/docs/inspect.code.md +0 -41
  187. package/dist/help/json/docs/inspect.cycles.md +0 -38
  188. package/dist/help/json/docs/inspect.deps.md +0 -46
  189. package/dist/help/json/docs/inspect.duplicates.md +0 -65
  190. package/dist/help/json/docs/inspect.exports.md +0 -40
  191. package/dist/help/json/docs/inspect.file.md +0 -38
  192. package/dist/help/json/docs/inspect.graph.md +0 -139
  193. package/dist/help/json/docs/inspect.imports.md +0 -15
  194. package/dist/help/json/docs/inspect.md +0 -88
  195. package/dist/help/json/docs/inspect.members.md +0 -32
  196. package/dist/help/json/docs/inspect.tree.md +0 -32
  197. package/dist/help/json/docs/inspect.usages.md +0 -61
  198. package/dist/help/json/docs/modulePlan.md +0 -73
  199. package/dist/help/json/docs/move.md +0 -56
  200. package/dist/help/json/docs/mutation.md +0 -65
  201. package/dist/help/json/docs/patterns.md +0 -76
  202. package/dist/help/json/docs/prefs.md +0 -40
  203. package/dist/help/json/docs/qr.md +0 -37
  204. package/dist/help/json/docs/quick-map.md +0 -30
  205. package/dist/help/json/docs/refactor.batch.md +0 -72
  206. package/dist/help/json/docs/rename.md +0 -47
  207. package/dist/help/json/docs/reveal.md +0 -30
  208. package/dist/help/json/docs/selectors.md +0 -23
  209. package/dist/help/json/docs/session.md +0 -77
  210. package/dist/help/json/docs/view.md +0 -30
  211. package/dist/help/json/snippets/agents.md +0 -14
  212. package/dist/help/json/topics/basics.md +0 -13
  213. package/dist/help/json/topics/config-setup.aliases.md +0 -54
  214. package/dist/help/json/topics/config-setup.excludes.md +0 -43
  215. package/dist/help/json/topics/config-setup.import-normalize.md +0 -84
  216. package/dist/help/json/topics/config-setup.import-rules.md +0 -94
  217. package/dist/help/json/topics/config-setup.tsconfigs.md +0 -31
  218. package/dist/help/json/topics/dsl.md +0 -23
  219. package/dist/help/json/topics/first-setup.md +0 -290
  220. package/dist/help/json/topics/help-format.md +0 -7
  221. package/dist/help/json/topics/help-protocol.md +0 -24
  222. package/dist/help/json/topics/imports.normalize.md +0 -45
  223. package/dist/help/json/topics/inspect.code.md +0 -39
  224. package/dist/help/json/topics/inspect.cycles.md +0 -36
  225. package/dist/help/json/topics/inspect.deps.md +0 -44
  226. package/dist/help/json/topics/inspect.duplicates.md +0 -37
  227. package/dist/help/json/topics/inspect.exports.md +0 -38
  228. package/dist/help/json/topics/inspect.file.md +0 -36
  229. package/dist/help/json/topics/inspect.graph.md +0 -137
  230. package/dist/help/json/topics/inspect.imports.md +0 -13
  231. package/dist/help/json/topics/inspect.md +0 -86
  232. package/dist/help/json/topics/inspect.members.md +0 -30
  233. package/dist/help/json/topics/inspect.tree.md +0 -22
  234. package/dist/help/json/topics/inspect.usages.md +0 -59
  235. package/dist/help/json/topics/modulePlan.md +0 -60
  236. package/dist/help/json/topics/move.md +0 -46
  237. package/dist/help/json/topics/mutation.md +0 -63
  238. package/dist/help/json/topics/patterns.md +0 -74
  239. package/dist/help/json/topics/prefs.md +0 -38
  240. package/dist/help/json/topics/qr.md +0 -35
  241. package/dist/help/json/topics/quick-map.md +0 -28
  242. package/dist/help/json/topics/refactor.batch.md +0 -61
  243. package/dist/help/json/topics/rename.md +0 -42
  244. package/dist/help/json/topics/reveal.md +0 -28
  245. package/dist/help/json/topics/selectors.md +0 -21
  246. package/dist/help/json/topics/session.md +0 -59
  247. package/dist/help/json/topics/view.md +0 -28
@@ -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 prefs get
12
-
13
- Run:
14
- aib session prefs get
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=5 +onlyDirs limit=200
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, aliases, and prefs.
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
- m-name method, usually with parent
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
- op arg arg key=value request
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 an unfamiliar file
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 declaration
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 or prefs.
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, request files, or prefs to hide sections such as edges/hubs/entrypoints/leaves.
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 refactors.
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 move/modulePlan imports do not match the repo style, run:
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
- Do not read all changed files just because a mutation touched them.
694
- That defeats the purpose of using AIB for mechanical refactors.
695
-
696
- If the command succeeds, the requested mechanical change was applied.
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 rename/move/modulePlan requests.
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
- Imports Normalize
788
+ File Move and File Rename
813
789
 
814
- Use imports normalize for explicit import-style cleanup.
815
- It rewrites resolved local import/export specifiers inside a chosen file or directory.
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
- Good for:
820
- - converting one area to aliases or relative imports
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
- Run:
833
- aib imports normalize preview --stdin
834
-
835
- Input:
836
- imports.normalize scope=@svc to=shortestAlias exclude=[@svc/generated,"**/* copy.ts"]
837
-
838
- Rewrite imports found inside src/core.
839
- When an imported file can be expressed through @features/*, prefer that alias.
840
-
841
- Input:
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
- -h N head; first N lines
907
- -t N tail; last N lines
908
- -o N offset; starting line, 1-based
909
- -l N limit; line count for offset reads
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 -h 80.
913
- If -a is present, it wins over other window flags.
869
+ If no window is provided, qr uses h=80.
870
+ If all is present, it wins over other window flags.
914
871
 
915
- Run:
916
- aib qr --stdin
872
+ {{qr.inline.examples}}
917
873
 
918
- Input:
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
- Inline:
925
- aib qr @scripts/a.txt -h 80
926
- aib qr @scripts/b.py -o 300 -l 50
927
- aib qr @logs/app.log -a
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
- Use stdin for several reads.
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