detect_scope() had the same bug class fixed in new-agent.sh (099bdec): it checked for a .git directory before checking whether it had reached $HOME, so a dotfiles-managed home directory (yadm, chezmoi bare-repo, etc.) made validate.sh misresolve to project scope, deriving the counterpart as ~/.github/agents/<name>.agent.md instead of the correct ~/.copilot/agents/<name>.agent.md and failing with a false "counterpart file not found". Check the $HOME boundary before the .git check, same fix shape as099bdec. Found via post-implementation review of issue #89.
11 KiB
11 KiB