@automaton-labs/aib 0.0.2 → 0.0.4

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 (46) hide show
  1. package/dist/bin/cli.js +2 -2
  2. package/dist/commands/config-command.js +1 -3
  3. package/dist/commands/config-output.js +8 -0
  4. package/dist/commands/init-workspace.js +1 -3
  5. package/dist/commands/inspect-tree.js +3 -3
  6. package/dist/commands/reveal-command.js +5 -0
  7. package/dist/commands/sync-command.js +2 -2
  8. package/dist/config/local-config.js +3 -3
  9. package/dist/config/resolve-command-alias.js +1 -1
  10. package/dist/config/tsconfig-discovery.js +1 -0
  11. package/dist/config/workspace-root.js +3 -3
  12. package/dist/config/workspace-state.js +1 -1
  13. package/dist/dsl/aib-dsl.js +1 -1
  14. package/dist/help/bootstrap.md +21 -11
  15. package/dist/help/docs/first-setup.md +277 -0
  16. package/dist/help/docs/inspect.tree.md +8 -6
  17. package/dist/help/docs/patterns.md +12 -3
  18. package/dist/help/dsl/bootstrap.md +21 -11
  19. package/dist/help/dsl/docs/first-setup.md +277 -0
  20. package/dist/help/dsl/docs/inspect.tree.md +8 -6
  21. package/dist/help/dsl/docs/patterns.md +12 -3
  22. package/dist/help/dsl/full.md +21 -11
  23. package/dist/help/dsl/topics/first-setup.md +275 -0
  24. package/dist/help/dsl/topics/inspect.tree.md +8 -6
  25. package/dist/help/dsl/topics/patterns.md +12 -3
  26. package/dist/help/full.md +21 -11
  27. package/dist/help/help-meta.json +11 -7
  28. package/dist/help/index.md +6 -0
  29. package/dist/help/json/bootstrap.md +21 -11
  30. package/dist/help/json/docs/first-setup.md +277 -0
  31. package/dist/help/json/docs/inspect.tree.md +8 -6
  32. package/dist/help/json/docs/patterns.md +12 -3
  33. package/dist/help/json/full.md +21 -11
  34. package/dist/help/json/topics/first-setup.md +275 -0
  35. package/dist/help/json/topics/inspect.tree.md +8 -6
  36. package/dist/help/json/topics/patterns.md +12 -3
  37. package/dist/help/topics/first-setup.md +275 -0
  38. package/dist/help/topics/inspect.tree.md +8 -6
  39. package/dist/help/topics/patterns.md +12 -3
  40. package/dist/runtime/run-command.js +1 -1
  41. package/extension/vscode-refactor-bridge-extension.vsix +0 -0
  42. package/package.json +1 -1
  43. package/runtimes/launcher/win-x64/aib.exe +0 -0
  44. package/scripts/install-windows-launcher.cjs +1 -0
  45. package/scripts/postinstall.cjs +5 -4
  46. package/scripts/provision-runtime.cjs +160 -24
@@ -0,0 +1,277 @@
1
+ # First Setup
2
+
3
+ Use this when the user asks you to set up AIB for a repository.
4
+
5
+ If you have not loaded the current bootstrap, run:
6
+ aib help bootstrap
7
+
8
+ 1. Detect existing setup
9
+
10
+ Run:
11
+
12
+ aib config
13
+
14
+ If AIB reports that no config exists, continue to initialization.
15
+
16
+ If config exists:
17
+ - verify that root is the intended repository root;
18
+ - keep existing settings if they are still valid and useful;
19
+ - only add missing project-specific aliases, rules, or excludes;
20
+ - do not regenerate aib.json.
21
+
22
+ If config resolves from a parent directory, verify that this is intentional.
23
+ Do not continue setup inside a nested worktree or copied project if AIB is using the parent repository config.
24
+
25
+ 2. Initialize if missing
26
+
27
+ From the repository root, run:
28
+
29
+ aib init --session-dir .tmp/aib
30
+
31
+ Use the output to check:
32
+ - root is the intended repository root;
33
+ - config is <root>/aib.json;
34
+ - sessionDir is set;
35
+ - cleanup/deletion/runtime TTLs are shown;
36
+ - not set includes the setup sections that still need decisions.
37
+
38
+ Do not create sessions yet.
39
+
40
+ 3. Configure repository-specific behavior
41
+
42
+ Edit aib.json directly.
43
+
44
+ Keep existing settings if they are still valid and useful.
45
+ Update settings that are stale, noisy, too broad, or no longer match the repository.
46
+
47
+ Use not set as the checklist for the setup sections below.
48
+
49
+ 4. Configure path aliases
50
+
51
+ Run:
52
+
53
+ aib reveal tsaliases
54
+
55
+ Use this to see existing tsconfig paths and baseUrl values.
56
+ They can reveal stable work areas, but they are not a list to copy.
57
+
58
+ Add pathAliases for long paths that are likely to appear repeatedly in AIB requests.
59
+ Prefer aliases for real work areas, package roots, or deep directories.
60
+
61
+ A good alias:
62
+ - saves meaningful path tokens;
63
+ - points to a stable work area;
64
+ - is easy to recognize later.
65
+
66
+ A bad alias:
67
+ - duplicates a short path like "src": "src";
68
+ - points to a rarely used folder;
69
+ - mirrors the directory tree without a workflow reason.
70
+
71
+ Having 20-30 good aliases is fine for a large repo or monorepo.
72
+
73
+ Example:
74
+
75
+ "pathAliases": {
76
+ "wstore": "apps/web/src/shared/store",
77
+ "wapi": "apps/web/src/shared/api",
78
+ "whooks": "apps/web/src/shared/utils/hooks",
79
+ "pmail": "packages/email/src",
80
+ "putils": "packages/utils/src",
81
+ "arules": "docs/agent/rules"
82
+ }
83
+
84
+ 5. Configure import rules
85
+
86
+ Set importRules to the import style this repository should use after move/modulePlan mutations.
87
+
88
+ If the repository has one style, use one broad rule:
89
+
90
+ "importRules": [
91
+ {
92
+ "scope": ".",
93
+ "specifier": "shortest",
94
+ "ending": "auto",
95
+ "builtin": "node",
96
+ "unusedImports": "remove"
97
+ }
98
+ ]
99
+
100
+ Use scoped rules only when areas differ by style, for example packages use aliases but scripts use relative imports:
101
+
102
+ "importRules": [
103
+ {
104
+ "scope": "packages",
105
+ "specifier": "shortest",
106
+ "ending": "auto",
107
+ "builtin": "node",
108
+ "unusedImports": "remove"
109
+ },
110
+ {
111
+ "scope": "scripts",
112
+ "specifier": "relative",
113
+ "ending": "auto",
114
+ "builtin": "node",
115
+ "unusedImports": "remove"
116
+ }
117
+ ]
118
+
119
+ Use the most specific scope that matches the real convention.
120
+ Do not add scoped rules just because directories exist.
121
+
122
+ 6. Configure import normalization
123
+
124
+ Add importNormalize only for cleanup commands the agent is likely to run more than once.
125
+
126
+ Use it when the repo has a clear normalization target:
127
+
128
+ "importNormalize": [
129
+ {
130
+ "scope": "src",
131
+ "to": "shortestAlias",
132
+ "preferAlias": "@/*",
133
+ "exclude": [
134
+ "src/generated",
135
+ "src/**/dist"
136
+ ]
137
+ },
138
+ {
139
+ "scope": "scripts",
140
+ "to": "relative",
141
+ "exclude": [
142
+ "scripts/**/*.cjs",
143
+ "scripts/**/*.mjs"
144
+ ]
145
+ }
146
+ ]
147
+
148
+ Choose scopes from real repo conventions.
149
+ Do not copy importRules into importNormalize automatically.
150
+ Leave it unset if normalization is not a repeated workflow.
151
+
152
+ 7. Configure tree and graph excludes
153
+
154
+ Add excludes for noise the repository is known to contain.
155
+
156
+ Use tree excludes for what the agent should not see while mapping folders.
157
+ Use graph excludes for files that should not affect graph counts, hubs, entrypoints, leaves, edges, or saved graph views.
158
+
159
+ Built-in excludes already skip common noise such as node_modules, .git, dist, build, out, and .tmp.
160
+ Add config excludes for repository-specific noise.
161
+
162
+ 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.
163
+ Exclude them explicitly:
164
+
165
+ "inspect.tree.onlyDirs.exclude": [
166
+ "**/*copy",
167
+ "**/*copy/**"
168
+ ],
169
+ "inspect.tree.files.exclude": [
170
+ "**/* copy.ts",
171
+ "**/*.generated.ts"
172
+ ],
173
+ "inspect.graph.exclude": [
174
+ "**/* copy.ts",
175
+ "**/*.generated.ts",
176
+ "src/generated/**"
177
+ ]
178
+
179
+ Prefer narrow patterns for known noise:
180
+ - generated files;
181
+ - local copy/backup folders;
182
+ - build artifacts not already skipped by defaults;
183
+ - vendored or checked-in output.
184
+
185
+ These are common cases, not mandatory rules.
186
+ If the repository needs one of these areas for reasoning or mutation impact checks, do not exclude it.
187
+
188
+ Do not exclude broad source areas to make output smaller.
189
+ If output is too large, use scope, depth, limit, graph view, or graph toggles first.
190
+
191
+ 8. Configure TypeScript config discovery
192
+
193
+ Check which TypeScript configs AIB will sync and watch:
194
+
195
+ aib reveal tsconfigs +all
196
+
197
+ If output includes nested workspaces, seed projects, snapshots, backups, copied apps, or other non-primary projects, exclude them:
198
+
199
+ "sync.tsconfig.exclude": [
200
+ "dev-seed/**",
201
+ "snapshots/**"
202
+ ]
203
+
204
+ Do not exclude real package/app configs just to reduce output.
205
+
206
+ After editing aib.json, run:
207
+
208
+ aib sync
209
+
210
+ Then check again:
211
+
212
+ aib reveal tsconfigs +all
213
+
214
+ Visible tsconfigs should describe the active project surface.
215
+ Excluded tsconfigs should be things the agent should not use for setup decisions.
216
+
217
+ Use +nec only when you need to compare visible configs with config-excluded configs:
218
+
219
+ aib reveal tsconfigs +nec
220
+
221
+ 9. Sync and verify
222
+
223
+ After all aib.json edits, run:
224
+
225
+ aib sync
226
+
227
+ If sync fails, fix aib.json and rerun sync.
228
+
229
+ Check the final config summary:
230
+
231
+ aib config
232
+
233
+ Run one compact tree batch using important aliases:
234
+
235
+ aib inspect --stdin
236
+
237
+ Input:
238
+ tree @<important-alias> depth=3 +onlyDirs limit=80
239
+ tree @<another-important-alias> depth=3 +onlyDirs limit=80
240
+
241
+ Check final TypeScript config discovery:
242
+
243
+ aib reveal tsconfigs
244
+
245
+ Confirm:
246
+ - aliases resolve;
247
+ - obvious tree noise is hidden;
248
+ - visible tsconfigs match the active project surface;
249
+ - config sections are set intentionally.
250
+
251
+ 10. Note operational constraints
252
+
253
+ Before reporting back, identify any constraints the user should know.
254
+
255
+ Worktrees:
256
+ AIB resolves config from the nearest parent aib.json.
257
+ If the repository uses nested copied projects or worktrees inside the repo root, AIB may resolve the parent config.
258
+ Do not set up AIB inside nested worktrees that should behave as independent repositories.
259
+ Independent worktrees should live outside the main repo root or have their own intended aib.json boundary.
260
+
261
+ TTL:
262
+ Sessions and managed runtime are cleaned up after inactivity according to aib config session.
263
+ Tell the user if you changed these defaults or left them as-is.
264
+
265
+ Watchers:
266
+ AIB watches aib.json and visible tsconfig files after sync.
267
+ If config changes are not reflected, run aib sync.
268
+
269
+ 11. Report to user
270
+
271
+ Report:
272
+ - whether AIB config already existed or was initialized;
273
+ - which aliases were added and why;
274
+ - which importRules/importNormalize settings were added or intentionally left unset;
275
+ - which tree/graph/tsconfig excludes were added;
276
+ - whether sync and verification passed;
277
+ - any worktree, TTL, watcher, or tsconfig discovery constraints the user should know.
@@ -3,23 +3,25 @@
3
3
  Use tree to list a compact directory layout.
4
4
  It is useful before focused inspect when you know the area but not the exact file.
5
5
 
6
- node_modules, .git, dist, build, out, and .tmp are skipped by default.
7
-
8
6
  Controls:
9
- scope, depth, minDepth, limit, include, exclude, onlyDirs
7
+ scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
10
8
 
11
9
  Specific:
12
10
  depth max nesting depth; depth=N
13
11
  minDepth hide shallower paths; minDepth=N
14
12
  onlyDirs show directories only; +onlyDirs
15
- include only matching files/dirs; include=[...]
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
16
17
 
17
18
  Run:
18
19
  aib inspect --stdin
19
20
 
20
21
  Input:
21
- tree src depth=4 +onlyDirs limit=200
22
- tree @svc depth=3 include=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
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
23
25
 
24
26
  First pass in an unfamiliar codebase:
25
27
  tree src depth=5 +onlyDirs limit=200
@@ -154,10 +154,19 @@ shortestAlias rewrite to the shortest valid alias specifier
154
154
  preferAlias:
155
155
  @shared/* prefer one alias pattern when several aliases can resolve the same file
156
156
 
157
- inspect.graph.exclude skips files before graph builds the model.
158
- Use it for generated files, backups, local copies, or other paths that make graph output noisy.
157
+ AIB has four config exclude fields:
158
+ inspect.graph.exclude
159
+ inspect.tree.files.exclude
160
+ inspect.tree.onlyDirs.exclude
161
+ sync.tsconfig.exclude
159
162
 
160
- Excluded files do not affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, or saved graph files.
163
+ For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
164
+
165
+ Use config excludes for generated files, backups, local copies, nested workspaces, seed projects, or other repository-specific noise.
166
+
167
+ Graph excludes affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, and saved graph files.
168
+ Tree excludes affect directory/file discovery output.
169
+ Tsconfig excludes affect which TypeScript configs AIB syncs and watches.
161
170
 
162
171
  Leave feedback while working.
163
172
 
@@ -177,10 +177,19 @@ shortestAlias rewrite to the shortest valid alias specifier
177
177
  preferAlias:
178
178
  @shared/* prefer one alias pattern when several aliases can resolve the same file
179
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.
180
+ AIB has four config exclude fields:
181
+ inspect.graph.exclude
182
+ inspect.tree.files.exclude
183
+ inspect.tree.onlyDirs.exclude
184
+ sync.tsconfig.exclude
185
+
186
+ For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
187
+
188
+ Use config excludes for generated files, backups, local copies, nested workspaces, seed projects, or other repository-specific noise.
189
+
190
+ Graph excludes affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, and saved graph files.
191
+ Tree excludes affect directory/file discovery output.
192
+ Tsconfig excludes affect which TypeScript configs AIB syncs and watches.
184
193
 
185
194
  Leave feedback while working.
186
195
 
@@ -640,24 +649,25 @@ Inspect Tree
640
649
  Use tree to list a compact directory layout.
641
650
  It is useful before focused inspect when you know the area but not the exact file.
642
651
 
643
- node_modules, .git, dist, build, out, and .tmp are skipped by default.
644
-
645
652
  Controls:
646
- scope, depth, minDepth, limit, include, exclude, onlyDirs
653
+ scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
647
654
 
648
655
  Specific:
649
656
  depth max nesting depth; depth=N
650
657
  minDepth hide shallower paths; minDepth=N
651
658
  onlyDirs show directories only; +onlyDirs
652
- exclude skip matching files/dirs
653
- include only matching files/dirs; include=[...]
659
+ only keep only matching files/dirs; only=[...]
660
+ exclude skip matching files/dirs; exclude=[...]
661
+ ned no-default-exclude; show paths hidden by built-in excludes; +ned
662
+ nec no-config-exclude; ignore inspect.tree.*.exclude from aib.json; +nec
654
663
 
655
664
  Run:
656
665
  aib inspect --stdin
657
666
 
658
667
  Input:
659
- tree src depth=4 +onlyDirs limit=200
660
- tree @svc depth=3 include=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
668
+ tree src depth=4 +onlyDirs limit=200 +ned +nec
669
+ tree @svc depth=3 only=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
670
+ tree src depth=3 only=["src/services/**"] limit=80
661
671
 
662
672
  Inspect Duplicates
663
673
 
@@ -0,0 +1,277 @@
1
+ # First Setup
2
+
3
+ Use this when the user asks you to set up AIB for a repository.
4
+
5
+ If you have not loaded the current bootstrap, run:
6
+ aib help bootstrap
7
+
8
+ 1. Detect existing setup
9
+
10
+ Run:
11
+
12
+ aib config
13
+
14
+ If AIB reports that no config exists, continue to initialization.
15
+
16
+ If config exists:
17
+ - verify that root is the intended repository root;
18
+ - keep existing settings if they are still valid and useful;
19
+ - only add missing project-specific aliases, rules, or excludes;
20
+ - do not regenerate aib.json.
21
+
22
+ If config resolves from a parent directory, verify that this is intentional.
23
+ Do not continue setup inside a nested worktree or copied project if AIB is using the parent repository config.
24
+
25
+ 2. Initialize if missing
26
+
27
+ From the repository root, run:
28
+
29
+ aib init --session-dir .tmp/aib
30
+
31
+ Use the output to check:
32
+ - root is the intended repository root;
33
+ - config is <root>/aib.json;
34
+ - sessionDir is set;
35
+ - cleanup/deletion/runtime TTLs are shown;
36
+ - not set includes the setup sections that still need decisions.
37
+
38
+ Do not create sessions yet.
39
+
40
+ 3. Configure repository-specific behavior
41
+
42
+ Edit aib.json directly.
43
+
44
+ Keep existing settings if they are still valid and useful.
45
+ Update settings that are stale, noisy, too broad, or no longer match the repository.
46
+
47
+ Use not set as the checklist for the setup sections below.
48
+
49
+ 4. Configure path aliases
50
+
51
+ Run:
52
+
53
+ aib reveal tsaliases
54
+
55
+ Use this to see existing tsconfig paths and baseUrl values.
56
+ They can reveal stable work areas, but they are not a list to copy.
57
+
58
+ Add pathAliases for long paths that are likely to appear repeatedly in AIB requests.
59
+ Prefer aliases for real work areas, package roots, or deep directories.
60
+
61
+ A good alias:
62
+ - saves meaningful path tokens;
63
+ - points to a stable work area;
64
+ - is easy to recognize later.
65
+
66
+ A bad alias:
67
+ - duplicates a short path like "src": "src";
68
+ - points to a rarely used folder;
69
+ - mirrors the directory tree without a workflow reason.
70
+
71
+ Having 20-30 good aliases is fine for a large repo or monorepo.
72
+
73
+ Example:
74
+
75
+ "pathAliases": {
76
+ "wstore": "apps/web/src/shared/store",
77
+ "wapi": "apps/web/src/shared/api",
78
+ "whooks": "apps/web/src/shared/utils/hooks",
79
+ "pmail": "packages/email/src",
80
+ "putils": "packages/utils/src",
81
+ "arules": "docs/agent/rules"
82
+ }
83
+
84
+ 5. Configure import rules
85
+
86
+ Set importRules to the import style this repository should use after move/modulePlan mutations.
87
+
88
+ If the repository has one style, use one broad rule:
89
+
90
+ "importRules": [
91
+ {
92
+ "scope": ".",
93
+ "specifier": "shortest",
94
+ "ending": "auto",
95
+ "builtin": "node",
96
+ "unusedImports": "remove"
97
+ }
98
+ ]
99
+
100
+ Use scoped rules only when areas differ by style, for example packages use aliases but scripts use relative imports:
101
+
102
+ "importRules": [
103
+ {
104
+ "scope": "packages",
105
+ "specifier": "shortest",
106
+ "ending": "auto",
107
+ "builtin": "node",
108
+ "unusedImports": "remove"
109
+ },
110
+ {
111
+ "scope": "scripts",
112
+ "specifier": "relative",
113
+ "ending": "auto",
114
+ "builtin": "node",
115
+ "unusedImports": "remove"
116
+ }
117
+ ]
118
+
119
+ Use the most specific scope that matches the real convention.
120
+ Do not add scoped rules just because directories exist.
121
+
122
+ 6. Configure import normalization
123
+
124
+ Add importNormalize only for cleanup commands the agent is likely to run more than once.
125
+
126
+ Use it when the repo has a clear normalization target:
127
+
128
+ "importNormalize": [
129
+ {
130
+ "scope": "src",
131
+ "to": "shortestAlias",
132
+ "preferAlias": "@/*",
133
+ "exclude": [
134
+ "src/generated",
135
+ "src/**/dist"
136
+ ]
137
+ },
138
+ {
139
+ "scope": "scripts",
140
+ "to": "relative",
141
+ "exclude": [
142
+ "scripts/**/*.cjs",
143
+ "scripts/**/*.mjs"
144
+ ]
145
+ }
146
+ ]
147
+
148
+ Choose scopes from real repo conventions.
149
+ Do not copy importRules into importNormalize automatically.
150
+ Leave it unset if normalization is not a repeated workflow.
151
+
152
+ 7. Configure tree and graph excludes
153
+
154
+ Add excludes for noise the repository is known to contain.
155
+
156
+ Use tree excludes for what the agent should not see while mapping folders.
157
+ Use graph excludes for files that should not affect graph counts, hubs, entrypoints, leaves, edges, or saved graph views.
158
+
159
+ Built-in excludes already skip common noise such as node_modules, .git, dist, build, out, and .tmp.
160
+ Add config excludes for repository-specific noise.
161
+
162
+ 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.
163
+ Exclude them explicitly:
164
+
165
+ "inspect.tree.onlyDirs.exclude": [
166
+ "**/*copy",
167
+ "**/*copy/**"
168
+ ],
169
+ "inspect.tree.files.exclude": [
170
+ "**/* copy.ts",
171
+ "**/*.generated.ts"
172
+ ],
173
+ "inspect.graph.exclude": [
174
+ "**/* copy.ts",
175
+ "**/*.generated.ts",
176
+ "src/generated/**"
177
+ ]
178
+
179
+ Prefer narrow patterns for known noise:
180
+ - generated files;
181
+ - local copy/backup folders;
182
+ - build artifacts not already skipped by defaults;
183
+ - vendored or checked-in output.
184
+
185
+ These are common cases, not mandatory rules.
186
+ If the repository needs one of these areas for reasoning or mutation impact checks, do not exclude it.
187
+
188
+ Do not exclude broad source areas to make output smaller.
189
+ If output is too large, use scope, depth, limit, graph view, or graph toggles first.
190
+
191
+ 8. Configure TypeScript config discovery
192
+
193
+ Check which TypeScript configs AIB will sync and watch:
194
+
195
+ aib reveal tsconfigs +all
196
+
197
+ If output includes nested workspaces, seed projects, snapshots, backups, copied apps, or other non-primary projects, exclude them:
198
+
199
+ "sync.tsconfig.exclude": [
200
+ "dev-seed/**",
201
+ "snapshots/**"
202
+ ]
203
+
204
+ Do not exclude real package/app configs just to reduce output.
205
+
206
+ After editing aib.json, run:
207
+
208
+ aib sync
209
+
210
+ Then check again:
211
+
212
+ aib reveal tsconfigs +all
213
+
214
+ Visible tsconfigs should describe the active project surface.
215
+ Excluded tsconfigs should be things the agent should not use for setup decisions.
216
+
217
+ Use +nec only when you need to compare visible configs with config-excluded configs:
218
+
219
+ aib reveal tsconfigs +nec
220
+
221
+ 9. Sync and verify
222
+
223
+ After all aib.json edits, run:
224
+
225
+ aib sync
226
+
227
+ If sync fails, fix aib.json and rerun sync.
228
+
229
+ Check the final config summary:
230
+
231
+ aib config
232
+
233
+ Run one compact tree batch using important aliases:
234
+
235
+ aib inspect --stdin
236
+
237
+ Input:
238
+ tree @<important-alias> depth=3 +onlyDirs limit=80
239
+ tree @<another-important-alias> depth=3 +onlyDirs limit=80
240
+
241
+ Check final TypeScript config discovery:
242
+
243
+ aib reveal tsconfigs
244
+
245
+ Confirm:
246
+ - aliases resolve;
247
+ - obvious tree noise is hidden;
248
+ - visible tsconfigs match the active project surface;
249
+ - config sections are set intentionally.
250
+
251
+ 10. Note operational constraints
252
+
253
+ Before reporting back, identify any constraints the user should know.
254
+
255
+ Worktrees:
256
+ AIB resolves config from the nearest parent aib.json.
257
+ If the repository uses nested copied projects or worktrees inside the repo root, AIB may resolve the parent config.
258
+ Do not set up AIB inside nested worktrees that should behave as independent repositories.
259
+ Independent worktrees should live outside the main repo root or have their own intended aib.json boundary.
260
+
261
+ TTL:
262
+ Sessions and managed runtime are cleaned up after inactivity according to aib config session.
263
+ Tell the user if you changed these defaults or left them as-is.
264
+
265
+ Watchers:
266
+ AIB watches aib.json and visible tsconfig files after sync.
267
+ If config changes are not reflected, run aib sync.
268
+
269
+ 11. Report to user
270
+
271
+ Report:
272
+ - whether AIB config already existed or was initialized;
273
+ - which aliases were added and why;
274
+ - which importRules/importNormalize settings were added or intentionally left unset;
275
+ - which tree/graph/tsconfig excludes were added;
276
+ - whether sync and verification passed;
277
+ - any worktree, TTL, watcher, or tsconfig discovery constraints the user should know.
@@ -3,23 +3,25 @@
3
3
  Use tree to list a compact directory layout.
4
4
  It is useful before focused inspect when you know the area but not the exact file.
5
5
 
6
- node_modules, .git, dist, build, out, and .tmp are skipped by default.
7
-
8
6
  Controls:
9
- scope, depth, minDepth, limit, include, exclude, onlyDirs
7
+ scope, depth, minDepth, limit, only, exclude, onlyDirs, ned, nec
10
8
 
11
9
  Specific:
12
10
  depth max nesting depth; depth=N
13
11
  minDepth hide shallower paths; minDepth=N
14
12
  onlyDirs show directories only; +onlyDirs
15
- include only matching files/dirs; include=[...]
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
16
17
 
17
18
  Run:
18
19
  aib inspect --stdin
19
20
 
20
21
  Input:
21
- tree src depth=4 +onlyDirs limit=200
22
- tree @svc depth=3 include=["**/*.ts"] exclude=["**/*.test.ts","**/* copy.ts"]
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
23
25
 
24
26
  First pass in an unfamiliar codebase:
25
27
  tree src depth=5 +onlyDirs limit=200