@automaton-labs/aib 0.0.4 → 0.0.6
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.
- package/dist/bin/cli.js +2 -2
- package/dist/commands/config-command.js +2 -1
- package/dist/commands/config-output.js +10 -8
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/help-command.js +7 -3
- package/dist/commands/inspect-format.js +1 -1
- package/dist/commands/quick-read.js +8 -8
- package/dist/commands/result-view.js +5 -5
- package/dist/commands/session-workspace.js +8 -8
- package/dist/config/workspace-root.js +3 -3
- package/dist/help/bootstrap.md +92 -91
- package/dist/help/docs/config-setup.aliases.md +56 -0
- package/dist/help/docs/config-setup.excludes.md +45 -0
- package/dist/help/docs/config-setup.import-normalize.md +86 -0
- package/dist/help/docs/config-setup.import-rules.md +96 -0
- package/dist/help/docs/config-setup.tsconfigs.md +33 -0
- package/dist/help/docs/first-setup.md +63 -48
- package/dist/help/docs/help-format.md +4 -7
- package/dist/help/docs/help-protocol.md +26 -0
- package/dist/help/docs/inspect.cycles.md +38 -0
- package/dist/help/docs/inspect.md +1 -0
- package/dist/help/docs/modulePlan.md +3 -0
- package/dist/help/docs/move.md +3 -0
- package/dist/help/docs/mutation.md +3 -0
- package/dist/help/docs/patterns.md +7 -118
- package/dist/help/docs/qr.md +6 -2
- package/dist/help/docs/quick-map.md +30 -0
- package/dist/help/docs/reveal.md +30 -0
- package/dist/help/dsl/bootstrap.md +92 -91
- package/dist/help/dsl/docs/config-setup.aliases.md +56 -0
- package/dist/help/dsl/docs/config-setup.excludes.md +45 -0
- package/dist/help/dsl/docs/config-setup.import-normalize.md +86 -0
- package/dist/help/dsl/docs/config-setup.import-rules.md +96 -0
- package/dist/help/dsl/docs/config-setup.tsconfigs.md +33 -0
- package/dist/help/dsl/docs/first-setup.md +63 -48
- package/dist/help/dsl/docs/help-format.md +4 -7
- package/dist/help/dsl/docs/help-protocol.md +26 -0
- package/dist/help/dsl/docs/inspect.cycles.md +38 -0
- package/dist/help/dsl/docs/inspect.md +1 -0
- package/dist/help/dsl/docs/modulePlan.md +3 -0
- package/dist/help/dsl/docs/move.md +3 -0
- package/dist/help/dsl/docs/mutation.md +3 -0
- package/dist/help/dsl/docs/patterns.md +7 -118
- package/dist/help/dsl/docs/qr.md +6 -2
- package/dist/help/dsl/docs/quick-map.md +30 -0
- package/dist/help/dsl/docs/reveal.md +30 -0
- package/dist/help/dsl/full.md +92 -91
- package/dist/help/dsl/topics/config-setup.aliases.md +54 -0
- package/dist/help/dsl/topics/config-setup.excludes.md +43 -0
- package/dist/help/dsl/topics/config-setup.import-normalize.md +84 -0
- package/dist/help/dsl/topics/config-setup.import-rules.md +94 -0
- package/dist/help/dsl/topics/config-setup.tsconfigs.md +31 -0
- package/dist/help/dsl/topics/first-setup.md +63 -48
- package/dist/help/dsl/topics/help-format.md +4 -7
- package/dist/help/dsl/topics/help-protocol.md +24 -0
- package/dist/help/dsl/topics/inspect.cycles.md +36 -0
- package/dist/help/dsl/topics/inspect.md +1 -0
- package/dist/help/dsl/topics/modulePlan.md +3 -0
- package/dist/help/dsl/topics/move.md +3 -0
- package/dist/help/dsl/topics/mutation.md +3 -0
- package/dist/help/dsl/topics/patterns.md +7 -118
- package/dist/help/dsl/topics/qr.md +6 -2
- package/dist/help/dsl/topics/quick-map.md +28 -0
- package/dist/help/dsl/topics/reveal.md +28 -0
- package/dist/help/full.md +92 -91
- package/dist/help/help-meta.json +55 -19
- package/dist/help/index.md +54 -0
- package/dist/help/json/bootstrap.md +92 -91
- package/dist/help/json/docs/config-setup.aliases.md +56 -0
- package/dist/help/json/docs/config-setup.excludes.md +45 -0
- package/dist/help/json/docs/config-setup.import-normalize.md +86 -0
- package/dist/help/json/docs/config-setup.import-rules.md +96 -0
- package/dist/help/json/docs/config-setup.tsconfigs.md +33 -0
- package/dist/help/json/docs/first-setup.md +63 -48
- package/dist/help/json/docs/help-format.md +4 -7
- package/dist/help/json/docs/help-protocol.md +26 -0
- package/dist/help/json/docs/inspect.cycles.md +38 -0
- package/dist/help/json/docs/inspect.md +1 -0
- package/dist/help/json/docs/modulePlan.md +3 -0
- package/dist/help/json/docs/move.md +3 -0
- package/dist/help/json/docs/mutation.md +3 -0
- package/dist/help/json/docs/patterns.md +7 -118
- package/dist/help/json/docs/qr.md +6 -2
- package/dist/help/json/docs/quick-map.md +30 -0
- package/dist/help/json/docs/reveal.md +30 -0
- package/dist/help/json/full.md +92 -91
- package/dist/help/json/topics/config-setup.aliases.md +54 -0
- package/dist/help/json/topics/config-setup.excludes.md +43 -0
- package/dist/help/json/topics/config-setup.import-normalize.md +84 -0
- package/dist/help/json/topics/config-setup.import-rules.md +94 -0
- package/dist/help/json/topics/config-setup.tsconfigs.md +31 -0
- package/dist/help/json/topics/first-setup.md +63 -48
- package/dist/help/json/topics/help-format.md +4 -7
- package/dist/help/json/topics/help-protocol.md +24 -0
- package/dist/help/json/topics/inspect.cycles.md +36 -0
- package/dist/help/json/topics/inspect.md +1 -0
- package/dist/help/json/topics/modulePlan.md +3 -0
- package/dist/help/json/topics/move.md +3 -0
- package/dist/help/json/topics/mutation.md +3 -0
- package/dist/help/json/topics/patterns.md +7 -118
- package/dist/help/json/topics/qr.md +6 -2
- package/dist/help/json/topics/quick-map.md +28 -0
- package/dist/help/json/topics/reveal.md +28 -0
- package/dist/help/topics/config-setup.aliases.md +54 -0
- package/dist/help/topics/config-setup.excludes.md +43 -0
- package/dist/help/topics/config-setup.import-normalize.md +84 -0
- package/dist/help/topics/config-setup.import-rules.md +94 -0
- package/dist/help/topics/config-setup.tsconfigs.md +31 -0
- package/dist/help/topics/first-setup.md +63 -48
- package/dist/help/topics/help-format.md +4 -7
- package/dist/help/topics/help-protocol.md +24 -0
- package/dist/help/topics/inspect.cycles.md +36 -0
- package/dist/help/topics/inspect.md +1 -0
- package/dist/help/topics/modulePlan.md +3 -0
- package/dist/help/topics/move.md +3 -0
- package/dist/help/topics/mutation.md +3 -0
- package/dist/help/topics/patterns.md +7 -118
- package/dist/help/topics/qr.md +6 -2
- package/dist/help/topics/quick-map.md +28 -0
- package/dist/help/topics/reveal.md +28 -0
- package/dist/managed-host/serve-web-autostart.js +1 -1
- package/dist/managed-host/serve-web-host.cjs +193 -79
- package/dist/observability/config.js +1 -1
- package/dist/payloads/read-stdin-json.js +1 -1
- package/dist/runtime/managed-runtime-provisioning.js +1 -1
- package/dist/runtime/run-command.js +1 -1
- package/dist/session/server.js +7 -5
- package/dist/shared/diagnostic-catalog.js +1 -1
- package/dist/shared/errors.js +17 -15
- package/dist/shared/stdin-examples.js +3 -0
- package/dist/tracing/trace.js +5 -3
- package/extension/vscode-refactor-bridge-extension.vsix +0 -0
- package/package.json +1 -1
- package/runtimes/launcher/linux-x64/aib +0 -0
- package/runtimes/launcher/win-x64/aib.exe +0 -0
- package/scripts/provision-runtime.cjs +25 -1
|
@@ -48,7 +48,7 @@ Use not set as the checklist for the setup sections below.
|
|
|
48
48
|
|
|
49
49
|
4. Configure path aliases
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Check TypeScript aliases for hints:
|
|
52
52
|
|
|
53
53
|
aib reveal tsaliases
|
|
54
54
|
|
|
@@ -64,7 +64,7 @@ A good alias:
|
|
|
64
64
|
- is easy to recognize later.
|
|
65
65
|
|
|
66
66
|
A bad alias:
|
|
67
|
-
- duplicates a short path like "src": "src";
|
|
67
|
+
- duplicates a short path like "src": "src", "packages": "packages", "scripts": "scripts";
|
|
68
68
|
- points to a rarely used folder;
|
|
69
69
|
- mirrors the directory tree without a workflow reason.
|
|
70
70
|
|
|
@@ -83,9 +83,52 @@ Example:
|
|
|
83
83
|
|
|
84
84
|
5. Configure import rules
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
importRules control imports created or expanded by move/modulePlan mutation cleanup.
|
|
87
|
+
They do not rewrite the whole project.
|
|
88
|
+
|
|
89
|
+
AIB starts from IDE/TS import preferences.
|
|
90
|
+
For mutation cleanup, matching importRules in aib.json take priority.
|
|
91
|
+
Do not assume IDE/TS defaults match the repo style.
|
|
92
|
+
|
|
93
|
+
Fields:
|
|
94
|
+
scope repo-relative file or directory scope; most specific scope wins
|
|
95
|
+
specifier relative|shortest|project-relative|non-relative
|
|
96
|
+
ending auto|minimal|index|js
|
|
97
|
+
builtin node|bare
|
|
98
|
+
unusedImports remove|preserve
|
|
99
|
+
|
|
100
|
+
Defaults:
|
|
101
|
+
specifier omitted IDE/TS decides
|
|
102
|
+
ending omitted IDE/TS decides
|
|
103
|
+
builtin omitted keep TS/project builtin style
|
|
104
|
+
unusedImports omitted keep unused imports
|
|
105
|
+
|
|
106
|
+
specifier:
|
|
107
|
+
relative best for local relative imports
|
|
108
|
+
shortest best for shortest valid alias/path output
|
|
109
|
+
project-relative best for root-relative project imports
|
|
110
|
+
non-relative best for package or alias imports
|
|
111
|
+
|
|
112
|
+
ending:
|
|
113
|
+
minimal best for extensionless TS imports
|
|
114
|
+
js best for ESM-style TS projects that require .js
|
|
115
|
+
auto leaves the decision to TypeScript
|
|
116
|
+
index best for explicit index import style
|
|
117
|
+
|
|
118
|
+
builtin:
|
|
119
|
+
node path -> node:path; best for explicit Node builtin imports
|
|
120
|
+
bare node:path -> path; best for bare Node builtin imports
|
|
121
|
+
omit field keeps TypeScript/project output; add builtin if agents keep fixing this manually
|
|
122
|
+
|
|
123
|
+
unusedImports:
|
|
124
|
+
remove clean unused imports in mutation-touched files
|
|
125
|
+
preserve keep unused imports
|
|
126
|
+
omit same as preserve
|
|
127
|
+
|
|
128
|
+
Mutation-touched files are files where TS produced edits: source/target files and any reference/update files TS changed.
|
|
129
|
+
Recommended value: remove
|
|
130
|
+
|
|
131
|
+
If the repository has one import style, use one broad rule:
|
|
89
132
|
|
|
90
133
|
"importRules": [
|
|
91
134
|
{
|
|
@@ -119,42 +162,10 @@ Use scoped rules only when areas differ by style, for example packages use alias
|
|
|
119
162
|
Use the most specific scope that matches the real convention.
|
|
120
163
|
Do not add scoped rules just because directories exist.
|
|
121
164
|
|
|
122
|
-
6. Configure
|
|
123
|
-
|
|
124
|
-
Add importNormalize only for cleanup commands the agent is likely to run more than once.
|
|
165
|
+
6. Configure tree and graph excludes
|
|
125
166
|
|
|
126
|
-
|
|
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.
|
|
167
|
+
Tree excludes affect directory and file discovery output.
|
|
168
|
+
Graph excludes affect graph counts, hubs, entrypoints, leaves, edges, imports, importedBy, and saved graph views.
|
|
158
169
|
|
|
159
170
|
Built-in excludes already skip common noise such as node_modules, .git, dist, build, out, and .tmp.
|
|
160
171
|
Add config excludes for repository-specific noise.
|
|
@@ -188,21 +199,25 @@ If the repository needs one of these areas for reasoning or mutation impact chec
|
|
|
188
199
|
Do not exclude broad source areas to make output smaller.
|
|
189
200
|
If output is too large, use scope, depth, limit, graph view, or graph toggles first.
|
|
190
201
|
|
|
191
|
-
|
|
202
|
+
7. Configure TypeScript config discovery
|
|
203
|
+
|
|
204
|
+
AIB syncs and watches visible tsconfigs.
|
|
205
|
+
Keep real app/package configs visible.
|
|
206
|
+
Exclude nested workspaces, seed projects, snapshots, backups, copied apps, or other non-primary projects.
|
|
207
|
+
|
|
208
|
+
Do not exclude real package/app configs just to reduce output.
|
|
192
209
|
|
|
193
210
|
Check which TypeScript configs AIB will sync and watch:
|
|
194
211
|
|
|
195
212
|
aib reveal tsconfigs +all
|
|
196
213
|
|
|
197
|
-
If output includes
|
|
214
|
+
If output includes non-primary projects, exclude them:
|
|
198
215
|
|
|
199
216
|
"sync.tsconfig.exclude": [
|
|
200
217
|
"dev-seed/**",
|
|
201
218
|
"snapshots/**"
|
|
202
219
|
]
|
|
203
220
|
|
|
204
|
-
Do not exclude real package/app configs just to reduce output.
|
|
205
|
-
|
|
206
221
|
After editing aib.json, run:
|
|
207
222
|
|
|
208
223
|
aib sync
|
|
@@ -218,7 +233,7 @@ Use +nec only when you need to compare visible configs with config-excluded conf
|
|
|
218
233
|
|
|
219
234
|
aib reveal tsconfigs +nec
|
|
220
235
|
|
|
221
|
-
|
|
236
|
+
8. Sync and verify
|
|
222
237
|
|
|
223
238
|
After all aib.json edits, run:
|
|
224
239
|
|
|
@@ -248,7 +263,7 @@ Confirm:
|
|
|
248
263
|
- visible tsconfigs match the active project surface;
|
|
249
264
|
- config sections are set intentionally.
|
|
250
265
|
|
|
251
|
-
|
|
266
|
+
9. Note operational constraints
|
|
252
267
|
|
|
253
268
|
Before reporting back, identify any constraints the user should know.
|
|
254
269
|
|
|
@@ -266,12 +281,12 @@ Watchers:
|
|
|
266
281
|
AIB watches aib.json and visible tsconfig files after sync.
|
|
267
282
|
If config changes are not reflected, run aib sync.
|
|
268
283
|
|
|
269
|
-
|
|
284
|
+
10. Report to user
|
|
270
285
|
|
|
271
286
|
Report:
|
|
272
287
|
- whether AIB config already existed or was initialized;
|
|
273
288
|
- which aliases were added and why;
|
|
274
|
-
- which importRules
|
|
289
|
+
- which importRules settings were added or intentionally left unset;
|
|
275
290
|
- which tree/graph/tsconfig excludes were added;
|
|
276
291
|
- whether sync and verification passed;
|
|
277
292
|
- any worktree, TTL, watcher, or tsconfig discovery constraints the user should know.
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
Inline commands below omit the aib prefix.
|
|
4
4
|
Run them as: aib <command>
|
|
5
5
|
|
|
6
|
-
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
7
|
-
Stdin Run lines include the aib prefix to avoid confusion.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@'
|
|
11
|
-
<input>
|
|
12
|
-
'@ | aib <command> --stdin
|
|
6
|
+
Stdin examples show command and input separately to avoid shell-specific syntax.
|
|
7
|
+
Stdin Run lines include the aib prefix to avoid confusion.
|
|
8
|
+
|
|
9
|
+
{{stdin.examples}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Help Protocol
|
|
2
|
+
|
|
3
|
+
After context compaction, always run:
|
|
4
|
+
aib help help-protocol quick-map
|
|
5
|
+
aib config aliases
|
|
6
|
+
|
|
7
|
+
Use focused help when you would otherwise guess how a known AIB capability works.
|
|
8
|
+
|
|
9
|
+
Reread bootstrap when you need to restore the overall AIB workflow faster than piecing it together from focused topics.
|
|
10
|
+
If you just reread bootstrap, do not also read focused topics unless you need details that bootstrap does not cover.
|
|
11
|
+
|
|
12
|
+
Do not reread bootstrap automatically if focused help is enough.
|
|
13
|
+
|
|
14
|
+
If you are about to change import style across files, add or adopt tsconfig aliases, or clean imports repeatedly, read:
|
|
15
|
+
aib help config-setup.import-normalize imports.normalize
|
|
16
|
+
|
|
17
|
+
Refresh focused config help by signal:
|
|
18
|
+
- repeated long paths: aib help config-setup.aliases
|
|
19
|
+
- wrong move/modulePlan imports: aib help config-setup.import-rules
|
|
20
|
+
- noisy tree/graph output: aib help config-setup.excludes
|
|
21
|
+
- too many visible tsconfigs: aib help config-setup.tsconfigs
|
|
22
|
+
|
|
23
|
+
When refreshing multiple areas, request them together instead of one by one.
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
aib help patterns mutation inspect inspect.file inspect.code imports.normalize
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Inspect Cycles
|
|
2
|
+
|
|
3
|
+
Use cycles to find import cycles in a file or directory scope.
|
|
4
|
+
|
|
5
|
+
Cycles reports cyclic components, not every possible path through a dense graph.
|
|
6
|
+
It classifies cycles as runtime, type-only, or mixed.
|
|
7
|
+
|
|
8
|
+
Start broad with summary output.
|
|
9
|
+
Use detail=imports when you need the import edges that explain a cycle.
|
|
10
|
+
Use detail=files when file membership is enough.
|
|
11
|
+
|
|
12
|
+
Controls:
|
|
13
|
+
scope file or directory scope
|
|
14
|
+
files focus cycles that include one or more files
|
|
15
|
+
detail summary|imports|files
|
|
16
|
+
limit max cyclic components shown
|
|
17
|
+
|
|
18
|
+
Run:
|
|
19
|
+
aib inspect cycles <scope>
|
|
20
|
+
|
|
21
|
+
Inline:
|
|
22
|
+
aib inspect cycles src/features --limit 20
|
|
23
|
+
aib inspect cycles src/features --detail imports --limit 20
|
|
24
|
+
aib inspect cycles --files src/features/service.ts --detail imports
|
|
25
|
+
|
|
26
|
+
Stdin:
|
|
27
|
+
aib inspect --stdin
|
|
28
|
+
|
|
29
|
+
Input:
|
|
30
|
+
cycles src/features limit=20
|
|
31
|
+
cycles src/features detail=imports limit=20
|
|
32
|
+
cycles scope=src/features files=[src/features/service.ts] detail=imports
|
|
33
|
+
|
|
34
|
+
If output hides components and shows a view handle, inspect only the hidden part:
|
|
35
|
+
|
|
36
|
+
aib view <handle> --offset 2 --limit 2
|
|
37
|
+
aib view <handle> --index 4 --detail imports
|
|
38
|
+
aib view <handle> --index 5 --detail files
|
|
@@ -23,6 +23,7 @@ incoming references/callers usages
|
|
|
23
23
|
file/module connectivity graph
|
|
24
24
|
compact directory layout tree
|
|
25
25
|
repeated declarations/helpers duplicates
|
|
26
|
+
local import cycles cycles
|
|
26
27
|
|
|
27
28
|
Prefer one batch JSON request for related questions.
|
|
28
29
|
Top-level fields are defaults for every request.
|
|
@@ -12,6 +12,9 @@ Use it when a large file should be refactored into several target files.
|
|
|
12
12
|
|
|
13
13
|
modulePlan orchestrates semantic moves and updates affected references/imports.
|
|
14
14
|
|
|
15
|
+
If imports created by modulePlan do not match the repo style, run:
|
|
16
|
+
aib help config-setup.import-rules
|
|
17
|
+
|
|
15
18
|
Use expectEmpty when your modulePlan intent is to move all declarations out of the source file.
|
|
16
19
|
It does not change the move behavior; it only asks output to report remaining source declarations if any remain.
|
|
17
20
|
Use it only when remaining declarations would mean the split did not match your intent.
|
|
@@ -12,6 +12,9 @@ Move is semantic; it moves supported declarations and updates affected imports/r
|
|
|
12
12
|
Use it for focused extraction into a single target file.
|
|
13
13
|
For large file splitting across several target files, use modulePlan.
|
|
14
14
|
|
|
15
|
+
If imports created by move do not match the repo style, run:
|
|
16
|
+
aib help config-setup.import-rules
|
|
17
|
+
|
|
15
18
|
Move to file:
|
|
16
19
|
move toFile preview --stdin
|
|
17
20
|
move toFile execute --stdin
|
|
@@ -5,6 +5,9 @@ Successful mutations update affected references and imports.
|
|
|
5
5
|
|
|
6
6
|
After a successful mutation, do not manually patch the same imports unless aib reports a follow-up or checks show a real issue.
|
|
7
7
|
|
|
8
|
+
If move/modulePlan imports do not match the repo style, run:
|
|
9
|
+
aib help config-setup.import-rules
|
|
10
|
+
|
|
8
11
|
AIB mutations are designed to reduce manual checking.
|
|
9
12
|
Your job is to express the intent in DSL.
|
|
10
13
|
AIB's job is to convert that intent into code changes.
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Working Patterns
|
|
2
2
|
|
|
3
|
+
To refresh help protocol:
|
|
4
|
+
aib help help-protocol
|
|
5
|
+
|
|
3
6
|
Use aib before broad file reads when the question is about TS/JS structure, references, dependencies, or focused code.
|
|
7
|
+
Use qr for cross-OS quick reads of text files, logs, JSON, scripts, and line windows.
|
|
8
|
+
It is not a replacement for inspect.
|
|
4
9
|
Use normal text search when the question is just text.
|
|
5
10
|
|
|
6
11
|
For a first pass in a new codebase, map directories before reading files:
|
|
@@ -42,117 +47,7 @@ aib execution status last
|
|
|
42
47
|
|
|
43
48
|
This is an escape hatch for recovering the latest mutation status/result.
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
aib config
|
|
48
|
-
|
|
49
|
-
Set pathAliases for repeated request paths.
|
|
50
|
-
Set importRules so move/modulePlan create imports in the project style.
|
|
51
|
-
|
|
52
|
-
This avoids repeating long paths in requests and avoids manual import cleanup after mutations.
|
|
53
|
-
Do this before large move/modulePlan work, not after cleanup becomes repetitive.
|
|
54
|
-
|
|
55
|
-
Example aib.json config:
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
"pathAliases": {
|
|
59
|
-
"svc": "src/services",
|
|
60
|
-
"cli": "packages/cli/src",
|
|
61
|
-
"ext": "packages/extension/src"
|
|
62
|
-
},
|
|
63
|
-
"importRules": [
|
|
64
|
-
{
|
|
65
|
-
"scope": ".",
|
|
66
|
-
"specifier": "shortest",
|
|
67
|
-
"ending": "auto",
|
|
68
|
-
"builtin": "bare",
|
|
69
|
-
"unusedImports": "remove"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"importNormalize": [
|
|
73
|
-
{
|
|
74
|
-
"scope": "src",
|
|
75
|
-
"to": "shortestAlias",
|
|
76
|
-
"exclude": ["src/generated"]
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"inspect.graph.exclude": [
|
|
80
|
-
"**/* copy.ts"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
pathAliases define short request aliases for paths agents repeat in aib commands.
|
|
85
|
-
Use them to reduce input tokens for repeated inspect and mutation work.
|
|
86
|
-
|
|
87
|
-
Aliases are for aib request paths. They do not change TypeScript imports by themselves.
|
|
88
|
-
For import style after mutations, use importRules.
|
|
89
|
-
|
|
90
|
-
importRules control imports created or expanded by move/modulePlan mutation cleanup.
|
|
91
|
-
They do not rewrite the whole project.
|
|
92
|
-
|
|
93
|
-
AIB starts from IDE/TS import preferences.
|
|
94
|
-
For mutation cleanup, matching importRules in aib.json take priority.
|
|
95
|
-
|
|
96
|
-
Do not assume IDE/TS defaults match the repo style.
|
|
97
|
-
Set importRules before large move/modulePlan work so imports do not need manual cleanup.
|
|
98
|
-
|
|
99
|
-
Fields:
|
|
100
|
-
scope repo-relative file or directory scope; most specific scope wins
|
|
101
|
-
specifier relative|shortest|project-relative|non-relative
|
|
102
|
-
ending auto|minimal|index|js
|
|
103
|
-
builtin node|bare
|
|
104
|
-
unusedImports remove|preserve
|
|
105
|
-
|
|
106
|
-
Defaults:
|
|
107
|
-
specifier omitted IDE/TS decides
|
|
108
|
-
ending omitted IDE/TS decides
|
|
109
|
-
builtin omitted keep TS/project builtin style
|
|
110
|
-
unusedImports omitted keep unused imports
|
|
111
|
-
|
|
112
|
-
specifier:
|
|
113
|
-
relative best for local relative imports
|
|
114
|
-
shortest best for shortest valid alias/path output
|
|
115
|
-
project-relative best for root-relative project imports
|
|
116
|
-
non-relative best for package or alias imports
|
|
117
|
-
|
|
118
|
-
ending:
|
|
119
|
-
minimal best for extensionless TS imports
|
|
120
|
-
js best for ESM-style TS projects that require .js
|
|
121
|
-
auto leaves the decision to TypeScript
|
|
122
|
-
index best for explicit index import style
|
|
123
|
-
|
|
124
|
-
builtin:
|
|
125
|
-
node path -> node:path; best for explicit Node builtin imports
|
|
126
|
-
bare node:path -> path; best for bare Node builtin imports
|
|
127
|
-
omit field keeps TypeScript/project output; add builtin if agents keep fixing this manually
|
|
128
|
-
|
|
129
|
-
unusedImports:
|
|
130
|
-
remove clean unused imports in mutation-touched files
|
|
131
|
-
preserve keep unused imports
|
|
132
|
-
omit same as preserve
|
|
133
|
-
|
|
134
|
-
Mutation-touched files are files where TS produced edits: source/target files and any reference/update files TS changed.
|
|
135
|
-
Recommended value: remove
|
|
136
|
-
|
|
137
|
-
importNormalize defines reusable defaults for aib imports normalize.
|
|
138
|
-
Use it when the same normalize request would otherwise be repeated.
|
|
139
|
-
|
|
140
|
-
It affects explicit import normalize commands only.
|
|
141
|
-
It does not run automatically during move/modulePlan; use importRules for mutation-time cleanup.
|
|
142
|
-
|
|
143
|
-
Fields:
|
|
144
|
-
scope repo-relative file or directory scope; most specific scope wins
|
|
145
|
-
to relative|alias|shortestAlias
|
|
146
|
-
preferAlias tsconfig paths pattern used when to=alias
|
|
147
|
-
exclude files, directories, or glob-like patterns to skip
|
|
148
|
-
|
|
149
|
-
to:
|
|
150
|
-
relative rewrite resolved local imports to relative paths
|
|
151
|
-
alias rewrite resolved local imports to a matching tsconfig alias
|
|
152
|
-
shortestAlias rewrite to the shortest valid alias specifier
|
|
153
|
-
|
|
154
|
-
preferAlias:
|
|
155
|
-
@shared/* prefer one alias pattern when several aliases can resolve the same file
|
|
50
|
+
Config excludes can hide files from tree/graph/sync output.
|
|
156
51
|
|
|
157
52
|
AIB has four config exclude fields:
|
|
158
53
|
inspect.graph.exclude
|
|
@@ -162,13 +57,7 @@ sync.tsconfig.exclude
|
|
|
162
57
|
|
|
163
58
|
For all of them, node_modules, .git, dist, build, out, and .tmp are skipped by default.
|
|
164
59
|
|
|
165
|
-
|
|
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.
|
|
170
|
-
|
|
171
|
-
Leave feedback while working.
|
|
60
|
+
Important: leave feedback while working.
|
|
172
61
|
|
|
173
62
|
aib is built for agents. Agent feedback is the main signal for improving output, docs, mutations, and token efficiency.
|
|
174
63
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# Quick Read
|
|
2
2
|
|
|
3
|
-
Use qr
|
|
3
|
+
Use qr for cross-OS quick reads of text files: ts, js, cmd, sh, json, log, txt, ndjson, etc.
|
|
4
|
+
Use it for compact line windows and batching.
|
|
4
5
|
qr supports AIB path aliases.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
It is not a replacement for inspect.
|
|
7
8
|
Use it as a token-efficient way to read text data when semantic inspect is not needed.
|
|
8
9
|
|
|
10
|
+
For focused text reads, prefer qr over cat/Get-Content/type, especially when aliases, line windows, or batching help.
|
|
11
|
+
Use shell reads only when piping into shell tooling or qr is unavailable.
|
|
12
|
+
|
|
9
13
|
Controls:
|
|
10
14
|
-h N head; first N lines
|
|
11
15
|
-t N tail; last N lines
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Quick Map
|
|
2
|
+
|
|
3
|
+
Read:
|
|
4
|
+
qr quick reads: ts, js, cmd, sh, json, log, txt, etc.
|
|
5
|
+
view hidden/truncated output
|
|
6
|
+
|
|
7
|
+
Inspect:
|
|
8
|
+
file
|
|
9
|
+
imports
|
|
10
|
+
exports
|
|
11
|
+
members
|
|
12
|
+
code
|
|
13
|
+
deps
|
|
14
|
+
usages
|
|
15
|
+
graph
|
|
16
|
+
tree
|
|
17
|
+
duplicates
|
|
18
|
+
cycles
|
|
19
|
+
|
|
20
|
+
Mutate:
|
|
21
|
+
rename
|
|
22
|
+
move
|
|
23
|
+
modulePlan
|
|
24
|
+
refactor batch
|
|
25
|
+
imports normalize
|
|
26
|
+
|
|
27
|
+
Other:
|
|
28
|
+
config
|
|
29
|
+
prefs
|
|
30
|
+
reveal tsconfig and tsconfig alias discovery
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Reveal
|
|
2
|
+
|
|
3
|
+
Use reveal to inspect TypeScript config discovery used by AIB.
|
|
4
|
+
|
|
5
|
+
Reveal is for config/setup diagnosis.
|
|
6
|
+
Use it when aliases, sync, imports normalize, or tsconfig excludes depend on which tsconfig files AIB sees.
|
|
7
|
+
|
|
8
|
+
Commands:
|
|
9
|
+
aib reveal tsconfigs
|
|
10
|
+
aib reveal tsaliases
|
|
11
|
+
|
|
12
|
+
tsconfigs shows visible TypeScript configs and config-excluded configs.
|
|
13
|
+
tsaliases shows baseUrl, paths, extends, inherited paths, duplicated inherited paths, and overridden inherited paths.
|
|
14
|
+
|
|
15
|
+
Controls:
|
|
16
|
+
all show all output instead of compact output
|
|
17
|
+
nec no config excludes; ignore sync.tsconfig.exclude
|
|
18
|
+
ned no default excludes
|
|
19
|
+
limit max visible groups/items before + N more
|
|
20
|
+
|
|
21
|
+
Examples:
|
|
22
|
+
aib reveal tsconfigs
|
|
23
|
+
aib reveal tsconfigs +all
|
|
24
|
+
aib reveal tsconfigs +nec limit=20
|
|
25
|
+
aib reveal tsaliases
|
|
26
|
+
aib reveal tsaliases +all
|
|
27
|
+
aib reveal tsaliases +nec
|
|
28
|
+
|
|
29
|
+
Use tsconfigs before tuning sync.tsconfig.exclude.
|
|
30
|
+
Use tsaliases before creating AIB pathAliases or configuring import normalization.
|