Repository navigation
Enforce minimum module sizes and reject non-splits - #152
Merged
Merged
Conversation
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.
Small modules and whole-parent wrappers create unnecessary documentation pages and downstream agent tasks. Add a configurable 1,000-code-token minimum and reject partitions that leave fewer than two viable children.
Changes
--min-token-per-modulethrough configuration, generation, and CLI help, with regression coverage for both backends and language-independent sizing.Validation
.venv/bin/python -m pytest -o addopts= -q).git diff --checkpassed.build/: identical 152,232 code tokens, 403 components, and 785 dependency edges to the saved baseline. Baseline delegation base was 4,000; the new run used 8,000.The new cmark run took 59m49s, covered all 51 files, and produced all 28 expected Markdown pages with no missing local Markdown links. The 12,992-token inline module and the 71,524-token scanner module remain leaves. One leaf lists 960 representative-component tokens but owns 1,061 tokens across its complete files, satisfying the minimum under the existing size calculation.
Remote Mermaid validation timed out during generation, so diagrams were not fully verified remotely. Source repositories and saved baseline trees were not modified; generated scratch outputs were removed.