docs(plans): library splits map and Qwen Code as an ACP backend - #2314
Conversation
…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>
🖥️ PR preview
|
4d6e929 to
144630a
Compare
jonathanKingston
left a comment
There was a problem hiding this comment.
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 (
rootsoption etc.) for packages that already exist atpackages/shell-guard/src/shell-scope.tsand friends. Some of what actually went intoshell-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
qwenentry exists onmain:KNOWN_ACP_AGENTSinsrc/shared/acp-known-agents.tshasgemini,claude-acp,cursor,codex-acp.qwen --acpmatches nothing in-repo; the only--acpargs entry isgemini(line 218). Mirroring thegeminientry 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 omitsreauth, whichgeminisets. Minor. pnpm run probe:acpandprobe:acp:behaviorexist 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
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011jaQbed96h8aSZLijfiHNB
|
Pushed 8c6cadc: the body now matches Generated by Claude Code |
Reference screenshots ready for reviewReview GitHub’s image diffs in screenshot PR #2369. Rendered for If this source branch moves, a later successful render closes the stale review PR and replaces this link. |
Summary
docs/plans/library-splits.md: a measured map of which parts ofagent-panecould become workspace packages or separate repositories, with LOC, outward-import counts, Electron coupling, effort, and value per candidate, and the seams each extraction needs.qwen --acp) over the stream-json SDK or in-process embedding.docs/plans/README.mdas 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 ofsrc/. Electron counts are files importing fromelectron. Effort estimates are judgement.Validation
npx oxfmt --writeon both files (formatter clean).🤖 Generated with Claude Code