Repository navigation
Clear the fork's architecture findings that have a mechanical fix - #74
Merged
Merged
Conversation
arch:check was failing on main with 49 findings, almost all from fork features, because our CI does not run it. This fixes the ones with a mechanical answer and records the rest, which are composition seams, as debt in the ratchet. - Deep imports go through the target context's layer entry (index.ts); the missing entries are added with named re-exports only. - voiceSettings moves from voice/domain to settings/domain, beside pluginSettings: it is part of AgentSettings, and keeping it in voice would make the two domain entries import each other. - window.opencoveApi in the file-drop handlers and the plugin node-header poller goes through transport adapters (fileDropApi.ts, pluginNodeHeaderApi.ts), as the boundary rule asks. - Provider and node-kind decisions read a table field instead of comparing ids: OpenCode's launch env is a per-provider hook looked up in the catalog, foreground recognition is a descriptor capability, and the plugin host reads PLUGIN_SESSION_NODE_KINDS. - ratchet.json takes the lowered counts, and records the voice/plugin UI seams (contextForbiddenLayer 141 -> 146, layerDependency 583 -> 593) as debt for a follow-up spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUJxdvNkaMbgXq7YR53F8Y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Change Scope
Small: imports, adapters and table lookups only, with no change in behavior. The structural part is split off into the draft spec #73.
📝 What Does This PR Do?
pnpm arch:checkfailed onmainwith 49 findings, almost all from fork features. Ourci.ymldoesn't run it, so they piled up. This PR fixes the ones with a mechanical answer and records the rest in the ratchet as debt for #73. After it,arch:checkis green.src/contexts/<ctx>/<layer>/index.ts. Missing entries are added, with named re-exports only (contextEntryShape).voiceSettings.tsmoves tosettings/domain, besidepluginSettings.ts. It's part ofAgentSettings. Left invoice/domain, the two domain entries would import each other, andagentSettings.defaultsreadsDEFAULT_VOICE_SETTINGSat load time, which would risk a TDZ error.window.opencoveApibehind adapters.utils/fileDropApi.tscovers canvas and terminal drop/paste.pluginNodeHeaderApi.tscovers the node-header poller.launchEnvhook (opencode/OpenCodeLaunchEnv.ts), looked up by id in the catalog.foregroundProcessRecognition, withisForegroundRecognizedProviderderived from it). The derived type must stay assignable toRecognizedForegroundAgent, so marking a provider the recognizer doesn't know is a compile error.PLUGIN_SESSION_NODE_KINDS..includeson a named array as a detector gap. I didn't use it.🏗️ Large Change Spec (Required if "Large Change" is checked)
Not applicable: Small change. The structural part is spec'd in #73.
📈 Ratchet rises
harness/architecture/ratchet.jsonarchitecture.contextForbiddenLayer141 -> 146: debt: Spec draft: composition seams for the voice and plugin UI #73 voice and plugin UI composed across context presentation layers (settings → voice section, voice → settings group and workspace renderer types, terminal node → plugin header actions); needs slots, which the spec decidesharness/architecture/ratchet.jsonarchitecture.layerDependency583 -> 593: debt: Spec draft: composition seams for the voice and plugin UI #73 voice and plugin renderer UI use app-renderer i18n, UI primitives and store, plus one more canvas-image infrastructure edge in workspace main-ipc register.ts (same pattern as upstream's two there)🔗 Co-change partners left untouched
docs/ui/README.md(withsrc/app/renderer/shell/components/AppShellOverlays.tsx, 5/8): only import specifiers changed in AppShellOverlays; no UI change to documentsrc/app/renderer/shell/AppShell.tsx(withsrc/app/renderer/shell/components/AppShellOverlays.tsx, 5/8): import specifiers only; the overlays' props are unchangedsrc/app/renderer/shell/components/ControlCenter.tsx(withsrc/app/renderer/shell/components/AppShellOverlays.tsx, 7/8): import specifiers only; nothing ControlCenter consumes changedsrc/contexts/settings/presentation/renderer/settingsPanel/SettingsPanelContent.tsx(withsrc/contexts/settings/domain/agentSettings.types.ts, 8/11): the VoiceSettings import path changed, but the settings shape did notsrc/contexts/settings/presentation/renderer/settingsPanel/settingsSearchIndex.definitions.ts(withsrc/contexts/settings/domain/agentSettings.types.ts, 6/11): no new setting; the search index is unaffectedsrc/contexts/settings/presentation/renderer/useSettingsPanelUpdaters.ts(withsrc/contexts/settings/domain/agentSettings.types.ts, 9/11): no new setting; the updaters are unaffected✅ Delivery & Compliance Checklist
pnpm verify:quick/pnpm pre-commitis green; any additional focused tests are reported above.arch:checkgreen,pnpm check(tsc) green,oxlinton the changed files green.vitest relatedfor all changed files: 995 files pass. 2 fail only because the sandbox install skipped native builds (Electron binary, node-pty). E2E didn't run here.satisfies/derived types. Mechanical:arch:checkwith the ratchet.DEVELOPMENT.mdarchitectural boundaries.Follow-up outside this PR: run
arch:checkinci.yml, so the fork can't drift again. That needs workflow permissions, so it's done by hand.https://claude.ai/code/session_01TUJxdvNkaMbgXq7YR53F8Y
Generated by Claude Code