Repository navigation
Closed
Description
STATUS: APPROVED (2026-11-14), module version. Owner decision: the published crates stay exactly as today (
tole-core,tole-tui,tole-cli); the goal is a tidier, more modular structure inside them so nothing is too big. Layering is a convention checked by a test, not by crate boundaries.
Owner decision (2026-11-14)
- No new published crates;
publish.yml,release.ymland the crates.io names do not change. - Reorganise
tole-core(about 51k lines, ~80 flat files) andtole-cli(about 52k lines) into subsystem directories (modules), by pure moves. - Layering is one-way and enforced by a test that scans
use crate::edges (levels: kernel, engines, faces); existing violations are recorded in an allow list, not silently fixed. - Public paths do not change: every moved module stays reachable through
pub useat its old path. - Not a compile-time win (one crate is one compile unit); real crate splits stay a future option if compile time or embedder size requires it, and the module boundaries make that cheap.
Rules
- One subsystem per PR, pure moves (
git mvpluspub use), each PR small enough for Cora; the PR with new logic (the layering test) is separate and small. - Each PR keeps: same number of tests,
cargo test --workspacegreen,cargo check -p tole-core --no-default-featuresgreen, the OS Check jobs green, no change in the public API (cargo public-apidiff empty),tole --versionand a smoke of run, discuss and serve unchanged. - Do not move files that an open PR is changing (delegation files wait for design: an owner approval surface for delegated children (durable queue, parked and resumed) #714 PR 5 and 6).
Work order
- PR 0: the layering test with a baseline allow list.
discussion/in tole-core (discussion.rs,discussion_log.rsand tests; imports only secrets, paths, delegation_report, skill_draft).secrets/(withsensitive).delegation/(after design: an owner approval surface for delegated children (durable queue, parked and resumed) #714 PR 5 and 6).web/,mcp/,storage/.- tole-cli:
discuss/,serve/,delegation/,plugin/.
Testing (per PR)
-
cargo test --workspacegreen; test count unchanged -
cargo check -p tole-core --no-default-featuresgreen - public API unchanged (
cargo public-apidiff or an equivalent check) - layering test green with a baseline that only shrinks
- build time not higher than before
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-][PLAN] workspace layering: modular-monolith crate structure (crastu-style)[/-][+][PLAN] workspace layering: modular structure inside the three published crates[/+]refactor(core): move discussion and discussion_log into discussion/ (#…
test(core): a layering test for the modules of tole-core, with a base…
refactor(core): move the discussion modules into discussion/, public …
refactor(core): move the secret modules into secrets/, public paths u…
refactor(core): move the delegation modules into delegation/, public …
refactor(core): move the skill modules into skills/, public paths unc…
refactor(core): move ledger, cron, tz and webhook into ledger/, publi…
refactor(core): move gh, git, gitea, cora_search, uteke and verify_pa…
refactor(core): move file_tools, read_file and todo into tools/, publ…
refactor(core): move provider, openai, failover, mock, replay and ima…
refactor(core): move turn, compaction and transcript into turn/, publ…
refactor(core): move entry, register, state, storage, machine and saf…
refactor(core): move agents, child_env, handoff, sibling_watch and me…
test(cli): a layering test for the modules of tole-cli, with a baseli…
refactor(cli): move plugin_gate and plugin_cmd into plugin/, public p…
refactor(cli): move config and its trust, routing and profile modules…
refactor(cli): move the delegation modules of tole-cli into delegatio…
refactor(cli): move the discussion modules of tole-cli into discuss/,…
refactor(cli): move the skill modules of tole-cli into skill/ and gua…
refactor(cli): move the session modules of tole-cli into session/, pu…
refactor(cli): move serve_images, events, protocol and auth into serv…
refactor(cli): move redact_url into provider_chain so it no longer im…
chore(arch): crate kinds and a crate-level dependency matrix check (#…