@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.
Files changed (258) 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 -1
  6. package/dist/commands/config-output.js +10 -8
  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 -1
  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 +8 -8
  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/session-workspace.js +7 -7
  38. package/dist/commands/worker-command.js +1 -0
  39. package/dist/config/defaults.js +1 -1
  40. package/dist/config/env-vars.js +1 -1
  41. package/dist/config/path-aliases.js +1 -1
  42. package/dist/config/resolve-command-alias.js +1 -1
  43. package/dist/config/workspace-root.js +3 -3
  44. package/dist/content/content-bundle.js +1 -1
  45. package/dist/dsl/aib-dsl.js +1 -1
  46. package/dist/dsl/declaration-dsl.js +1 -0
  47. package/dist/dsl/file-move-to-dir-dsl.js +1 -0
  48. package/dist/dsl/file-refactor-batch-dsl.js +1 -0
  49. package/dist/dsl/file-rename-dsl.js +1 -0
  50. package/dist/help/bootstrap.bash.md +907 -0
  51. package/dist/help/bootstrap.md +105 -144
  52. package/dist/help/{json/bootstrap.md → bootstrap.pwsh.md} +216 -397
  53. package/dist/help/docs/dsl.md +4 -3
  54. package/dist/help/docs/file.move.md +46 -0
  55. package/dist/help/docs/file.rename.md +35 -0
  56. package/dist/help/docs/help-format.md +4 -7
  57. package/dist/help/docs/inspect.code.md +5 -5
  58. package/dist/help/docs/inspect.deps.md +7 -7
  59. package/dist/help/docs/inspect.file.md +2 -1
  60. package/dist/help/docs/inspect.graph.md +3 -3
  61. package/dist/help/docs/inspect.md +5 -5
  62. package/dist/help/docs/mutation.md +23 -13
  63. package/dist/help/docs/patterns.md +1 -5
  64. package/dist/help/docs/qr.md +7 -22
  65. package/dist/help/docs/quick-map.md +1 -0
  66. package/dist/help/docs/recipe.file-layout.md +15 -0
  67. package/dist/help/docs/rg.md +22 -0
  68. package/dist/help/docs/selectors.md +3 -2
  69. package/dist/help/docs/session.md +1 -1
  70. package/dist/help/dsl/bootstrap.bash.md +907 -0
  71. package/dist/help/dsl/bootstrap.md +105 -144
  72. package/dist/help/{json/full.md → dsl/bootstrap.pwsh.md} +216 -397
  73. package/dist/help/dsl/docs/dsl.md +4 -3
  74. package/dist/help/dsl/docs/file.move.md +46 -0
  75. package/dist/help/dsl/docs/file.rename.md +35 -0
  76. package/dist/help/dsl/docs/help-format.md +4 -7
  77. package/dist/help/dsl/docs/inspect.code.md +5 -5
  78. package/dist/help/dsl/docs/inspect.deps.md +7 -7
  79. package/dist/help/dsl/docs/inspect.file.md +2 -1
  80. package/dist/help/dsl/docs/inspect.graph.md +3 -3
  81. package/dist/help/dsl/docs/inspect.md +5 -5
  82. package/dist/help/dsl/docs/mutation.md +23 -13
  83. package/dist/help/dsl/docs/patterns.md +1 -5
  84. package/dist/help/dsl/docs/qr.md +7 -22
  85. package/dist/help/dsl/docs/quick-map.md +1 -0
  86. package/dist/help/dsl/docs/recipe.file-layout.md +15 -0
  87. package/dist/help/dsl/docs/rg.md +22 -0
  88. package/dist/help/dsl/docs/selectors.md +3 -2
  89. package/dist/help/dsl/docs/session.md +1 -1
  90. package/dist/help/dsl/full.md +105 -144
  91. package/dist/help/dsl/help-index.md +44 -0
  92. package/dist/help/dsl/tokens/qr.inline.examples.md +2 -0
  93. package/dist/help/dsl/tokens/stdin.examples.bash.md +8 -0
  94. package/dist/help/dsl/tokens/stdin.examples.pwsh.md +8 -0
  95. package/dist/help/dsl/tokens/stdin.examples.with-qr.bash.md +12 -0
  96. package/dist/help/dsl/tokens/stdin.examples.with-qr.pwsh.md +12 -0
  97. package/dist/help/dsl/topics/dsl.md +4 -3
  98. package/dist/help/dsl/topics/file.move.md +44 -0
  99. package/dist/help/dsl/topics/file.rename.md +33 -0
  100. package/dist/help/dsl/topics/help-format.md +4 -7
  101. package/dist/help/dsl/topics/inspect.code.md +5 -5
  102. package/dist/help/dsl/topics/inspect.deps.md +7 -7
  103. package/dist/help/dsl/topics/inspect.file.md +2 -1
  104. package/dist/help/dsl/topics/inspect.graph.md +3 -3
  105. package/dist/help/dsl/topics/inspect.md +5 -5
  106. package/dist/help/dsl/topics/mutation.md +23 -13
  107. package/dist/help/dsl/topics/patterns.md +1 -5
  108. package/dist/help/dsl/topics/qr.md +7 -22
  109. package/dist/help/dsl/topics/quick-map.md +1 -0
  110. package/dist/help/dsl/topics/recipe.file-layout.md +13 -0
  111. package/dist/help/dsl/topics/rg.md +20 -0
  112. package/dist/help/dsl/topics/selectors.md +3 -2
  113. package/dist/help/dsl/topics/session.md +1 -1
  114. package/dist/help/full.md +105 -144
  115. package/dist/help/help-index.md +44 -0
  116. package/dist/help/help-meta.json +45 -29
  117. package/dist/help/index.md +32 -75
  118. package/dist/help/tokens/qr.inline.examples.md +2 -0
  119. package/dist/help/tokens/stdin.examples.bash.md +8 -0
  120. package/dist/help/tokens/stdin.examples.pwsh.md +8 -0
  121. package/dist/help/tokens/stdin.examples.with-qr.bash.md +12 -0
  122. package/dist/help/tokens/stdin.examples.with-qr.pwsh.md +12 -0
  123. package/dist/help/topics/dsl.md +4 -3
  124. package/dist/help/topics/file.move.md +44 -0
  125. package/dist/help/topics/file.rename.md +33 -0
  126. package/dist/help/topics/help-format.md +4 -7
  127. package/dist/help/topics/inspect.code.md +5 -5
  128. package/dist/help/topics/inspect.deps.md +7 -7
  129. package/dist/help/topics/inspect.file.md +2 -1
  130. package/dist/help/topics/inspect.graph.md +3 -3
  131. package/dist/help/topics/inspect.md +5 -5
  132. package/dist/help/topics/mutation.md +23 -13
  133. package/dist/help/topics/patterns.md +1 -5
  134. package/dist/help/topics/qr.md +7 -22
  135. package/dist/help/topics/quick-map.md +1 -0
  136. package/dist/help/topics/recipe.file-layout.md +13 -0
  137. package/dist/help/topics/rg.md +20 -0
  138. package/dist/help/topics/selectors.md +3 -2
  139. package/dist/help/topics/session.md +1 -1
  140. package/dist/host/capabilities.js +1 -0
  141. package/dist/ide-launch/common.cjs +162 -162
  142. package/dist/managed-host/extension-vsix-resolver.js +1 -1
  143. package/dist/managed-host/manage-serve-web-host.cjs +141 -141
  144. package/dist/managed-host/serve-web-autostart.js +1 -1
  145. package/dist/managed-host/serve-web-host.cjs +1985 -1660
  146. package/dist/observability/config.js +1 -1
  147. package/dist/payloads/read-stdin-json.js +1 -1
  148. package/dist/rg-wrapper/core.js +6 -0
  149. package/dist/rg-wrapper/options.js +1 -0
  150. package/dist/rtk-wrapper/core.js +2 -0
  151. package/dist/runtime/input-source.js +1 -1
  152. package/dist/runtime/managed-runtime-provisioning.js +1 -1
  153. package/dist/runtime/run-command.js +1 -1
  154. package/dist/selectors/parse-entities.js +1 -1
  155. package/dist/session/daemon-state.js +2 -0
  156. package/dist/session/server.js +7 -6
  157. package/dist/shared/errors.js +14 -13
  158. package/dist/shared/operations.js +1 -1
  159. package/dist/shared/protocol.js +1 -1
  160. package/dist/shared/routes.js +1 -1
  161. package/dist/shared/stdin-examples.js +1 -0
  162. package/dist/shared/types.js +1 -1
  163. package/dist/tool-runtime/runtime-tools.js +1 -0
  164. package/dist/tracing/trace.js +5 -3
  165. package/dist/workers/control-plane/aib-control-plane-worker.cjs +80 -0
  166. package/dist/workers/control-plane/client-config.default.json +3 -0
  167. package/dist/workers/product-storage.js +1 -0
  168. package/dist/workers/registry.js +1 -0
  169. package/extension/vscode-refactor-bridge-extension.vsix +0 -0
  170. package/package.json +6 -4
  171. package/runtimes/launcher/linux-x64/aib +0 -0
  172. package/runtimes/launcher/win-x64/aib.exe +0 -0
  173. package/runtimes/tools/rg/darwin-arm64/rg +0 -0
  174. package/runtimes/tools/rg/darwin-x64/rg +0 -0
  175. package/runtimes/tools/rg/linux-arm64/rg +0 -0
  176. package/runtimes/tools/rg/linux-x64/rg +0 -0
  177. package/runtimes/tools/rg/manifest.json +36 -0
  178. package/runtimes/tools/rg/win32-x64/rg.exe +0 -0
  179. package/runtimes/tools/rtk/darwin-arm64/rtk +0 -0
  180. package/runtimes/tools/rtk/darwin-x64/rtk +0 -0
  181. package/runtimes/tools/rtk/linux-arm64/rtk +0 -0
  182. package/runtimes/tools/rtk/linux-x64/rtk +0 -0
  183. package/runtimes/tools/rtk/manifest.json +36 -0
  184. package/runtimes/tools/rtk/win32-x64/rtk.exe +0 -0
  185. package/scripts/provision-runtime.cjs +25 -1
  186. package/dist/help/json/docs/basics.md +0 -15
  187. package/dist/help/json/docs/config-setup.aliases.md +0 -56
  188. package/dist/help/json/docs/config-setup.excludes.md +0 -45
  189. package/dist/help/json/docs/config-setup.import-normalize.md +0 -86
  190. package/dist/help/json/docs/config-setup.import-rules.md +0 -96
  191. package/dist/help/json/docs/config-setup.tsconfigs.md +0 -33
  192. package/dist/help/json/docs/dsl.md +0 -25
  193. package/dist/help/json/docs/first-setup.md +0 -292
  194. package/dist/help/json/docs/help-format.md +0 -12
  195. package/dist/help/json/docs/help-protocol.md +0 -26
  196. package/dist/help/json/docs/imports.normalize.md +0 -47
  197. package/dist/help/json/docs/inspect.code.md +0 -41
  198. package/dist/help/json/docs/inspect.cycles.md +0 -38
  199. package/dist/help/json/docs/inspect.deps.md +0 -46
  200. package/dist/help/json/docs/inspect.duplicates.md +0 -65
  201. package/dist/help/json/docs/inspect.exports.md +0 -40
  202. package/dist/help/json/docs/inspect.file.md +0 -38
  203. package/dist/help/json/docs/inspect.graph.md +0 -139
  204. package/dist/help/json/docs/inspect.imports.md +0 -15
  205. package/dist/help/json/docs/inspect.md +0 -88
  206. package/dist/help/json/docs/inspect.members.md +0 -32
  207. package/dist/help/json/docs/inspect.tree.md +0 -32
  208. package/dist/help/json/docs/inspect.usages.md +0 -61
  209. package/dist/help/json/docs/modulePlan.md +0 -73
  210. package/dist/help/json/docs/move.md +0 -56
  211. package/dist/help/json/docs/mutation.md +0 -65
  212. package/dist/help/json/docs/patterns.md +0 -76
  213. package/dist/help/json/docs/prefs.md +0 -40
  214. package/dist/help/json/docs/qr.md +0 -37
  215. package/dist/help/json/docs/quick-map.md +0 -30
  216. package/dist/help/json/docs/refactor.batch.md +0 -72
  217. package/dist/help/json/docs/rename.md +0 -47
  218. package/dist/help/json/docs/reveal.md +0 -30
  219. package/dist/help/json/docs/selectors.md +0 -23
  220. package/dist/help/json/docs/session.md +0 -77
  221. package/dist/help/json/docs/view.md +0 -30
  222. package/dist/help/json/snippets/agents.md +0 -14
  223. package/dist/help/json/topics/basics.md +0 -13
  224. package/dist/help/json/topics/config-setup.aliases.md +0 -54
  225. package/dist/help/json/topics/config-setup.excludes.md +0 -43
  226. package/dist/help/json/topics/config-setup.import-normalize.md +0 -84
  227. package/dist/help/json/topics/config-setup.import-rules.md +0 -94
  228. package/dist/help/json/topics/config-setup.tsconfigs.md +0 -31
  229. package/dist/help/json/topics/dsl.md +0 -23
  230. package/dist/help/json/topics/first-setup.md +0 -290
  231. package/dist/help/json/topics/help-format.md +0 -10
  232. package/dist/help/json/topics/help-protocol.md +0 -24
  233. package/dist/help/json/topics/imports.normalize.md +0 -45
  234. package/dist/help/json/topics/inspect.code.md +0 -39
  235. package/dist/help/json/topics/inspect.cycles.md +0 -36
  236. package/dist/help/json/topics/inspect.deps.md +0 -44
  237. package/dist/help/json/topics/inspect.duplicates.md +0 -37
  238. package/dist/help/json/topics/inspect.exports.md +0 -38
  239. package/dist/help/json/topics/inspect.file.md +0 -36
  240. package/dist/help/json/topics/inspect.graph.md +0 -137
  241. package/dist/help/json/topics/inspect.imports.md +0 -13
  242. package/dist/help/json/topics/inspect.md +0 -86
  243. package/dist/help/json/topics/inspect.members.md +0 -30
  244. package/dist/help/json/topics/inspect.tree.md +0 -22
  245. package/dist/help/json/topics/inspect.usages.md +0 -59
  246. package/dist/help/json/topics/modulePlan.md +0 -60
  247. package/dist/help/json/topics/move.md +0 -46
  248. package/dist/help/json/topics/mutation.md +0 -63
  249. package/dist/help/json/topics/patterns.md +0 -74
  250. package/dist/help/json/topics/prefs.md +0 -38
  251. package/dist/help/json/topics/qr.md +0 -35
  252. package/dist/help/json/topics/quick-map.md +0 -28
  253. package/dist/help/json/topics/refactor.batch.md +0 -61
  254. package/dist/help/json/topics/rename.md +0 -42
  255. package/dist/help/json/topics/reveal.md +0 -28
  256. package/dist/help/json/topics/selectors.md +0 -21
  257. package/dist/help/json/topics/session.md +0 -59
  258. package/dist/help/json/topics/view.md +0 -28
@@ -1,137 +0,0 @@
1
- Use graph when the question is about file/module boundaries, not one symbol.
2
- It builds a reusable map of local import relationships, then lets you focus files inside that map.
3
-
4
- Good for:
5
- - mapping an unfamiliar directory or subsystem
6
- - seeing which files are hubs, entrypoints, or leaves
7
- - comparing a few known areas without mapping all src
8
- - choosing files/entities to inspect next
9
- - checking module boundaries when ownership is unclear
10
-
11
- Use deps for one entity's outgoing dependencies.
12
- Use usages for real incoming references.
13
- Use graph for file-level connectivity.
14
-
15
- Model:
16
- build graph: scope + view + save
17
- query graph: fromFile + focus + output toggles
18
-
19
- view controls what enters the saved graph.
20
- focus only expands details for files already inside it.
21
- If focus misses a file, rebuild with wider scope or view.
22
-
23
- Default view:
24
- directory scope -> local
25
- file or multiple scopes -> neighbors
26
- fromFile -> uses the saved graph
27
-
28
- Views:
29
- local only files inside scope; best directory map
30
- neighbors direct import neighborhood; best file-centered map
31
- expanded wider neighborhood; more output
32
-
33
- Scope choice:
34
- scope: "src" creates a broad reusable map for src.
35
- scope: "src/services" is cheaper for local work.
36
- scope: [...] compares known areas without mapping all src.
37
-
38
- After you understand which graph sections matter, hide the rest with JSON fields or prefs.
39
- Graph can be noisy; shape it for the current task.
40
-
41
- Controls:
42
- scope, view, from, focus, symbolUsage, edges, hubs, entrypoints, leaves, exclude, save
43
-
44
- Specific:
45
- view local|neighbors|expanded
46
- from reuse saved graph index; from=aib:graph:<name>
47
- focus focus a file inside the graph; focus=path
48
- symbolUsage show imported symbols on edges; +symbolUsage
49
-
50
- edges/hubs/entrypoints/leaves output section toggles; +name or -name
51
-
52
- Run:
53
- aib inspect --stdin
54
-
55
- Input:
56
- {
57
- "op": "graph",
58
- "requests": [
59
- {
60
- "scope": "src/services",
61
- "view": "local",
62
- "save": "services-graph"
63
- },
64
- {
65
- "fromFile": "aib:graph:services-graph",
66
- "focus": ["src/services/users.ts", "src/services/admins.ts"],
67
- "symbolUsage": true,
68
- "edges": false
69
- }
70
- ]
71
- }
72
-
73
- Focus saved graph later:
74
- inspect graph --from-file aib:graph:services-graph --focus src/services/messages.ts --focus src/services/posts.ts --symbol-usage
75
-
76
- Inline graph focus can add focus and symbolUsage.
77
- Inline cannot hide graph sections such as edges/hubs/entrypoints/leaves.
78
- Use JSON request fields or prefs for section control.
79
-
80
- Specialized graph command:
81
- Run:
82
- aib inspect graph --stdin
83
-
84
- Input:
85
- {
86
- "requests": [
87
- {
88
- "scope": "src/services",
89
- "view": "local",
90
- "save": "services-graph"
91
- },
92
- {
93
- "fromFile": "aib:graph:services-graph",
94
- "focus": ["src/services/users.ts", "src/services/admins.ts"],
95
- "symbolUsage": true,
96
- "edges": false
97
- }
98
- ]
99
- }
100
-
101
- Multiple scopes:
102
- Run:
103
- aib inspect --stdin
104
-
105
- Input:
106
- {
107
- "op": "graph",
108
- "scope": ["src/main/server", "src/services/ws"],
109
- "view": "local",
110
- "save": "server-ws-graph"
111
- }
112
-
113
- scope accepts one file/dir or an array.
114
- scopes is accepted as an alias for multiple scopes.
115
-
116
- Graph prefs:
117
- inspect.graph.edges boolean
118
- inspect.graph.hubs boolean
119
- inspect.graph.entrypoints boolean
120
- inspect.graph.leaves boolean
121
- inspect.graph.symbols boolean
122
- inspect.graph.symbolUsage boolean
123
-
124
- symbolUsage is usually the better first choice when imported names matter.
125
-
126
- Example:
127
- session prefs set inspect.graph.edges false inspect.graph.hubs false inspect.graph.symbolUsage true
128
-
129
- Output fields:
130
- summary file/edge/package counts
131
- paths compact path aliases used in text output
132
- focus selected files with imports/importedBy
133
- hubs highly connected files
134
- entrypoints scoped files imported by nobody in graph
135
- leaves scoped files importing nobody in graph
136
- edges local file-to-file imports
137
- saved reusable aib:graph handle
@@ -1,13 +0,0 @@
1
- Use imports to inspect static and dynamic imports in a file.
2
- If there are no dynamic imports, the dynamic imports block is omitted.
3
-
4
- Controls:
5
- file, ranges
6
-
7
- Defaults: +ranges
8
-
9
- Run:
10
- aib inspect --stdin
11
-
12
- Input:
13
- imports @svc/service.ts
@@ -1,86 +0,0 @@
1
- Inspect helps you turn an unknown code area into a small working model.
2
-
3
- Use it to understand what exists, how pieces connect, what repeats, where a change can spread, and which exact code should enter context next.
4
-
5
- One useful flow:
6
- map -> focus -> code
7
-
8
- map: learn what exists and how it connects
9
- focus: choose files/entities/usages that matter
10
- code: fetch exact code needed
11
-
12
- Choose inspect operation:
13
-
14
- declarations in one file file
15
- static/dynamic imports imports
16
- public API exports
17
- methods/properties of parent members
18
- exact implementation code
19
- outgoing deps of one entity deps
20
- incoming references/callers usages
21
- file/module connectivity graph
22
- compact directory layout tree
23
- repeated declarations/helpers duplicates
24
- local import cycles cycles
25
-
26
- Prefer one batch JSON request for related questions.
27
- Top-level fields are defaults for every request.
28
- A request without op uses the top-level op.
29
- A request without file/scope/target uses the top-level value when applicable.
30
- Each request may override any default.
31
-
32
- Batch example:
33
-
34
- Run:
35
- aib inspect --stdin
36
-
37
- Input:
38
- {
39
- "file": "src/service.ts",
40
- "requests": [
41
- { "op": "file" },
42
- { "op": "members", "entity": "Service" },
43
- {
44
- "op": "code",
45
- "entities": [
46
- { "parent": "Service", "entities": ["render", "reset"] },
47
- "normalize"
48
- ],
49
- "show": true,
50
- "save": "service-focus"
51
- },
52
- {
53
- "op": "usages",
54
- "target": "src/service.ts",
55
- "entity": "normalize",
56
- "scope": "src",
57
- "detail": "locations"
58
- },
59
- {
60
- "op": "duplicates",
61
- "scope": "src/scripts",
62
- "detail": "summary",
63
- "limit": 20
64
- }
65
- ]
66
- }
67
-
68
- Inspect controls:
69
-
70
- file default file for requests
71
- target file, dir, or symbol area to analyze
72
- scope where to search; JSON scope:string|string[]
73
- entity one symbol
74
- entities several target symbols; JSON entities:[...]
75
- parent class/interface parent for methods/properties
76
- ranges include line/range metadata; JSON ranges:boolean; CLI --ranges
77
- localOnly show local declarations and reexports without resolving facade API; JSON localOnly:boolean; CLI --local-only
78
- resolveStar resolve export * through re-exported modules; JSON resolveStar:boolean; CLI --resolve-star
79
- limit max items in one page; JSON limit:N; CLI --limit N
80
- offset page offset; JSON offset:N; CLI --offset N
81
- all return all items; JSON all:boolean; CLI --all
82
- detail output level; JSON detail:summary|locations|code; CLI --detail summary|locations|code
83
- show include code output; JSON show:boolean; CLI --show
84
- save save reusable output; JSON save:"name"; CLI --save name
85
- exclude skip names/selectors; JSON exclude:[...]
86
- kinds restrict selector kinds; JSON kinds:["f","t"]
@@ -1,30 +0,0 @@
1
- Use members to map a class/interface/object-like symbol without reading its body.
2
- It shows the internal shape of a parent entity without reading its full body.
3
-
4
- Good for:
5
- - listing member names when the parent entity is known
6
- - narrowing a large parent entity to relevant members
7
- - understanding object shape before changing or moving related code
8
-
9
- Controls:
10
- file, entity, entities, ranges, limit, offset, all
11
-
12
- Prefs:
13
- inspect.members.maxItems
14
- inspect.members.all
15
-
16
- Run:
17
- aib inspect --stdin
18
-
19
- Input:
20
- {
21
- "file": "src/service.ts",
22
- "op": "members",
23
- "limit": 12,
24
- "requests": [
25
- { "entity": "Service" },
26
- { "entities": ["ServiceOptions", "WsOptions"], "all": true }
27
- ]
28
- }
29
-
30
- inspect members src/service.ts Service [--limit N] [--offset N] [--all] [--ranges]
@@ -1,22 +0,0 @@
1
- Use tree to list a compact directory layout.
2
- It is useful before focused inspect when you know the area but not the exact file.
3
-
4
- Controls:
5
- scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
6
-
7
- Specific:
8
- depth max nesting depth; depth=N
9
- minDepth hide shallower paths; minDepth=N
10
- onlyDirs show directories only; +onlyDirs
11
- only only matching files/dirs; only=[...]
12
- exclude skip matching files/dirs; exclude=[...]
13
- ned no-default-exclude; ignore built-in excludes; +ned
14
- nec no-config-exclude; ignore aib.json tree excludes; +nec
15
-
16
- Run:
17
- aib inspect --stdin
18
-
19
- Input:
20
- tree src depth=4 +onlyDirs limit=200 +ned +nec
21
- tree @svc depth=3 only=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
22
- tree src depth=3 only=["src/services/**"] limit=80
@@ -1,59 +0,0 @@
1
- Use usages to find who references a file, directory, or entity inside a scope.
2
- It reports real references, not unused imports or text matches.
3
- For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
4
- Use includeTarget only when references inside the target file or directory matter.
5
-
6
- Good for:
7
- - checking impact before changing behavior
8
- - finding consumers of an entity or module area
9
- - confirming whether extracted or renamed code still has callers
10
- - getting caller locations or caller code without broad file scans
11
-
12
- Use locations for broad impact checks.
13
- Use code when usage count is small or caller context matters now.
14
-
15
- Controls:
16
- target, scope, entity, entities, parent, detail, limit, all, save, includeTarget
17
-
18
- Specific:
19
- includeTarget include references inside the target file/directory; +includeTarget
20
-
21
- Prefs:
22
- inspect.usages.maxLocations
23
- inspect.usages.maxCodeBlocks
24
-
25
- Run:
26
- aib inspect --stdin
27
-
28
- Input:
29
- {
30
- "op": "usages",
31
- "target": "src/service.ts",
32
- "entities": [
33
- "createService",
34
- { "parent": "Service", "entities": ["render", "reset"] }
35
- ],
36
- "scope": ["src/app", "src/tests"],
37
- "detail": "locations",
38
- "save": "service-usages"
39
- }
40
-
41
- inspect usages src/service.ts createService --scope src --detail locations [--limit N] [--all] [--save name]
42
-
43
- Expand saved usages by focusing the reusable usages index:
44
- inspect usages --from-file aib:usages:service-usages --focus createService --detail code
45
-
46
- Use the saved usages handle with --from-file/from to focus or expand the reusable index.
47
-
48
- Directory target:
49
- Run:
50
- aib inspect --stdin
51
-
52
- Input:
53
- {
54
- "op": "usages",
55
- "target": "src/shared",
56
- "scope": ["src/app", "src/renderer"],
57
- "detail": "summary",
58
- "save": "shared-usages"
59
- }
@@ -1,60 +0,0 @@
1
- Modes: preview/apply or execute.
2
- Use execute for routine changes.
3
- Use preview/apply when learning a mutation command or inspecting a large multi-step request before writing files.
4
-
5
- If a name is ambiguous, use selectors.
6
- Run help selectors to refresh selector syntax.
7
-
8
- modulePlan is for splitting large files into smaller modules.
9
- Use it when a large file should be refactored into several target files.
10
-
11
- modulePlan orchestrates semantic moves and updates affected references/imports.
12
-
13
- If imports created by modulePlan do not match the repo style, run:
14
- aib help config-setup.import-rules
15
-
16
- Use expectEmpty when your modulePlan intent is to move all declarations out of the source file.
17
- It does not change the move behavior; it only asks output to report remaining source declarations if any remain.
18
- Use it only when remaining declarations would mean the split did not match your intent.
19
- Do not use it for partial extractions.
20
-
21
- Plan:
22
- modulePlan preview --stdin
23
- modulePlan execute --stdin
24
- modulePlan apply <planId>
25
-
26
- Use preview/apply when you want to inspect the plan before writing files.
27
- Use execute when you want to preview and apply immediately.
28
- Use --from with captured input handles when rerunning edited large plans.
29
-
30
- Split one large source file into several targets:
31
- Run:
32
- aib modulePlan execute --stdin
33
-
34
- Input:
35
- {
36
- "sourceFile": "src/large-service.ts",
37
- "expectEmpty": true,
38
- "modules": [
39
- {
40
- "target": "src/large-service.types.ts",
41
- "entities": ["ServiceOptions", "ServiceMode"]
42
- },
43
- {
44
- "target": "src/large-service.core.ts",
45
- "entities": ["LargeService", "createLargeService"]
46
- }
47
- ]
48
- }
49
-
50
- If a large or partial modulePlan request fails, edit the captured input file and rerun with --from.
51
- For small one-off modulePlan requests, write a corrected request instead.
52
-
53
- Latest modulePlan input:
54
- <session-dir>/inputs/modulePlan/_last.json
55
-
56
- Handle:
57
- aib:input:modulePlan:last
58
-
59
- Example:
60
- modulePlan preview --from aib:input:modulePlan:last
@@ -1,46 +0,0 @@
1
- Modes: preview/apply or execute.
2
- Use execute for routine changes.
3
- Use preview/apply when learning a mutation command or inspecting a large multi-step request before writing files.
4
-
5
- If a name is ambiguous, use selectors.
6
- Run help selectors to refresh selector syntax.
7
-
8
- Move transfers one or more symbols from one file to another.
9
- Move is semantic; it moves supported declarations and updates affected imports/references.
10
- Use it for focused extraction into a single target file.
11
- For large file splitting across several target files, use modulePlan.
12
-
13
- If imports created by move do not match the repo style, run:
14
- aib help config-setup.import-rules
15
-
16
- Move to file:
17
- move toFile preview --stdin
18
- move toFile execute --stdin
19
- move toFile apply <previewId>
20
-
21
- Use preview/apply when you want to inspect the planned change before writing files.
22
- Use execute when you want to write immediately.
23
- Use --from with captured input handles when rerunning edited large requests.
24
-
25
- Move several entities into one target:
26
- Run:
27
- aib move toFile execute --stdin
28
-
29
- Input:
30
- {
31
- "sourceFile": "src/service.ts",
32
- "targetFile": "src/service.helpers.ts",
33
- "entities": ["oldHelper", "OtherHelper"]
34
- }
35
-
36
- If a large move request fails, edit the captured input file and rerun with --from.
37
- For small one-off move requests, write a corrected request instead.
38
-
39
- Latest move input:
40
- <session-dir>/inputs/move/_last.json
41
-
42
- Handle:
43
- aib:input:move:last
44
-
45
- Example:
46
- move toFile preview --from aib:input:move:last
@@ -1,63 +0,0 @@
1
- Mutation commands change code through TS/IDE refactors.
2
- Successful mutations update affected references and imports.
3
-
4
- After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
5
-
6
- If move/modulePlan imports do not match the repo style, run:
7
- aib help config-setup.import-rules
8
-
9
- AIB mutations are designed to reduce manual checking.
10
- Your job is to express the intent in DSL.
11
- AIB's job is to convert that intent into code changes.
12
-
13
- Do not read all changed files just because a mutation touched them.
14
- That defeats the purpose of using AIB for mechanical refactors.
15
-
16
- If the command succeeds, the requested mechanical change was applied.
17
- After failure or partial success, use the output to decide the next request.
18
-
19
- When running mutation commands, set the harness timeout to 3 minutes.
20
- If the harness stops waiting before final output appears, recover with:
21
-
22
- aib execution status last
23
-
24
- Modes:
25
- preview inspect planned edits, then apply by id
26
- apply write a previewed change
27
- execute write immediately
28
-
29
- Use execute for routine rename/move/modulePlan requests.
30
-
31
- 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.
32
- Typical examples: a huge modulePlan or refactor batch.
33
-
34
- preview/apply uses more tool calls and more output tokens.
35
- preview validates input and planned edits, but writing files can still hit a TS/IDE refactor error.
36
- execute writes immediately and reports what changed.
37
-
38
- If a mutation cannot be completed, aib reports the failed part and the captured input.
39
- For large or partial requests, edit the captured input and rerun the remaining or changed intent.
40
- For small requests, write a corrected request instead.
41
-
42
- Prefer batch JSON for related mutations.
43
- One request can describe several related changes.
44
- aib captures JSON input automatically so large failed or partial requests can be edited and rerun.
45
-
46
- When a batch mutation partly fails, split the next request by failure type.
47
-
48
- If the failure is wrong input, fix the selector/entity/file and run the corrected remaining intent.
49
- If TS/IDE cannot apply one part of the batch, do not treat the whole intent as failed.
50
- Run the next request without the failed part and let aib report any later failures.
51
- Then decide whether failed parts need smaller requests or manual fallback.
52
-
53
- If a large or partial mutation request fails, edit the captured input file and rerun with --from.
54
- For small one-off requests, write a corrected request instead.
55
-
56
- Latest mutation inputs:
57
- <session-dir>/inputs/rename/_last.json
58
- <session-dir>/inputs/move/_last.json
59
- <session-dir>/inputs/refactor/_last.json
60
- <session-dir>/inputs/modulePlan/_last.json
61
-
62
- Example:
63
- rename preview --from aib:input:rename:last
@@ -1,74 +0,0 @@
1
- To refresh help protocol:
2
- aib help help-protocol
3
-
4
- Use aib before broad file reads when the question is about TS/JS structure, references, dependencies, or focused code.
5
- Use qr for cross-OS quick reads of text files, logs, JSON, scripts, and line windows.
6
- It is not a replacement for inspect.
7
- Use normal text search when the question is just text.
8
-
9
- For a first pass in a new codebase, map directories before reading files:
10
-
11
- tree src depth=5 +onlyDirs limit=200
12
-
13
- Start compact for broad scans.
14
- Use summary, locations, or local graph views first when output could be large.
15
- Expand to code or wider graph views only for the parts that matter now.
16
- If output hides data and shows `view: aib:res_<id>`, use `aib view ...` to fetch only the hidden part instead of repeating the original request.
17
-
18
- Compact output is a starting point, not a substitute for needed code.
19
- Fetch exact code when correctness depends on implementation details.
20
-
21
- Use prefs when the current phase repeats the same output shape.
22
- Turn details off when they stop helping.
23
- Turn them back on when they matter.
24
-
25
- Use @file only when several following operations share the same file.
26
- For independent one-off file requests, pass the path directly:
27
- file @svc/a.ts
28
- code @svc/b.ts ServiceB
29
-
30
- AIB mutations are designed to reduce manual checking.
31
- Your job is to express the intent in DSL.
32
- AIB's job is to convert that intent into code changes.
33
-
34
- Do not read all changed files just because a mutation touched them.
35
- That defeats the purpose of using AIB for mechanical refactors.
36
-
37
- If the command succeeds, the requested mechanical change was applied.
38
- After failure or partial success, use the output to decide the next request.
39
-
40
- For mutation commands, set the shell/tool harness timeout to 3 minutes.
41
-
42
- If a mutation command times out or returns no final output, use:
43
-
44
- aib execution status last
45
-
46
- This is an escape hatch for recovering the latest mutation status/result.
47
-
48
- Config excludes can hide files from tree/graph/sync output.
49
-
50
- AIB has four config exclude fields:
51
- inspect.graph.exclude
52
- inspect.tree.files.exclude
53
- inspect.tree.onlyDirs.exclude
54
- sync.tsconfig.exclude
55
-
56
- For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
57
-
58
- Important: leave feedback while working.
59
-
60
- aib is built for agents. Agent feedback is the main signal for improving output, docs, mutations, and token efficiency.
61
-
62
- Use feedback when something is wrong, unclear, noisy, or could be more efficient.
63
-
64
- Format:
65
- feedback "kind | message"
66
- feedback "kind | topic | message"
67
-
68
- Kinds:
69
- bug, confusion, friction, idea, other
70
-
71
- Topic is optional. Choose any short topic that helps classify the feedback.
72
-
73
- Example:
74
- feedback "friction | imports | normalize required manual cleanup"
@@ -1,38 +0,0 @@
1
- Prefs change defaults for the active session.
2
- Use them when you want repeated CLI behavior without repeating request fields.
3
-
4
- Set prefs:
5
- session prefs set <name> <value> [<name> <value>...]
6
-
7
- Example:
8
- session prefs set inspect.graph.hubs false inspect.graph.leaves false
9
-
10
- Show prefs:
11
- session prefs get [prefix] [--all]
12
-
13
- By default, get shows session overrides.
14
- --all includes defaults.
15
- prefix filters keys.
16
-
17
- boolean = true|false
18
- N = integer
19
-
20
- Available prefs:
21
- inspect.code.maxNonEmptyLines N
22
- inspect.usages.maxLocations N
23
- inspect.usages.maxCodeBlocks N
24
- inspect.members.maxItems N
25
- inspect.members.all boolean
26
- inspect.graph.hubs boolean
27
- inspect.graph.entrypoints boolean
28
- inspect.graph.leaves boolean
29
- inspect.graph.edges boolean
30
- inspect.graph.symbols boolean
31
- inspect.graph.symbolUsage boolean
32
-
33
- Use prefs to reduce repeated request fields and avoid unnecessary output.
34
-
35
- If graph output is too noisy:
36
- session prefs set inspect.graph.hubs false inspect.graph.leaves false
37
-
38
- Change prefs while working. Turn details back on when you need them.
@@ -1,35 +0,0 @@
1
- Use qr for cross-OS quick reads of text files: ts, js, cmd, sh, json, log, txt, ndjson, etc.
2
- Use it for compact line windows and batching.
3
- qr supports AIB path aliases.
4
-
5
- It is not a replacement for inspect.
6
- Use it as a token-efficient way to read text data when semantic inspect is not needed.
7
-
8
- For focused text reads, prefer qr over cat/Get-Content/type, especially when aliases, line windows, or batching help.
9
- Use shell reads only when piping into shell tooling or qr is unavailable.
10
-
11
- Controls:
12
- -h N head; first N lines
13
- -t N tail; last N lines
14
- -o N offset; starting line, 1-based
15
- -l N limit; line count for offset reads
16
- -a all; whole file
17
-
18
- If no window is provided, qr uses -h 80.
19
- If -a is present, it wins over other window flags.
20
-
21
- Run:
22
- aib qr --stdin
23
-
24
- Input:
25
- qr @scripts/a.txt h=80
26
- qr @scripts/b.py o=300 l=50
27
- qr @scripts/c.md t=120
28
- qr @logs/app.log all
29
-
30
- Inline:
31
- aib qr @scripts/a.txt -h 80
32
- aib qr @scripts/b.py -o 300 -l 50
33
- aib qr @logs/app.log -a
34
-
35
- Use stdin for several reads.