Skip to content

docs(plans): library splits map and Qwen Code as an ACP backend - #2314

Merged
jonathanKingston merged 3 commits into
mainfrom
claude/agent-panel-library-splits-f28652
Sep 5, 2026
Merged

jonathanKingston merged 3 commits into
mainfrom
claude/agent-panel-library-splits-f28652

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

Summary

  • Adds docs/plans/library-splits.md: a measured map of which parts of agent-pane could become workspace packages or separate repositories, with LOC, outward-import counts, Electron coupling, effort, and value per candidate, and the seams each extraction needs.
  • Assesses three routes for using Qwen Code as a backend and recommends the ACP catalog entry (qwen --acp) over the stream-json SDK or in-process embedding.
  • Indexes the plan in docs/plans/README.md as Proposed.

Tracking: #2303, with one sub-issue per step of the suggested order (#2304 to #2313).

Why

Four packages have already left the app (@copse/streaming-markdown, @copse/llm, @copse/agent, @copse/plan-usage). This document records where the next cuts are and what they cost, so each sub-issue starts from measured coupling rather than a fresh survey.

Method

Import scan of non-test source at fb887be31. "Outward" counts relative imports leaving a candidate directory into the rest of src/. Electron counts are files importing from electron. Effort estimates are judgement.

Validation

  • npx oxfmt --write on both files (formatter clean).
  • Documentation only; no product change, no visual evidence required.

🤖 Generated with Claude Code

…kend

Adds docs/plans/library-splits.md: a measured register of which parts of
agent-pane could become workspace packages or separate repos, with LOC,
outward-import counts, Electron coupling, effort, and value per candidate,
plus the seams each extraction needs. Assesses three routes for a Qwen Code
backend and recommends the ACP catalog entry. Tracking issue #2303 with one
sub-issue per step (#2304-#2313). Indexes the plan in docs/plans/README.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🖥️ PR preview

Steps 2 to 5 of the suggested order are on main (#2315, #2316, #2317,
#2319). The plan's status moves from Proposed to Active, the sub-issue
table names the PR each landed in, and the plan index row lists what
remains.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jonathanKingston
jonathanKingston force-pushed the claude/agent-panel-library-splits-f28652 branch from 4d6e929 to 144630a Compare September 3, 2026 22:10

@jonathanKingston jonathanKingston left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: library splits map

Verdict: needs a refresh before merge. Links, the README index row and most measurements check out, but the body of the plan still describes three shipped extractions as future work, and two LOC figures are off by about 2x.

Body contradicts the status block

The status block (lines 5 to 12) and the sub-issues table (lines 307 to 310) correctly say @copse/std, @copse/shell-guard, @copse/thread-store and @copse/hooks-dialects landed in #2315, #2316, #2317, #2319. The rest of the document was not updated to match:

  • Line 22: "Four packages have already left the app" (it is eight on main: git ls-tree origin/main packages/).
  • Lines 28 to 29 (Verdict): "The next cuts ... are the shell command classifier, the thread-store format, the hook dialect adapters, and the ACP client core." Three of four have landed.
  • Line 55 (distribution table, packages/ row) lists only @copse/llm, @copse/agent, @copse/plan-usage.
  • Lines 91 to 94 (candidate register) carry "What blocks it" text as if unstarted, e.g. line 91 "Nothing. Do it first so later packages stop vendoring copies."
  • Lines 133 to 176 ("The four cuts worth starting") describe seams still to be built (roots option etc.) for packages that already exist at packages/shell-guard/src/shell-scope.ts and friends. Some of what actually went into shell-guard (read-outside-project, gh-argv, trusted-commands) is never mentioned.
  • Lines 282 to 289 (suggested order) list steps 2 to 5 without the "landed" marker the sub-issues table has.

Either rewrite those sections in the past tense (what the seams became) or add a one-line "landed, see packages/x" pointer to each, so a reader starting from #2309 onwards does not re-derive work that is done.

Measurements

Spot-checked at fb887be31 (non-test .ts, raw line counts as the Method section states):

Plan Measured
services/acp 40 files / 10,129 40 / 10,129 exact
services/plugins + mcp 5,191 3,489 + 1,702 exact
search 4,266, github 6,343, diagnostics 1,668, shared/usage 1,123 all exact
30 of 474 main-process files import electron 30 / 474 exact
shell classifier ~3,000 (l.92) 3,004 ok
thread store ~6,100 (l.93) 6,174 ok
hook dialect adapters ~4,000 (l.94) 5,626 for the named files; packages/hooks-dialects/src on main is 6,049 ~40% under
@copse/std ~400 (l.91) 170 for the named files; packages/std/src on main is 188 >2x over
PII ~600 (l.95) 258 (310 with reveal-pii-tool.ts) ~2x over

The std and PII rows read like estimates rather than counts. Lines 92 and 95 also say security/... where the path is src/main/services/security/; consistent with the services/ shorthand elsewhere but worth a note in Method. Since main has moved (for example src/main/services/hooks went from 7,755 to 2,698 lines), consider stating which rows are pre-extraction numbers, or re-measure at f3930bc9.

Qwen Code / ACP section

  • No qwen entry exists on main: KNOWN_ACP_AGENTS in src/shared/acp-known-agents.ts has gemini, claude-acp, cursor, codex-acp. qwen --acp matches nothing in-repo; the only --acp args entry is gemini (line 218). Mirroring the gemini entry is plausible for a Gemini CLI fork but the doc's "verify" markers are doing the work; the registry entry id should be confirmed before #2304 starts.
  • The proposed snippet's field names all exist on KnownAcpAgent (lines 18 to 40). It omits reauth, which gemini sets. Minor.
  • pnpm run probe:acp and probe:acp:behavior exist as referenced.

Links and index

All 14 relative links resolve on main. The README row matches its neighbours in format and status vocabulary. README line 20 "Last audited 2026-07-21" is left unchanged while the new row cites September PRs; consider bumping.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Pushed 8c6cadc: the body now matches main at 3b5bedc. The verdict, distribution table, candidate register, "cuts worth starting" section and suggested order all mark @copse/std, @copse/shell-guard, @copse/thread-store, @copse/hooks-dialects and (since #2335 landed meanwhile) @copse/plugin-sdk as landed, with the landed sections rewritten from the packages' actual environment.ts shapes rather than the planned seams. Re-measured rows: std ~190, shell-guard ~3,500 (now naming read-outside-project, gh-argv, trusted-commands), hooks-dialects ~6,000, plugin-sdk ~1,800, PII ~260; the Method section says which rows were re-measured at 3b5bedc and which remain at fb887be, and that paths are relative to src/main/services unless prefixed. The Qwen section notes the omitted reauth. oxfmt clean, all 72 relative links resolve.


Generated by Claude Code

@jonathanKingston
jonathanKingston marked this pull request as ready for review September 4, 2026 23:40
@copse-release-bot

Copy link
Copy Markdown
Contributor

Reference screenshots ready for review

Review GitHub’s image diffs in screenshot PR #2369.
Merge it (or enable auto-merge) to apply the accepted PNGs to claude/agent-panel-library-splits-f28652.

Rendered for 8c6cadccd8e3 by CI run 33930389014; the immutable artifact is reference-screenshot-candidates-33930389014.

If this source branch moves, a later successful render closes the stale review PR and replaces this link.

@jonathanKingston
jonathanKingston merged commit 48c8515 into main Sep 5, 2026
33 of 35 checks passed
@jonathanKingston
jonathanKingston deleted the claude/agent-panel-library-splits-f28652 branch September 5, 2026 00:05
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant