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:
repo/ ├── .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:paths: skills: skills/ evals: evals/ results: results/ server: resultsDir: resultsSteps to reproduce
From the workspace root:
waza 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:
skill-creatorappears with2tasks- other pilot skills also appear in the coverage grid
waza run evals/skill-creator/eval.yaml ...Run executes successfully enough to:
- load the skill directories
- run the selected task
- apply graders
- save a result JSON file under
results/...
waza check skills/development/skill-creatorOutput includes:
Evaluation Suite: Not Found - Waza version:
Assistant
I'll start by exploring the repository structure to understand the codebase and then locate the relevant files for the
check,coverage, andruncommands.Assistant
This is a Go project. Let me explore the structure more, especially the
cmdandinternaldirectories where the CLI commands are likely defined.Assistant
Now let me look at the
cmd_check.gofile since that's where the issue is:Assistant
Let me see the full file, especially the
checkReadinessfunction:Assistant
Let me continue reading the file, especially the
checkReadinessfunction and how it discovers evals:Assistant
Now I can see the key part. The
checkReadinessfunction checks for evals in three ways:- If
wsCtxis provided, it usesworkspace.FindEval(wsCtx, sk.Frontmatter.Name) - It tries auto-detection from the current working directory
- It falls back to a co-located
eval.yamlin the skill directory
The problem is in the
runCheckfunction. When a path likeskills/development/skill-creatoris passed, the code callscheckReadiness(skillDir, nil)- passingnilforwsCtx. Let me look atresolveWorkspaceandworkspace.LooksLikePath:- If
Assistant
Now let me look at the
workspacepackage to understandLooksLikePathand how it works:Assistant
Now I understand the issue. Let me look at the key flow:
- When the user runs
waza check skills/development/skill-creator, therunCheckfunction checks if the argument looks like a path usingworkspace.LooksLikePath(args[0]). - Since
"skills/development/skill-creator"contains/, it returnstrue. - Then it calls
checkReadiness(skillDir, nil)withwsCtxasnil! - Because
wsCtxisnil, the eval discovery logic incheckReadinesscan't use the workspace-awareworkspace.FindEval()function with proper context.
Let me also check the
coveragecommand to see how it handles the same scenario:- When the user runs
Assistant
I see! The
coveragecommand has its own discovery logic that scans theevals/directory and skill directories independently. It doesn't use theworkspacepackage in the same way.Now let me look at the tests to understand the expected behavior better:
Assistant
This is very helpful! I can see that
TestCheckCommand_WorkspaceWithSeparatedEvaltests the case where the eval is in the separated convention (evals/{skill-name}/eval.yaml), and it passes the skill name as an argument, not the path.Now let me understand the issue more precisely. Looking at the
runCheckfunction:-
When the user runs
waza check skills/development/skill-creator:workspace.LooksLikePath("skills/development/skill-creator")returnstruebecause it contains/- So it goes directly to
checkReadiness(skillDir, nil)withwsCtxset tonil - Without
wsCtx, the eval discovery incheckReadinessfalls back to auto-detection from CWD or co-located eval
-
When the user runs
waza check skill-creator:workspace.LooksLikePath("skill-creator")returnsfalse- So it goes to
resolveWorkspace(args)which properly detects the workspace - Then
runCheckForSkillsis called with the workspace context - The eval discovery should work correctly here
-
Assistant
So in
resolveWorkspace, when the arg looks like a path, it just returns the full context with all skills. This means inrunCheck, when a path is passed, it bypasses the workspace resolution entirely.The fix should be: when a path argument is provided, we should still resolve the workspace and pass the workspace context to
checkReadinessso that eval discovery works properly.Let me now create a test script to reproduce the issue first:
Assistant
Let me create a test workspace to reproduce the issue:
Assistant
Now let me build and test the
wazaCLI:Assistant
Continue
Assistant
Now let me test the issue:
Assistant
I've reproduced the issue. The output shows
Evaluation Suite: Not Foundeven though the eval exists atevals/skill-creator/eval.yaml.Now let's test with just the skill name (not the path):
Assistant
Interesting - so the skill name lookup doesn't work here either. The issue is more nuanced. Let me check how the workspace detection works:
Assistant
Hmm, it seems like workspace detection isn't finding the skills in the nested directory. Let me check if the
.waza.yamlconfig is being read properly:Assistant
Let me look at the project config loading:
Assistant
Now I understand the project structure better. Let me trace through how the
resolveWorkspacefunction works with the config options:The key insight is in
configDetectOptions():- It loads the
.waza.yamland extractscfg.Paths.Skillsandcfg.Paths.Evals - If
cfg.Diris set, it joins the paths with the config directory
Looking at
DetectContextinworkspace.go:- Step 3 checks
skillsDir = filepath.Join(absDir, o.skillsDir)for skills
The issue is that when running
waza check skills/development/skill-creator:- The argument is treated as a path (contains
/) - It bypasses workspace detection and calls
checkReadiness(skillDir, nil) - The
wsCtxisnil, soworkspace.FindEval()is never called with proper context
Let me look more carefully at how the path resolution works and create a proper fix:
- It loads the
Assistant
Now I understand the issue clearly. The fix should be: when a path argument is provided, we should still try to detect the workspace context and pass it to
checkReadiness(). This way, the eval discovery will work properly.Let me look at how the
checkReadinessfunction uses the workspace context:Assistant
I see - when
wsCtxisnil, it falls back to auto-detection from the working directory. But there's an issue: the auto-detection in the fallback doesn't useconfigDetectOptions()to get the custom paths from.waza.yaml.Let me check the existing tests that pass to understand the expected behavior:
Assistant
This test uses the skill name (
eval-test) as the argument - not the path. So the issue is specifically when passing a path.Now let me write my fix. The key change is in the
runCheckfunction: when a path argument is provided, we should still detect the workspace context and pass it tocheckReadiness(). This ensures eval discovery works correctly.Assistant
Let me add this test to the test file and run it to confirm the issue:
Assistant
Let me run this test:
Assistant
I accidentally appended the full file with
packagedeclaration. Let me fix this:Assistant
Now let me add just the test function:
Assistant
Now run the test to confirm it fails:
Assistant
The test fails as expected - it shows "Evaluation Suite: Not Found" when it should find the eval. Now let me implement the fix.
The fix should modify the
runCheckfunction to:- When a path argument is provided, still detect the workspace context
- Pass the workspace context to
checkReadiness()so eval discovery works properly
Assistant
I need to use the proper tool to open the file. Let me use the bash command to view and edit it.
Assistant
Now I understand the code structure. The fix needs to modify the section where a path is detected. Instead of passing
niltocheckReadiness, we should detect the workspace context and pass it. Let me create the fix:Assistant
Now I'll implement the fix. The key change is to detect the workspace context before calling
checkReadinesswhen a path argument is provided:Assistant
Good, the fix is in place. Now let me rebuild and test:
Assistant
Now let me run the new test:
Assistant
The test is still failing. Let me investigate further. The issue is that even with the workspace context, the
FindEvalfunction needs the skill to be in the workspace's skills list. Let me check howFindEvalworks:Assistant
I see -
FindEvalfirst callsFindSkillwhich requires the skill to be inwsCtx.Skills. When I detect the workspace from CWD, the skills are scanned from theskills/directory, but the skill atskills/nested/eval-test/SKILL.mdis found and added to the list.Wait, let me check how
scanForSkillsworks - it only scans immediate children, not nested directories:Assistant
That's the issue! The
scanForSkillsfunction only looks at immediate children of the skills directory. So if a skill is atskills/nested/eval-test/SKILL.md, it won't be found becauseskills/nesteddoesn't have aSKILL.mdfile directly in it.But wait, looking back at the issue description:
skills/ │ ├── development/skill-creator/SKILL.mdThe skills are nested in subdirectories like
development/skill-creator. So the workspace detection needs to scan recursively. Let me check if there's a recursive scan function or if we need to add one.Let me look at the
DetectContextfunction more carefully:Assistant
The current
scanForSkillsonly looks at immediate children. But the issue description shows a nested structure. Let me check how the coverage command discovers skills - it might walk the directory tree:Assistant
The coverage command uses
filepath.WalkDirwhich recursively walks the directory tree. That's why it finds the nested skills! But the workspace detection only usesscanForSkillswhich only looks at immediate children.There are two potential fixes:
- Make
scanForSkillsrecursive - In
checkReadiness, when workspace detection fails to find the skill, fall back to using the skill directory path to infer the eval location
Let me think about this more carefully. The issue is:
- When passing a path like
skills/development/skill-creator, the workspace context is detected - But the skill isn't in the workspace's skills list because it's nested
- So
FindEvalfails becauseFindSkillfails
The proper fix should make the workspace detection recursive, or alternatively, we should make
checkReadinesssmarter about finding evals when the skill isn't in the workspace's skills list.Let me look at how
coverageworks - it discovers both skills and evals using recursive walking. For consistency, the workspace detection should also support nested skills.- Make
Assistant
Let me check the workspace tests:
Assistant
Looking at the existing tests, they only test non-nested skills (e.g.,
skills/alpha/SKILL.md, notskills/development/alpha/SKILL.md). The issue description specifically mentions nested skills.Looking more closely at the issue, I think the real problem is a bit different. The
scanForSkillsfunction only scans immediate children, but the issue's workspace has nested directories likeskills/development/skill-creator/SKILL.md. Thecoveragecommand usesfilepath.WalkDirwhich recursively finds these skills.The proper fix should be to make
scanForSkillsrecursive, so it can find skills in nested directories. This will make the workspace detection consistent with the coverage command.Let me modify
scanForSkillsto be recursive:Assistant
Let me look at the full function and think about how to make it recursive:
Assistant
Now I'll create a recursive version of
scanForSkills. I'll add a helper functionscanForSkillsRecursiveand update the comment:Assistant
Now let me replace the old
scanForSkillsfunction with the new recursive version:Assistant
Let me verify the change was applied correctly:
Assistant
The change looks good. Now let me run the tests to make sure existing tests still pass:
Assistant
One test failed:
TestDetectContext_WithCustomSkillsDir. Let me look at this test:Assistant
I see the issue. The test expects that with default detection (no custom skills dir), skills in
my-skills/alpha/SKILL.mdshould NOT be found (becausemy-skillsis not a recognized skills directory). But now with my recursive scan, it's finding them because the defaultskills/directory scan recurses into all subdirectories includingmy-skills/.Wait, no - the test creates the skill at
my-skills/alpha/SKILL.md, not atskills/my-skills/alpha/SKILL.md. Let me re-read the test...The test writes to
filepath.Join(root, "my-skills", "alpha", "SKILL.md"). With default detection:DetectContextchecks forskills/(default)- There's no
skills/directory, so it should returnContextNone
The problem is that step 4 of
DetectContextscans the root directory for child directories containing SKILL.md:Assistant
I see. The issue is:
- Step 3 uses
scanForSkills(skillsDir)for the configured skills directory - Step 3b uses
scanForSkills(githubSkillsDir)for .github/skills - Step 4 uses
scanForSkills(absDir)for generic root directory scan
The test
TestDetectContext_WithCustomSkillsDircreates a skill inmy-skills/alpha/SKILL.md, and with default config, step 4 should NOT find it becausemy-skillsis not an immediate child with SKILL.md.My recursive change makes step 4 also scan recursively, which breaks this test.
Let me revert my change to
scanForSkillsand instead create a separate recursive function only used for step 3 and 3b:- Step 3 uses
Assistant
Let me revert this change and take a different approach:
Assistant
Now let me take a more targeted approach. Instead of making the general
scanForSkillsrecursive, I'll create a separate recursive function and only use it for the configured skills directory:Assistant
Now I'll add a recursive scan function and use it only for the configured skills directory (steps 3 and 3b), while keeping the non-recursive scan for step 4:
Assistant
Now I'll add a recursive version and use it in the appropriate places. Let me add
scanForSkillsRecursiveafterscanForSkills:Assistant
Now let me update the
DetectContextfunction to usescanForSkillsRecursivefor the configured skills directory:Assistant
Let me verify the changes:
Assistant
Good. Now let me verify step 4 still uses the non-recursive scan:
Assistant
Step 4 still uses
scanForSkills(non-recursive), which is correct.Now let me run the workspace tests:
Assistant
All workspace tests pass. Now let me run the check command tests including our new test:
Assistant
The test passes now. Let me run all the check-related tests to make sure nothing is broken:
Assistant
All tests pass. Now let me rebuild the binary and test with my manual test workspace to confirm the fix works end-to-end.
Assistant
The fix is working - the output now shows "Evaluation Suite: Found" instead of "Not Found". The schema errors are just because my test eval.yaml was minimal, but the important thing is that the eval was discovered.
Now let me also test the skill-name-based lookup to make sure that still works:
Assistant
Excellent! Both the path-based and name-based lookups now correctly find the eval. Let me also run the broader test suite to ensure I haven't broken anything else:
Assistant
All tests pass. Let me verify the complete test results are clean by checking if any tests failed.
Assistant
All tests pass. Let me also run the full test suite for the internal packages to make sure nothing is broken:
Assistant
I need to revert the test file changes since the instructions say not to add new tests to the repository.
Assistant
Now let me verify that all the existing tests still pass without the new test I added:
Assistant
Let me review my changes and verify they are correct by looking at the diff and summarizing what I did.
Assistant
Let me fix the indentation issue in the diff - there's a comment that lost its tab:
Assistant
I see there's an indentation issue with the comment. Let me fix it:
Assistant
Good, the indentation is fixed. Let me run the tests again to make sure everything still works:
Assistant
All tests pass. Let me now review my final changes and make sure they are complete:
Assistant
Let me do a final test with a more comprehensive test case to confirm the fix works for the exact scenario described in the issue:
Assistant
Now let me test the different scenarios mentioned in the issue:
Assistant
All three scenarios work correctly:
waza check skills/development/skill-creator- now finds the eval suite (was "Not Found" before)waza check skill-creator- finds the eval suitewaza coverage .- correctly shows both skills
Let me also test edge cases to ensure the fix handles them properly:
Assistant
All edge cases work correctly. Let me run all tests one more time to confirm everything is passing:
Assistant
Now let me summarize what I've done and verify the checklist:
Summary of Changes
I made two changes to fix the issue where
waza checkwas inconsistent with and in multi-skill workspaces:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.