Fix ProjectDetector not recognizing .mcs-project as project root#309
Merged
Fix ProjectDetector not recognizing .mcs-project as project root#309
Conversation
- Add .claude/.mcs-project as third project root marker in findProjectRoot(), fixing doctor/export/check-updates failing to detect projects without .git or CLAUDE.local.md - Reorder ProjectStateFileCheck to check .mcs-project first and pass when it exists without CLAUDE.local.md (common for template-less packs) - Add tests for .mcs-project detection and ProjectStateFileCheck without CLAUDE.local.md
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
mcs doctor,mcs export, andmcs check-updatesfailed to detect projects that have.claude/.mcs-projectbut no.git/orCLAUDE.local.md. This is common for packs that provide only skills, MCP servers, or settings (no templates).mcs synccreates the project state at CWD but the other commands usedProjectDetector.findProjectRoot()which only recognized.git/andCLAUDE.local.md.Changes
.claude/.mcs-projectas a third project root marker inProjectDetector.findProjectRoot(), so all commands that walk up from CWD (doctor, export, check-updates) can detect template-less projectsProjectStateFileCheck.check()to try.mcs-projectfirst — passes when it exists even withoutCLAUDE.local.md, only warns for legacy state (CLAUDE.local.md present but .mcs-project missing)ProjectStateFileCheckdoc comment to reflect the full three-way behavior (pass/warn/skip).mcs-project-only project root detection andProjectStateFileCheckpassing withoutCLAUDE.local.mdTest plan
swift testpasses locally (915 tests, 0 failures)swiftformat --lint .andswiftlintpass without violationsmcs doctorfrom a template-less project)