@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
@@ -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
- op arg arg key=value request
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.
@@ -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 declaration
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 an unfamiliar file
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 or prefs.
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, request files, or prefs to hide sections such as edges/hubs/entrypoints/leaves.
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 refactors.
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 move/modulePlan imports do not match the repo style, run:
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
- Do not read all changed files just because a mutation touched them.
16
- That defeats the purpose of using AIB for mechanical refactors.
17
-
18
- If the command succeeds, the requested mechanical change was applied.
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 rename/move/modulePlan requests.
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=5 +onlyDirs limit=200
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
@@ -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
- -h N head; first N lines
15
- -t N tail; last N lines
16
- -o N offset; starting line, 1-based
17
- -l N limit; line count for offset reads
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 -h 80.
21
- If -a is present, it wins over other window flags.
19
+ If no window is provided, qr uses h=80.
20
+ If all is present, it wins over other window flags.
22
21
 
23
- Run:
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}}
@@ -2,6 +2,7 @@
2
2
 
3
3
  Read:
4
4
  qr quick reads: ts, js, cmd, sh, json, log, txt, etc.
5
+ rg use `aib rg -- <args>` instead of `rg <args>`
5
6
  view hidden/truncated output
6
7
 
7
8
  Inspect:
@@ -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
@@ -18,6 +18,7 @@ c-Name class
18
18
  i-Name interface
19
19
  t-Name type
20
20
  v-name variable
21
- e-Name enum
22
- m-name method, usually with parent
21
+ e-Name enum
22
+ ns-Name namespace
23
+ m-name method, usually with parent
23
24
  p-name property, usually with parent
@@ -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, aliases, and prefs.
7
+ Session stores saved artifacts and aliases.
8
8
 
9
9
  Prefer short session names:
10
10
  aa, tr, qa, a2