fix(onboard): skip legacy AGENT.md when copying embedded workspace templates

The workspace/ directory contains both AGENT.md (legacy) and AGENTS.md
(current). copyEmbeddedToTarget was copying both, causing the test
TestCopyEmbeddedToTargetUsesAgentsMarkdown to fail. Skip AGENT.md
during the walk to match the expected behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mingmxren 2026-03-04 01:58:58 +08:00
parent aead637d10
commit 3c2b6e8121

View file

@ -70,6 +70,11 @@ func copyEmbeddedToTarget(targetDir string) error {
return nil
}
// Skip legacy file superseded by AGENTS.md
if filepath.Base(path) == "AGENT.md" {
return nil
}
// Read embedded file
data, err := embeddedFiles.ReadFile(path)
if err != nil {