From 526ddb9f4c88e124966859009a575e116252010a Mon Sep 17 00:00:00 2001 From: amp Date: Mon, 26 Oct 2026 21:01:50 +0000 Subject: [PATCH 1/2] docs(architecture): record the agent's app-host dependency and classify nine agent files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agent record claimed no dependency on `app-host`, and nine agent source and test files belonged to no domain at all. Both are record inaccuracies, not runtime problems: no `src` file changes here. - **`agent.domain.json` / `app-host.domain.json`** — `agentAuth.ts` imports `@/platform/distribution/types`, and 70 other agent files import `src/i18n.ts` or that same module; both are claimed by `app-host`. The generator pairs `allowedDependencies` with `allowedConsumers` (`tools/architecture/src/boundaries.ts:93`), so the grant needs both halves. `extension-runtime` got the same pairing in #20903 and `app-host` was missed. - **`agent.domain.json` modules** — the nine files #21232 deferred are now classified, each taking the role its sibling already has in the same record: the four `crdt` scenario tests `integration` like every other `agentInsertWorkflow*` / `agentSubgraph*Follower` test, `agentMessageParts.test.ts` `domain` like `agentMessageParts.ts`, `useAttachment.validation.test.ts` `application` like `useAttachment.test.ts`, and `attachmentMessages.{ts,test.ts}` `application` because the helper reads the `app-host/application` i18n runtime (`domain` would reach upward across a role boundary). `agentCrdtStatus.ts` is `domain`, matching the pure-type modules beside it (`docFrameCodes.ts`, `crdtSnapshot.ts`, its own main consumer). - **`app-host`, `extension-runtime`, `workbench-shell` compatibility promises** — each said inventory grants no "cross-module dependency permissions" while holding, or now holding, `allowedConsumers: ["agent"]`. Dropped that clause, the same repair #21232 made to `dialog-host`. - **`boundaries.json`** — regenerated with `pnpm architecture:update`, not hand-edited. `pnpm architecture:check` passes and the unclassified-file warnings drop from 208 to 199. `pnpm typecheck` clean; `pnpm test:unit tools/architecture` passes (63 tests). `pnpm exec fallow dead-code --boundary-violations` goes from 13191 to 13146: the `app-host` pairing clears 68 inherited findings, including `agentAuth.ts:4 -> src/platform/distribution/types.ts`, while classifying the nine files surfaces 23 that were hidden only because the files sat in the `unclassified` zone. The pre-push `fallow audit --changed-since` reports no issues in the five changed files. Red/green: reverting the record edits while keeping the generated `boundaries.json` makes `pnpm architecture:check` fail with "docs/architecture/domains/boundaries.json is out of date"; restoring them makes it pass. - **A public entry point for `authentication` (R5).** Not a contained change. The agent reaches eleven distinct authentication modules from about twenty-five files, not the four functions the finding lists, and three of those callers are `AgentPanelRoot.vue` and its tests, which PR #22004 is already editing. `settings` adds seven more modules. Details in the PR body. - **`bottom-panel.domain.json`** carries the same promise contradiction (`allowedDependencies: ["keybindings"]`), but it is unrelated to the agent. --- docs/architecture/domains/boundaries.json | 44 +++++++++++++++++-- .../domains/records/agent.domain.json | 37 ++++++++++++++++ .../domains/records/app-host.domain.json | 4 +- .../records/extension-runtime.domain.json | 2 +- .../records/workbench-shell.domain.json | 2 +- 5 files changed, 82 insertions(+), 7 deletions(-) diff --git a/docs/architecture/domains/boundaries.json b/docs/architecture/domains/boundaries.json index 042605925e4..a4fc5283de2 100644 --- a/docs/architecture/domains/boundaries.json +++ b/docs/architecture/domains/boundaries.json @@ -162,7 +162,9 @@ "src/workbench/extensions/agent/utils/workflowReferenceParts.test.ts", "src/workbench/extensions/agent/utils/workflowReferenceParts.ts", "src/workbench/extensions/agent/utils/workflowReferenceText.test.ts", - "src/workbench/extensions/agent/utils/workflowReferenceText.ts" + "src/workbench/extensions/agent/utils/workflowReferenceText.ts", + "src/workbench/extensions/agent/crdt/agentCrdtStatus.ts", + "src/workbench/extensions/agent/services/agent/agentMessageParts.test.ts" ] }, { @@ -203,7 +205,10 @@ "src/workbench/extensions/agent/utils/getPageVisibilityMetadata.test.ts", "src/workbench/extensions/agent/utils/getPageVisibilityMetadata.ts", "src/workbench/extensions/agent/services/agent/agentIdentity.ts", - "src/workbench/extensions/agent/services/agent/agentIdentity.test.ts" + "src/workbench/extensions/agent/services/agent/agentIdentity.test.ts", + "src/workbench/extensions/agent/composables/agent/useAttachment.validation.test.ts", + "src/workbench/extensions/agent/utils/attachmentMessages.test.ts", + "src/workbench/extensions/agent/utils/attachmentMessages.ts" ] }, { @@ -321,7 +326,11 @@ "src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts", "src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts", "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.test.ts", - "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.ts" + "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.ts", + "src/workbench/extensions/agent/crdt/agentBuiltWidgetInputLink.regression.test.ts", + "src/workbench/extensions/agent/crdt/agentDisplayIntAdd.regression.test.ts", + "src/workbench/extensions/agent/crdt/agentInsertWorkflowOutputs.integration.test.ts", + "src/workbench/extensions/agent/crdt/agentSubgraphInteriorFollower.test.ts" ] }, { @@ -4107,6 +4116,7 @@ "from": "agent/domain", "allow": [ "agent/domain", + "app-host/domain", "authentication/domain", "design-system/domain", "dialog-host/domain", @@ -4115,6 +4125,7 @@ "keybindings/domain", "workbench-shell/domain", "workflow-management/domain", + "app-host/domain/outer-1", "design-system/domain/outer-1", "unclassified" ] @@ -4126,6 +4137,9 @@ "agent/domain", "agent/application", "agent/infrastructure", + "app-host/domain", + "app-host/application", + "app-host/infrastructure", "authentication/domain", "authentication/application", "authentication/infrastructure", @@ -4147,6 +4161,7 @@ "workflow-management/domain", "workflow-management/application", "workflow-management/infrastructure", + "app-host/domain/outer-1", "authentication/infrastructure/outer-1", "design-system/domain/outer-1", "extension-runtime/infrastructure/outer-1", @@ -4161,6 +4176,9 @@ "agent/domain", "agent/application", "agent/infrastructure", + "app-host/domain", + "app-host/application", + "app-host/infrastructure", "authentication/domain", "authentication/application", "authentication/infrastructure", @@ -4182,6 +4200,7 @@ "workflow-management/domain", "workflow-management/application", "workflow-management/infrastructure", + "app-host/domain/outer-1", "authentication/infrastructure/outer-1", "design-system/domain/outer-1", "extension-runtime/infrastructure/outer-1", @@ -4196,6 +4215,9 @@ "agent/domain", "agent/application", "agent/presentation", + "app-host/domain", + "app-host/application", + "app-host/presentation", "authentication/domain", "authentication/application", "authentication/presentation", @@ -4217,6 +4239,8 @@ "workflow-management/domain", "workflow-management/application", "workflow-management/presentation", + "app-host/domain/outer-1", + "app-host/presentation/outer-1", "design-system/domain/outer-1", "design-system/presentation/outer-1", "dialog-host/presentation/outer-1", @@ -4237,6 +4261,11 @@ "agent/infrastructure", "agent/presentation", "agent/integration", + "app-host/domain", + "app-host/application", + "app-host/infrastructure", + "app-host/presentation", + "app-host/integration", "authentication/domain", "authentication/application", "authentication/infrastructure", @@ -4271,6 +4300,8 @@ "workflow-management/presentation", "workflow-management/integration", "agent/integration/outer-1", + "app-host/domain/outer-1", + "app-host/presentation/outer-1", "authentication/infrastructure/outer-1", "design-system/domain/outer-1", "design-system/presentation/outer-1", @@ -7586,6 +7617,11 @@ "agent/infrastructure", "agent/presentation", "agent/integration", + "app-host/domain", + "app-host/application", + "app-host/infrastructure", + "app-host/presentation", + "app-host/integration", "authentication/domain", "authentication/application", "authentication/infrastructure", @@ -7620,6 +7656,8 @@ "workflow-management/presentation", "workflow-management/integration", "agent/integration/outer-1", + "app-host/domain/outer-1", + "app-host/presentation/outer-1", "authentication/infrastructure/outer-1", "design-system/domain/outer-1", "design-system/presentation/outer-1", diff --git a/docs/architecture/domains/records/agent.domain.json b/docs/architecture/domains/records/agent.domain.json index c6e0ed3f4d0..92036f34789 100644 --- a/docs/architecture/domains/records/agent.domain.json +++ b/docs/architecture/domains/records/agent.domain.json @@ -790,10 +790,47 @@ { "path": "src/workbench/extensions/agent/crdt/agentCrdtTransport.test.ts", "role": "infrastructure" + }, + { + "path": "src/workbench/extensions/agent/composables/agent/useAttachment.validation.test.ts", + "role": "application" + }, + { + "path": "src/workbench/extensions/agent/crdt/agentBuiltWidgetInputLink.regression.test.ts", + "role": "integration" + }, + { + "path": "src/workbench/extensions/agent/crdt/agentCrdtStatus.ts", + "role": "domain" + }, + { + "path": "src/workbench/extensions/agent/crdt/agentDisplayIntAdd.regression.test.ts", + "role": "integration" + }, + { + "path": "src/workbench/extensions/agent/crdt/agentInsertWorkflowOutputs.integration.test.ts", + "role": "integration" + }, + { + "path": "src/workbench/extensions/agent/crdt/agentSubgraphInteriorFollower.test.ts", + "role": "integration" + }, + { + "path": "src/workbench/extensions/agent/services/agent/agentMessageParts.test.ts", + "role": "domain" + }, + { + "path": "src/workbench/extensions/agent/utils/attachmentMessages.test.ts", + "role": "application" + }, + { + "path": "src/workbench/extensions/agent/utils/attachmentMessages.ts", + "role": "application" } ], "publicEntryPoints": [], "allowedDependencies": [ + "app-host", "authentication", "design-system", "dialog-host", diff --git a/docs/architecture/domains/records/app-host.domain.json b/docs/architecture/domains/records/app-host.domain.json index af259077295..b35168c8168 100644 --- a/docs/architecture/domains/records/app-host.domain.json +++ b/docs/architecture/domains/records/app-host.domain.json @@ -131,7 +131,7 @@ "keybindings", "telemetry" ], - "allowedConsumers": ["error-reporting", "selection-toolbox"], + "allowedConsumers": ["agent", "error-reporting", "selection-toolbox"], "characterizationScenarios": [ { "name": "Bootstrap loads i18n, waits for cloud auth with a bounded retry, and loads settings and workflows once", @@ -156,7 +156,7 @@ ], "adrs": ["docs/adr/TELEMETRY-STARTUP-0030-production-startup-telemetry.md"], "compatibilityPromises": [ - "Inventory preserves existing exports and runtime behavior without granting public entry points or cross-module dependency permissions." + "Inventory preserves existing exports and runtime behavior without granting public entry points." ], "deepImports": "inventory" } diff --git a/docs/architecture/domains/records/extension-runtime.domain.json b/docs/architecture/domains/records/extension-runtime.domain.json index 3fc0729afc6..88958f2866f 100644 --- a/docs/architecture/domains/records/extension-runtime.domain.json +++ b/docs/architecture/domains/records/extension-runtime.domain.json @@ -246,7 +246,7 @@ "docs/adr/EXTENSIONS-PUBLIC-API-0005-bundle-vue-dependencies-in-extensions.md" ], "compatibilityPromises": [ - "Inventory preserves existing exports and runtime behavior without granting public entry points or cross-module dependency permissions." + "Inventory preserves existing exports and runtime behavior without granting public entry points." ], "deepImports": "inventory" } diff --git a/docs/architecture/domains/records/workbench-shell.domain.json b/docs/architecture/domains/records/workbench-shell.domain.json index 96298c04a94..0b11328a337 100644 --- a/docs/architecture/domains/records/workbench-shell.domain.json +++ b/docs/architecture/domains/records/workbench-shell.domain.json @@ -208,7 +208,7 @@ ], "adrs": [], "compatibilityPromises": [ - "Inventory preserves existing exports and runtime behavior without granting public entry points or cross-module dependency permissions." + "Inventory preserves existing exports and runtime behavior without granting public entry points." ], "deepImports": "inventory" } From 51611c855e4327aa1f02090912b3e43642ee0aa0 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 28 Oct 2026 03:54:28 +0000 Subject: [PATCH 2/2] docs(architecture): leave the nine agent files unclassified docs/architecture/domains/AGENTS.md governs this directory and says to leave unclassified files unclassified, so classifying nine of them opportunistically was the wrong half of this change. The generator treats them as warnings, not errors: architecture:check passes with them unclaimed. The app-host dependency record stays. That one documents an import the agent already makes, which is the part of this PR that was actually load-bearing. --- docs/architecture/domains/boundaries.json | 15 ++------ .../domains/records/agent.domain.json | 36 ------------------- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/docs/architecture/domains/boundaries.json b/docs/architecture/domains/boundaries.json index a4fc5283de2..7aae7beaec0 100644 --- a/docs/architecture/domains/boundaries.json +++ b/docs/architecture/domains/boundaries.json @@ -162,9 +162,7 @@ "src/workbench/extensions/agent/utils/workflowReferenceParts.test.ts", "src/workbench/extensions/agent/utils/workflowReferenceParts.ts", "src/workbench/extensions/agent/utils/workflowReferenceText.test.ts", - "src/workbench/extensions/agent/utils/workflowReferenceText.ts", - "src/workbench/extensions/agent/crdt/agentCrdtStatus.ts", - "src/workbench/extensions/agent/services/agent/agentMessageParts.test.ts" + "src/workbench/extensions/agent/utils/workflowReferenceText.ts" ] }, { @@ -205,10 +203,7 @@ "src/workbench/extensions/agent/utils/getPageVisibilityMetadata.test.ts", "src/workbench/extensions/agent/utils/getPageVisibilityMetadata.ts", "src/workbench/extensions/agent/services/agent/agentIdentity.ts", - "src/workbench/extensions/agent/services/agent/agentIdentity.test.ts", - "src/workbench/extensions/agent/composables/agent/useAttachment.validation.test.ts", - "src/workbench/extensions/agent/utils/attachmentMessages.test.ts", - "src/workbench/extensions/agent/utils/attachmentMessages.ts" + "src/workbench/extensions/agent/services/agent/agentIdentity.test.ts" ] }, { @@ -326,11 +321,7 @@ "src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts", "src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts", "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.test.ts", - "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.ts", - "src/workbench/extensions/agent/crdt/agentBuiltWidgetInputLink.regression.test.ts", - "src/workbench/extensions/agent/crdt/agentDisplayIntAdd.regression.test.ts", - "src/workbench/extensions/agent/crdt/agentInsertWorkflowOutputs.integration.test.ts", - "src/workbench/extensions/agent/crdt/agentSubgraphInteriorFollower.test.ts" + "src/workbench/extensions/agent/services/agent/workflowTabActivityTracker.ts" ] }, { diff --git a/docs/architecture/domains/records/agent.domain.json b/docs/architecture/domains/records/agent.domain.json index 92036f34789..d4a86c660f5 100644 --- a/docs/architecture/domains/records/agent.domain.json +++ b/docs/architecture/domains/records/agent.domain.json @@ -790,42 +790,6 @@ { "path": "src/workbench/extensions/agent/crdt/agentCrdtTransport.test.ts", "role": "infrastructure" - }, - { - "path": "src/workbench/extensions/agent/composables/agent/useAttachment.validation.test.ts", - "role": "application" - }, - { - "path": "src/workbench/extensions/agent/crdt/agentBuiltWidgetInputLink.regression.test.ts", - "role": "integration" - }, - { - "path": "src/workbench/extensions/agent/crdt/agentCrdtStatus.ts", - "role": "domain" - }, - { - "path": "src/workbench/extensions/agent/crdt/agentDisplayIntAdd.regression.test.ts", - "role": "integration" - }, - { - "path": "src/workbench/extensions/agent/crdt/agentInsertWorkflowOutputs.integration.test.ts", - "role": "integration" - }, - { - "path": "src/workbench/extensions/agent/crdt/agentSubgraphInteriorFollower.test.ts", - "role": "integration" - }, - { - "path": "src/workbench/extensions/agent/services/agent/agentMessageParts.test.ts", - "role": "domain" - }, - { - "path": "src/workbench/extensions/agent/utils/attachmentMessages.test.ts", - "role": "application" - }, - { - "path": "src/workbench/extensions/agent/utils/attachmentMessages.ts", - "role": "application" } ], "publicEntryPoints": [],