-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Title: Respect ambiguous platform detection in resolveProjectPlatform instead of defaulting to claude-code
Summary
resolveProjectPlatform() still defaults to claude-code when bmalph/config.json is missing and platform detection is ambiguous. detectPlatform() now reports ambiguous root-only markers correctly, but that signal is discarded by the resolver fallback.
Current behavior
In configless projects:
.cursor/correctly resolves tocursor- root-only
AGENTS.mdis treated by detection as ambiguous betweencodexandcursor - root-only
CLAUDE.mdis treated by detection as ambiguous betweenclaude-codeandcursor - but
resolveProjectPlatform()still returnsclaude-codewheneverdetection.detectedis null
Relevant code:
src/platform/detect.tssrc/platform/resolve.ts
Why this matters
This does not block the normal bmalph init --platform cursor -> implement -> run flow because initialized projects have explicit config. It does leave configless edge cases misaligned with the intended Cursor/Codex/Claude detection contract and can produce misleading status/doctor guidance.
Expected behavior
When config is missing and detection is ambiguous, the resolver should not silently default to claude-code.
Possible directions:
- return an explicit ambiguity result from the resolver and make callers handle it
- or raise a targeted error/warning telling the user to set the platform explicitly
- but do not collapse ambiguous detection into
claude-code
Acceptance criteria
resolveProjectPlatform()does not silently resolve ambiguous root-only markers toclaude-codeAGENTS.md-only projects are not treated asclaude-codeCLAUDE.md-only projects are not treated asclaude-codeunless there is an unambiguous Claude marker- caller-facing commands (
status,doctor, any other resolver consumers) produce explicit guidance for ambiguous detection paths - tests cover the ambiguous detection + resolver behavior end to end