refactor(rules): tidy GooseRule paths type and drop dead excludeToolDir#2054
Merged
Conversation
…nused excludeToolDir Resolve the two non-blocking refactoring findings from the PR #2049 review: - Define GooseRuleSettablePaths via Pick<ToolRuleSettablePaths, "root">, matching the grokcli/warp/deepagents fold-into-root precedent so future refactors of ToolRuleSettablePaths propagate uniformly. - Drop the now-dead excludeToolDir parameter from GooseRule.getSettablePaths; goose folds non-root rules into the root .goosehints and no longer builds a tool-dir path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
@dyoshikawa Thank you! |
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.
Background
Follow-up to the PR #2049 review, which switched the goose rules target to the fold-into-root pattern. Three low-severity, non-blocking findings were captured in #2051. This PR resolves the two concrete refactoring findings (Findings 2 and 3).
Changes
GooseRuleSettablePathsviaPick<ToolRuleSettablePaths, "root">, matching thegrokcliprecedent it documents itself as mirroring, so future refactors ofToolRuleSettablePathspropagate consistently.excludeToolDiroption fromGooseRule.getSettablePaths. Goose folds non-root rules into the root.goosehintsand no longer callsbuildToolPath, so the parameter was unused.On Finding 1 (stale
.goose/memoriesmigration footgun)Intentionally not addressed here. The issue itself concluded this is "acceptable and consistent with precedent" —
grokcli/warp/deepagentsshare the exact same behavior and none clean their legacy memories dirs. A cross-tool cleanup mechanism would be a separate design decision, out of scope for this cosmetic cleanup.Verification
pnpm cicheckpasses (6546 tests, lint, typecheck, content checks).Closes #2051