Add code-hygiene checks (large-file, folder-size, AI-writing) across prek + CI + cloud#7
Merged
Merged
Conversation
…prek + CI + cloud Port four hygiene checks wired at three layers kept in sync: - check_large_files.sh / check_folder_sizes.sh: line-count and folder-fanout guards (SOURCE_EXTS=rs), shared by prek and GitHub Actions. - check_ai_writing.sh: fail on em dashes (U+2014) and contrastive-parallelism constructions; pure ripgrep with a git-grep fallback, no build needed. - prek.toml: local hooks plus upstream check-added-large-files. - large-files.yaml / folder-size.yaml workflows and an AI-writing step in ci.yml. - .claude SessionStart hook installs prek so cloud commits run the same checks. Replace existing em dashes in the docs with hyphens so the AI-writing check passes on a clean tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wmfUGTZR6HFL78eSjYxBU
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
1 issue found across 13 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
rustup installs cargo to ~/.cargo/bin, which the hook never added to PATH, so `cargo fetch` would fail on a clean machine. Add ~/.cargo/bin to PATH (persisted to CLAUDE_ENV_FILE), source ~/.cargo/env after a fresh install, and split the install/fetch off the `||` one-liner so fetch only runs once cargo is resolvable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wmfUGTZR6HFL78eSjYxBU
Resolve doc conflicts by taking main's rewritten Components section (role diagram replacing the on-disk file tree) and README badges block. Re-apply the em-dash sweep to the merged docs and the new docs/architecture.svg so the AI-writing check stays green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wmfUGTZR6HFL78eSjYxBU
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.
Ports four code-hygiene checks into this repo, each wired at three layers kept in sync (prek, GitHub Actions, Claude Code cloud).
Checks
—(U+2014) anywhere in the repo.This repo is Rust, so the
rsstack was used throughout:SOURCE_EXTS=(rs), prekfiles = \.(rs)$, CIpaths: '**.rs'— all the same extension set.Files
Only the Rust AI-writing impl exists (no
.py/.tsvariants).Notes
ARCHITECTURE.md,CONTRIBUTING.md,README.md,SECURITY.mdwith hyphens so the em-dash check passes on a clean tree.goes beyond/so much as).Verification (all exit 0)
check_large_files.sh --all— clean;daemon.rs(645) andenv_store.rs(555) warn but stay under the 800 error threshold.check_folder_sizes.sh --all— clean.check_ai_writing.sh— passes on both thergandgit greppaths.prek run --all-files— the three local hooks pass.🤖 Generated with Claude Code
Generated by Claude Code
Summary by cubic
Add repo-wide hygiene checks for large Rust sources (file length, folder fan-out, and writing-style patterns) running in local
prek, GitHub Actions, and cloud editor sessions. Warn/error thresholds: 500/800 lines per file and 20/35 files per folder.New Features
*.rs.ci.yml.prek.tomlhooks;.claudeSessionStart installs Rust, sets PATH, installsprek, runscargo fetch.Bug Fixes
main: adopted the rewritten Components section and README badges; re-applied the hyphen sweep across docs anddocs/architecture.svgto pass the writing check.~/.cargo/binis on PATH and source~/.cargo/envafter a fresh install socargo fetchand checks run reliably.Written for commit 638b7a0. Summary will update on new commits.