Add scoped Compass initialization#29
Merged
Merged
Conversation
forhappy
marked this pull request as ready for review
July 25, 2026 01:07
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.
Summary
compass init.compass/config.tomlWhy
Compass previously required users to repeat repository paths and exclusions for every build or watch invocation. This adds a first-run workflow that records a reviewable project scope and consistently applies it afterward.
User impact
Users can initialize an entire repository interactively with
compass init, or automate a focused monorepo setup with repeatable--includeand--excludeflags plus--yes. Invalid or unmatched scope fails before configuration is written, and existing configuration requires--forceto replace.Final review fixes
The final review found and addressed three edge cases:
.and./now work as literal project-root directory scopes.compassconfiguration paths cannot escape and overwrite files outside the project rootRegression coverage also verifies interactive/non-interactive behavior, forced replacement, saved-scope reuse on update, and fail-closed invalid configuration handling.
Validation
cargo fmt --all -- --checkcargo test -p compass-filescargo test -p compass-corecargo test -p compass-cli --test init_cli --test update_cli --test watch_cli --test help_cli --test compass_productcargo clippy -p compass-files -p compass-core -p compass-cli --all-targets --no-deps -- -D warningsbash -n completions/compass.bashzsh -n completions/_compassgit diff --checkgraphify update .