ISSUE DESCRIPTION waza check eval discovery is inconsistent with coverage and run in…
- User
ISSUE DESCRIPTION
waza checkeval discovery is inconsistent withcoverageandrunin multi-skill workspacesSummary
In a multi-skill workspace,
waza coverage .andwaza run evals/.../eval.yamlboth recognize the eval structure, butwaza checkdoes not discover the related eval suite consistently.This creates a confusing user experience because the workspace appears valid for coverage and execution, but readiness checks report that no eval exists or fail to find the skill.
Environment
- Waza version:
0.31.0 - OS: Windows
- Shell: PowerShell
Workspace shape
This was reproduced in a repository with this structure:
textrepo/ ├── .waza.yaml ├── skills/ │ ├── development/skill-creator/SKILL.md │ ├── copilot-exclusive/mcp-ecosystem/SKILL.md │ ├── copilot-exclusive/fleet-parallel/SKILL.md │ ├── testing/eval-harness/SKILL.md │ └── copilot-exclusive/background-agent/SKILL.md └── evals/ ├── skill-creator/eval.yaml ├── mcp-ecosystem/eval.yaml ├── fleet-parallel/eval.yaml ├── eval-harness/eval.yaml └── background-agent/eval.yamlThe root
.waza.yamlincludes:yamlpaths: skills: skills/ evals: evals/ results: results/ server: resultsDir: resultsSteps to reproduce
From the workspace root:
powershellwaza coverage . waza check skills/development/skill-creator waza check skill-creator waza run evals/skill-creator/eval.yaml --task create-dev-skill-001 --trials 1 --output-dir results -vActual behavior
waza coverage .Coverage recognizes the pilot evals and shows the skill as partially covered.
Example outcome:
- Waza version:
- Assistant
I'll start by exploring the repository to understand the structure and locate the relevant code for
waza check. Let's first see what's in the root. - Assistant
Let me explore the repository structure more to understand the codebase.
- Assistant
Let me understand the structure better and look for the
checkcommand implementation. - Assistant
Let me find the check command implementation and understand the discovery logic.
- Assistant
Let me examine the check command implementation and the related test files.
- Assistant
Let me find the
checkReadinessfunction. It's likely in this file or an imported package. Let me search more. - Assistant
Let me see that function.
- Assistant
Now let me look at the
workspace.FindEvalfunction to understand how eval discovery works: - Assistant
Let me look at the workspace.FindEval function to understand how it works.
- Assistant
Now let me look at the workspace_resolve.go file to understand how workspace detection and resolution works.
- Assistant
Let me check the workspace test to understand the expected behavior.
- Assistant
Now I understand the issue. Let me look at the
scanForSkillsfunction in workspace.go more carefully. - Assistant
Let me see that function and surrounding code.
- Assistant
Now I understand the issue! The
scanForSkillsfunction only scans immediate children of the skills directory. For a multi-skill workspace with nested directories like:codeskills/ ├── development/ │ └── skill-creator/ │ └── SKILL.mdscanForSkills("skills/")would only check:skills/development→ looks forskills/development/SKILL.md→ not found, skipped
The actual skill is at
skills/development/skill-creator/SKILL.md, but the function never looks there because it only goes one level deep.Let me first check how
coveragediscovers skills to understand why it works differently: - Assistant
Let me see the
discoverSkillFilesfunction more closely. - Assistant
Now I understand the root cause. The
coveragecommand usesfilepath.WalkDirto recursively scan directories, butworkspace.scanForSkillsonly scans immediate children (one level deep). This means for a nested structure likeskills/development/skill-creator/SKILL.md, the workspace detection misses it.Let me check how the check command resolves workspaces:
- Assistant
Let me also check if there are any tests related to this issue.
- Assistant
Let me look at the check_workspace_test.go file.
- Assistant
Now I have a clear understanding of the issue. The
scanForSkillsfunction only scans immediate children of the skills directory. For nested structures likeskills/development/skill-creator/SKILL.md, the workspace detection misses the skills because it only checksskills/development(which doesn't have SKILL.md directly), and doesn't recursively checkskills/development/skill-creator/.Let me first create a reproduction script to confirm the issue:
- Assistant
Let me fix that and create the test repo properly:
- Assistant
Now let me try to build the waza binary and test it:
- Assistant
Let me check if Go is installed and set up the environment properly.
- Assistant
Let me set up the Go environment properly.
- Assistant
Let me check the environment and set it up properly.
- Assistant
Good! The binary built. Let me test it with the reproduction case:
- Assistant
Let me also test the path-based check:
- Assistant
Good! I can reproduce both issues:
waza check skill-creator→ "no SKILL.md found in /tmp/test-repo"waza check skills/development/skill-creator→ "Evaluation Suite: Not Found" (even though eval.yaml exists)
Both issues stem from the same root cause:
scanForSkillsonly scans immediate children, not recursively. Let me also check whatwaza coveragedoes: - Assistant
Coverage found the skill (it uses
filepath.WalkDirwhich is recursive), but it failed to parse the eval because of a YAML format issue. The important thing is that coverage uses recursive scanning while workspace detection doesn't.Now let me implement the fix. I need to modify
scanForSkillsininternal/workspace/workspace.goto be recursive: - Assistant
Let me check the current directory and go back to the repo:
- Assistant
Good. Now let me look at the full workspace.go file to understand the structure better:
- Assistant
Let me see the full imports and structure of workspace.go:
- Assistant
Let me check if
scanForSkillsis used elsewhere: - Assistant
Now let me implement the fix. I'll modify
scanForSkillsto be recursive: - Assistant
Now let me implement the fix. First, I'll add the
"io/fs"import: - Assistant
Let me use a different approach to add the import:
- Assistant
Now let me replace the
scanForSkillsfunction with a recursive version: - Assistant
Let me verify the changes:
- Assistant
Good! The changes look correct. Now let me rebuild the binary and test it:
- Assistant
Good! Now let me test with the reproduction case:
- Assistant
Excellent! The first issue is fixed!
waza check skill-creatornow works and finds both the skill and the eval suite. Let me test the second case: - Assistant
Perfect! Both issues are fixed! Now let me run the existing tests to make sure I didn't break anything:
- Assistant
I have one failing test. Let me look at it:
- Assistant
I see the issue. The recursive scan is too aggressive when scanning the root directory itself (step 4 in
DetectContext). It finds skills in arbitrary subdirectories likemy-skills/alpha/SKILL.mdeven when the configured skills directory isskills/.I need to be more careful. Let me look at how the function is called:
- Assistant
I see the issue. The recursive scan is too aggressive for step 4 (scanning the root directory). I need to create two versions: one recursive for configured skills directories, and one shallow for the root directory fallback.
Let me update the implementation:
- Assistant
Now I need to update the calls in
DetectContextto usescanForSkillsRecursivefor configured skills directories: - Assistant
Now let me rebuild and test:
- Assistant
Let me run the tests again:
- Assistant
Excellent! All workspace tests pass. Let me also run the check command tests:
- Assistant
All tests pass. Let me verify the fix works with the reproduction case again:
- Assistant
Let me also test with a more complex nested structure:
- Assistant
Let me fix the test script:
- Assistant
Excellent! The fix works for deeply nested structures. Let me run a broader set of tests to make sure nothing else is broken:
- Assistant
Let me also run any other related tests:
- Assistant
All tests pass. Let me look at the final state of the workspace.go file to verify the changes:
- Assistant
Good, the import was added. Let me also verify the scanForSkills functions:
- Assistant
Let me check where each function is used:
- Assistant
Perfect! The changes are correct:
- Line 134:
scanForSkillsRecursive(skillsDir)- scans configured skills directory recursively - Line 140:
scanForSkillsRecursive(githubSkillsDir)- scans .github/skills recursively - Line 154:
scanForSkills(absDir)- scans root directory with immediate children only (fallback)
Let me run one final comprehensive test to make sure everything works:
- Line 134:
- Assistant
All tests pass! The fix is complete. Let me verify the checklist:
CHECKLIST:
-
If an error was reported in the issue description, I have successfully reproduced it.
- ✅ Yes, I reproduced both errors:
waza check skill-creator→ "no SKILL.md found in /tmp/test-repo"waza check skills/development/skill-creator→ "Evaluation Suite: Not Found"
- ✅ Yes, I reproduced both errors:
-
- Assistant
The changes are minimal and focused. Let me now submit the changes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.