Repository navigation
ISSUE-454: Skip CLAUDE file freshness when mcs never wrote there - #455
Merged
Merged
Conversation
…here - A marker-free CLAUDE.md / CLAUDE.local.md is skipped unless a configured pack recorded template sections - Recorded sections with missing markers still warn as drift; legacy packs without a record count as recorded - Regression and lifecycle tests for the project-only bootstrap case
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves genuine drift warnings, includes relevant regression coverage, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Fixes #454 by preventing doctor from warning about unmarked CLAUDE files that mcs never managed.
Changes:
- Skips unmarked files when configured packs recorded no template sections.
- Preserves drift warnings for recorded sections and legacy packs without artifact records.
- Adds unit and integration regression coverage.
| File | Description |
|---|---|
| Tests/MCSTests/ProjectDetectorTests.swift | Expects unmanaged files to be skipped. |
| Tests/MCSTests/LifecycleIntegrationTests.swift | Covers hand-written global instructions after project-only sync. |
| Tests/MCSTests/CLAUDELocalFreshnessCheckTests.swift | Tests empty records, recorded sections, and legacy state. |
| Sources/mcs/Doctor/SectionValidator.swift | Gates missing-marker warnings on scope-specific artifact records. |
| Sources/mcs/Doctor/DoctorRunner.swift | Updates the freshness-check comment. |
Review effort: Balanced
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
After a project-only setup,
mcs doctorwarned that a hand-written~/.claude/CLAUDE.mdhas no mcs markers and told the user to runmcs sync --global. Following that hint would install packs globally that the user only wanted in a project. A CLAUDE file is now checked only when mcs recorded sections for it.Closes #454
Release note
mcs doctorno longer warns about a hand-written CLAUDE.md that mcs never wrote sections intoChanges
Test plan
swift testpasses locallyswiftformat --lint .andswiftlintpass without violationsmcs sync,mcs doctor)Checklist for engine changes
LifecycleIntegrationTestsorDoctorRunnerIntegrationTests)