@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
@@ -1,139 +0,0 @@
1
- # Inspect Graph
2
-
3
- Use graph when the question is about file/module boundaries, not one symbol.
4
- It builds a reusable map of local import relationships, then lets you focus files inside that map.
5
-
6
- Good for:
7
- - mapping an unfamiliar directory or subsystem
8
- - seeing which files are hubs, entrypoints, or leaves
9
- - comparing a few known areas without mapping all src
10
- - choosing files/entities to inspect next
11
- - checking module boundaries when ownership is unclear
12
-
13
- Use deps for one entity's outgoing dependencies.
14
- Use usages for real incoming references.
15
- Use graph for file-level connectivity.
16
-
17
- Model:
18
- build graph: scope + view + save
19
- query graph: fromFile + focus + output toggles
20
-
21
- view controls what enters the saved graph.
22
- focus only expands details for files already inside it.
23
- If focus misses a file, rebuild with wider scope or view.
24
-
25
- Default view:
26
- directory scope -> local
27
- file or multiple scopes -> neighbors
28
- fromFile -> uses the saved graph
29
-
30
- Views:
31
- local only files inside scope; best directory map
32
- neighbors direct import neighborhood; best file-centered map
33
- expanded wider neighborhood; more output
34
-
35
- Scope choice:
36
- scope: "src" creates a broad reusable map for src.
37
- scope: "src/services" is cheaper for local work.
38
- scope: [...] compares known areas without mapping all src.
39
-
40
- After you understand which graph sections matter, hide the rest with JSON fields or prefs.
41
- Graph can be noisy; shape it for the current task.
42
-
43
- Controls:
44
- scope, view, from, focus, symbolUsage, edges, hubs, entrypoints, leaves, exclude, save
45
-
46
- Specific:
47
- view local|neighbors|expanded
48
- from reuse saved graph index; from=aib:graph:<name>
49
- focus focus a file inside the graph; focus=path
50
- symbolUsage show imported symbols on edges; +symbolUsage
51
-
52
- edges/hubs/entrypoints/leaves output section toggles; +name or -name
53
-
54
- Run:
55
- aib inspect --stdin
56
-
57
- Input:
58
- {
59
- "op": "graph",
60
- "requests": [
61
- {
62
- "scope": "src/services",
63
- "view": "local",
64
- "save": "services-graph"
65
- },
66
- {
67
- "fromFile": "aib:graph:services-graph",
68
- "focus": ["src/services/users.ts", "src/services/admins.ts"],
69
- "symbolUsage": true,
70
- "edges": false
71
- }
72
- ]
73
- }
74
-
75
- Focus saved graph later:
76
- inspect graph --from-file aib:graph:services-graph --focus src/services/messages.ts --focus src/services/posts.ts --symbol-usage
77
-
78
- Inline graph focus can add focus and symbolUsage.
79
- Inline cannot hide graph sections such as edges/hubs/entrypoints/leaves.
80
- Use JSON request fields or prefs for section control.
81
-
82
- Specialized graph command:
83
- Run:
84
- aib inspect graph --stdin
85
-
86
- Input:
87
- {
88
- "requests": [
89
- {
90
- "scope": "src/services",
91
- "view": "local",
92
- "save": "services-graph"
93
- },
94
- {
95
- "fromFile": "aib:graph:services-graph",
96
- "focus": ["src/services/users.ts", "src/services/admins.ts"],
97
- "symbolUsage": true,
98
- "edges": false
99
- }
100
- ]
101
- }
102
-
103
- Multiple scopes:
104
- Run:
105
- aib inspect --stdin
106
-
107
- Input:
108
- {
109
- "op": "graph",
110
- "scope": ["src/main/server", "src/services/ws"],
111
- "view": "local",
112
- "save": "server-ws-graph"
113
- }
114
-
115
- scope accepts one file/dir or an array.
116
- scopes is accepted as an alias for multiple scopes.
117
-
118
- Graph prefs:
119
- inspect.graph.edges boolean
120
- inspect.graph.hubs boolean
121
- inspect.graph.entrypoints boolean
122
- inspect.graph.leaves boolean
123
- inspect.graph.symbols boolean
124
- inspect.graph.symbolUsage boolean
125
-
126
- symbolUsage is usually the better first choice when imported names matter.
127
-
128
- Example:
129
- session prefs set inspect.graph.edges false inspect.graph.hubs false inspect.graph.symbolUsage true
130
-
131
- Output fields:
132
- summary file/edge/package counts
133
- paths compact path aliases used in text output
134
- focus selected files with imports/importedBy
135
- hubs highly connected files
136
- entrypoints scoped files imported by nobody in graph
137
- leaves scoped files importing nobody in graph
138
- edges local file-to-file imports
139
- saved reusable aib:graph handle
@@ -1,15 +0,0 @@
1
- # Inspect Imports
2
-
3
- Use imports to inspect static and dynamic imports in a file.
4
- If there are no dynamic imports, the dynamic imports block is omitted.
5
-
6
- Controls:
7
- file, ranges
8
-
9
- Defaults: +ranges
10
-
11
- Run:
12
- aib inspect --stdin
13
-
14
- Input:
15
- imports @svc/service.ts
@@ -1,88 +0,0 @@
1
- # Inspect
2
-
3
- Inspect helps you turn an unknown code area into a small working model.
4
-
5
- Use it to understand what exists, how pieces connect, what repeats, where a change can spread, and which exact code should enter context next.
6
-
7
- One useful flow:
8
- map -> focus -> code
9
-
10
- map: learn what exists and how it connects
11
- focus: choose files/entities/usages that matter
12
- code: fetch exact code needed
13
-
14
- Choose inspect operation:
15
-
16
- declarations in one file file
17
- static/dynamic imports imports
18
- public API exports
19
- methods/properties of parent members
20
- exact implementation code
21
- outgoing deps of one entity deps
22
- incoming references/callers usages
23
- file/module connectivity graph
24
- compact directory layout tree
25
- repeated declarations/helpers duplicates
26
- local import cycles cycles
27
-
28
- Prefer one batch JSON request for related questions.
29
- Top-level fields are defaults for every request.
30
- A request without op uses the top-level op.
31
- A request without file/scope/target uses the top-level value when applicable.
32
- Each request may override any default.
33
-
34
- Batch example:
35
-
36
- Run:
37
- aib inspect --stdin
38
-
39
- Input:
40
- {
41
- "file": "src/service.ts",
42
- "requests": [
43
- { "op": "file" },
44
- { "op": "members", "entity": "Service" },
45
- {
46
- "op": "code",
47
- "entities": [
48
- { "parent": "Service", "entities": ["render", "reset"] },
49
- "normalize"
50
- ],
51
- "show": true,
52
- "save": "service-focus"
53
- },
54
- {
55
- "op": "usages",
56
- "target": "src/service.ts",
57
- "entity": "normalize",
58
- "scope": "src",
59
- "detail": "locations"
60
- },
61
- {
62
- "op": "duplicates",
63
- "scope": "src/scripts",
64
- "detail": "summary",
65
- "limit": 20
66
- }
67
- ]
68
- }
69
-
70
- Inspect controls:
71
-
72
- file default file for requests
73
- target file, dir, or symbol area to analyze
74
- scope where to search; JSON scope:string|string[]
75
- entity one symbol
76
- entities several target symbols; JSON entities:[...]
77
- parent class/interface parent for methods/properties
78
- ranges include line/range metadata; JSON ranges:boolean; CLI --ranges
79
- localOnly show local declarations and reexports without resolving facade API; JSON localOnly:boolean; CLI --local-only
80
- resolveStar resolve export * through re-exported modules; JSON resolveStar:boolean; CLI --resolve-star
81
- limit max items in one page; JSON limit:N; CLI --limit N
82
- offset page offset; JSON offset:N; CLI --offset N
83
- all return all items; JSON all:boolean; CLI --all
84
- detail output level; JSON detail:summary|locations|code; CLI --detail summary|locations|code
85
- show include code output; JSON show:boolean; CLI --show
86
- save save reusable output; JSON save:"name"; CLI --save name
87
- exclude skip names/selectors; JSON exclude:[...]
88
- kinds restrict selector kinds; JSON kinds:["f","t"]
@@ -1,32 +0,0 @@
1
- # Inspect Members
2
-
3
- Use members to map a class/interface/object-like symbol without reading its body.
4
- It shows the internal shape of a parent entity without reading its full body.
5
-
6
- Good for:
7
- - listing member names when the parent entity is known
8
- - narrowing a large parent entity to relevant members
9
- - understanding object shape before changing or moving related code
10
-
11
- Controls:
12
- file, entity, entities, ranges, limit, offset, all
13
-
14
- Prefs:
15
- inspect.members.maxItems
16
- inspect.members.all
17
-
18
- Run:
19
- aib inspect --stdin
20
-
21
- Input:
22
- {
23
- "file": "src/service.ts",
24
- "op": "members",
25
- "limit": 12,
26
- "requests": [
27
- { "entity": "Service" },
28
- { "entities": ["ServiceOptions", "WsOptions"], "all": true }
29
- ]
30
- }
31
-
32
- inspect members src/service.ts Service [--limit N] [--offset N] [--all] [--ranges]
@@ -1,32 +0,0 @@
1
- # Inspect Tree
2
-
3
- Use tree to list a compact directory layout.
4
- It is useful before focused inspect when you know the area but not the exact file.
5
-
6
- Controls:
7
- scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
8
-
9
- Specific:
10
- depth max nesting depth; depth=N
11
- minDepth hide shallower paths; minDepth=N
12
- onlyDirs show directories only; +onlyDirs
13
- only only matching files/dirs; only=[...]
14
- exclude skip matching files/dirs; exclude=[...]
15
- ned no-default-exclude; ignore built-in excludes; +ned
16
- nec no-config-exclude; ignore aib.json tree excludes; +nec
17
-
18
- Run:
19
- aib inspect --stdin
20
-
21
- Input:
22
- tree src depth=4 +onlyDirs limit=200 +ned +nec
23
- tree @svc depth=3 only=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
24
- tree src depth=3 only=["src/services/**"] limit=80
25
-
26
- First pass in an unfamiliar codebase:
27
- tree src depth=5 +onlyDirs limit=200
28
-
29
- Show only deeper directories:
30
- tree src depth=5 minDepth=3 +onlyDirs limit=200
31
-
32
- Use project config to hide repeated noisy tree paths instead of repeating excludes in every request.
@@ -1,61 +0,0 @@
1
- # Inspect Usages
2
-
3
- Use usages to find who references a file, directory, or entity inside a scope.
4
- It reports real references, not unused imports or text matches.
5
- For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
6
- Use includeTarget only when references inside the target file or directory matter.
7
-
8
- Good for:
9
- - checking impact before changing behavior
10
- - finding consumers of an entity or module area
11
- - confirming whether extracted or renamed code still has callers
12
- - getting caller locations or caller code without broad file scans
13
-
14
- Use locations for broad impact checks.
15
- Use code when usage count is small or caller context matters now.
16
-
17
- Controls:
18
- target, scope, entity, entities, parent, detail, limit, all, save, includeTarget
19
-
20
- Specific:
21
- includeTarget include references inside the target file/directory; +includeTarget
22
-
23
- Prefs:
24
- inspect.usages.maxLocations
25
- inspect.usages.maxCodeBlocks
26
-
27
- Run:
28
- aib inspect --stdin
29
-
30
- Input:
31
- {
32
- "op": "usages",
33
- "target": "src/service.ts",
34
- "entities": [
35
- "createService",
36
- { "parent": "Service", "entities": ["render", "reset"] }
37
- ],
38
- "scope": ["src/app", "src/tests"],
39
- "detail": "locations",
40
- "save": "service-usages"
41
- }
42
-
43
- inspect usages src/service.ts createService --scope src --detail locations [--limit N] [--all] [--save name]
44
-
45
- Expand saved usages by focusing the reusable usages index:
46
- inspect usages --from-file aib:usages:service-usages --focus createService --detail code
47
-
48
- Use the saved usages handle with --from-file/from to focus or expand the reusable index.
49
-
50
- Directory target:
51
- Run:
52
- aib inspect --stdin
53
-
54
- Input:
55
- {
56
- "op": "usages",
57
- "target": "src/shared",
58
- "scope": ["src/app", "src/renderer"],
59
- "detail": "summary",
60
- "save": "shared-usages"
61
- }
@@ -1,73 +0,0 @@
1
- # Module Plan
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
- If a name is ambiguous, use selectors.
8
- Run help selectors to refresh selector syntax.
9
-
10
- modulePlan is for splitting large files into smaller modules.
11
- Use it when a large file should be refactored into several target files.
12
-
13
- modulePlan orchestrates semantic moves and updates affected references/imports.
14
-
15
- If imports created by modulePlan do not match the repo style, run:
16
- aib help config-setup.import-rules
17
-
18
- Use expectEmpty when your modulePlan intent is to move all declarations out of the source file.
19
- It does not change the move behavior; it only asks output to report remaining source declarations if any remain.
20
- Use it only when remaining declarations would mean the split did not match your intent.
21
- Do not use it for partial extractions.
22
-
23
- Plan:
24
- modulePlan preview --stdin
25
- modulePlan execute --stdin
26
- modulePlan apply <planId>
27
-
28
- Use preview/apply when you want to inspect the plan before writing files.
29
- Use execute when you want to preview and apply immediately.
30
- Use --from with captured input handles when rerunning edited large plans.
31
-
32
- Split one large source file into several targets:
33
- Run:
34
- aib modulePlan execute --stdin
35
-
36
- Input:
37
- {
38
- "sourceFile": "src/large-service.ts",
39
- "expectEmpty": true,
40
- "modules": [
41
- {
42
- "target": "src/large-service.types.ts",
43
- "entities": ["ServiceOptions", "ServiceMode"]
44
- },
45
- {
46
- "target": "src/large-service.core.ts",
47
- "entities": ["LargeService", "createLargeService"]
48
- }
49
- ]
50
- }
51
-
52
- modulePlan is better than many separate move requests when one large source file should be split into several target files.
53
-
54
- Preferred JSON fields:
55
- sourceFile file being split
56
- modules target groups
57
- target output file for one group
58
- entities symbols moved into that target
59
-
60
- Target files are created when needed.
61
- The order in the request describes intent; rely on TS/IDE refactors for reference and import updates.
62
-
63
- If a large or partial modulePlan request fails, edit the captured input file and rerun with --from.
64
- For small one-off modulePlan requests, write a corrected request instead.
65
-
66
- Latest modulePlan input:
67
- <session-dir>/inputs/modulePlan/_last.json
68
-
69
- Handle:
70
- aib:input:modulePlan:last
71
-
72
- Example:
73
- modulePlan preview --from aib:input:modulePlan:last
@@ -1,56 +0,0 @@
1
- # 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
- If a name is ambiguous, use selectors.
8
- Run help selectors to refresh selector syntax.
9
-
10
- Move transfers one or more symbols from one file to another.
11
- Move is semantic; it moves supported declarations and updates affected imports/references.
12
- Use it for focused extraction into a single target file.
13
- For large file splitting across several target files, use modulePlan.
14
-
15
- If imports created by move do not match the repo style, run:
16
- aib help config-setup.import-rules
17
-
18
- Move to file:
19
- move toFile preview --stdin
20
- move toFile execute --stdin
21
- move toFile apply <previewId>
22
-
23
- Use preview/apply when you want to inspect the planned change before writing files.
24
- Use execute when you want to write immediately.
25
- Use --from with captured input handles when rerunning edited large requests.
26
-
27
- Move several entities into one target:
28
- Run:
29
- aib move toFile execute --stdin
30
-
31
- Input:
32
- {
33
- "sourceFile": "src/service.ts",
34
- "targetFile": "src/service.helpers.ts",
35
- "entities": ["oldHelper", "OtherHelper"]
36
- }
37
-
38
- Move creates the target file when needed.
39
- The target can already exist.
40
-
41
- The request means:
42
- take entities from sourceFile and move them into targetFile.
43
-
44
- Use refactor batch when the same workflow needs both rename and move steps.
45
-
46
- If a large move request fails, edit the captured input file and rerun with --from.
47
- For small one-off move requests, write a corrected request instead.
48
-
49
- Latest move input:
50
- <session-dir>/inputs/move/_last.json
51
-
52
- Handle:
53
- aib:input:move:last
54
-
55
- Example:
56
- move toFile preview --from aib:input:move:last
@@ -1,65 +0,0 @@
1
- # Mutation
2
-
3
- Mutation commands change code through TS/IDE refactors.
4
- Successful mutations update affected references and imports.
5
-
6
- After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
7
-
8
- If move/modulePlan imports do not match the repo style, run:
9
- aib help config-setup.import-rules
10
-
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.
19
- After failure or partial success, use the output to decide the next request.
20
-
21
- When running mutation commands, set the harness timeout to 3 minutes.
22
- If the harness stops waiting before final output appears, recover with:
23
-
24
- aib execution status last
25
-
26
- Modes:
27
- preview inspect planned edits, then apply by id
28
- apply write a previewed change
29
- execute write immediately
30
-
31
- Use execute for routine rename/move/modulePlan requests.
32
-
33
- 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
- Typical examples: a huge modulePlan or refactor batch.
35
-
36
- preview/apply uses more tool calls and more output tokens.
37
- preview validates input and planned edits, but writing files can still hit a TS/IDE refactor error.
38
- execute writes immediately and reports what changed.
39
-
40
- If a mutation cannot be completed, aib reports the failed part and the captured input.
41
- For large or partial requests, edit the captured input and rerun the remaining or changed intent.
42
- For small requests, write a corrected request instead.
43
-
44
- Prefer batch JSON for related mutations.
45
- One request can describe several related changes.
46
- aib captures JSON input automatically so large failed or partial requests can be edited and rerun.
47
-
48
- When a batch mutation partly fails, split the next request by failure type.
49
-
50
- If the failure is wrong input, fix the selector/entity/file and run the corrected remaining intent.
51
- If TS/IDE cannot apply one part of the batch, do not treat the whole intent as failed.
52
- Run the next request without the failed part and let aib report any later failures.
53
- Then decide whether failed parts need smaller requests or manual fallback.
54
-
55
- If a large or partial mutation request fails, edit the captured input file and rerun with --from.
56
- For small one-off requests, write a corrected request instead.
57
-
58
- Latest mutation inputs:
59
- <session-dir>/inputs/rename/_last.json
60
- <session-dir>/inputs/move/_last.json
61
- <session-dir>/inputs/refactor/_last.json
62
- <session-dir>/inputs/modulePlan/_last.json
63
-
64
- Example:
65
- rename preview --from aib:input:rename:last
@@ -1,76 +0,0 @@
1
- # Working Patterns
2
-
3
- To refresh help protocol:
4
- aib help help-protocol
5
-
6
- Use aib before broad file reads when the question is about TS/JS structure, references, dependencies, or focused code.
7
- Use qr for cross-OS quick reads of text files, logs, JSON, scripts, and line windows.
8
- It is not a replacement for inspect.
9
- Use normal text search when the question is just text.
10
-
11
- For a first pass in a new codebase, map directories before reading files:
12
-
13
- tree src depth=5 +onlyDirs limit=200
14
-
15
- Start compact for broad scans.
16
- Use summary, locations, or local graph views first when output could be large.
17
- Expand to code or wider graph views only for the parts that matter now.
18
- 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.
19
-
20
- Compact output is a starting point, not a substitute for needed code.
21
- Fetch exact code when correctness depends on implementation details.
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
- Use @file only when several following operations share the same file.
28
- For independent one-off file requests, pass the path directly:
29
- file @svc/a.ts
30
- code @svc/b.ts ServiceB
31
-
32
- AIB mutations are designed to reduce manual checking.
33
- Your job is to express the intent in DSL.
34
- AIB's job is to convert that intent into code changes.
35
-
36
- Do not read all changed files just because a mutation touched them.
37
- That defeats the purpose of using AIB for mechanical refactors.
38
-
39
- If the command succeeds, the requested mechanical change was applied.
40
- After failure or partial success, use the output to decide the next request.
41
-
42
- For mutation commands, set the shell/tool harness timeout to 3 minutes.
43
-
44
- If a mutation command times out or returns no final output, use:
45
-
46
- aib execution status last
47
-
48
- This is an escape hatch for recovering the latest mutation status/result.
49
-
50
- Config excludes can hide files from tree/graph/sync output.
51
-
52
- AIB has four config exclude fields:
53
- inspect.graph.exclude
54
- inspect.tree.files.exclude
55
- inspect.tree.onlyDirs.exclude
56
- sync.tsconfig.exclude
57
-
58
- For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
59
-
60
- Important: leave feedback while working.
61
-
62
- aib is built for agents. Agent feedback is the main signal for improving output, docs, mutations, and token efficiency.
63
-
64
- Use feedback when something is wrong, unclear, noisy, or could be more efficient.
65
-
66
- Format:
67
- feedback "kind | message"
68
- feedback "kind | topic | message"
69
-
70
- Kinds:
71
- bug, confusion, friction, idea, other
72
-
73
- Topic is optional. Choose any short topic that helps classify the feedback.
74
-
75
- Example:
76
- feedback "friction | imports | normalize required manual cleanup"
@@ -1,40 +0,0 @@
1
- # Prefs
2
-
3
- Prefs change defaults for the active session.
4
- Use them when you want repeated CLI behavior without repeating request fields.
5
-
6
- Set prefs:
7
- session prefs set <name> <value> [<name> <value>...]
8
-
9
- Example:
10
- session prefs set inspect.graph.hubs false inspect.graph.leaves false
11
-
12
- Show prefs:
13
- session prefs get [prefix] [--all]
14
-
15
- By default, get shows session overrides.
16
- --all includes defaults.
17
- prefix filters keys.
18
-
19
- boolean = true|false
20
- N = integer
21
-
22
- Available prefs:
23
- inspect.code.maxNonEmptyLines N
24
- inspect.usages.maxLocations N
25
- inspect.usages.maxCodeBlocks N
26
- inspect.members.maxItems N
27
- inspect.members.all boolean
28
- inspect.graph.hubs boolean
29
- inspect.graph.entrypoints boolean
30
- inspect.graph.leaves boolean
31
- inspect.graph.edges boolean
32
- inspect.graph.symbols boolean
33
- inspect.graph.symbolUsage boolean
34
-
35
- Use prefs to reduce repeated request fields and avoid unnecessary output.
36
-
37
- If graph output is too noisy:
38
- session prefs set inspect.graph.hubs false inspect.graph.leaves false
39
-
40
- Change prefs while working. Turn details back on when you need them.