@automaton-labs/aib 0.0.5 → 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.
- package/dist/bin/cli.js +4 -2
- package/dist/commands/apply-module-plan.js +3 -3
- package/dist/commands/background-command.js +2 -0
- package/dist/commands/captured-input.js +1 -2
- package/dist/commands/config-command.js +2 -1
- package/dist/commands/config-output.js +10 -8
- package/dist/commands/control-plane-command.js +1 -0
- package/dist/commands/declaration-command.js +7 -0
- package/dist/commands/declaration-execution-cache.js +1 -0
- package/dist/commands/declaration-format.js +1 -0
- package/dist/commands/declaration-preview-cache.js +2 -0
- package/dist/commands/doctor.js +3 -1
- package/dist/commands/execution-command.js +1 -1
- package/dist/commands/file-command.js +1 -0
- package/dist/commands/file-move-to-dir-execution-cache.js +1 -0
- package/dist/commands/file-move-to-dir-preview-cache.js +2 -0
- package/dist/commands/file-move-to-dir.js +5 -0
- package/dist/commands/file-mutation-runtime.js +1 -0
- package/dist/commands/file-refactor-batch-execution-cache.js +1 -0
- package/dist/commands/file-refactor-batch-preview-cache.js +2 -0
- package/dist/commands/file-refactor-batch.js +5 -0
- package/dist/commands/file-rename-execution-cache.js +1 -0
- package/dist/commands/file-rename-preview-cache.js +2 -0
- package/dist/commands/file-rename.js +5 -0
- package/dist/commands/help-command.js +5 -5
- package/dist/commands/host-command.js +1 -0
- package/dist/commands/inspect-cycles.js +3 -3
- package/dist/commands/inspect-format.js +15 -15
- package/dist/commands/inspect-tree.js +2 -2
- package/dist/commands/inspect.js +12 -12
- package/dist/commands/move-to-file.js +2 -2
- package/dist/commands/ota-command.js +2 -0
- package/dist/commands/quick-read.js +8 -8
- package/dist/commands/refactor-batch.js +4 -4
- package/dist/commands/rename-entities.js +4 -4
- package/dist/commands/result-view.js +6 -5
- package/dist/commands/session-workspace.js +7 -7
- package/dist/commands/worker-command.js +1 -0
- package/dist/config/defaults.js +1 -1
- package/dist/config/env-vars.js +1 -1
- package/dist/config/path-aliases.js +1 -1
- package/dist/config/resolve-command-alias.js +1 -1
- package/dist/config/workspace-root.js +3 -3
- package/dist/content/content-bundle.js +1 -1
- package/dist/dsl/aib-dsl.js +1 -1
- package/dist/dsl/declaration-dsl.js +1 -0
- package/dist/dsl/file-move-to-dir-dsl.js +1 -0
- package/dist/dsl/file-refactor-batch-dsl.js +1 -0
- package/dist/dsl/file-rename-dsl.js +1 -0
- package/dist/help/bootstrap.bash.md +907 -0
- package/dist/help/bootstrap.md +105 -144
- package/dist/help/{json/bootstrap.md → bootstrap.pwsh.md} +216 -397
- package/dist/help/docs/dsl.md +4 -3
- package/dist/help/docs/file.move.md +46 -0
- package/dist/help/docs/file.rename.md +35 -0
- package/dist/help/docs/help-format.md +4 -7
- package/dist/help/docs/inspect.code.md +5 -5
- package/dist/help/docs/inspect.deps.md +7 -7
- package/dist/help/docs/inspect.file.md +2 -1
- package/dist/help/docs/inspect.graph.md +3 -3
- package/dist/help/docs/inspect.md +5 -5
- package/dist/help/docs/mutation.md +23 -13
- package/dist/help/docs/patterns.md +1 -5
- package/dist/help/docs/qr.md +7 -22
- package/dist/help/docs/quick-map.md +1 -0
- package/dist/help/docs/recipe.file-layout.md +15 -0
- package/dist/help/docs/rg.md +22 -0
- package/dist/help/docs/selectors.md +3 -2
- package/dist/help/docs/session.md +1 -1
- package/dist/help/dsl/bootstrap.bash.md +907 -0
- package/dist/help/dsl/bootstrap.md +105 -144
- package/dist/help/{json/full.md → dsl/bootstrap.pwsh.md} +216 -397
- package/dist/help/dsl/docs/dsl.md +4 -3
- package/dist/help/dsl/docs/file.move.md +46 -0
- package/dist/help/dsl/docs/file.rename.md +35 -0
- package/dist/help/dsl/docs/help-format.md +4 -7
- package/dist/help/dsl/docs/inspect.code.md +5 -5
- package/dist/help/dsl/docs/inspect.deps.md +7 -7
- package/dist/help/dsl/docs/inspect.file.md +2 -1
- package/dist/help/dsl/docs/inspect.graph.md +3 -3
- package/dist/help/dsl/docs/inspect.md +5 -5
- package/dist/help/dsl/docs/mutation.md +23 -13
- package/dist/help/dsl/docs/patterns.md +1 -5
- package/dist/help/dsl/docs/qr.md +7 -22
- package/dist/help/dsl/docs/quick-map.md +1 -0
- package/dist/help/dsl/docs/recipe.file-layout.md +15 -0
- package/dist/help/dsl/docs/rg.md +22 -0
- package/dist/help/dsl/docs/selectors.md +3 -2
- package/dist/help/dsl/docs/session.md +1 -1
- package/dist/help/dsl/full.md +105 -144
- package/dist/help/dsl/help-index.md +44 -0
- package/dist/help/dsl/tokens/qr.inline.examples.md +2 -0
- package/dist/help/dsl/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/dsl/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/dsl/topics/dsl.md +4 -3
- package/dist/help/dsl/topics/file.move.md +44 -0
- package/dist/help/dsl/topics/file.rename.md +33 -0
- package/dist/help/dsl/topics/help-format.md +4 -7
- package/dist/help/dsl/topics/inspect.code.md +5 -5
- package/dist/help/dsl/topics/inspect.deps.md +7 -7
- package/dist/help/dsl/topics/inspect.file.md +2 -1
- package/dist/help/dsl/topics/inspect.graph.md +3 -3
- package/dist/help/dsl/topics/inspect.md +5 -5
- package/dist/help/dsl/topics/mutation.md +23 -13
- package/dist/help/dsl/topics/patterns.md +1 -5
- package/dist/help/dsl/topics/qr.md +7 -22
- package/dist/help/dsl/topics/quick-map.md +1 -0
- package/dist/help/dsl/topics/recipe.file-layout.md +13 -0
- package/dist/help/dsl/topics/rg.md +20 -0
- package/dist/help/dsl/topics/selectors.md +3 -2
- package/dist/help/dsl/topics/session.md +1 -1
- package/dist/help/full.md +105 -144
- package/dist/help/help-index.md +44 -0
- package/dist/help/help-meta.json +45 -29
- package/dist/help/index.md +32 -75
- package/dist/help/tokens/qr.inline.examples.md +2 -0
- package/dist/help/tokens/stdin.examples.bash.md +8 -0
- package/dist/help/tokens/stdin.examples.pwsh.md +8 -0
- package/dist/help/tokens/stdin.examples.with-qr.bash.md +12 -0
- package/dist/help/tokens/stdin.examples.with-qr.pwsh.md +12 -0
- package/dist/help/topics/dsl.md +4 -3
- package/dist/help/topics/file.move.md +44 -0
- package/dist/help/topics/file.rename.md +33 -0
- package/dist/help/topics/help-format.md +4 -7
- package/dist/help/topics/inspect.code.md +5 -5
- package/dist/help/topics/inspect.deps.md +7 -7
- package/dist/help/topics/inspect.file.md +2 -1
- package/dist/help/topics/inspect.graph.md +3 -3
- package/dist/help/topics/inspect.md +5 -5
- package/dist/help/topics/mutation.md +23 -13
- package/dist/help/topics/patterns.md +1 -5
- package/dist/help/topics/qr.md +7 -22
- package/dist/help/topics/quick-map.md +1 -0
- package/dist/help/topics/recipe.file-layout.md +13 -0
- package/dist/help/topics/rg.md +20 -0
- package/dist/help/topics/selectors.md +3 -2
- package/dist/help/topics/session.md +1 -1
- package/dist/host/capabilities.js +1 -0
- package/dist/ide-launch/common.cjs +162 -162
- package/dist/managed-host/extension-vsix-resolver.js +1 -1
- package/dist/managed-host/manage-serve-web-host.cjs +141 -141
- package/dist/managed-host/serve-web-autostart.js +1 -1
- package/dist/managed-host/serve-web-host.cjs +1985 -1660
- package/dist/observability/config.js +1 -1
- package/dist/payloads/read-stdin-json.js +1 -1
- package/dist/rg-wrapper/core.js +6 -0
- package/dist/rg-wrapper/options.js +1 -0
- package/dist/rtk-wrapper/core.js +2 -0
- package/dist/runtime/input-source.js +1 -1
- package/dist/runtime/managed-runtime-provisioning.js +1 -1
- package/dist/runtime/run-command.js +1 -1
- package/dist/selectors/parse-entities.js +1 -1
- package/dist/session/daemon-state.js +2 -0
- package/dist/session/server.js +7 -6
- package/dist/shared/errors.js +14 -13
- package/dist/shared/operations.js +1 -1
- package/dist/shared/protocol.js +1 -1
- package/dist/shared/routes.js +1 -1
- package/dist/shared/stdin-examples.js +1 -0
- package/dist/shared/types.js +1 -1
- package/dist/tool-runtime/runtime-tools.js +1 -0
- package/dist/tracing/trace.js +5 -3
- package/dist/workers/control-plane/aib-control-plane-worker.cjs +80 -0
- package/dist/workers/control-plane/client-config.default.json +3 -0
- package/dist/workers/product-storage.js +1 -0
- package/dist/workers/registry.js +1 -0
- package/extension/vscode-refactor-bridge-extension.vsix +0 -0
- package/package.json +6 -4
- package/runtimes/launcher/linux-x64/aib +0 -0
- package/runtimes/launcher/win-x64/aib.exe +0 -0
- package/runtimes/tools/rg/darwin-arm64/rg +0 -0
- package/runtimes/tools/rg/darwin-x64/rg +0 -0
- package/runtimes/tools/rg/linux-arm64/rg +0 -0
- package/runtimes/tools/rg/linux-x64/rg +0 -0
- package/runtimes/tools/rg/manifest.json +36 -0
- package/runtimes/tools/rg/win32-x64/rg.exe +0 -0
- package/runtimes/tools/rtk/darwin-arm64/rtk +0 -0
- package/runtimes/tools/rtk/darwin-x64/rtk +0 -0
- package/runtimes/tools/rtk/linux-arm64/rtk +0 -0
- package/runtimes/tools/rtk/linux-x64/rtk +0 -0
- package/runtimes/tools/rtk/manifest.json +36 -0
- package/runtimes/tools/rtk/win32-x64/rtk.exe +0 -0
- package/scripts/provision-runtime.cjs +25 -1
- package/dist/help/json/docs/basics.md +0 -15
- package/dist/help/json/docs/config-setup.aliases.md +0 -56
- package/dist/help/json/docs/config-setup.excludes.md +0 -45
- package/dist/help/json/docs/config-setup.import-normalize.md +0 -86
- package/dist/help/json/docs/config-setup.import-rules.md +0 -96
- package/dist/help/json/docs/config-setup.tsconfigs.md +0 -33
- package/dist/help/json/docs/dsl.md +0 -25
- package/dist/help/json/docs/first-setup.md +0 -292
- package/dist/help/json/docs/help-format.md +0 -12
- package/dist/help/json/docs/help-protocol.md +0 -26
- package/dist/help/json/docs/imports.normalize.md +0 -47
- package/dist/help/json/docs/inspect.code.md +0 -41
- package/dist/help/json/docs/inspect.cycles.md +0 -38
- package/dist/help/json/docs/inspect.deps.md +0 -46
- package/dist/help/json/docs/inspect.duplicates.md +0 -65
- package/dist/help/json/docs/inspect.exports.md +0 -40
- package/dist/help/json/docs/inspect.file.md +0 -38
- package/dist/help/json/docs/inspect.graph.md +0 -139
- package/dist/help/json/docs/inspect.imports.md +0 -15
- package/dist/help/json/docs/inspect.md +0 -88
- package/dist/help/json/docs/inspect.members.md +0 -32
- package/dist/help/json/docs/inspect.tree.md +0 -32
- package/dist/help/json/docs/inspect.usages.md +0 -61
- package/dist/help/json/docs/modulePlan.md +0 -73
- package/dist/help/json/docs/move.md +0 -56
- package/dist/help/json/docs/mutation.md +0 -65
- package/dist/help/json/docs/patterns.md +0 -76
- package/dist/help/json/docs/prefs.md +0 -40
- package/dist/help/json/docs/qr.md +0 -37
- package/dist/help/json/docs/quick-map.md +0 -30
- package/dist/help/json/docs/refactor.batch.md +0 -72
- package/dist/help/json/docs/rename.md +0 -47
- package/dist/help/json/docs/reveal.md +0 -30
- package/dist/help/json/docs/selectors.md +0 -23
- package/dist/help/json/docs/session.md +0 -77
- package/dist/help/json/docs/view.md +0 -30
- package/dist/help/json/snippets/agents.md +0 -14
- package/dist/help/json/topics/basics.md +0 -13
- package/dist/help/json/topics/config-setup.aliases.md +0 -54
- package/dist/help/json/topics/config-setup.excludes.md +0 -43
- package/dist/help/json/topics/config-setup.import-normalize.md +0 -84
- package/dist/help/json/topics/config-setup.import-rules.md +0 -94
- package/dist/help/json/topics/config-setup.tsconfigs.md +0 -31
- package/dist/help/json/topics/dsl.md +0 -23
- package/dist/help/json/topics/first-setup.md +0 -290
- package/dist/help/json/topics/help-format.md +0 -10
- package/dist/help/json/topics/help-protocol.md +0 -24
- package/dist/help/json/topics/imports.normalize.md +0 -45
- package/dist/help/json/topics/inspect.code.md +0 -39
- package/dist/help/json/topics/inspect.cycles.md +0 -36
- package/dist/help/json/topics/inspect.deps.md +0 -44
- package/dist/help/json/topics/inspect.duplicates.md +0 -37
- package/dist/help/json/topics/inspect.exports.md +0 -38
- package/dist/help/json/topics/inspect.file.md +0 -36
- package/dist/help/json/topics/inspect.graph.md +0 -137
- package/dist/help/json/topics/inspect.imports.md +0 -13
- package/dist/help/json/topics/inspect.md +0 -86
- package/dist/help/json/topics/inspect.members.md +0 -30
- package/dist/help/json/topics/inspect.tree.md +0 -22
- package/dist/help/json/topics/inspect.usages.md +0 -59
- package/dist/help/json/topics/modulePlan.md +0 -60
- package/dist/help/json/topics/move.md +0 -46
- package/dist/help/json/topics/mutation.md +0 -63
- package/dist/help/json/topics/patterns.md +0 -74
- package/dist/help/json/topics/prefs.md +0 -38
- package/dist/help/json/topics/qr.md +0 -35
- package/dist/help/json/topics/quick-map.md +0 -28
- package/dist/help/json/topics/refactor.batch.md +0 -61
- package/dist/help/json/topics/rename.md +0 -42
- package/dist/help/json/topics/reveal.md +0 -28
- package/dist/help/json/topics/selectors.md +0 -21
- package/dist/help/json/topics/session.md +0 -59
- package/dist/help/json/topics/view.md +0 -28
|
@@ -1,292 +0,0 @@
|
|
|
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
|
-
Check TypeScript aliases for hints:
|
|
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", "packages": "packages", "scripts": "scripts";
|
|
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
|
-
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:
|
|
132
|
-
|
|
133
|
-
"importRules": [
|
|
134
|
-
{
|
|
135
|
-
"scope": ".",
|
|
136
|
-
"specifier": "shortest",
|
|
137
|
-
"ending": "auto",
|
|
138
|
-
"builtin": "node",
|
|
139
|
-
"unusedImports": "remove"
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
|
|
143
|
-
Use scoped rules only when areas differ by style, for example packages use aliases but scripts use relative imports:
|
|
144
|
-
|
|
145
|
-
"importRules": [
|
|
146
|
-
{
|
|
147
|
-
"scope": "packages",
|
|
148
|
-
"specifier": "shortest",
|
|
149
|
-
"ending": "auto",
|
|
150
|
-
"builtin": "node",
|
|
151
|
-
"unusedImports": "remove"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"scope": "scripts",
|
|
155
|
-
"specifier": "relative",
|
|
156
|
-
"ending": "auto",
|
|
157
|
-
"builtin": "node",
|
|
158
|
-
"unusedImports": "remove"
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
|
|
162
|
-
Use the most specific scope that matches the real convention.
|
|
163
|
-
Do not add scoped rules just because directories exist.
|
|
164
|
-
|
|
165
|
-
6. Configure tree and graph excludes
|
|
166
|
-
|
|
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.
|
|
169
|
-
|
|
170
|
-
Built-in excludes already skip common noise such as node_modules, .git, dist, build, out, and .tmp.
|
|
171
|
-
Add config excludes for repository-specific noise.
|
|
172
|
-
|
|
173
|
-
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.
|
|
174
|
-
Exclude them explicitly:
|
|
175
|
-
|
|
176
|
-
"inspect.tree.onlyDirs.exclude": [
|
|
177
|
-
"**/*copy",
|
|
178
|
-
"**/*copy/**"
|
|
179
|
-
],
|
|
180
|
-
"inspect.tree.files.exclude": [
|
|
181
|
-
"**/* copy.ts",
|
|
182
|
-
"**/*.generated.ts"
|
|
183
|
-
],
|
|
184
|
-
"inspect.graph.exclude": [
|
|
185
|
-
"**/* copy.ts",
|
|
186
|
-
"**/*.generated.ts",
|
|
187
|
-
"src/generated/**"
|
|
188
|
-
]
|
|
189
|
-
|
|
190
|
-
Prefer narrow patterns for known noise:
|
|
191
|
-
- generated files;
|
|
192
|
-
- local copy/backup folders;
|
|
193
|
-
- build artifacts not already skipped by defaults;
|
|
194
|
-
- vendored or checked-in output.
|
|
195
|
-
|
|
196
|
-
These are common cases, not mandatory rules.
|
|
197
|
-
If the repository needs one of these areas for reasoning or mutation impact checks, do not exclude it.
|
|
198
|
-
|
|
199
|
-
Do not exclude broad source areas to make output smaller.
|
|
200
|
-
If output is too large, use scope, depth, limit, graph view, or graph toggles first.
|
|
201
|
-
|
|
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.
|
|
209
|
-
|
|
210
|
-
Check which TypeScript configs AIB will sync and watch:
|
|
211
|
-
|
|
212
|
-
aib reveal tsconfigs +all
|
|
213
|
-
|
|
214
|
-
If output includes non-primary projects, exclude them:
|
|
215
|
-
|
|
216
|
-
"sync.tsconfig.exclude": [
|
|
217
|
-
"dev-seed/**",
|
|
218
|
-
"snapshots/**"
|
|
219
|
-
]
|
|
220
|
-
|
|
221
|
-
After editing aib.json, run:
|
|
222
|
-
|
|
223
|
-
aib sync
|
|
224
|
-
|
|
225
|
-
Then check again:
|
|
226
|
-
|
|
227
|
-
aib reveal tsconfigs +all
|
|
228
|
-
|
|
229
|
-
Visible tsconfigs should describe the active project surface.
|
|
230
|
-
Excluded tsconfigs should be things the agent should not use for setup decisions.
|
|
231
|
-
|
|
232
|
-
Use +nec only when you need to compare visible configs with config-excluded configs:
|
|
233
|
-
|
|
234
|
-
aib reveal tsconfigs +nec
|
|
235
|
-
|
|
236
|
-
8. Sync and verify
|
|
237
|
-
|
|
238
|
-
After all aib.json edits, run:
|
|
239
|
-
|
|
240
|
-
aib sync
|
|
241
|
-
|
|
242
|
-
If sync fails, fix aib.json and rerun sync.
|
|
243
|
-
|
|
244
|
-
Check the final config summary:
|
|
245
|
-
|
|
246
|
-
aib config
|
|
247
|
-
|
|
248
|
-
Run one compact tree batch using important aliases:
|
|
249
|
-
|
|
250
|
-
aib inspect --stdin
|
|
251
|
-
|
|
252
|
-
Input:
|
|
253
|
-
tree @<important-alias> depth=3 +onlyDirs limit=80
|
|
254
|
-
tree @<another-important-alias> depth=3 +onlyDirs limit=80
|
|
255
|
-
|
|
256
|
-
Check final TypeScript config discovery:
|
|
257
|
-
|
|
258
|
-
aib reveal tsconfigs
|
|
259
|
-
|
|
260
|
-
Confirm:
|
|
261
|
-
- aliases resolve;
|
|
262
|
-
- obvious tree noise is hidden;
|
|
263
|
-
- visible tsconfigs match the active project surface;
|
|
264
|
-
- config sections are set intentionally.
|
|
265
|
-
|
|
266
|
-
9. Note operational constraints
|
|
267
|
-
|
|
268
|
-
Before reporting back, identify any constraints the user should know.
|
|
269
|
-
|
|
270
|
-
Worktrees:
|
|
271
|
-
AIB resolves config from the nearest parent aib.json.
|
|
272
|
-
If the repository uses nested copied projects or worktrees inside the repo root, AIB may resolve the parent config.
|
|
273
|
-
Do not set up AIB inside nested worktrees that should behave as independent repositories.
|
|
274
|
-
Independent worktrees should live outside the main repo root or have their own intended aib.json boundary.
|
|
275
|
-
|
|
276
|
-
TTL:
|
|
277
|
-
Sessions and managed runtime are cleaned up after inactivity according to aib config session.
|
|
278
|
-
Tell the user if you changed these defaults or left them as-is.
|
|
279
|
-
|
|
280
|
-
Watchers:
|
|
281
|
-
AIB watches aib.json and visible tsconfig files after sync.
|
|
282
|
-
If config changes are not reflected, run aib sync.
|
|
283
|
-
|
|
284
|
-
10. Report to user
|
|
285
|
-
|
|
286
|
-
Report:
|
|
287
|
-
- whether AIB config already existed or was initialized;
|
|
288
|
-
- which aliases were added and why;
|
|
289
|
-
- which importRules settings were added or intentionally left unset;
|
|
290
|
-
- which tree/graph/tsconfig excludes were added;
|
|
291
|
-
- whether sync and verification passed;
|
|
292
|
-
- any worktree, TTL, watcher, or tsconfig discovery constraints the user should know.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Help Format
|
|
2
|
-
|
|
3
|
-
Inline commands below omit the aib prefix.
|
|
4
|
-
Run them as: aib <command>
|
|
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
|
-
PowerShell stdin shape:
|
|
10
|
-
@'
|
|
11
|
-
<input>
|
|
12
|
-
'@ | aib <command> --stdin
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Imports Normalize
|
|
2
|
-
|
|
3
|
-
Use imports normalize for explicit import-style cleanup.
|
|
4
|
-
It rewrites resolved local import/export specifiers inside a chosen file or directory.
|
|
5
|
-
|
|
6
|
-
Use importNormalize in aib.json for repeated defaults.
|
|
7
|
-
|
|
8
|
-
Good for:
|
|
9
|
-
- converting one area to aliases or relative imports
|
|
10
|
-
- cleaning import style after manual edits or broad refactors
|
|
11
|
-
- applying the same import style to a directory without hand-editing files
|
|
12
|
-
- applying new tsconfig aliases after they are added
|
|
13
|
-
|
|
14
|
-
Controls:
|
|
15
|
-
scope file/dir scope to normalize
|
|
16
|
-
to relative|alias|shortestAlias
|
|
17
|
-
preferAlias select one tsconfig paths pattern when several aliases can resolve the same file
|
|
18
|
-
exclude files, directories, or glob-like patterns to skip
|
|
19
|
-
all show all planned edits; avoid on broad directory scopes
|
|
20
|
-
|
|
21
|
-
Run:
|
|
22
|
-
aib imports normalize preview --stdin
|
|
23
|
-
|
|
24
|
-
Input:
|
|
25
|
-
{
|
|
26
|
-
"scope": "src/services",
|
|
27
|
-
"to": "shortestAlias",
|
|
28
|
-
"exclude": ["src/services/generated", "**/* copy.ts"]
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
Rewrite imports found inside src/core.
|
|
32
|
-
When an imported file can be expressed through @features/*, prefer that alias.
|
|
33
|
-
|
|
34
|
-
Run:
|
|
35
|
-
aib imports normalize preview --stdin
|
|
36
|
-
|
|
37
|
-
Input:
|
|
38
|
-
{
|
|
39
|
-
"scope": "src/core",
|
|
40
|
-
"to": "alias",
|
|
41
|
-
"preferAlias": "@features/*"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
With matching importNormalize config for this scope or a parent scope, use inline CLI commands:
|
|
45
|
-
|
|
46
|
-
imports normalize preview @svc
|
|
47
|
-
imports normalize execute @svc
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Inspect Code
|
|
2
|
-
|
|
3
|
-
Use code to fetch exact declarations or members.
|
|
4
|
-
It returns focused code without reading the whole file.
|
|
5
|
-
|
|
6
|
-
Good for:
|
|
7
|
-
- reading a known function, class, method, or declaration
|
|
8
|
-
- fetching several related code blocks in one request
|
|
9
|
-
- keeping context focused on code needed for the current task
|
|
10
|
-
|
|
11
|
-
Controls:
|
|
12
|
-
file, entity, entities, parent, show, ranges
|
|
13
|
-
|
|
14
|
-
Specific:
|
|
15
|
-
show include source output
|
|
16
|
-
|
|
17
|
-
Defaults: +show +ranges
|
|
18
|
-
Use -show for names/ranges only.
|
|
19
|
-
Use -ranges for source without ranges.
|
|
20
|
-
|
|
21
|
-
Prefs:
|
|
22
|
-
inspect.code.maxNonEmptyLines
|
|
23
|
-
|
|
24
|
-
Run:
|
|
25
|
-
aib inspect --stdin
|
|
26
|
-
|
|
27
|
-
Input:
|
|
28
|
-
{
|
|
29
|
-
"file": "src/service.ts",
|
|
30
|
-
"op": "code",
|
|
31
|
-
"requests": [
|
|
32
|
-
{
|
|
33
|
-
"entities": [
|
|
34
|
-
{ "parent": "Service", "entities": ["render", "reset"] },
|
|
35
|
-
"normalize"
|
|
36
|
-
],
|
|
37
|
-
"show": true,
|
|
38
|
-
"save": "service-focus"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Inspect Deps
|
|
2
|
-
|
|
3
|
-
Use deps to see what one entity depends on inside its file.
|
|
4
|
-
It separates type-only dependencies from runtime value dependencies.
|
|
5
|
-
|
|
6
|
-
Good for:
|
|
7
|
-
- checking what a symbol may need when moved or extracted
|
|
8
|
-
- spotting nearby types, constants, or helpers tied to one entity
|
|
9
|
-
- deciding whether one symbol is standalone or tied to nearby declarations
|
|
10
|
-
- debugging mutation failures caused by local dependency shape
|
|
11
|
-
|
|
12
|
-
Controls:
|
|
13
|
-
file, entity, entities, parent
|
|
14
|
-
|
|
15
|
-
Run:
|
|
16
|
-
aib inspect --stdin
|
|
17
|
-
|
|
18
|
-
Input:
|
|
19
|
-
{
|
|
20
|
-
"file": "src/service.ts",
|
|
21
|
-
"op": "deps",
|
|
22
|
-
"requests": [
|
|
23
|
-
{ "entity": "createService" },
|
|
24
|
-
{
|
|
25
|
-
"entities": [
|
|
26
|
-
{ "parent": "Service", "entities": ["render", "reset"] }
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
inspect deps src/service.ts Service
|
|
33
|
-
|
|
34
|
-
Batch several symbols when you are planning a move:
|
|
35
|
-
Run:
|
|
36
|
-
aib inspect --stdin
|
|
37
|
-
|
|
38
|
-
Input:
|
|
39
|
-
{
|
|
40
|
-
"file": "src/service.ts",
|
|
41
|
-
"requests": [
|
|
42
|
-
{ "op": "deps", "entity": "Service" },
|
|
43
|
-
{ "op": "deps", "entity": "ServiceOptions" },
|
|
44
|
-
{ "op": "deps", "entity": "createService" }
|
|
45
|
-
]
|
|
46
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Inspect Duplicates
|
|
2
|
-
|
|
3
|
-
Use duplicates to find repeated top-level names and exact declaration copies.
|
|
4
|
-
It is useful when many files may contain copied local helpers, duplicated types, or repeated declarations.
|
|
5
|
-
|
|
6
|
-
Start with summary for broad scopes.
|
|
7
|
-
Use locations when you need files/lines.
|
|
8
|
-
Use code only for duplicate names you are ready to inspect.
|
|
9
|
-
|
|
10
|
-
Controls:
|
|
11
|
-
scope, detail, limit, offset, kinds, entities, exclude, pathExclude
|
|
12
|
-
|
|
13
|
-
Specific:
|
|
14
|
-
entities only these duplicate names/selectors
|
|
15
|
-
exclude skip these names/selectors
|
|
16
|
-
pathExclude skip files or path/glob-like patterns
|
|
17
|
-
kinds selector kinds, e.g. f, t, c, etc.; kinds=[...]
|
|
18
|
-
|
|
19
|
-
Summary scan:
|
|
20
|
-
Run:
|
|
21
|
-
aib inspect --stdin
|
|
22
|
-
|
|
23
|
-
Input:
|
|
24
|
-
{
|
|
25
|
-
"scope": "src",
|
|
26
|
-
"detail": "summary",
|
|
27
|
-
"limit": 20
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
Inspect specific duplicate code:
|
|
31
|
-
Run:
|
|
32
|
-
aib inspect --stdin
|
|
33
|
-
|
|
34
|
-
Input:
|
|
35
|
-
{
|
|
36
|
-
"scope": "src",
|
|
37
|
-
"detail": "code",
|
|
38
|
-
"entities": ["getBoolean", "WsOptions"]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
Command shape:
|
|
42
|
-
inspect duplicates <scope> [--detail summary|locations|code] [--limit N] [--offset N]
|
|
43
|
-
|
|
44
|
-
Use JSON when filtering by several names:
|
|
45
|
-
Run:
|
|
46
|
-
aib inspect --stdin
|
|
47
|
-
|
|
48
|
-
Input:
|
|
49
|
-
{
|
|
50
|
-
"scope": ["src/scripts", "tools"],
|
|
51
|
-
"detail": "locations",
|
|
52
|
-
"entities": ["getBoolean", "getNumberValue"],
|
|
53
|
-
"exclude": ["LegacyOptions"]
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
Use saved output when duplicate results are large:
|
|
57
|
-
Run:
|
|
58
|
-
aib inspect --stdin
|
|
59
|
-
|
|
60
|
-
Input:
|
|
61
|
-
{
|
|
62
|
-
"scope": "src",
|
|
63
|
-
"detail": "summary",
|
|
64
|
-
"save": "duplicate-summary"
|
|
65
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Inspect Exports
|
|
2
|
-
|
|
3
|
-
Use exports to see the public API of one file.
|
|
4
|
-
It answers what other files can import from that file.
|
|
5
|
-
|
|
6
|
-
Important:
|
|
7
|
-
inspect.file marks exported declarations already.
|
|
8
|
-
|
|
9
|
-
Do not batch this for a plain implementation file:
|
|
10
|
-
file src/service.ts
|
|
11
|
-
exports src/service.ts
|
|
12
|
-
|
|
13
|
-
Use exports when you need public module surface, barrels, re-exports, export *, or resolveStar.
|
|
14
|
-
|
|
15
|
-
Good for:
|
|
16
|
-
- checking a module boundary or public surface
|
|
17
|
-
- understanding facade/barrel files
|
|
18
|
-
- resolving export * when the local file only re-exports from elsewhere
|
|
19
|
-
- comparing API shape when public imports matter
|
|
20
|
-
|
|
21
|
-
Controls:
|
|
22
|
-
file, ranges, resolveStar
|
|
23
|
-
|
|
24
|
-
Specific:
|
|
25
|
-
resolveStar resolve export * through re-exported modules; +resolveStar
|
|
26
|
-
|
|
27
|
-
Run:
|
|
28
|
-
aib inspect --stdin
|
|
29
|
-
|
|
30
|
-
Input:
|
|
31
|
-
{
|
|
32
|
-
"op": "exports",
|
|
33
|
-
"file": "src/service.ts",
|
|
34
|
-
"requests": [
|
|
35
|
-
{ "ranges": true },
|
|
36
|
-
{ "file": "src/index.ts", "resolveStar": true }
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
inspect exports src/service.ts [--ranges] [--resolve-star]
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Inspect File
|
|
2
|
-
|
|
3
|
-
Use file to map top-level declarations physically present in one file.
|
|
4
|
-
Exported declarations are marked in the output.
|
|
5
|
-
It shows what lives in the file before you decide whether to read code.
|
|
6
|
-
|
|
7
|
-
Good for:
|
|
8
|
-
- mapping an unfamiliar file
|
|
9
|
-
- listing top-level declarations
|
|
10
|
-
- checking whether a file contains real declarations or mostly re-exports
|
|
11
|
-
|
|
12
|
-
Do not add limit just in case.
|
|
13
|
-
file output is compact and most files have far fewer than 100 top-level declarations.
|
|
14
|
-
Use limit only after file output is actually too large.
|
|
15
|
-
|
|
16
|
-
Controls:
|
|
17
|
-
file, ranges, localOnly
|
|
18
|
-
|
|
19
|
-
Specific:
|
|
20
|
-
localOnly show local declarations and reexports without resolving facade API; +localOnly
|
|
21
|
-
|
|
22
|
-
Defaults: +ranges
|
|
23
|
-
Use -ranges to show names without ranges.
|
|
24
|
-
|
|
25
|
-
Run:
|
|
26
|
-
aib inspect --stdin
|
|
27
|
-
|
|
28
|
-
Input:
|
|
29
|
-
{
|
|
30
|
-
"op": "file",
|
|
31
|
-
"file": "src/service.ts",
|
|
32
|
-
"requests": [
|
|
33
|
-
{ "ranges": true },
|
|
34
|
-
{ "file": "src/index.ts", "localOnly": true }
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
inspect file src/service.ts [--ranges] [--local-only]
|