Skip to content

chore: prune feature-map bloat, style-heuristic gates, orphan goldens, and legacy mirror script - #2979

Merged
kitlangton merged 1 commit into
devfrom
prune-docs-and-guardrails
Nov 27, 2026
Merged

kitlangton merged 1 commit into
devfrom
prune-docs-and-guardrails

Conversation

@kitlangton

Copy link
Copy Markdown
Collaborator

Cut 9,583 lines of feature-map bloat, heuristic shape gates, orphan goldens, and an unused 2.x mirror script.
Runtime behavior, Labs gating, settings recovery, and the 1,500-line non-test file size ceiling are unchanged. scripts/setup.sh is intentionally left for a tiny follow-up because removing its workflow calls touches .github/workflows/ (@thdxr).

❌ Before

  • docs/features/README.md (3,960 lines) and docs/features/labs.md (5,131 lines) hand-duplicated the Labs registry, pasted a dated test log, and required prose updates on unrelated work.
  • scripts/code-shape.py and src/code_shape_tests.rs blocked commits on folder-count limits, filename prefix-family heuristics, and regex design-token literals backed by exception lists, and kept stale ceilings for files already below 1,500 lines.
  • AGENTS.md required bumping four Rune pins and Nix hashes at the start of every work round.
  • Two unreferenced golden PNGs (rune-modes-speech-{dark,light}.png) and the legacy 2.x scripts/publish-app-mirror.sh remained in tree.

✅ After

  • docs/features/README.md (97 lines) is a scannable capability and wire-spec index preserving incoming anchors (#get-ready, #other-platforms-and-consumers), and docs/features/labs.md (145 lines) documents the Labs contract while pointing to src/labs/feature.rs and site/src/labs.json as the single source of truth.
  • scripts/code-shape.py and src/code_shape_tests.rs enforce only non-test file size limits (warn >800, hard fail >1,500, ratcheted in scripts/file-size-exceptions.txt with stale entries removed); scripts/design-token-exceptions.txt and scripts/folder-shape-exceptions.txt are deleted.
  • AGENTS.md scopes Rune pin bumps to dedicated dependency PRs or tasks that need a Rune fix, and scopes feature-map updates to user-facing behavior or contract changes.
  • Orphan rune-modes-speech-{dark,light}.png goldens and scripts/publish-app-mirror.sh are deleted.

🟰 Behavior change: none.

- code-shape: file size + folder count + prefix families + regex token baseline
+ code-shape: non-test file size (warn >800, fail >1,500) + ratcheted ceilings
- docs/features/{README,labs}.md: 9,091 lines of duplicated registry prose & logs
+ docs/features/{README,labs}.md: 242 lines of index, contracts & source-of-truth links

📊 Numbers: exact tracked-file deltas from git diff --stat

Surface Before After
docs/features/README.md 3,960 lines 97 lines
docs/features/labs.md 5,131 lines 145 lines
scripts/code-shape.py + src/code_shape_tests.rs 1,301 lines 670 lines
Deleted exception lists & legacy mirror script 62 lines (3 files) 0
scripts/file-size-exceptions.txt ceilings 15 entries 13 tightened entries
Orphan golden PNGs (rune-modes-speech-*) 349,680 bytes (2 files) 0
Total diff 9,866 lines removed 283 lines added (-9,583 net)

👀 Read: scripts/code-shape.py and src/code_shape_tests.rs to verify both keep the 1,500-line non-test ceiling and inline #[cfg(test)] exclusion while dropping the regex token, folder-count, and prefix-family blockers. The rest is routine.

🔍 Found in a code audit · no user reports · measured from git diff and local test runs

Checks run
  • python3 scripts/code-shape.py --check: exit 0 (1198 source files: no hard problems; 139 files over 800 lines, 34 test files over 1,000 lines (13 excepted))
  • scripts/check labs code_shape_tests: 67 passed, 4,105 skipped
  • cargo clippy --locked --bin hex -- -D warnings: exit 0
  • Relative link check across docs/features/README.md and docs/features/labs.md: all valid
  • rg check for deleted goldens, mirror script, and removed exception files: 0 references

@kitlangton
kitlangton merged commit 035cbf9 into dev Nov 27, 2026
4 checks passed
@kitlangton
kitlangton deleted the prune-docs-and-guardrails branch November 27, 2026 19:36
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