docs(workspace): document crate split + MCP-reuse contract (FJ-9) #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/verify-cli-free-document-layout-fj-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes FJ-9 (FJ-3 Phase 5 of 5: verify fj-client/fj-core are CLI-free + document the layout).
Per the human decision recorded on FJ-9 (blockers 1a + 2a), this is a pure documentation PR: no refactor, no dependency change.
What this does
Adds a "Workspace layout (FJ-3 crate split)" section to the root
CLAUDE.mddocumenting the three workspace members and the MCP-reuse contract:fj-client(lib): connection + credential layer.fj-core(lib): CLI-agnostic domain logic (repo-name parsing, issue-template parser, per-command operation modules).fj(binary): clap command tree, crossterm, fluent localization, and all rendering.The MCP-reuse contract: neither library may depend on
clap,crossterm, or anyfluent-*crate, so a future Forgejo MCP can depend onfj-core.comrakis documented as the one intentional non-CLI parsing exception infj-core(CommonMark issue-template parsing, added in FJ-7). The doc also records that the binary legitimately holds more raw LoC than the libraries combined because rendering, the clap tree, and fluent stay in the binary by design (so "majority of LoC in the libs" is explicitly not a success metric).Verification (FJ-9 step 4)
cargo build -p fj-client -p fj-core: libs build standalone.cargo tree -p fj-client -p fj-core -e normal | grep -E 'clap|crossterm|fluent': empty (amended grep per decision 1a;comrakis the documented exception).just check,just pre-commit: pass.docker run --rm forgejo-cli:local version: printsfj v0.6.0.Lockfile note
Also syncs the workspace member version in
Cargo.lock(forgejo-cli0.5.0 -> 0.6.0) socargo build --lockedmatchescrates/fj/Cargo.toml. The lock was left stale by the v0.6.0 release commit; without this sync the locked CI build fails onmain. No third-party dependency versions change.