bc-atlas 0.7.0 → 0.10.0

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 (90) hide show
  1. package/.bca.example.json +40 -0
  2. package/CHANGELOG.md +325 -4
  3. package/README.md +110 -43
  4. package/THIRD_PARTY_NOTICES.md +17 -0
  5. package/package.json +13 -7
  6. package/src/al/compiler.js +349 -0
  7. package/src/al/index.js +184 -0
  8. package/src/al/settings.js +166 -0
  9. package/src/al/toolchain.js +234 -0
  10. package/src/analyzer.js +100 -36
  11. package/src/app/page.js +54 -0
  12. package/src/app/service.js +68 -0
  13. package/src/app/snapshot.js +84 -0
  14. package/src/app/ui/app.css +338 -0
  15. package/src/app/ui/app.js +1545 -0
  16. package/src/app/ui/index.html +53 -0
  17. package/src/app/worker.js +32 -0
  18. package/src/app/workspace.js +390 -0
  19. package/src/architecture.js +20 -5
  20. package/src/automation/pipelines.js +14 -2
  21. package/src/automation/run.js +8 -4
  22. package/src/automation/setup.js +22 -7
  23. package/src/{commands/init.js → automation/starter.js} +0 -27
  24. package/src/automation/vscode.js +12 -13
  25. package/src/blueprint/annotate.js +50 -0
  26. package/src/blueprint/baseline.js +54 -0
  27. package/src/blueprint/cluster.js +576 -0
  28. package/src/blueprint/components.js +186 -0
  29. package/src/blueprint/drilldown.js +195 -0
  30. package/src/blueprint/evaluate.js +546 -0
  31. package/src/blueprint/extract.js +321 -0
  32. package/src/blueprint/index.js +114 -0
  33. package/src/blueprint/ownership.js +54 -0
  34. package/src/blueprint/propose.js +467 -0
  35. package/src/blueprint/report.js +283 -0
  36. package/src/blueprint/resolutions.js +151 -0
  37. package/src/blueprint/surface.js +212 -0
  38. package/src/call-analysis.js +36 -3
  39. package/src/capabilities.js +203 -142
  40. package/src/cli/help.js +22 -10
  41. package/src/cli.js +22 -23
  42. package/src/commands/blueprint.js +69 -0
  43. package/src/commands/check.js +28 -5
  44. package/src/commands/explore.js +32 -0
  45. package/src/commands/export.js +171 -0
  46. package/src/commands/refactor.js +55 -0
  47. package/src/commands/report.js +24 -13
  48. package/src/docs/al-ui-source.js +276 -45
  49. package/src/docs/captions.js +2 -2
  50. package/src/docs/cli.js +13 -3
  51. package/src/docs/export.js +52 -14
  52. package/src/docs/model.js +4 -1
  53. package/src/docs/phrases.js +120 -2
  54. package/src/docs/process.js +419 -0
  55. package/src/docs/render/bpmn.js +131 -0
  56. package/src/docs/render/dita.js +3 -2
  57. package/src/docs/render/html.js +26 -12
  58. package/src/docs/render/markdown.js +21 -8
  59. package/src/docs/render/process-svg.js +142 -0
  60. package/src/docs/steps.js +137 -12
  61. package/src/docs/tags.js +2 -1
  62. package/src/docs/task.js +61 -28
  63. package/src/graph/coupling.js +67 -0
  64. package/src/graph/document.js +149 -0
  65. package/src/graph/history.js +286 -0
  66. package/src/graph/html.js +51 -0
  67. package/src/graph/lenses/dependency.js +425 -0
  68. package/src/graph/lenses/index.js +19 -0
  69. package/src/graph/metrics.js +118 -0
  70. package/src/graph/temporal.js +99 -0
  71. package/src/graph/viewer/template.html +76 -0
  72. package/src/graph/viewer/viewer.css +198 -0
  73. package/src/graph/viewer/viewer.js +1470 -0
  74. package/src/health.js +108 -6
  75. package/src/insights.js +1 -1
  76. package/src/mcp.js +111 -3
  77. package/src/output.js +4 -1
  78. package/src/parse-cache.js +98 -0
  79. package/src/refactor/diff.js +72 -0
  80. package/src/refactor/move.js +288 -0
  81. package/src/refactor/surface.js +107 -0
  82. package/src/resolver.js +7 -4
  83. package/src/sarif.js +65 -0
  84. package/src/svg.js +23 -1
  85. package/src/symbols.js +30 -2
  86. package/src/ui/theme.css +143 -0
  87. package/src/update.js +1 -1
  88. package/src/views.js +27 -4
  89. package/src/workflow.js +5 -1
  90. package/src/commands/architecture.js +0 -79
package/.bca.example.json CHANGED
@@ -63,12 +63,52 @@
63
63
  "message": "Core must not depend on UI"
64
64
  }
65
65
  ],
66
+ "architecture": {
67
+ "components": [
68
+ { "name": "Core", "layer": 0, "match": ["namespace:Contoso.Core"], "exposes": ["type:interface,table", "object:codeunit:Core API"] },
69
+ { "name": "Sales", "layer": 1, "match": ["namespace:Contoso.Sales"], "dependsOn": ["Core"], "maxObjects": 400 },
70
+ { "name": "Integration", "layer": 2, "match": ["app:Contoso Integration"], "dependsOn": ["Sales"] }
71
+ ],
72
+ "allowSameLayer": false,
73
+ "strictLayers": false,
74
+ "maxObjects": 1500,
75
+ "couplingWeights": { "reads": 2, "subscribes": 1 },
76
+ "severity": "error",
77
+ "unassigned": "warning",
78
+ "severities": {
79
+ "internal-access": "warning",
80
+ "unstable-dependency": "off"
81
+ },
82
+ "rules": [
83
+ {
84
+ "name": "owner-writes-its-tables",
85
+ "from": "*",
86
+ "to": "type:table",
87
+ "kinds": ["writes"],
88
+ "across": true,
89
+ "severity": "error",
90
+ "message": "Only the component that owns a table writes to it",
91
+ "resolution": "Call a codeunit of the owning component that writes the record."
92
+ },
93
+ {
94
+ "name": "core-has-no-ui",
95
+ "from": "layer:0",
96
+ "to": "type:page,report",
97
+ "except": ["object:page:Core Setup"]
98
+ }
99
+ ]
100
+ },
66
101
  "check": {
67
102
  "failOn": "error",
68
103
  "cycles": "warning",
69
104
  "maxFanIn": 25,
70
105
  "maxFanOut": 25
71
106
  },
107
+ "al": {
108
+ "compiler": "auto",
109
+ "analyzers": ["CodeCop", "UICop"],
110
+ "callGraph": true
111
+ },
72
112
  "report": {
73
113
  "outputDir": "docs/atlas",
74
114
  "views": [
package/CHANGELOG.md CHANGED
@@ -4,7 +4,331 @@ All notable changes to BC Atlas will be documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
5
5
  follows [Semantic Versioning](https://semver.org/).
6
6
 
7
- ## Unreleased
7
+ ## 0.10.0 - 2026-10-29
8
+
9
+ The npm package skips 0.9.0 so it shares its version with the VS Code
10
+ extension, whose previous release was 0.9.0.
11
+
12
+ ### Added
13
+
14
+ - Shared core: objects that many components use but none owns (setup
15
+ tables, master data) form a component of their own instead of gluing the
16
+ others together.
17
+ - App candidates and namespaces: components that are coupled more to each
18
+ other than to the rest could become one app together. Every proposed
19
+ component gets a role (app, component, shared core) and a suggested
20
+ namespace, in the JSON (`proposal.recommendations`), the reports, the
21
+ component's description, and the Architecture page.
22
+ - `id:50100..50199` selects objects by ID range; proposals use it for code
23
+ without namespaces or functional folders.
24
+ - A page per component (click it on the Architecture page): its role, layer,
25
+ the components it may use, suggested namespace, app candidate, and
26
+ selectors; the groups inside it (sub-domains clustered by coupling and
27
+ named after their namespace, folder, or shared words); a graph of its
28
+ objects with one island per group and, on request, its links to other
29
+ components in green (allowed) and red (wrong way); per other component
30
+ whether it may be used and how often it is; every object; and its work
31
+ items. Also in the exported app.
32
+ - Dependencies between components, should vs. is: a map of the components in
33
+ their layers with green arrows for allowed and red arrows for wrong-way
34
+ dependencies, and a matrix that tints every pair by the rules and counts
35
+ today's object links in it.
36
+ - `bca docs` turns more TestPage code into steps: `Field.Value :=`,
37
+ `Filter.SetFilter`, `GoToKey`, the `OK`, `Cancel`, `Yes`, and `No` buttons,
38
+ `First`/`Last`/`Next`/`Previous`, `Lookup`, `Drilldown`, `AssistEdit`,
39
+ `Page.Trap()` ("The ... page opens."), `asserterror` ("Business Central
40
+ shows an error message."), calls over several lines, and the pages and
41
+ confirmations a test answers in `[ModalPageHandler]`, `[PageHandler]`,
42
+ `[RequestPageHandler]`, and `[ConfirmHandler]` procedures ("If the ... page
43
+ opens, ...").
44
+
45
+ ### Changed
46
+
47
+ - The architecture proposal comes from the relations, not from namespaces.
48
+ Relations are typed (structural, data, behavioral, loose, administrative)
49
+ and weighted; inside each app or module, the objects that are coupled more
50
+ to each other than to the rest form a component (the best of several
51
+ Louvain runs, refined object by object, with today's namespaces and
52
+ folders competing as candidates). It works the same for apps without
53
+ namespaces (type folders, ID blocks) and for a mix. `--group-by coupling`
54
+ is now the same as `auto`; `namespace` and `folder` let the structure
55
+ decide and place objects without one by their relations.
56
+ - A page or query and its source table are a relation of their own
57
+ (`source`, weight 4) instead of a read.
58
+ - VS Code and `bca export --view app` keep the parse results of every AL file
59
+ on disk (`BCA_CACHE_DIR`, default `<temp>/bc-atlas/parse`) and across
60
+ changes, so reopening a project or saving a file parses only what changed.
61
+ The Docs page and the explorer reuse them instead of parsing the app again.
62
+ On a 2,931-object app the overview opens in about 8 seconds instead of 15,
63
+ and the Docs page in about 11 instead of 25.
64
+ - The npm package and the VS Code extension are released under one version
65
+ number from now on, starting with 0.10.0; `npm run version:set -- <version>`
66
+ sets both, and the tests and publish workflows refuse a mismatch.
67
+ - Dependencies: zod 4.6.7, web-tree-sitter 0.27.1, and the MCP SDK 2.4.0.
68
+
69
+ ### Fixed
70
+
71
+ - The report no longer writes an absolute path into README.md when a view has
72
+ too many nodes for the bundled SVG renderer: it keeps the view as D2, links
73
+ it relative to the README, removes an SVG left by an earlier run, and the
74
+ MCP report tool marks it `d2Only`.
75
+ - Opening a scenario or use case on the Docs page no longer leaves the page
76
+ blank in VS Code (or loads the whole app into the frame in an exported
77
+ app): the guide is embedded through `srcdoc`, where `#links` resolve
78
+ against the host page, so it now scrolls to the target itself.
79
+ - `bca docs` reads AL tests written the way Microsoft writes the Business
80
+ Central tests: `[SCENARIO 218101]` with a work item number (kept as a
81
+ reference), `[FEATURE] [Sales] [Invoice]` lists (`[UI]` and `[UT]` are left
82
+ out), the codeunit's `[FEATURE]` in its `OnRun` trigger, and `[VERIFY]` as
83
+ an expected result. Such test codeunits used to give no scenarios at all.
84
+ - A documented test ends where its procedure ends: tags and TestPage calls of
85
+ helper procedures after it (and, for the last test, the codeunit's global
86
+ variables) no longer leak into its guide and its fingerprint.
87
+ - Directory runs of `bca docs` leave out `[SCENARIO]` tests without any UI
88
+ step (unless they have a `[DOC-ID]`) and report how many; they used to
89
+ become empty guides.
90
+ - Guides for descriptive scenarios ("Users can post ...") no longer read
91
+ "Use this guide to users can ...", empty values no longer show as `****`,
92
+ the note about example values only appears when the steps show any, and
93
+ test case tables keep the context of loops and dialogs in one row.
94
+
95
+ ## 0.8.0 - 2026-10-29
96
+
97
+ ### Added
98
+
99
+ - Coupling weights: every dependency weighs what it takes to cut it
100
+ (`writes` 5, `extends` 4, `relates`/`implements` 3, calls and reads 2,
101
+ subscribers 1, permission grants 0.1; repeats count logarithmically;
102
+ `architecture.couplingWeights` changes them). The proposal orders
103
+ components, merges small groups, and finds objects that belong elsewhere
104
+ by coupling; PageRank and communities use it too.
105
+ - `--group-by coupling`: components from namespaces that are tightly coupled
106
+ to each other (Louvain communities on the coupling).
107
+ - Every architecture gets a score: cohesion per component, the share of the
108
+ coupling inside components, and modularity, to compare groupings.
109
+ - Dependency explorer: in open space, what drifts together follows the
110
+ color (apps, components, communities, types, build layers), groups are
111
+ spread apart, and tightly coupled objects sit closer together.
112
+ - Dependency explorer: the new default layout **Open space** lets the graph
113
+ float freely in a large space, like the large-graph example of
114
+ 3d-force-graph: small nodes, hairline links, apps or components that only
115
+ drift together, and the camera frames the connected objects once the layout
116
+ has settled. The filters start collapsed (☰ or `F`) so the graph has the
117
+ whole window.
118
+ - Tools to split a monolith into apps (see the new guide
119
+ [Split a monolith into apps](./docs/modularization.md) and the example
120
+ `examples/monolith`):
121
+ - **Data ownership:** for every table that other components use, who
122
+ owns, writes, reads, relates to, and extends it; `bca check` reports
123
+ tables other components write (`foreign-table-write`).
124
+ - **Extraction plans:** `bca architecture --extract <component>` (and the
125
+ MCP tool `bc_atlas_extraction_plan`, and the Architecture page) lists what
126
+ moves, the blockers with their work items (including app cycles), the new
127
+ app's `app.json` with a stable ID, dependencies, and `idRanges`, the tables
128
+ whose data moves with `ObsoleteState = PendingMove`/`MovedTo`/`MovedFrom`,
129
+ and the steps in order.
130
+ - **Public surface:** per component, the objects other components use (its
131
+ de facto API) and the objects that could be `Access = Internal`
132
+ (`could-be-internal`). `bca refactor surface` (and MCP
133
+ `bc_atlas_refactor_surface`) sets `Access = Internal` on them and writes
134
+ the API to `exposes`. `bca architecture --update-surface` records the
135
+ surface in `.bca-surface.json`; `bca check` then reports changes that
136
+ break its users, like AppSourceCop for internal boundaries
137
+ (`public-surface-change`: removed or internal objects, changed procedure
138
+ signatures, removed events, fields, and enum values).
139
+ - **`bca refactor move`:** moves an AL object to another component: its
140
+ file, or the object cut out of a shared file, goes to the component's
141
+ folder, its namespace becomes the component's, and referencing files get
142
+ the `using` they need. Dry run by default; also the MCP tool
143
+ `bc_atlas_refactor_move`. Work items that are moves carry the command.
144
+ - VS Code: the extension and its engine are bundled with esbuild; the
145
+ `.vsix` holds about 50 instead of 1,200 files, and CI tests the packaged
146
+ extension.
147
+ - More architecture rules in `bca check`, `bca architecture`, and the
148
+ Architecture page:
149
+ - **Public objects:** a component may use only public objects of another
150
+ one: `internal-access` for objects with `Access = Internal` (no other app
151
+ can see them) or outside the component's new `exposes` selectors.
152
+ - **Strict layers:** `strictLayers` lets a component use only the layer
153
+ directly below it (`layer-skip-dependency`).
154
+ - **Rules of your own:** `architecture.rules` forbids dependencies by
155
+ selectors, now also `component:` and `layer:`, with relation `kinds`
156
+ (e.g. only `writes`), `except`, `across`, and a message and resolution
157
+ (`dependency-rule`). Its violations are baselined like the others.
158
+ - **Checks of the architecture:** empty components, unused selectors, unused
159
+ or layer-contradicting `dependsOn` entries, declared cycles, components
160
+ above `maxObjects`, and dependencies on less stable components. Checks of
161
+ the configuration point at the component in `.bca.json`.
162
+ - **Severities:** `architecture.severities` sets the severity of each rule
163
+ or turns it off.
164
+ - New strategies `use-public-api`, `go-through-layer`, and `follow-rule`;
165
+ the report counts violations by rule.
166
+ - VS Code: the BC Atlas panel takes its design from the editor's color theme
167
+ (background, text, borders, accent, selection, status colors, and fonts),
168
+ for any theme including high contrast; the 3D explorer and the Docs page
169
+ inside the panel follow too. Exported pages keep the BC Atlas design.
170
+ - VS Code: the BC Atlas side bar is the panel's navigation and marks the page
171
+ it shows; the panel no longer repeats the pages in a navigation of its own.
172
+ - Microsoft's AL toolchain replaces BC Atlas's own analysis where it knows
173
+ better. With the AL Language extension or the AL Development Tools
174
+ installed (`al.compiler: auto`, the default), BC Atlas compiles a copy of the
175
+ workspace in dependency order and:
176
+ - resolves calls with the compiler's call graph (`al graph`): overloads,
177
+ variables, interfaces, and built-in methods, which no longer show up as
178
+ unresolved calls;
179
+ - reports compiler errors and warnings and CodeCop, UICop, AppSourceCop, and
180
+ PerTenantExtensionCop findings in `bca check`, with exact ranges and help
181
+ links; compiler syntax errors replace tree-sitter parse errors.
182
+
183
+ Results are cached by file content; nothing is written into the repository.
184
+ `--compiler auto|off|<path>`, `BCA_AL_COMPILER`, and the `al` section of
185
+ `.bca.json` choose the compiler; `--analyzers CodeCop,UICop` picks analyzers.
186
+ - `bca check --compiler-log <file|folder>` imports AL compiler error logs from
187
+ any build (alc `/errorlog`, `al workspace compile --errorlogdirectory`,
188
+ AL-Go, BcContainerHelper) without a compiler on the machine.
189
+ - `bca check --format sarif`: SARIF 2.1.0 with BC Atlas and AL findings for
190
+ GitHub code scanning and Azure DevOps.
191
+ - AL settings like the AL Language extension reads them: `al.packageCachePath`
192
+ (string or list) for symbols, `al.codeAnalyzers` with
193
+ `al.enableCodeAnalysis`, `al.ruleSetPath`, and `al.assemblyProbingPaths`
194
+ from `.vscode/settings.json` and `.code-workspace` files, whose `folders`
195
+ also define the projects. The same symbol package in several caches loads
196
+ once.
197
+ - VS Code: the extension uses the AL Language extension's compiler and the
198
+ editor's `al.*` settings, compiles in the background after each change, and
199
+ analyzes again after **AL: Download Symbols**, a new `.app`, or changed AL
200
+ settings. Settings `bcAtlas.alCompiler` and `bcAtlas.alAnalyzers`. Compiler
201
+ findings in the Problems panel are left to the AL Language extension.
202
+ - Generated GitHub Actions workflows and Azure Pipelines, and the BC Atlas
203
+ GitHub Action (`al-compiler` input), install the AL Development Tools.
204
+ - BC Atlas for VS Code (`vscode/`, `SchulzOli.bc-atlas`): everything BC Atlas
205
+ does, in the editor, with the engine inside. A panel with one look and feel
206
+ for all of it: an overview, health findings, the architecture (layers, work
207
+ items, components; adopt a proposal or accept violations with one click),
208
+ the 3D dependency explorer, diagrams for every view with zoom and pan, a
209
+ searchable object list with one page per object (dependencies, members,
210
+ violations; open the source at its line), and the UI-test documentation.
211
+ Findings in the Problems panel, CodeLens above AL objects, a status bar
212
+ item, a side bar, commands for export, documentation, setup, and tasks,
213
+ and the BC Atlas MCP server for agents in VS Code. The engine analyzes in
214
+ a background process and the panel refreshes when AL files change.
215
+ `bca setup --editor vscode` recommends the extension.
216
+ - `bca export`: one command for every file output. `--view app` (default)
217
+ writes the BC Atlas pages as one offline HTML file to share or publish from CI;
218
+ `report`, `explorer`, `catalog`, and the ten diagram views write what the
219
+ former commands wrote; `--watch` writes again on every change.
220
+ - The Git timeline can step by merged pull request (`--history-by prs`:
221
+ GitHub, Azure DevOps, GitLab, and squash merges, with the number of commits
222
+ each brought) or by release tag (`--history-by releases`, plus unreleased
223
+ commits); `--last n` keeps the most recent steps. The Dependencies page in
224
+ VS Code has the same choice.
225
+ - Explorer: a Spacing slider (50 % to 500 %) gives crowded graphs room:
226
+ longer links, longest between large nodes, stronger repulsion, and more
227
+ distance between clusters and floors.
228
+ - One design system (`src/ui/theme.css`) for the VS Code panel, the explorer, and the
229
+ HTML documentation, with light and dark themes.
230
+
231
+ - `bca architecture`: clean architecture for AL apps. Define components
232
+ (namespace, folder, app, module, type, or object selectors), layers, and
233
+ allowed dependencies in `.bca.json`, or let BC Atlas propose them from
234
+ today's dependencies (`--propose`, weighted feedback arc set and layering).
235
+ Every dependency that points outward, sideways, or undeclared becomes a work
236
+ item with a resolution strategy in AL terms: declare the dependency, move an
237
+ extension, subscriber, permissions, or navigation, move a related field into
238
+ a table extension, move an object, or invert the dependency with an
239
+ interface or event. Reports instability, abstractness, and distance per
240
+ component and which components can become apps of their own; text,
241
+ Markdown with a Mermaid diagram, and JSON.
242
+ - `--write` saves the architecture to `.bca.json`; `--update-baseline`
243
+ accepts today's violations. `bca check` fails on new violations, reports
244
+ fixed ones so the baseline only shrinks, and warns about component cycles.
245
+ - The dependency explorer shows the architecture: a Components level, violating edges
246
+ in red with their resolution, an Architecture panel with the largest work
247
+ items, violations per commit on the timeline, and architecture layers as a
248
+ layout. The MCP server offers `bc_atlas_architecture`.
249
+
250
+ - Dependency explorer (`bca export --view explorer`, and the Dependencies
251
+ page in VS Code): an interactive 3D dependency explorer in one
252
+ self-contained, offline HTML file. Dependencies inside one app are kept apart from
253
+ dependencies across apps, which are checked against `app.json`: `declared`,
254
+ `implicit` (Microsoft apps), `undeclared`, and `unresolved`. Switch between
255
+ an object level and an app level; filter by app, dependency class, object
256
+ type, and relation kind; search, isolate neighborhoods, and inspect the
257
+ evidence behind every edge.
258
+ - `--history` replays Git history as a fourth dimension: one frame per commit
259
+ that changed AL files or `app.json`, with added, changed, and removed
260
+ objects highlighted. Without Git, the timeline replays the build order.
261
+ - `--format json` writes the `bc-atlas.graph` document: a temporal graph with
262
+ presence spans, PageRank, Louvain communities, build layers, and cycles,
263
+ built with graphology. The MCP server offers it as `bc_atlas_explore`.
264
+ - `examples/multi-app`, a three-app workspace, and its explorer example.
265
+ - Nested `app.json` files are modules of the enclosing app, as in BCApps'
266
+ System Application and Base Application. The explorer adds a module level,
267
+ checks module dependencies against the module manifests, and marks
268
+ dependencies between modules of one app as `cross-module`.
269
+ - Platform system objects (`Integer`, `Date`, `Field`, `AllObjWithCaption`,
270
+ `Company`, ...) and `System "..."` permissions count as implicit
271
+ dependencies instead of unresolved ones.
272
+ - `--paths` analyzes and replays only some folders of a large
273
+ repository. Large explorer files embed their graph gzip-compressed and start
274
+ on the module level.
275
+
276
+ - `bca docs generate` draws every scenario as a flow of its clicks in BPMN
277
+ notation ("At a glance"): user tasks, milestones for `[THEN]` between
278
+ `[WHEN]` phases, loop markers for repeated blocks, and wrapping rows for long
279
+ flows.
280
+ - Every use case gets a process diagram with one lane per permission set, the
281
+ scenarios in `[NEXT]`/`[REQUIRES]` order, and an exclusive gateway where
282
+ `[ALTERNATIVE]` paths branch. In HTML, each scenario links to its guide.
283
+ - `--export bpmn`: `use-case-<feature>.bpmn`, a BPMN 2.0 file with diagram
284
+ layout and colors for Camunda Modeler, bpmn.io, and Signavio. Each scenario
285
+ is a collapsed sub-process; double-click it to see its clicks as user tasks.
286
+
287
+ ### Changed
288
+
289
+ - `internal-access` is on by default: a configured architecture can report
290
+ new violations where a component uses an `Access = Internal` object of
291
+ another one. Accept them with `bca architecture --update-baseline`, or set
292
+ `"severities": { "internal-access": "off" }` when components are layers of
293
+ one app that never split.
294
+ - The *Publish VS Code extension* workflow signs in to the Marketplace with
295
+ Microsoft Entra ID (GitHub OIDC, `vsce --azure-credential`) instead of the
296
+ `VSCE_PAT` token, because Azure DevOps retires global personal access
297
+ tokens on December 1, 2026. It needs the secrets `AZURE_CLIENT_ID` and
298
+ `AZURE_TENANT_ID` and checks access to the publisher before publishing.
299
+ - A new BC Atlas icon and logo (an "A" drawn as a dependency graph with an
300
+ orbit), used by the extension, its activity bar, and the panel. The
301
+ extension has a Marketplace listing with screenshots, a banner, and a social
302
+ preview image; sources and the render script are in `vscode/marketing/`.
303
+ - Fewer commands: 8 instead of 15. `bca report`, `bca graph`, `bca watch`,
304
+ `bca inspect`, and `bca codegraph` are now `bca export --view report`,
305
+ `--view <view>`, `--watch`, `--format json`, and `--view catalog`; `-o`
306
+ replaces `--output-dir`. `bca init` is part of `bca setup`, and
307
+ `bca capabilities` is `bca help --format json`. `bca <app-root>` is no
308
+ longer a shortcut; the interactive views are in the VS Code extension. See
309
+ the table in the CLI reference.
310
+ - The journey diagram shows each scenario with its permission set and number
311
+ of steps. `[NEXT]` and `[REQUIRES]` between the same scenarios are one
312
+ arrow in flow direction; `[ALTERNATIVE]` and `[RELATED]` are dashed lines.
313
+
314
+ ### Fixed
315
+
316
+ - The warehouse example declares `using BCA.Example.UI;` for the page its
317
+ permission set grants; the AL compiler reported it as missing.
318
+ - The 3D explorer inside the panel follows a dark theme: it now asks for the
319
+ theme once its graph is unpacked, instead of missing the message sent while
320
+ it was still loading.
321
+ - Namespace-qualified references such as
322
+ `Record Microsoft.Sales.Document."Sales Header"`,
323
+ `TableData Microsoft.Sales.Document."Sales Line" = R`, and
324
+ `Database::Microsoft.Sales.Document."Sales Header"` resolve to their object
325
+ instead of an unresolved object named `Microsoft`.
326
+ - The call view no longer slows down quadratically on large apps: resolving
327
+ calls in the Base Application takes about 2.5 instead of 70 seconds.
328
+
329
+ - Steps on quoted fields and actions, such as
330
+ `SalesOrder."Sell-to Customer No.".SetValue(...)`, are no longer dropped from
331
+ generated documentation.
8
332
 
9
333
  ## 0.7.0 - 2026-10-04
10
334
 
@@ -43,9 +367,6 @@ follows [Semantic Versioning](https://semver.org/).
43
367
  setup.
44
368
  - With a `package.json` that declares `bc-atlas`, generated pipelines and VS
45
369
  Code tasks use that version (`npm ci`, `npx --no-install bca`).
46
-
47
- ### Added
48
-
49
370
  - `bca docs generate` presents scenarios in the structure of an OASIS DITA 1.3
50
371
  task topic (prerequisites, steps, step results, result, related links).
51
372
  The AL tags are unchanged.
package/README.md CHANGED
@@ -5,13 +5,17 @@
5
5
  [![Node.js 22+](https://img.shields.io/badge/Node.js-22%2B-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
6
6
  [![Docs](https://img.shields.io/badge/docs-schulzoli.github.io%2FBC--Atlas-0b62d6)](https://schulzoli.github.io/BC-Atlas/)
7
7
 
8
+ ![BC Atlas: see your architecture, find what stands in its way, and keep it clean, right in VS Code](./vscode/marketing/social-preview.jpg)
9
+
8
10
  **Understand, guard, and document Microsoft Dynamics 365 Business Central AL
9
11
  projects - straight from source.**
10
12
 
11
13
  BC Atlas (`bca`) parses AL with
12
14
  [`tree-sitter-al`](https://github.com/SShadowS/tree-sitter-al), resolves
13
15
  objects, calls, events, data access, and permissions into an architecture
14
- model, and turns it into diagrams, health checks, reports, and documentation.
16
+ model, and shows it in one app: overview, health, a target architecture with
17
+ the work to reach it, a 3D dependency explorer, diagrams, one page per object,
18
+ and documentation from UI tests. The same results are files for Git and CI.
15
19
  Parser and renderer are WebAssembly: Node.js is the only requirement.
16
20
 
17
21
  **Documentation: [schulzoli.github.io/BC-Atlas](https://schulzoli.github.io/BC-Atlas/)**
@@ -19,29 +23,29 @@ Parser and renderer are WebAssembly: Node.js is the only requirement.
19
23
  ```sh
20
24
  npm install --global bc-atlas
21
25
  cd path/to/al-project
22
- bca setup # features, Husky hooks, VS Code tasks, pipeline, schedule (or: bca setup agent)
23
- bca report # docs/atlas/README.md: overview, diagrams, health
24
- bca check # architecture gate for CI
25
- bca update # new version? see what changed and update everything in one step
26
+ bca setup # .bca.json, Husky hooks, VS Code tasks, pipeline, schedule (or: bca setup agent)
27
+ bca check # architecture gate for CI
28
+ bca export --view report # docs/atlas/README.md: overview, diagrams, health
29
+ bca update # new version? see what changed and update everything in one step
26
30
  ```
27
31
 
32
+ In VS Code, install the **BC Atlas** extension and open an AL project:
33
+
34
+ ![BC Atlas in VS Code: an object page in the BC Atlas panel next to its AL source with CodeLens and a Problems entry](./docs/generated/images/vscode.png)
35
+
28
36
  ## Features at a glance
29
37
 
30
38
  | Area | Command | What you get |
31
39
  | --- | --- | --- |
32
- | **Get started** | `bca setup` | Guided setup in the terminal or through your AI agent (Claude Code, Copilot, Cursor): features, Husky or Git hooks, GitHub Actions or Azure Pipelines, cron schedule, and sync. |
33
- | | `bca init` | A starter `.bca.json`: title, excluded test folders, source links for your Git host. |
34
- | | `bca report` | One Markdown page with an at-a-glance table, six architecture diagrams, and the health summary. [Example](./examples/report/README.md) |
35
- | **Visualize** | `bca graph` | D2, SVG, PNG, PDF, or JSON for ten focused views (below). |
36
- | | `bca watch` | The same diagram, rebuilt on every AL change. |
37
- | **Analyze** | `bca check` | Health findings - cycles, forbidden dependencies, hot spots, diagnostics - with a CI exit code. |
38
- | | `bca inspect` | The resolved architecture model as JSON for scripts. |
39
- | **Document** | `bca codegraph` | One linked Markdown page per AL object. |
40
- | | `bca docs` | User guides and test cases from AL UI tests (`[SCENARIO]`, `[GIVEN]`, `[WHEN]`, `[THEN]`) as Markdown, HTML, DITA 1.3, or Azure DevOps CSV, with real captions and translations. [Example](./examples/docs/index.md) |
40
+ | **In VS Code** | BC Atlas extension | Everything below in the editor: a panel with overview, health, architecture, 3D dependencies, diagrams, objects, and docs; findings in the Problems panel; CodeLens above AL objects; the MCP server for agents. [Guide](./docs/vscode.md) |
41
+ | **Get started** | `bca setup` | Guided setup in the terminal or through your AI agent (Claude Code, Copilot, Cursor): a starter `.bca.json`, features, Husky or Git hooks, GitHub Actions or Azure Pipelines, cron schedule, and sync. |
42
+ | **Analyze** | `bca check` | Health findings - cycles, forbidden dependencies, architecture violations, hot spots, diagnostics, and AL compiler and CodeCop/UICop/AppSourceCop findings - with a CI exit code, also as SARIF for code scanning. |
43
+ | | `bca architecture` | Find a target architecture (components, layers), list every dependency that blocks it with how to resolve it, and enforce it with a shrinking baseline. [Guide](./docs/clean-architecture.md) |
44
+ | **Export** | `bca export` | Everything the extension shows, as files: the BC Atlas pages as one offline HTML file to share (default), the Markdown report ([example](./examples/report/README.md)), the 3D explorer, one Markdown page per object, any of ten diagram views as D2, SVG, PNG, PDF, or JSON, with `--watch`. |
45
+ | | `bca docs` | User guides and test cases from AL UI tests (`[SCENARIO]`, `[GIVEN]`, `[WHEN]`, `[THEN]`) as Markdown, HTML, DITA 1.3, or Azure DevOps CSV, with real captions and translations, a flow diagram per scenario, and BPMN 2.0 processes per use case. [Example](./examples/docs/index.md) |
41
46
  | **Integrate** | `bca run` | One entry point for Git hooks, schedules, and pipelines; verifies, stages, or publishes generated files. Also available as a [GitHub Action](./docs/automation-and-ci.md#github-actions). |
42
- | | `bca update` | "BC Atlas 0.8.0 is available": release notes, one-step update, and regenerated hooks, tasks, and pipelines. Dependabot pull requests on request. |
43
- | | `bca capabilities` | A versioned JSON contract of every command for tools and agents. |
44
- | | `bca mcp` | A Model Context Protocol server for AI agents. |
47
+ | | `bca update` | "BC Atlas 0.11.0 is available": release notes, one-step update, and regenerated hooks, tasks, and pipelines. Dependabot pull requests on request. |
48
+ | | `bca mcp` | A Model Context Protocol server for AI agents; `bca help --format json` is the versioned command contract. |
45
49
 
46
50
  Run `bca` for the same overview in your terminal and `bca help <command>` for
47
51
  options and examples.
@@ -50,16 +54,52 @@ options and examples.
50
54
 
51
55
  | View | Answers | Example |
52
56
  | --- | --- | --- |
53
- | `project` | What does the app contain? | `bca graph --view project -o project.svg` |
54
- | `module` | How do namespaces or folders depend on each other? | `bca graph --view module -o modules.svg` |
55
- | `object` | What surrounds one object? | `bca graph --view object --object codeunit:50100 -o object.svg` |
56
- | `data` | Which code reads and writes which tables? | `bca graph --view data -o data.svg` |
57
- | `call` | Which procedures call each other? | `bca graph --view call --root-procedure Post --call-direction both -o calls.svg` |
58
- | `boundary` | What crosses a namespace, folder, app, or object boundary? | `bca graph --view boundary --scope namespace:Contoso.Sales -o boundary.svg` |
59
- | `contracts` | Which types implement an interface? | `bca graph --view contracts -o contracts.svg` |
60
- | `events` | Which subscribers react to which publishers? | `bca graph --view events --focus OnPosted -o events.svg` |
61
- | `ui` | How do pages, actions, and source tables connect? | `bca graph --view ui --focus "Sales Order" -o ui.svg` |
62
- | `workflow` | What happens after an action or entry point? | `bca graph --view workflow --entry action:Release -o flow.svg` |
57
+ | `project` | What does the app contain? | `bca export --view project -o project.svg` |
58
+ | `module` | How do namespaces or folders depend on each other? | `bca export --view module -o modules.svg` |
59
+ | `object` | What surrounds one object? | `bca export --view object --object codeunit:50100 -o object.svg` |
60
+ | `data` | Which code reads and writes which tables? | `bca export --view data -o data.svg` |
61
+ | `call` | Which procedures call each other? | `bca export --view call --root-procedure Post --call-direction both -o calls.svg` |
62
+ | `boundary` | What crosses a namespace, folder, app, or object boundary? | `bca export --view boundary --scope namespace:Contoso.Sales -o boundary.svg` |
63
+ | `contracts` | Which types implement an interface? | `bca export --view contracts -o contracts.svg` |
64
+ | `events` | Which subscribers react to which publishers? | `bca export --view events --focus OnPosted -o events.svg` |
65
+ | `ui` | How do pages, actions, and source tables connect? | `bca export --view ui --focus "Sales Order" -o ui.svg` |
66
+ | `workflow` | What happens after an action or entry point? | `bca export --view workflow --entry action:Release -o flow.svg` |
67
+
68
+ In VS Code, the Diagrams page of the BC Atlas panel renders every view with zoom and pan.
69
+
70
+ ### Clean architecture
71
+
72
+ `bca architecture` finds a target architecture for an app or workspace
73
+ (components in layers, dependencies pointing inward), lists every dependency
74
+ that stands in the way as a work item with a concrete resolution (declare it,
75
+ move an extension or subscriber, move a field into a table extension, invert
76
+ it with an interface), and shows which components can become apps of their
77
+ own. Save it to `.bca.json`, accept today's violations in a baseline, and
78
+ `bca check` keeps the architecture from eroding: new violations fail CI,
79
+ fixed ones shrink the baseline. In VS Code, the Architecture page shows the
80
+ layers and work items and adopts a proposal with one click.
81
+
82
+ ```sh
83
+ bca architecture ./app --propose --format markdown -o architecture.md
84
+ bca architecture ./app --propose --write --update-baseline
85
+ bca check ./app
86
+ ```
87
+
88
+ ### Interactive dependency explorer
89
+
90
+ The Dependencies page in VS Code, also written by `bca export --view explorer` as
91
+ one offline HTML file, shows a 3D graph of every AL object and app. Dependencies inside one app stay gray; dependencies across apps are
92
+ checked against `app.json` and colored as declared, implicit (Microsoft),
93
+ undeclared, or unresolved. Filter by app, class, type, or relation kind,
94
+ switch to the app level, and press play: with `--history` the timeline replays
95
+ how objects and dependencies were added, changed, and removed commit by
96
+ commit.
97
+
98
+ ```sh
99
+ bca export ./workspace --view explorer --history -o dependencies.html
100
+ ```
101
+
102
+ ![Dependency explorer with three apps, an undeclared cross-app dependency, and the commit timeline](./docs/generated/images/explorer-view.png)
63
103
 
64
104
  ### Screenshots
65
105
 
@@ -83,8 +123,14 @@ Generated from the checked-in [warehouse example](./examples/README.md).
83
123
  - permission sets: table-data `RIMD` rights, execute rights, and composed sets
84
124
  across dependent apps;
85
125
  - pages, parts, actions, and navigation;
86
- - `app.json` metadata, `.alpackages` symbols, multi-app workspaces, cycles,
87
- hubs, orphans, and unresolved references.
126
+ - `app.json` metadata, `.alpackages` symbols and `al.packageCachePath`,
127
+ `.code-workspace` multi-root workspaces, cycles, hubs, orphans, and
128
+ unresolved references.
129
+
130
+ With Microsoft's AL toolchain installed (the AL Language extension or the AL
131
+ Development Tools), the AL compiler resolves every call and reports compiler
132
+ and code-analyzer findings; BC Atlas's own analysis is the fallback. See
133
+ [AL toolchain](./docs/al-toolchain.md).
88
134
 
89
135
  Relationship colors are consistent across views, and labels and dash patterns
90
136
  ensure that color is never the only signal. Every edge keeps its evidence
@@ -128,7 +174,8 @@ optionally as Dependabot pull requests. See [Guided setup](./docs/setup.md).
128
174
  Read the docs at **[schulzoli.github.io/BC-Atlas](https://schulzoli.github.io/BC-Atlas/)**, with
129
175
  search, or browse them here, starting with the [table of contents](./docs/_TOC_.md):
130
176
 
131
- - [Getting started](./docs/getting-started.md) and [guided setup](./docs/setup.md), including [staying up to date](./docs/setup.md#staying-up-to-date)
177
+ - [Getting started](./docs/getting-started.md), [BC Atlas for VS Code](./docs/vscode.md), and [guided setup](./docs/setup.md), including [staying up to date](./docs/setup.md#staying-up-to-date)
178
+ - [AL toolchain: compiler, analyzers, AL settings](./docs/al-toolchain.md)
132
179
  - [Automation: hooks, schedules, and pipelines](./docs/automation-and-ci.md)
133
180
  - [Architecture reports](./docs/reports.md) and [health checks](./docs/health-checks.md)
134
181
  - [Architecture diagrams and views](./docs/architecture-diagrams.md)
@@ -141,8 +188,8 @@ search, or browse them here, starting with the [table of contents](./docs/_TOC_.
141
188
  ## AI agents and tools
142
189
 
143
190
  ```sh
144
- bca capabilities # versioned JSON contract: argv templates, options, enums, exit codes
145
- bca mcp # MCP stdio server (also installed as bca-mcp)
191
+ bca help --format json # versioned JSON contract: argv templates, options, enums, exit codes
192
+ bca mcp # MCP stdio server (also installed as bca-mcp)
146
193
  ```
147
194
 
148
195
  Agents should read the contract first, pass arguments as arrays, parse stdout
@@ -155,26 +202,33 @@ and update-check tools. `bca setup agent --agent claude|copilot|cursor` adds a
155
202
  ## How it works
156
203
 
157
204
  ```text
158
- *.al + app.json + .alpackages
205
+ *.al + app.json + .alpackages + AL settings
159
206
  -> tree-sitter AL syntax tree
160
207
  -> objects, members, relations (analyzer)
208
+ -> AL compiler: calls and diagnostics (src/al, when the toolchain is installed)
161
209
  -> resolved model with evidence (resolver, call analysis, semantics)
162
210
  -> view projection and insights (views, workflow, health)
163
- -> D2 / SVG / JSON / Markdown (renderers)
211
+ -> D2 / SVG / JSON / Markdown / HTML (renderers)
212
+ -> the pages: one workspace, in VS Code (vscode/) or exported as one file
164
213
  ```
165
214
 
166
215
  Parsing, resolution, projection, and rendering are separate stages, so new
167
- views and outputs do not touch the parser. Every command is defined once in
216
+ views and outputs do not touch the parser. The VS Code extension, `bca check`,
217
+ `bca architecture`, and `bca export` read the same analysis, so they always
218
+ agree; `src/ui/theme.css` gives the pages, the explorer, and the HTML
219
+ documentation one look. Every command is defined once in
168
220
  `src/capabilities.js`; help, argument validation, the JSON contract, and the
169
221
  generated reference derive from it.
170
222
 
171
223
  ### Current limits
172
224
 
173
- BC Atlas is an architecture extractor, not the AL compiler. References resolve
174
- by object type, ID, name, namespace, app preference, and declared dependencies,
175
- including `.alpackages` symbols. Dynamic calls, interface dispatch, and unusual
176
- subscriber forms stay syntactic or unresolved when the source does not identify
177
- a target. Conditional compilation is represented as parsed, not evaluated.
225
+ Object references resolve by object type, ID, name, namespace, app
226
+ preference, and declared dependencies, including symbol packages. Calls are
227
+ exact when the AL compiler is available; without it they resolve by name and
228
+ number of arguments, and dynamic calls and unusual subscriber forms stay
229
+ syntactic or unresolved when the source does not identify a target. Without
230
+ the compiler, conditional compilation is represented as parsed, not
231
+ evaluated.
178
232
 
179
233
  ## Development
180
234
 
@@ -196,7 +250,7 @@ Container:
196
250
 
197
251
  ```sh
198
252
  docker build -t bc-atlas .
199
- docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/workspace" bc-atlas report /workspace/app --output-dir /workspace/docs/atlas
253
+ docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/workspace" bc-atlas export /workspace/app --view report -o /workspace/docs/atlas
200
254
  ```
201
255
 
202
256
  The AL grammar is pinned in `vendor/tree-sitter-al.wasm`; update it with
@@ -211,8 +265,21 @@ enter that exact version in the workflow form. The workflow rejects mismatched
211
265
  or already published versions, runs all checks, and publishes with the selected
212
266
  dist-tag. It then tags the commit as `v<version>`, so
213
267
  `uses: SchulzOli/BC-Atlas@v<version>` resolves, and creates a GitHub release
214
- with the version's `CHANGELOG.md` section. It requires an `NPM_TOKEN`
215
- repository secret.
268
+ with the version's `CHANGELOG.md` section. npm authenticates through
269
+ [trusted publishing](https://docs.npmjs.com/trusted-publishers): the package's
270
+ trusted publisher on npmjs.com is this repository's `publish-npm.yml`
271
+ workflow, so no npm token is stored in GitHub.
272
+
273
+
274
+ The VS Code extension in `vscode/` is published by the `Publish VS Code
275
+ extension` workflow: set `version` in `vscode/package.json`, then run the
276
+ workflow with that version. It tests and packages the extension with the
277
+ current engine and publishes it to the Visual Studio Marketplace as the
278
+ publisher `SchulzOli`, signed in with Microsoft Entra ID through GitHub's OIDC
279
+ token (no Marketplace token is stored; see the
280
+ [launch checklist](https://github.com/SchulzOli/BC-Atlas/blob/main/vscode/marketing/README.md#launch-checklist)), and, with
281
+ the secret `OVSX_PAT`, to Open VSX. Every CI run uploads the `.vsix` as the
282
+ `bc-atlas-vsix` artifact.
216
283
 
217
284
  ## Contributing and support
218
285