@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,23 +0,0 @@
1
- DSL request model:
2
- - directives set defaults for following requests
3
- - each request line can override defaults with key=value
4
- - +flag means true
5
- - -flag means false
6
- - file/imports/exports/members/code/deps accept a path as the first positional argument; examples below use this shape.
7
- - Use @file when several following operations share the same file.
8
- - For one-off file operations, pass the path directly.
9
-
10
- Syntax:
11
- @file <path> default file
12
- @source <path> default sourceFile for mutations
13
- op arg arg key=value request
14
- +flag boolean true
15
- -flag boolean false
16
- >name save reusable artifact when supported
17
- old->new rename pair
18
- Parent.member parent-qualified member
19
- Parent.{a,b} several members under one parent
20
- key=[a,b] list value for repeatable fields
21
- file="path with spaces.ts" quote values with spaces
22
- detail=sum|loc|code aliases for summary|locations|code
23
- from=... alias for fromFile
@@ -1,290 +0,0 @@
1
- Use this when the user asks you to set up AIB for a repository.
2
-
3
- If you have not loaded the current bootstrap, run:
4
- aib help bootstrap
5
-
6
- 1. Detect existing setup
7
-
8
- Run:
9
-
10
- aib config
11
-
12
- If AIB reports that no config exists, continue to initialization.
13
-
14
- If config exists:
15
- - verify that root is the intended repository root;
16
- - keep existing settings if they are still valid and useful;
17
- - only add missing project-specific aliases, rules, or excludes;
18
- - do not regenerate aib.json.
19
-
20
- If config resolves from a parent directory, verify that this is intentional.
21
- Do not continue setup inside a nested worktree or copied project if AIB is using the parent repository config.
22
-
23
- 2. Initialize if missing
24
-
25
- From the repository root, run:
26
-
27
- aib init --session-dir .tmp/aib
28
-
29
- Use the output to check:
30
- - root is the intended repository root;
31
- - config is <root>/aib.json;
32
- - sessionDir is set;
33
- - cleanup/deletion/runtime TTLs are shown;
34
- - not set includes the setup sections that still need decisions.
35
-
36
- Do not create sessions yet.
37
-
38
- 3. Configure repository-specific behavior
39
-
40
- Edit aib.json directly.
41
-
42
- Keep existing settings if they are still valid and useful.
43
- Update settings that are stale, noisy, too broad, or no longer match the repository.
44
-
45
- Use not set as the checklist for the setup sections below.
46
-
47
- 4. Configure path aliases
48
-
49
- Check TypeScript aliases for hints:
50
-
51
- aib reveal tsaliases
52
-
53
- Use this to see existing tsconfig paths and baseUrl values.
54
- They can reveal stable work areas, but they are not a list to copy.
55
-
56
- Add pathAliases for long paths that are likely to appear repeatedly in AIB requests.
57
- Prefer aliases for real work areas, package roots, or deep directories.
58
-
59
- A good alias:
60
- - saves meaningful path tokens;
61
- - points to a stable work area;
62
- - is easy to recognize later.
63
-
64
- A bad alias:
65
- - duplicates a short path like "src": "src", "packages": "packages", "scripts": "scripts";
66
- - points to a rarely used folder;
67
- - mirrors the directory tree without a workflow reason.
68
-
69
- Having 20-30 good aliases is fine for a large repo or monorepo.
70
-
71
- Example:
72
-
73
- "pathAliases": {
74
- "wstore": "apps/web/src/shared/store",
75
- "wapi": "apps/web/src/shared/api",
76
- "whooks": "apps/web/src/shared/utils/hooks",
77
- "pmail": "packages/email/src",
78
- "putils": "packages/utils/src",
79
- "arules": "docs/agent/rules"
80
- }
81
-
82
- 5. Configure import rules
83
-
84
- importRules control imports created or expanded by move/modulePlan mutation cleanup.
85
- They do not rewrite the whole project.
86
-
87
- AIB starts from IDE/TS import preferences.
88
- For mutation cleanup, matching importRules in aib.json take priority.
89
- Do not assume IDE/TS defaults match the repo style.
90
-
91
- Fields:
92
- scope repo-relative file or directory scope; most specific scope wins
93
- specifier relative|shortest|project-relative|non-relative
94
- ending auto|minimal|index|js
95
- builtin node|bare
96
- unusedImports remove|preserve
97
-
98
- Defaults:
99
- specifier omitted IDE/TS decides
100
- ending omitted IDE/TS decides
101
- builtin omitted keep TS/project builtin style
102
- unusedImports omitted keep unused imports
103
-
104
- specifier:
105
- relative best for local relative imports
106
- shortest best for shortest valid alias/path output
107
- project-relative best for root-relative project imports
108
- non-relative best for package or alias imports
109
-
110
- ending:
111
- minimal best for extensionless TS imports
112
- js best for ESM-style TS projects that require .js
113
- auto leaves the decision to TypeScript
114
- index best for explicit index import style
115
-
116
- builtin:
117
- node path -> node:path; best for explicit Node builtin imports
118
- bare node:path -> path; best for bare Node builtin imports
119
- omit field keeps TypeScript/project output; add builtin if agents keep fixing this manually
120
-
121
- unusedImports:
122
- remove clean unused imports in mutation-touched files
123
- preserve keep unused imports
124
- omit same as preserve
125
-
126
- Mutation-touched files are files where TS produced edits: source/target files and any reference/update files TS changed.
127
- Recommended value: remove
128
-
129
- If the repository has one import style, use one broad rule:
130
-
131
- "importRules": [
132
- {
133
- "scope": ".",
134
- "specifier": "shortest",
135
- "ending": "auto",
136
- "builtin": "node",
137
- "unusedImports": "remove"
138
- }
139
- ]
140
-
141
- Use scoped rules only when areas differ by style, for example packages use aliases but scripts use relative imports:
142
-
143
- "importRules": [
144
- {
145
- "scope": "packages",
146
- "specifier": "shortest",
147
- "ending": "auto",
148
- "builtin": "node",
149
- "unusedImports": "remove"
150
- },
151
- {
152
- "scope": "scripts",
153
- "specifier": "relative",
154
- "ending": "auto",
155
- "builtin": "node",
156
- "unusedImports": "remove"
157
- }
158
- ]
159
-
160
- Use the most specific scope that matches the real convention.
161
- Do not add scoped rules just because directories exist.
162
-
163
- 6. Configure tree and graph excludes
164
-
165
- Tree excludes affect directory and file discovery output.
166
- Graph excludes affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, and saved graph views.
167
-
168
- Built-in excludes already skip common noise such as node_modules, .git, dist, build, out, and .tmp.
169
- Add config excludes for repository-specific noise.
170
-
171
- For example, if the user often creates hard-copy directories or backup files before risky edits, those copies can make tree and graph output noisy.
172
- Exclude them explicitly:
173
-
174
- "inspect.tree.onlyDirs.exclude": [
175
- "**/*copy",
176
- "**/*copy/**"
177
- ],
178
- "inspect.tree.files.exclude": [
179
- "**/* copy.ts",
180
- "**/*.generated.ts"
181
- ],
182
- "inspect.graph.exclude": [
183
- "**/* copy.ts",
184
- "**/*.generated.ts",
185
- "src/generated/**"
186
- ]
187
-
188
- Prefer narrow patterns for known noise:
189
- - generated files;
190
- - local copy/backup folders;
191
- - build artifacts not already skipped by defaults;
192
- - vendored or checked-in output.
193
-
194
- These are common cases, not mandatory rules.
195
- If the repository needs one of these areas for reasoning or mutation impact checks, do not exclude it.
196
-
197
- Do not exclude broad source areas to make output smaller.
198
- If output is too large, use scope, depth, limit, graph view, or graph toggles first.
199
-
200
- 7. Configure TypeScript config discovery
201
-
202
- AIB syncs and watches visible tsconfigs.
203
- Keep real app/package configs visible.
204
- Exclude nested workspaces, seed projects, snapshots, backups, copied apps, or other non-primary projects.
205
-
206
- Do not exclude real package/app configs just to reduce output.
207
-
208
- Check which TypeScript configs AIB will sync and watch:
209
-
210
- aib reveal tsconfigs +all
211
-
212
- If output includes non-primary projects, exclude them:
213
-
214
- "sync.tsconfig.exclude": [
215
- "dev-seed/**",
216
- "snapshots/**"
217
- ]
218
-
219
- After editing aib.json, run:
220
-
221
- aib sync
222
-
223
- Then check again:
224
-
225
- aib reveal tsconfigs +all
226
-
227
- Visible tsconfigs should describe the active project surface.
228
- Excluded tsconfigs should be things the agent should not use for setup decisions.
229
-
230
- Use +nec only when you need to compare visible configs with config-excluded configs:
231
-
232
- aib reveal tsconfigs +nec
233
-
234
- 8. Sync and verify
235
-
236
- After all aib.json edits, run:
237
-
238
- aib sync
239
-
240
- If sync fails, fix aib.json and rerun sync.
241
-
242
- Check the final config summary:
243
-
244
- aib config
245
-
246
- Run one compact tree batch using important aliases:
247
-
248
- aib inspect --stdin
249
-
250
- Input:
251
- tree @<important-alias> depth=3 +onlyDirs limit=80
252
- tree @<another-important-alias> depth=3 +onlyDirs limit=80
253
-
254
- Check final TypeScript config discovery:
255
-
256
- aib reveal tsconfigs
257
-
258
- Confirm:
259
- - aliases resolve;
260
- - obvious tree noise is hidden;
261
- - visible tsconfigs match the active project surface;
262
- - config sections are set intentionally.
263
-
264
- 9. Note operational constraints
265
-
266
- Before reporting back, identify any constraints the user should know.
267
-
268
- Worktrees:
269
- AIB resolves config from the nearest parent aib.json.
270
- If the repository uses nested copied projects or worktrees inside the repo root, AIB may resolve the parent config.
271
- Do not set up AIB inside nested worktrees that should behave as independent repositories.
272
- Independent worktrees should live outside the main repo root or have their own intended aib.json boundary.
273
-
274
- TTL:
275
- Sessions and managed runtime are cleaned up after inactivity according to aib config session.
276
- Tell the user if you changed these defaults or left them as-is.
277
-
278
- Watchers:
279
- AIB watches aib.json and visible tsconfig files after sync.
280
- If config changes are not reflected, run aib sync.
281
-
282
- 10. Report to user
283
-
284
- Report:
285
- - whether AIB config already existed or was initialized;
286
- - which aliases were added and why;
287
- - which importRules settings were added or intentionally left unset;
288
- - which tree/graph/tsconfig excludes were added;
289
- - whether sync and verification passed;
290
- - any worktree, TTL, watcher, or tsconfig discovery constraints the user should know.
@@ -1,7 +0,0 @@
1
- Inline commands below omit the aib prefix.
2
- Run them as: aib <command>
3
-
4
- Stdin examples show command and input separately to avoid shell-specific syntax.
5
- Stdin Run lines include the aib prefix to avoid confusion.
6
-
7
- {{stdin.examples}}
@@ -1,24 +0,0 @@
1
- After context compaction, always run:
2
- aib help help-protocol quick-map
3
- aib config aliases
4
-
5
- Use focused help when you would otherwise guess how a known AIB capability works.
6
-
7
- Reread bootstrap when you need to restore the overall AIB workflow faster than piecing it together from focused topics.
8
- If you just reread bootstrap, do not also read focused topics unless you need details that bootstrap does not cover.
9
-
10
- Do not reread bootstrap automatically if focused help is enough.
11
-
12
- If you are about to change import style across files, add or adopt tsconfig aliases, or clean imports repeatedly, read:
13
- aib help config-setup.import-normalize imports.normalize
14
-
15
- Refresh focused config help by signal:
16
- - repeated long paths: aib help config-setup.aliases
17
- - wrong move/modulePlan imports: aib help config-setup.import-rules
18
- - noisy tree/graph output: aib help config-setup.excludes
19
- - too many visible tsconfigs: aib help config-setup.tsconfigs
20
-
21
- When refreshing multiple areas, request them together instead of one by one.
22
-
23
- Example:
24
- aib help patterns mutation inspect inspect.file inspect.code imports.normalize
@@ -1,45 +0,0 @@
1
- Use imports normalize for explicit import-style cleanup.
2
- It rewrites resolved local import/export specifiers inside a chosen file or directory.
3
-
4
- Use importNormalize in aib.json for repeated defaults.
5
-
6
- Good for:
7
- - converting one area to aliases or relative imports
8
- - cleaning import style after manual edits or broad refactors
9
- - applying the same import style to a directory without hand-editing files
10
- - applying new tsconfig aliases after they are added
11
-
12
- Controls:
13
- scope file/dir scope to normalize
14
- to relative|alias|shortestAlias
15
- preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
16
- exclude files, directories, or glob-like patterns to skip
17
- all show all planned edits; avoid on broad directory scopes
18
-
19
- Run:
20
- aib imports normalize preview --stdin
21
-
22
- Input:
23
- {
24
- "scope": "src/services",
25
- "to": "shortestAlias",
26
- "exclude": ["src/services/generated", "**/* copy.ts"]
27
- }
28
-
29
- Rewrite imports found inside src/core.
30
- When an imported file can be expressed through @features/*, prefer that alias.
31
-
32
- Run:
33
- aib imports normalize preview --stdin
34
-
35
- Input:
36
- {
37
- "scope": "src/core",
38
- "to": "alias",
39
- "preferAlias": "@features/*"
40
- }
41
-
42
- With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
43
-
44
- imports normalize preview @svc
45
- imports normalize execute @svc
@@ -1,39 +0,0 @@
1
- Use code to fetch exact declarations or members.
2
- It returns focused code without reading the whole file.
3
-
4
- Good for:
5
- - reading a known function, class, method, or declaration
6
- - fetching several related code blocks in one request
7
- - keeping context focused on code needed for the current task
8
-
9
- Controls:
10
- file, entity, entities, parent, show, ranges
11
-
12
- Specific:
13
- show include source output
14
-
15
- Defaults: +show +ranges
16
- Use -show for names/ranges only.
17
- Use -ranges for source without ranges.
18
-
19
- Prefs:
20
- inspect.code.maxNonEmptyLines
21
-
22
- Run:
23
- aib inspect --stdin
24
-
25
- Input:
26
- {
27
- "file": "src/service.ts",
28
- "op": "code",
29
- "requests": [
30
- {
31
- "entities": [
32
- { "parent": "Service", "entities": ["render", "reset"] },
33
- "normalize"
34
- ],
35
- "show": true,
36
- "save": "service-focus"
37
- }
38
- ]
39
- }
@@ -1,36 +0,0 @@
1
- Use cycles to find import cycles in a file or directory scope.
2
-
3
- Cycles reports cyclic components, not every possible path through a dense graph.
4
- It classifies cycles as runtime, type-only, or mixed.
5
-
6
- Start broad with summary output.
7
- Use detail=imports when you need the import edges that explain a cycle.
8
- Use detail=files when file membership is enough.
9
-
10
- Controls:
11
- scope file or directory scope
12
- files focus cycles that include one or more files
13
- detail summary|imports|files
14
- limit max cyclic components shown
15
-
16
- Run:
17
- aib inspect cycles <scope>
18
-
19
- Inline:
20
- aib inspect cycles src/features --limit 20
21
- aib inspect cycles src/features --detail imports --limit 20
22
- aib inspect cycles --files src/features/service.ts --detail imports
23
-
24
- Stdin:
25
- aib inspect --stdin
26
-
27
- Input:
28
- cycles src/features limit=20
29
- cycles src/features detail=imports limit=20
30
- cycles scope=src/features files=[src/features/service.ts] detail=imports
31
-
32
- If output hides components and shows a view handle, inspect only the hidden part:
33
-
34
- aib view <handle> --offset 2 --limit 2
35
- aib view <handle> --index 4 --detail imports
36
- aib view <handle> --index 5 --detail files
@@ -1,44 +0,0 @@
1
- Use deps to see what one entity depends on inside its file.
2
- It separates type-only dependencies from runtime value dependencies.
3
-
4
- Good for:
5
- - checking what a symbol may need when moved or extracted
6
- - spotting nearby types, constants, or helpers tied to one entity
7
- - deciding whether one symbol is standalone or tied to nearby declarations
8
- - debugging mutation failures caused by local dependency shape
9
-
10
- Controls:
11
- file, entity, entities, parent
12
-
13
- Run:
14
- aib inspect --stdin
15
-
16
- Input:
17
- {
18
- "file": "src/service.ts",
19
- "op": "deps",
20
- "requests": [
21
- { "entity": "createService" },
22
- {
23
- "entities": [
24
- { "parent": "Service", "entities": ["render", "reset"] }
25
- ]
26
- }
27
- ]
28
- }
29
-
30
- inspect deps src/service.ts Service
31
-
32
- Batch several symbols when you are planning a move:
33
- Run:
34
- aib inspect --stdin
35
-
36
- Input:
37
- {
38
- "file": "src/service.ts",
39
- "requests": [
40
- { "op": "deps", "entity": "Service" },
41
- { "op": "deps", "entity": "ServiceOptions" },
42
- { "op": "deps", "entity": "createService" }
43
- ]
44
- }
@@ -1,37 +0,0 @@
1
- Use duplicates to find repeated top-level names and exact declaration copies.
2
- It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.
3
-
4
- Start with summary for broad scopes.
5
- Use locations when you need files/lines.
6
- Use code only for duplicate names you are ready to inspect.
7
-
8
- Controls:
9
- scope, detail, limit, offset, kinds, entities, exclude, pathExclude
10
-
11
- Specific:
12
- entities only these duplicate names/selectors
13
- exclude skip these names/selectors
14
- pathExclude skip files or path/glob-like patterns
15
- kinds selector kinds, e.g. f, t, c, etc.; kinds=[...]
16
-
17
- Summary scan:
18
- Run:
19
- aib inspect --stdin
20
-
21
- Input:
22
- {
23
- "scope": "src",
24
- "detail": "summary",
25
- "limit": 20
26
- }
27
-
28
- Inspect specific duplicate code:
29
- Run:
30
- aib inspect --stdin
31
-
32
- Input:
33
- {
34
- "scope": "src",
35
- "detail": "code",
36
- "entities": ["getBoolean", "WsOptions"]
37
- }
@@ -1,38 +0,0 @@
1
- Use exports to see the public API of one file.
2
- It answers what other files can import from that file.
3
-
4
- Important:
5
- inspect.file marks exported declarations already.
6
-
7
- Do not batch this for a plain implementation file:
8
- file src/service.ts
9
- exports src/service.ts
10
-
11
- Use exports when you need public module surface, barrels, re-exports, export *, or resolveStar.
12
-
13
- Good for:
14
- - checking a module boundary or public surface
15
- - understanding facade/barrel files
16
- - resolving export * when the local file only re-exports from elsewhere
17
- - comparing API shape when public imports matter
18
-
19
- Controls:
20
- file, ranges, resolveStar
21
-
22
- Specific:
23
- resolveStar resolve export * through re-exported modules; +resolveStar
24
-
25
- Run:
26
- aib inspect --stdin
27
-
28
- Input:
29
- {
30
- "op": "exports",
31
- "file": "src/service.ts",
32
- "requests": [
33
- { "ranges": true },
34
- { "file": "src/index.ts", "resolveStar": true }
35
- ]
36
- }
37
-
38
- inspect exports src/service.ts [--ranges] [--resolve-star]
@@ -1,36 +0,0 @@
1
- Use file to map top-level declarations physically present in one file.
2
- Exported declarations are marked in the output.
3
- It shows what lives in the file before you decide whether to read code.
4
-
5
- Good for:
6
- - mapping an unfamiliar file
7
- - listing top-level declarations
8
- - checking whether a file contains real declarations or mostly re-exports
9
-
10
- Do not add limit just in case.
11
- file output is compact and most files have far fewer than 100 top-level declarations.
12
- Use limit only after file output is actually too large.
13
-
14
- Controls:
15
- file, ranges, localOnly
16
-
17
- Specific:
18
- localOnly show local declarations and reexports without resolving facade API; +localOnly
19
-
20
- Defaults: +ranges
21
- Use -ranges to show names without ranges.
22
-
23
- Run:
24
- aib inspect --stdin
25
-
26
- Input:
27
- {
28
- "op": "file",
29
- "file": "src/service.ts",
30
- "requests": [
31
- { "ranges": true },
32
- { "file": "src/index.ts", "localOnly": true }
33
- ]
34
- }
35
-
36
- inspect file src/service.ts [--ranges] [--local-only]