@automaton-labs/aib 0.0.1

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 (291) hide show
  1. package/README.md +578 -0
  2. package/dist/bin/aib.js +2 -0
  3. package/dist/bin/cli.js +3 -0
  4. package/dist/client/http-client.js +1 -0
  5. package/dist/client/transport-options.js +1 -0
  6. package/dist/client/websocket-client.js +1 -0
  7. package/dist/commands/add-missing-imports-preview-cache.js +2 -0
  8. package/dist/commands/add-missing-imports.js +2 -0
  9. package/dist/commands/apply-module-plan.js +3 -0
  10. package/dist/commands/captured-input.js +2 -0
  11. package/dist/commands/config-command.js +3 -0
  12. package/dist/commands/diagnostics-command.js +3 -0
  13. package/dist/commands/doctor.js +1 -0
  14. package/dist/commands/entity-resolution.js +1 -0
  15. package/dist/commands/execution-command.js +1 -0
  16. package/dist/commands/feedback-command.js +3 -0
  17. package/dist/commands/find-importers.js +1 -0
  18. package/dist/commands/find-unused-imports.js +1 -0
  19. package/dist/commands/generate-docs-command.js +6 -0
  20. package/dist/commands/help-command.js +3 -0
  21. package/dist/commands/imports-command.js +1 -0
  22. package/dist/commands/init-skill-usage.js +3 -0
  23. package/dist/commands/init-workspace.js +3 -0
  24. package/dist/commands/inspect-cycles.js +5 -0
  25. package/dist/commands/inspect-format.js +18 -0
  26. package/dist/commands/inspect-graph.js +9 -0
  27. package/dist/commands/inspect-imports.js +2 -0
  28. package/dist/commands/inspect-symbol-query.js +1 -0
  29. package/dist/commands/inspect-tree.js +5 -0
  30. package/dist/commands/inspect.js +16 -0
  31. package/dist/commands/json-file-input.js +1 -0
  32. package/dist/commands/list-instances.js +1 -0
  33. package/dist/commands/module-plan-cache.js +2 -0
  34. package/dist/commands/module-plan-command.js +1 -0
  35. package/dist/commands/module-plan-timeout.js +1 -0
  36. package/dist/commands/move-command.js +1 -0
  37. package/dist/commands/move-preview-cache.js +2 -0
  38. package/dist/commands/move-to-file.js +2 -0
  39. package/dist/commands/mutation-execution-cache.js +3 -0
  40. package/dist/commands/normalize-imports.js +4 -0
  41. package/dist/commands/observability-command.js +3 -0
  42. package/dist/commands/ping.js +1 -0
  43. package/dist/commands/print-config.js +1 -0
  44. package/dist/commands/quick-read.js +11 -0
  45. package/dist/commands/refactor-batch-builder.js +1 -0
  46. package/dist/commands/refactor-batch-execution-cache.js +1 -0
  47. package/dist/commands/refactor-batch-preview-cache.js +2 -0
  48. package/dist/commands/refactor-batch.js +4 -0
  49. package/dist/commands/refactor-command.js +1 -0
  50. package/dist/commands/rename-command.js +1 -0
  51. package/dist/commands/rename-entities.js +4 -0
  52. package/dist/commands/rename-execution-cache.js +1 -0
  53. package/dist/commands/rename-input.js +1 -0
  54. package/dist/commands/rename-preview-cache.js +2 -0
  55. package/dist/commands/result-view.js +6 -0
  56. package/dist/commands/runtime-command.js +4 -0
  57. package/dist/commands/runtime-info.js +1 -0
  58. package/dist/commands/session-workspace.js +31 -0
  59. package/dist/commands/shared.js +1 -0
  60. package/dist/commands/sync-command.js +2 -0
  61. package/dist/commands/validate-module-plan.js +2 -0
  62. package/dist/commands/workspace-cache.js +1 -0
  63. package/dist/compatibility/policy.js +1 -0
  64. package/dist/config/auto-start-ide.js +1 -0
  65. package/dist/config/defaults.js +1 -0
  66. package/dist/config/env-vars.js +1 -0
  67. package/dist/config/glob-match.js +1 -0
  68. package/dist/config/import-rules.js +1 -0
  69. package/dist/config/local-config.js +3 -0
  70. package/dist/config/mutation-comments.js +1 -0
  71. package/dist/config/path-aliases.js +1 -0
  72. package/dist/config/path-display.js +1 -0
  73. package/dist/config/product-storage.js +1 -0
  74. package/dist/config/resolve-command-alias.js +1 -0
  75. package/dist/config/resolve.js +1 -0
  76. package/dist/config/workspace-root.js +3 -0
  77. package/dist/config/workspace-state.js +1 -0
  78. package/dist/content/content-bundle.js +1 -0
  79. package/dist/diagnostics/module-plan-timeline.js +2 -0
  80. package/dist/diagnostics/readiness-text.js +8 -0
  81. package/dist/discovery/registry.js +1 -0
  82. package/dist/discovery/select-instance.js +1 -0
  83. package/dist/dsl/aib-dsl.js +1 -0
  84. package/dist/help/bootstrap.md +924 -0
  85. package/dist/help/diagnostics/doctor.json +70 -0
  86. package/dist/help/docs/basics.md +14 -0
  87. package/dist/help/docs/dsl.md +25 -0
  88. package/dist/help/docs/help-format.md +12 -0
  89. package/dist/help/docs/imports.normalize.md +36 -0
  90. package/dist/help/docs/inspect.code.md +29 -0
  91. package/dist/help/docs/inspect.deps.md +32 -0
  92. package/dist/help/docs/inspect.duplicates.md +72 -0
  93. package/dist/help/docs/inspect.exports.md +34 -0
  94. package/dist/help/docs/inspect.file.md +32 -0
  95. package/dist/help/docs/inspect.graph.md +112 -0
  96. package/dist/help/docs/inspect.imports.md +15 -0
  97. package/dist/help/docs/inspect.md +71 -0
  98. package/dist/help/docs/inspect.members.md +24 -0
  99. package/dist/help/docs/inspect.tree.md +30 -0
  100. package/dist/help/docs/inspect.usages.md +48 -0
  101. package/dist/help/docs/modulePlan.md +51 -0
  102. package/dist/help/docs/move.md +37 -0
  103. package/dist/help/docs/mutation.md +47 -0
  104. package/dist/help/docs/patterns.md +178 -0
  105. package/dist/help/docs/prefs.md +40 -0
  106. package/dist/help/docs/qr.md +33 -0
  107. package/dist/help/docs/refactor.batch.md +44 -0
  108. package/dist/help/docs/rename.md +39 -0
  109. package/dist/help/docs/selectors.md +23 -0
  110. package/dist/help/docs/session.md +61 -0
  111. package/dist/help/docs/view.md +30 -0
  112. package/dist/help/dsl/bootstrap.md +924 -0
  113. package/dist/help/dsl/docs/basics.md +14 -0
  114. package/dist/help/dsl/docs/dsl.md +25 -0
  115. package/dist/help/dsl/docs/help-format.md +12 -0
  116. package/dist/help/dsl/docs/imports.normalize.md +36 -0
  117. package/dist/help/dsl/docs/inspect.code.md +29 -0
  118. package/dist/help/dsl/docs/inspect.deps.md +32 -0
  119. package/dist/help/dsl/docs/inspect.duplicates.md +72 -0
  120. package/dist/help/dsl/docs/inspect.exports.md +34 -0
  121. package/dist/help/dsl/docs/inspect.file.md +32 -0
  122. package/dist/help/dsl/docs/inspect.graph.md +112 -0
  123. package/dist/help/dsl/docs/inspect.imports.md +15 -0
  124. package/dist/help/dsl/docs/inspect.md +71 -0
  125. package/dist/help/dsl/docs/inspect.members.md +24 -0
  126. package/dist/help/dsl/docs/inspect.tree.md +30 -0
  127. package/dist/help/dsl/docs/inspect.usages.md +48 -0
  128. package/dist/help/dsl/docs/modulePlan.md +51 -0
  129. package/dist/help/dsl/docs/move.md +37 -0
  130. package/dist/help/dsl/docs/mutation.md +47 -0
  131. package/dist/help/dsl/docs/patterns.md +178 -0
  132. package/dist/help/dsl/docs/prefs.md +40 -0
  133. package/dist/help/dsl/docs/qr.md +33 -0
  134. package/dist/help/dsl/docs/refactor.batch.md +44 -0
  135. package/dist/help/dsl/docs/rename.md +39 -0
  136. package/dist/help/dsl/docs/selectors.md +23 -0
  137. package/dist/help/dsl/docs/session.md +61 -0
  138. package/dist/help/dsl/docs/view.md +30 -0
  139. package/dist/help/dsl/full.md +924 -0
  140. package/dist/help/dsl/snippets/agents.md +14 -0
  141. package/dist/help/dsl/topics/basics.md +12 -0
  142. package/dist/help/dsl/topics/dsl.md +23 -0
  143. package/dist/help/dsl/topics/help-format.md +10 -0
  144. package/dist/help/dsl/topics/imports.normalize.md +34 -0
  145. package/dist/help/dsl/topics/inspect.code.md +27 -0
  146. package/dist/help/dsl/topics/inspect.deps.md +30 -0
  147. package/dist/help/dsl/topics/inspect.duplicates.md +43 -0
  148. package/dist/help/dsl/topics/inspect.exports.md +32 -0
  149. package/dist/help/dsl/topics/inspect.file.md +30 -0
  150. package/dist/help/dsl/topics/inspect.graph.md +110 -0
  151. package/dist/help/dsl/topics/inspect.imports.md +13 -0
  152. package/dist/help/dsl/topics/inspect.md +69 -0
  153. package/dist/help/dsl/topics/inspect.members.md +22 -0
  154. package/dist/help/dsl/topics/inspect.tree.md +20 -0
  155. package/dist/help/dsl/topics/inspect.usages.md +46 -0
  156. package/dist/help/dsl/topics/modulePlan.md +38 -0
  157. package/dist/help/dsl/topics/move.md +27 -0
  158. package/dist/help/dsl/topics/mutation.md +45 -0
  159. package/dist/help/dsl/topics/patterns.md +176 -0
  160. package/dist/help/dsl/topics/prefs.md +38 -0
  161. package/dist/help/dsl/topics/qr.md +31 -0
  162. package/dist/help/dsl/topics/refactor.batch.md +33 -0
  163. package/dist/help/dsl/topics/rename.md +25 -0
  164. package/dist/help/dsl/topics/selectors.md +21 -0
  165. package/dist/help/dsl/topics/session.md +59 -0
  166. package/dist/help/dsl/topics/view.md +28 -0
  167. package/dist/help/full.md +924 -0
  168. package/dist/help/help-meta.json +113 -0
  169. package/dist/help/index.md +167 -0
  170. package/dist/help/json/bootstrap.md +1074 -0
  171. package/dist/help/json/docs/basics.md +15 -0
  172. package/dist/help/json/docs/dsl.md +25 -0
  173. package/dist/help/json/docs/help-format.md +12 -0
  174. package/dist/help/json/docs/imports.normalize.md +47 -0
  175. package/dist/help/json/docs/inspect.code.md +41 -0
  176. package/dist/help/json/docs/inspect.deps.md +46 -0
  177. package/dist/help/json/docs/inspect.duplicates.md +65 -0
  178. package/dist/help/json/docs/inspect.exports.md +40 -0
  179. package/dist/help/json/docs/inspect.file.md +38 -0
  180. package/dist/help/json/docs/inspect.graph.md +139 -0
  181. package/dist/help/json/docs/inspect.imports.md +15 -0
  182. package/dist/help/json/docs/inspect.md +87 -0
  183. package/dist/help/json/docs/inspect.members.md +32 -0
  184. package/dist/help/json/docs/inspect.tree.md +30 -0
  185. package/dist/help/json/docs/inspect.usages.md +61 -0
  186. package/dist/help/json/docs/modulePlan.md +70 -0
  187. package/dist/help/json/docs/move.md +53 -0
  188. package/dist/help/json/docs/mutation.md +62 -0
  189. package/dist/help/json/docs/patterns.md +178 -0
  190. package/dist/help/json/docs/prefs.md +40 -0
  191. package/dist/help/json/docs/qr.md +33 -0
  192. package/dist/help/json/docs/refactor.batch.md +72 -0
  193. package/dist/help/json/docs/rename.md +47 -0
  194. package/dist/help/json/docs/selectors.md +23 -0
  195. package/dist/help/json/docs/session.md +77 -0
  196. package/dist/help/json/docs/view.md +30 -0
  197. package/dist/help/json/full.md +1074 -0
  198. package/dist/help/json/snippets/agents.md +14 -0
  199. package/dist/help/json/topics/basics.md +13 -0
  200. package/dist/help/json/topics/dsl.md +23 -0
  201. package/dist/help/json/topics/help-format.md +10 -0
  202. package/dist/help/json/topics/imports.normalize.md +45 -0
  203. package/dist/help/json/topics/inspect.code.md +39 -0
  204. package/dist/help/json/topics/inspect.deps.md +44 -0
  205. package/dist/help/json/topics/inspect.duplicates.md +37 -0
  206. package/dist/help/json/topics/inspect.exports.md +38 -0
  207. package/dist/help/json/topics/inspect.file.md +36 -0
  208. package/dist/help/json/topics/inspect.graph.md +137 -0
  209. package/dist/help/json/topics/inspect.imports.md +13 -0
  210. package/dist/help/json/topics/inspect.md +85 -0
  211. package/dist/help/json/topics/inspect.members.md +30 -0
  212. package/dist/help/json/topics/inspect.tree.md +20 -0
  213. package/dist/help/json/topics/inspect.usages.md +59 -0
  214. package/dist/help/json/topics/modulePlan.md +57 -0
  215. package/dist/help/json/topics/move.md +43 -0
  216. package/dist/help/json/topics/mutation.md +60 -0
  217. package/dist/help/json/topics/patterns.md +176 -0
  218. package/dist/help/json/topics/prefs.md +38 -0
  219. package/dist/help/json/topics/qr.md +31 -0
  220. package/dist/help/json/topics/refactor.batch.md +61 -0
  221. package/dist/help/json/topics/rename.md +42 -0
  222. package/dist/help/json/topics/selectors.md +21 -0
  223. package/dist/help/json/topics/session.md +59 -0
  224. package/dist/help/json/topics/view.md +28 -0
  225. package/dist/help/snippets/agents.md +14 -0
  226. package/dist/help/topics/basics.md +12 -0
  227. package/dist/help/topics/dsl.md +23 -0
  228. package/dist/help/topics/help-format.md +10 -0
  229. package/dist/help/topics/imports.normalize.md +34 -0
  230. package/dist/help/topics/inspect.code.md +27 -0
  231. package/dist/help/topics/inspect.deps.md +30 -0
  232. package/dist/help/topics/inspect.duplicates.md +43 -0
  233. package/dist/help/topics/inspect.exports.md +32 -0
  234. package/dist/help/topics/inspect.file.md +30 -0
  235. package/dist/help/topics/inspect.graph.md +110 -0
  236. package/dist/help/topics/inspect.imports.md +13 -0
  237. package/dist/help/topics/inspect.md +69 -0
  238. package/dist/help/topics/inspect.members.md +22 -0
  239. package/dist/help/topics/inspect.tree.md +20 -0
  240. package/dist/help/topics/inspect.usages.md +46 -0
  241. package/dist/help/topics/modulePlan.md +38 -0
  242. package/dist/help/topics/move.md +27 -0
  243. package/dist/help/topics/mutation.md +45 -0
  244. package/dist/help/topics/patterns.md +176 -0
  245. package/dist/help/topics/prefs.md +38 -0
  246. package/dist/help/topics/qr.md +31 -0
  247. package/dist/help/topics/refactor.batch.md +33 -0
  248. package/dist/help/topics/rename.md +25 -0
  249. package/dist/help/topics/selectors.md +21 -0
  250. package/dist/help/topics/session.md +59 -0
  251. package/dist/help/topics/view.md +28 -0
  252. package/dist/ide-launch/common.cjs +162 -0
  253. package/dist/managed-host/extension-vsix-resolver.js +1 -0
  254. package/dist/managed-host/manage-serve-web-host.cjs +141 -0
  255. package/dist/managed-host/serve-web-autostart.js +1 -0
  256. package/dist/managed-host/serve-web-host.cjs +1790 -0
  257. package/dist/metrics/central-metrics.js +2 -0
  258. package/dist/observability/config.js +1 -0
  259. package/dist/observability/context.js +1 -0
  260. package/dist/observability/failure-snapshot.js +2 -0
  261. package/dist/observability/recent.js +2 -0
  262. package/dist/payloads/read-stdin-json.js +1 -0
  263. package/dist/runtime/bundled-node.js +1 -0
  264. package/dist/runtime/input-source.js +1 -0
  265. package/dist/runtime/managed-runtime-provisioning.js +1 -0
  266. package/dist/runtime/run-command.js +1 -0
  267. package/dist/selectors/parse-entities.js +1 -0
  268. package/dist/session/client.js +1 -0
  269. package/dist/session/paths.js +1 -0
  270. package/dist/session/server.js +6 -0
  271. package/dist/shared/agent-text.js +1 -0
  272. package/dist/shared/diagnostic-catalog.js +1 -0
  273. package/dist/shared/diagnostics.js +1 -0
  274. package/dist/shared/errors.js +28 -0
  275. package/dist/shared/event-loop.js +1 -0
  276. package/dist/shared/hints.js +1 -0
  277. package/dist/shared/metrics.js +1 -0
  278. package/dist/shared/operations.js +1 -0
  279. package/dist/shared/presentation.js +4 -0
  280. package/dist/shared/protocol.js +1 -0
  281. package/dist/shared/routes.js +1 -0
  282. package/dist/shared/stdout.js +2 -0
  283. package/dist/shared/types.js +1 -0
  284. package/dist/tracing/config.js +2 -0
  285. package/dist/tracing/trace.js +3 -0
  286. package/extension/vscode-refactor-bridge-extension.vsix +0 -0
  287. package/package.json +39 -0
  288. package/runtimes/launcher/win-x64/aib.exe +0 -0
  289. package/scripts/install-windows-launcher.cjs +58 -0
  290. package/scripts/postinstall.cjs +28 -0
  291. package/scripts/provision-runtime.cjs +299 -0
@@ -0,0 +1,924 @@
1
+ AIB
2
+
3
+ aib is a local CLI for TS/JS code work backed by IDE and TypeScript APIs.
4
+ It can inspect symbols, usages, dependencies, duplicates, focused code, and run IDE-backed mutations.
5
+
6
+ aib is designed for agent workflows:
7
+ batch requests, compact text output, session handles, and reusable artifacts.
8
+
9
+ Inline commands omit the aib prefix.
10
+ When you see:
11
+ session prefs get
12
+
13
+ Run:
14
+ aib session prefs get
15
+
16
+ Stdin examples show command and input separately to avoid shell-specific syntax.
17
+ Stdin Run lines include the aib prefix to avoid confusion.
18
+
19
+ PowerShell stdin shape:
20
+ @'
21
+ <input>
22
+ '@ | aib <command> --stdin
23
+
24
+ Basics
25
+
26
+ Use the active session while you work.
27
+
28
+ Examples are patterns, not limits.
29
+ Feature sections show common high-value uses, not every valid use.
30
+ Adapt requests to the task: combine features, batch related questions, and skip steps when you already have enough context.
31
+
32
+ Prefer batch DSL instead of one-off inline calls.
33
+ One request can inspect/mutate several files/entities and save reusable artifacts when supported.
34
+ Use one-off commands only for small checks/changes.
35
+
36
+ For mutations, aib asks TS/IDE refactors to update affected references and imports.
37
+ After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or the build/checks show a real issue.
38
+
39
+ Working patterns
40
+
41
+ Use aib before broad file reads when the question is about TS/JS structure, references, dependencies, or focused code.
42
+ Use normal text search when the question is just text.
43
+
44
+ For a first pass in a new codebase, map directories before reading files:
45
+
46
+ tree src depth=5 +onlyDirs limit=200
47
+
48
+ Start compact for broad scans.
49
+ Use summary, locations, or local graph views first when output could be large.
50
+ Expand to code or wider graph views only for the parts that matter now.
51
+ 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.
52
+
53
+ Compact output is a starting point, not a substitute for needed code.
54
+ Fetch exact code when correctness depends on implementation details.
55
+
56
+ Use prefs when the current phase repeats the same output shape.
57
+ Turn details off when they stop helping.
58
+ Turn them back on when they matter.
59
+
60
+ For mutation commands, set the shell/tool harness timeout to 3 minutes.
61
+
62
+ If a mutation command times out or returns no final output, use:
63
+
64
+ aib execution status last
65
+
66
+ This is an escape hatch for recovering the latest mutation status/result.
67
+
68
+ Before repeated mutation work, check aib config:
69
+
70
+ aib config
71
+
72
+ Set pathAliases for repeated request paths.
73
+ Set importRules so move/modulePlan create imports in the project style.
74
+
75
+ This avoids repeating long paths in requests and avoids manual import cleanup after mutations.
76
+ Do this before large move/modulePlan work, not after cleanup becomes repetitive.
77
+
78
+ Example aib.json config:
79
+
80
+ {
81
+ "pathAliases": {
82
+ "svc": "src/services",
83
+ "cli": "packages/cli/src",
84
+ "ext": "packages/extension/src"
85
+ },
86
+ "importRules": [
87
+ {
88
+ "scope": ".",
89
+ "specifier": "shortest",
90
+ "ending": "auto",
91
+ "builtin": "bare",
92
+ "unusedImports": "remove"
93
+ }
94
+ ],
95
+ "importNormalize": [
96
+ {
97
+ "scope": "src",
98
+ "to": "shortestAlias",
99
+ "exclude": ["src/generated"]
100
+ }
101
+ ],
102
+ "inspect.graph.exclude": [
103
+ "**/* copy.ts"
104
+ ]
105
+ }
106
+
107
+ pathAliases define short request aliases for paths agents repeat in aib commands.
108
+ Use them to reduce input tokens for repeated inspect and mutation work.
109
+
110
+ Aliases are for aib request paths. They do not change TypeScript imports by themselves.
111
+ For import style after mutations, use importRules.
112
+
113
+ importRules control imports created or expanded by move/modulePlan mutation cleanup.
114
+ They do not rewrite the whole project.
115
+
116
+ AIB starts from IDE/TS import preferences.
117
+ For mutation cleanup, matching importRules in aib.json take priority.
118
+
119
+ Do not assume IDE/TS defaults match the repo style.
120
+ Set importRules before large move/modulePlan work so imports do not need manual cleanup.
121
+
122
+ Fields:
123
+ scope repo-relative file or directory scope; most specific scope wins
124
+ specifier relative|shortest|project-relative|non-relative
125
+ ending auto|minimal|index|js
126
+ builtin node|bare
127
+ unusedImports remove|preserve
128
+
129
+ Defaults:
130
+ specifier omitted IDE/TS decides
131
+ ending omitted IDE/TS decides
132
+ builtin omitted keep TS/project builtin style
133
+ unusedImports omitted keep unused imports
134
+
135
+ specifier:
136
+ relative best for local relative imports
137
+ shortest best for shortest valid alias/path output
138
+ project-relative best for root-relative project imports
139
+ non-relative best for package or alias imports
140
+
141
+ ending:
142
+ minimal best for extensionless TS imports
143
+ js best for ESM-style TS projects that require .js
144
+ auto leaves the decision to TypeScript
145
+ index best for explicit index import style
146
+
147
+ builtin:
148
+ node path -> node:path; best for explicit Node builtin imports
149
+ bare node:path -> path; best for bare Node builtin imports
150
+ omit field keeps TypeScript/project output; add builtin if agents keep fixing this manually
151
+
152
+ unusedImports:
153
+ remove clean unused imports in mutation-touched files
154
+ preserve keep unused imports
155
+ omit same as preserve
156
+
157
+ Mutation-touched files are files where TS produced edits: source/target files and any reference/update files TS changed.
158
+ Recommended value: remove
159
+
160
+ importNormalize defines reusable defaults for aib imports normalize.
161
+ Use it when the same normalize request would otherwise be repeated.
162
+
163
+ It affects explicit import normalize commands only.
164
+ It does not run automatically during move/modulePlan; use importRules for mutation-time cleanup.
165
+
166
+ Fields:
167
+ scope repo-relative file or directory scope; most specific scope wins
168
+ to relative|alias|shortestAlias
169
+ preferAlias tsconfig paths pattern used when to=alias
170
+ exclude files, directories, or glob-like patterns to skip
171
+
172
+ to:
173
+ relative rewrite resolved local imports to relative paths
174
+ alias rewrite resolved local imports to a matching tsconfig alias
175
+ shortestAlias rewrite to the shortest valid alias specifier
176
+
177
+ preferAlias:
178
+ @shared/* prefer one alias pattern when several aliases can resolve the same file
179
+
180
+ inspect.graph.exclude skips files before graph builds the model.
181
+ Use it for generated files, backups, local copies, or other paths that make graph output noisy.
182
+
183
+ Excluded files do not affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, or saved graph files.
184
+
185
+ Leave feedback while working.
186
+
187
+ aib is built for agents. Agent feedback is the main signal for improving output, docs, mutations, and token efficiency.
188
+
189
+ Use feedback when something is wrong, unclear, noisy, or could be more efficient.
190
+
191
+ Format:
192
+ feedback "kind | message"
193
+ feedback "kind | topic | message"
194
+
195
+ Kinds:
196
+ bug, confusion, friction, idea, other
197
+
198
+ Topic is optional. Choose any short topic that helps classify the feedback.
199
+
200
+ Example:
201
+ feedback "friction | imports | normalize required manual cleanup"
202
+
203
+ Session
204
+
205
+ Start by creating or selecting your session.
206
+ Create it once, then reuse it.
207
+ Do not create a new session for every command or subtask.
208
+
209
+ Session stores saved artifacts, aliases, and prefs.
210
+
211
+ Prefer short session names:
212
+ aa, tr, qa, a2
213
+
214
+ Create:
215
+ session init --name <name>
216
+
217
+ Follow the command output.
218
+ If aib says multiple sessions exist, use the session you created explicitly:
219
+ aib -s <name> <command>
220
+
221
+ Or bind this shell:
222
+ AIB=<name>
223
+
224
+ If you want to prune session data, use:
225
+ session clear
226
+
227
+ After clear, keep using the same session.
228
+
229
+ Check:
230
+ session status
231
+
232
+ Reusable index handles look like:
233
+ `aib:graph:<name>` `aib:usages:<name>`
234
+
235
+ Pass index handles back to the matching inspect command with `--from-file` or `from` in DSL.
236
+
237
+ Prefs
238
+
239
+ Prefs change defaults for the active session.
240
+ Use them when you want repeated CLI behavior without repeating request fields.
241
+
242
+ Set prefs:
243
+ session prefs set <name> <value> [<name> <value>...]
244
+
245
+ Example:
246
+ session prefs set inspect.graph.hubs false inspect.graph.leaves false
247
+
248
+ Show prefs:
249
+ session prefs get [prefix] [--all]
250
+
251
+ By default, get shows session overrides.
252
+ --all includes defaults.
253
+ prefix filters keys.
254
+
255
+ boolean = true|false
256
+ N = integer
257
+
258
+ Available prefs:
259
+ inspect.code.maxNonEmptyLines N
260
+ inspect.usages.maxLocations N
261
+ inspect.usages.maxCodeBlocks N
262
+ inspect.members.maxItems N
263
+ inspect.members.all boolean
264
+ inspect.graph.hubs boolean
265
+ inspect.graph.entrypoints boolean
266
+ inspect.graph.leaves boolean
267
+ inspect.graph.edges boolean
268
+ inspect.graph.symbolUsage boolean
269
+
270
+ Selectors identify symbols when names are ambiguous.
271
+ Use plain names when they are unambiguous.
272
+ Use selectors when aib reports ambiguity or when different symbol kinds share a name.
273
+
274
+ Example:
275
+ type WsOptions
276
+ class WsOptions
277
+
278
+ If aib needs the exact entity, use:
279
+ t-WsOptions
280
+ c-WsOptions
281
+
282
+ Selectors list:
283
+ f-name function
284
+ c-Name class
285
+ i-Name interface
286
+ t-Name type
287
+ v-name variable
288
+ e-Name enum
289
+ m-name method, usually with parent
290
+ p-name property, usually with parent
291
+
292
+ DSL request model:
293
+ - directives set defaults for following requests
294
+ - each request line can override defaults with key=value
295
+ - +flag means true
296
+ - -flag means false
297
+ - file/imports/exports/members/code/deps accept a path as the first positional argument; examples below use this shape.
298
+ - Use @file when several following operations share the same file.
299
+ - For one-off file operations, pass the path directly.
300
+
301
+ Syntax:
302
+ @file <path> default file
303
+ @source <path> default sourceFile for mutations
304
+ op arg arg key=value request
305
+ +flag boolean true
306
+ -flag boolean false
307
+ >name save reusable artifact when supported
308
+ old->new rename pair
309
+ Parent.member parent-qualified member
310
+ Parent.{a,b} several members under one parent
311
+ key=[a,b] list value for repeatable fields
312
+ file="path with spaces.ts" quote values with spaces
313
+ detail=sum|loc|code aliases for summary|locations|code
314
+ from=... alias for fromFile
315
+
316
+ Inspect
317
+
318
+ Inspect helps you turn an unknown code area into a small working model.
319
+
320
+ Use it to understand what exists, how pieces connect, what repeats, where a change can spread, and which exact code should enter context next.
321
+
322
+ One useful flow:
323
+ map -> focus -> code
324
+
325
+ map: learn what exists and how it connects
326
+ focus: choose files/entities/usages that matter
327
+ code: fetch exact code needed
328
+
329
+ Choose inspect operation:
330
+
331
+ declarations in one file file
332
+ static/dynamic imports imports
333
+ public API exports
334
+ methods/properties of parent members
335
+ exact implementation code
336
+ outgoing deps of one entity deps
337
+ incoming references/callers usages
338
+ file/module connectivity graph
339
+ compact directory layout tree
340
+ repeated declarations/helpers duplicates
341
+
342
+ Prefer one batch DSL request for related questions.
343
+
344
+ Batch example:
345
+
346
+ Run:
347
+ aib inspect --stdin
348
+
349
+ Input:
350
+ @file @svc/service.ts
351
+ file
352
+ file @svc/serviceB.ts
353
+ members Service
354
+ code entities=[Service.{render,reset},normalize]
355
+ code @svc/serviceC.ts ServiceC -ranges
356
+ usages target=@svc/service.ts normalize scope=src detail=loc
357
+ duplicates scope=src/scripts detail=sum limit=20
358
+
359
+ How inheritance works above:
360
+ @file sets the default file for following file-like inspect requests.
361
+ file uses @svc/service.ts.
362
+ file @svc/serviceB.ts overrides the default for that one request.
363
+ members Service uses @svc/service.ts because it has no file override.
364
+ code entities=[...] also uses @svc/service.ts.
365
+ code @svc/serviceC.ts ServiceC overrides the file and disables ranges for that request.
366
+ usages sets its own target/scope/detail because it searches references instead of reading the default file.
367
+ duplicates sets its own scope because it scans a directory.
368
+
369
+ Inspect request fields:
370
+
371
+ file source file; first positional path, @file path, or file=path
372
+ target file or directory to analyze; target=path
373
+ scope where to search; scope=path or scope=[a,b]
374
+ entity one symbol selector; entity=name or positional selector
375
+ entities several symbol selectors; entities=[...] or positional selectors
376
+ parent parent class/interface for methods/properties; Parent.member or parent=Name
377
+ ranges include line/range metadata
378
+ exclude skip paths or names depending on operation; exclude=[...]
379
+ detail output level; detail=sum|loc|code
380
+ all return all items; +all
381
+ limit max items in one page; limit=N
382
+ offset page offset; offset=N
383
+ save save reusable artifact where supported; >name
384
+
385
+ Operation sections list their supported controls.
386
+ Specific explains controls whose meaning is local to that operation.
387
+
388
+ Inspect File
389
+
390
+ Use file to map top-level declarations physically present in one file.
391
+ Exported declarations are marked in the output.
392
+ It shows what lives in the file before you decide whether to read code.
393
+
394
+ Good for:
395
+ - mapping an unfamiliar file
396
+ - listing top-level declarations
397
+ - checking whether a file contains real declarations or mostly re-exports
398
+
399
+ Do not add limit just in case.
400
+ file output is compact and most files have far fewer than 100 top-level declarations.
401
+ Use limit only after file output is actually too large.
402
+
403
+ Controls:
404
+ file, ranges, localOnly
405
+
406
+ Specific:
407
+ localOnly show local declarations and reexports without resolving facade API; +localOnly
408
+
409
+ Defaults: +ranges
410
+ Use -ranges to show names without ranges.
411
+
412
+ Run:
413
+ aib inspect --stdin
414
+
415
+ Input:
416
+ file @svc/service.ts +localOnly
417
+ file src/index.ts
418
+
419
+ inspect file src/service.ts [--ranges] [--local-only]
420
+
421
+ Inspect Imports
422
+
423
+ Use imports to inspect static and dynamic imports in a file.
424
+ If there are no dynamic imports, the dynamic imports block is omitted.
425
+
426
+ Controls:
427
+ file, ranges
428
+
429
+ Defaults: +ranges
430
+
431
+ Run:
432
+ aib inspect --stdin
433
+
434
+ Input:
435
+ imports @svc/service.ts
436
+
437
+ Inspect Exports
438
+
439
+ Use exports to see the public API of one file.
440
+ It answers what other files can import from that file.
441
+
442
+ Important:
443
+ inspect.file marks exported declarations already.
444
+
445
+ Do not batch this for a plain implementation file:
446
+ file src/service.ts
447
+ exports src/service.ts
448
+
449
+ Use exports when you need public module surface, barrels, re-exports, export *, or resolveStar.
450
+
451
+ Good for:
452
+ - checking a module boundary or public surface
453
+ - understanding facade/barrel files
454
+ - resolving export * when the local file only re-exports from elsewhere
455
+ - comparing API shape when public imports matter
456
+
457
+ Controls:
458
+ file, ranges, resolveStar
459
+
460
+ Specific:
461
+ resolveStar resolve export * through re-exported modules; +resolveStar
462
+
463
+ Run:
464
+ aib inspect --stdin
465
+
466
+ Input:
467
+ exports src/service.ts +ranges
468
+ exports src/index.ts +resolveStar
469
+
470
+ inspect exports src/service.ts [--ranges] [--resolve-star]
471
+
472
+ Inspect Members
473
+
474
+ Use members to map a class/interface/object-like symbol without reading its body.
475
+ It shows the internal shape of a parent entity without reading its full body.
476
+
477
+ Good for:
478
+ - listing member names when the parent entity is known
479
+ - narrowing a large parent entity to relevant members
480
+ - understanding object shape before changing or moving related code
481
+
482
+ Controls:
483
+ file, entity, entities, ranges, limit, offset, all
484
+
485
+ Run:
486
+ aib inspect --stdin
487
+
488
+ Input:
489
+ members @svc/service.ts entities=[Service,ServiceOptions] +all +ranges
490
+
491
+ inspect members src/service.ts Service [--limit N] [--offset N] [--all] [--ranges]
492
+
493
+ Inspect Code
494
+
495
+ Use code to fetch exact declarations or members.
496
+ It returns focused code without reading the whole file.
497
+
498
+ Good for:
499
+ - reading a known function, class, method, or declaration
500
+ - fetching several related code blocks in one request
501
+ - keeping context focused on code needed for the current task
502
+
503
+ Controls:
504
+ file, entity, entities, parent, show, ranges
505
+
506
+ Specific:
507
+ show include source output
508
+
509
+ Defaults: +show +ranges
510
+ Use -show for names/ranges only.
511
+ Use -ranges for source without ranges.
512
+
513
+ Run:
514
+ aib inspect --stdin
515
+
516
+ Input:
517
+ code @svc/service.ts Service.{render,reset} normalize
518
+ code @svc/serviceB.ts ServiceB.{constructor}
519
+
520
+ Inspect Deps
521
+
522
+ Use deps to see what one entity depends on inside its file.
523
+ It separates type-only dependencies from runtime value dependencies.
524
+
525
+ Good for:
526
+ - checking what a symbol may need when moved or extracted
527
+ - spotting nearby types, constants, or helpers tied to one entity
528
+ - deciding whether one symbol is standalone or tied to nearby declarations
529
+ - debugging mutation failures caused by local dependency shape
530
+
531
+ Controls:
532
+ file, entity, entities, parent
533
+
534
+ Run:
535
+ aib inspect --stdin
536
+
537
+ Input:
538
+ deps @svc/service.ts entities=[createService,normalize,Service.{render,reset}]
539
+ deps @svc/serviceB.ts ServiceB.{constructor} getConfig
540
+
541
+ Inspect Usages
542
+
543
+ Use usages to find who references a file, directory, or entity inside a scope.
544
+ It reports real references, not unused imports or text matches.
545
+ For broad impact checks, target-local usages are hidden automatically when the target is inside a wider scope.
546
+ Use includeTarget only when references inside the target file or directory matter.
547
+
548
+ Good for:
549
+ - checking impact before changing behavior
550
+ - finding consumers of an entity or module area
551
+ - confirming whether extracted or renamed code still has callers
552
+ - getting caller locations or caller code without broad file scans
553
+
554
+ Use detail=code directly when you already need caller code.
555
+ Use detail=loc + save when the first question is impact shape and you may expand only part of it later.
556
+
557
+ Controls:
558
+ target, scope, entity, entities, parent, detail, limit, all, save, includeTarget
559
+
560
+ Specific:
561
+ includeTarget include references inside the target file/directory; +includeTarget
562
+
563
+ Run:
564
+ aib inspect --stdin
565
+
566
+ Input:
567
+ usages target=@svc/service.ts entities=[createService,normalize,Service.{render,reset}] scope=[src/app,src/tests] detail=loc >service-usages
568
+
569
+ Expand saved usages when needed:
570
+ inspect usages --from-file aib:usages:service-usages --focus createService --detail code --limit 20
571
+
572
+ Inspect Graph
573
+
574
+ Use graph when the question is about file/module boundaries, not one symbol.
575
+ It builds a reusable map of local import relationships, then lets you focus files inside that map.
576
+
577
+ Good for:
578
+ - mapping an unfamiliar directory or subsystem
579
+ - seeing which files are hubs, entrypoints, or leaves
580
+ - comparing a few known areas without mapping all src
581
+ - choosing files/entities to inspect next
582
+ - checking module boundaries when ownership is unclear
583
+
584
+ Use deps for one entity's outgoing dependencies.
585
+ Use usages for real incoming references.
586
+ Use graph for file-level connectivity.
587
+
588
+ Model:
589
+ build graph: scope + view + save
590
+ query graph: from + focus + output toggles
591
+
592
+ view controls what enters the saved graph.
593
+ focus only expands details for files already inside it.
594
+ If focus misses a file, rebuild with wider scope or view.
595
+
596
+ Default view:
597
+ directory scope -> local
598
+ file or multiple scopes -> neighbors
599
+ from -> uses the saved graph
600
+
601
+ Views:
602
+ local only files inside scope; best directory map
603
+ neighbors direct import neighborhood; best file-centered map
604
+ expanded wider neighborhood; more output
605
+
606
+ Scope choice:
607
+ scope=src creates a broad reusable map for src.
608
+ scope=src/services is cheaper for local work.
609
+ scope=[src/services,src/components] compares known areas without mapping all src.
610
+
611
+ After you understand which graph sections matter, hide the rest with flags or prefs.
612
+ Graph can be noisy; shape it for the current task.
613
+
614
+ Controls:
615
+ scope, view, from, focus, symbolUsage, edges, hubs, entrypoints, leaves, exclude, save
616
+
617
+ Specific:
618
+ view local|neighbors|expanded
619
+ from reuse saved graph index; from=aib:graph:<name>
620
+ focus focus a file inside the graph; focus=path
621
+ symbolUsage show imported symbols on edges; +symbolUsage
622
+
623
+ edges/hubs/entrypoints/leaves output section toggles; +name or -name
624
+
625
+ Run:
626
+ aib inspect --stdin
627
+
628
+ Input:
629
+ graph scope=@svc view=local >services-graph
630
+ graph from=aib:graph:services-graph focus=[@svc/users.ts,@svc/admins.ts] +symbolUsage -edges
631
+
632
+ Focus saved graph later:
633
+ inspect graph --from-file aib:graph:services-graph --focus @svc/messages.ts --focus @svc/posts.ts --symbol-usage
634
+
635
+ Inline graph focus can add focus and symbolUsage.
636
+ Use DSL, request files, or prefs to hide sections such as edges/hubs/entrypoints/leaves.
637
+
638
+ Inspect Tree
639
+
640
+ Use tree to list a compact directory layout.
641
+ It is useful before focused inspect when you know the area but not the exact file.
642
+
643
+ node_modules, .git, dist, build, out, and .tmp are skipped by default.
644
+
645
+ Controls:
646
+ scope, depth, minDepth, limit, include, exclude, onlyDirs
647
+
648
+ Specific:
649
+ depth max nesting depth; depth=N
650
+ minDepth hide shallower paths; minDepth=N
651
+ onlyDirs show directories only; +onlyDirs
652
+ exclude skip matching files/dirs
653
+ include only matching files/dirs; include=[...]
654
+
655
+ Run:
656
+ aib inspect --stdin
657
+
658
+ Input:
659
+ tree src depth=4 +onlyDirs limit=200
660
+ tree @svc depth=3 include=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
661
+
662
+ Inspect Duplicates
663
+
664
+ Use duplicates to find repeated top-level names and exact declaration copies.
665
+ It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.
666
+
667
+ Start with summary for broad scopes.
668
+ Use locations when you need files/lines.
669
+ Use code only for duplicate names you are ready to inspect.
670
+
671
+ Controls:
672
+ scope, detail, limit, offset, kinds, entities, exclude, pathExclude
673
+
674
+ Specific:
675
+ entities only these duplicate names/selectors
676
+ exclude skip these names/selectors
677
+ pathExclude skip files or path/glob-like patterns
678
+ kinds selector kinds, e.g. f, t, c, etc.; kinds=[...]
679
+
680
+ Run:
681
+ aib inspect --stdin
682
+
683
+ Input:
684
+ duplicates scope=src detail=sum exclude=[config,baseUrl] kinds=[t,i] limit=20
685
+ duplicates scope=@svc detail=loc pathExclude=[src/generated,"**/* copy.ts"] limit=20
686
+
687
+ Mutation
688
+
689
+ Mutation commands change code through TS/IDE refactors.
690
+ Successful mutations update affected references and imports.
691
+
692
+ After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
693
+
694
+ AIB mutations are designed to reduce manual checking.
695
+ Your job is to express the intent in DSL.
696
+ AIB's job is to convert that intent into code changes.
697
+
698
+ Do not read all changed files just because a mutation touched them.
699
+ That defeats the purpose of using AIB for mechanical refactors.
700
+
701
+ If the command succeeds, the requested mechanical change was applied.
702
+ After failure or partial success, use the output to decide the next request.
703
+
704
+ When running mutation commands, set the harness timeout to 3 minutes.
705
+ If the harness stops waiting before final output appears, recover with:
706
+
707
+ aib execution status last
708
+
709
+ Modes:
710
+ preview inspect planned edits, then apply by id
711
+ apply write a previewed change
712
+ execute write immediately
713
+
714
+ Use execute for routine rename/move/modulePlan requests.
715
+
716
+ 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.
717
+ Typical examples: a huge modulePlan or refactor batch.
718
+
719
+ preview/apply uses more tool calls and more output tokens.
720
+ preview validates input and planned edits, but writing files can still hit a TS/IDE refactor error.
721
+ execute writes immediately and reports what changed.
722
+
723
+ If a mutation cannot be completed, aib reports the failed part.
724
+
725
+ Prefer batch DSL for related mutations.
726
+ One request can describe several related changes.
727
+
728
+ When a batch mutation partly fails, split the next request by failure type.
729
+
730
+ If the failure is wrong input, fix the selector/entity/file and run the corrected remaining intent.
731
+ If TS/IDE cannot apply one part of the batch, do not treat the whole intent as failed.
732
+ Run the next request without the failed part and let aib report any later failures.
733
+ Then decide whether failed parts need smaller requests or manual fallback.
734
+
735
+ Rename
736
+
737
+ Rename is for semantic symbol renames.
738
+ It follows TypeScript references.
739
+ It is not plain-text replacement.
740
+
741
+ Run:
742
+ aib rename execute --stdin
743
+
744
+ Input:
745
+ @file src/service.ts
746
+ rename oldName->newName OldService->NewService
747
+
748
+ Move
749
+
750
+ Move transfers one or more symbols from one file to another.
751
+ Move is semantic; it moves supported declarations and updates affected imports/references.
752
+ Use it for focused extraction into a single target file.
753
+ For large file splitting across several target files, use modulePlan.
754
+
755
+ Move several entities into one target:
756
+ Run:
757
+ aib move toFile execute --stdin
758
+
759
+ Input:
760
+ @source src/service.ts
761
+ move src/service.helpers.ts: oldHelper OtherHelper
762
+
763
+ Module Plan
764
+
765
+ modulePlan is for splitting large files into smaller modules.
766
+ Use it when a large file should be refactored into several target files.
767
+
768
+ modulePlan orchestrates semantic moves and updates affected references/imports.
769
+
770
+ Use +expectEmpty when your modulePlan intent is to move all declarations out of the source file.
771
+ It does not change the move behavior; it only asks output to report remaining source declarations if any remain.
772
+ Use it only when remaining declarations would mean the split did not match your intent.
773
+ Do not use it for partial extractions.
774
+
775
+ Split one large source file into several targets:
776
+ Run:
777
+ aib modulePlan execute --stdin
778
+
779
+ Input:
780
+ @source src/large-service.ts +expectEmpty
781
+ module src/large-service.types.ts: ServiceOptions ServiceMode
782
+ module src/large-service.core.ts: LargeService createLargeService
783
+
784
+ How inheritance works above:
785
+ @source sets the source file once.
786
+ +expectEmpty says no declarations should remain in the source after the plan.
787
+ Each module line declares one target and the entities that should move there.
788
+
789
+ Refactor Batch
790
+
791
+ refactor batch runs related mutation requests together.
792
+ Use it when one workflow needs ordered steps, such as rename plus move.
793
+
794
+ Use modulePlan when the main intent is only to split one large file into target modules.
795
+ Use refactor batch when the split also includes coordinated renames or mixed mutation steps.
796
+
797
+ Example: rename and move in one request
798
+
799
+ Run:
800
+ aib refactor batch execute --stdin
801
+
802
+ Input:
803
+ @source src/service.ts
804
+ rename oldHelper->newHelper oldType->newType
805
+ move src/service.helpers.ts: newHelper
806
+ move src/service.types.ts: newType
807
+
808
+ This keeps related mutation intent together:
809
+ rename first, then move the renamed symbols.
810
+
811
+ Imports Normalize
812
+
813
+ Use imports normalize for explicit import-style cleanup.
814
+ It rewrites resolved local import/export specifiers inside a chosen file or directory.
815
+
816
+ Use importNormalize in aib.json for repeated defaults.
817
+
818
+ Good for:
819
+ - converting one area to aliases or relative imports
820
+ - cleaning import style after manual edits or broad refactors
821
+ - applying the same import style to a directory without hand-editing files
822
+ - applying new tsconfig aliases after they are added
823
+
824
+ Controls:
825
+ scope file/dir scope to normalize
826
+ to relative|alias|shortestAlias
827
+ preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
828
+ exclude files, directories, or glob-like patterns to skip
829
+ all show all planned edits; avoid on broad directory scopes
830
+
831
+ Run:
832
+ aib imports normalize preview --stdin
833
+
834
+ Input:
835
+ imports.normalize scope=@svc to=shortestAlias exclude=[@svc/generated,"**/* copy.ts"]
836
+
837
+ Rewrite imports found inside src/core.
838
+ When an imported file can be expressed through @features/*, prefer that alias.
839
+
840
+ Input:
841
+ imports.normalize scope=src/core to=alias preferAlias=@features/*
842
+
843
+ With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
844
+
845
+ imports normalize preview @svc
846
+ imports normalize execute @svc
847
+
848
+ JS/TS compatibility
849
+
850
+ With tsconfig:
851
+ TS/TSX inspect + rename + move + modulePlan
852
+ JS/MJS/JSX ESM inspect + rename + move + modulePlan
853
+ CJS / JS CommonJS inspect + rename
854
+
855
+ Without tsconfig:
856
+ JS/MJS/JSX/CJS inspect only
857
+ rename/move/modulePlan require tsconfig
858
+
859
+ CommonJS means .cjs or module.exports / exports.*.
860
+
861
+ View Hidden Output
862
+
863
+ AIB keeps large outputs compact.
864
+ When part of a result is hidden, output may include:
865
+
866
+ view: aib:res_<id>
867
+
868
+ Use view to fetch the hidden part without repeating what you already saw.
869
+
870
+ When a batch has several hidden results of the same kind, output may include:
871
+
872
+ view all code: aib:res_<id>
873
+ view all members: aib:res_<id>
874
+
875
+ A `view all` handle covers hidden parts from all results of that kind.
876
+
877
+ For code views, narrow what you fetch:
878
+ only show only these hidden code entities
879
+ except show all hidden code except these entities
880
+
881
+ Run:
882
+ aib view --stdin
883
+
884
+ Input:
885
+ view aib:res_<id_1> only=[ClassA.{bigA,bigB},bigQ,ClassB.bigB]
886
+ view aib:res_<id_2> except=[ClassC.bigC]
887
+
888
+ Inline:
889
+ aib view aib:res_<id_1> --only bigQ --only "ClassA.{bigA,bigB}"
890
+ aib view aib:res_<id_2> --except ClassB.bigB --except ClassC.bigC
891
+
892
+ Quick Read
893
+
894
+ Use qr to read arbitrary text files with compact, cross-platform line windows.
895
+ qr supports AIB path aliases.
896
+
897
+ qr is not a replacement for inspect.
898
+ Use it as a token-efficient way to read text data when semantic inspect is not needed.
899
+
900
+ Controls:
901
+ -h N head; first N lines
902
+ -t N tail; last N lines
903
+ -o N offset; starting line, 1-based
904
+ -l N limit; line count for offset reads
905
+ -a all; whole file
906
+
907
+ If no window is provided, qr uses -h 80.
908
+ If -a is present, it wins over other window flags.
909
+
910
+ Run:
911
+ aib qr --stdin
912
+
913
+ Input:
914
+ qr @scripts/a.txt h=80
915
+ qr @scripts/b.py o=300 l=50
916
+ qr @scripts/c.md t=120
917
+ qr @logs/app.log all
918
+
919
+ Inline:
920
+ aib qr @scripts/a.txt -h 80
921
+ aib qr @scripts/b.py -o 300 -l 50
922
+ aib qr @logs/app.log -a
923
+
924
+ Use stdin for several reads.