waza check eval discovery is inconsistent with coverage and run in multi-skill workspaces
Summary
In a multi-skill workspace, waza coverage . and waza run evals/.../eval.yaml both recognize the eval structure, but waza check does 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:
Coverage recognizes the pilot evals and shows the skill as partially covered.
Example outcome:
Assistant
Now let's fix the cmd_check.go code to use configDetectOptions() consistently, and pass the skillDir context properly.
Assistant
Build succeeds. Now let's run the workspace tests:
Assistant
Now let's rename the recursive function and re-add the original shallow scanForSkills:
Assistant
Let me open the file first then use edit properly.
Assistant
Now editing lines 286-330:
Assistant
Now let's build and test.
Assistant
All workspace tests pass. Now let's fix cmd_check.go to use configDetectOptions() and to pass down skillDir correctly when detecting workspace context.
Assistant
Now update cmd_check.go to use these helpers:
Assistant
Now let's build:
Assistant
Build succeeds. Now let's reproduce the exact scenario from the issue to verify the fix.
Assistant
Let me rewrite the eval and task files to a correct schema, then verify waza run and waza check work fully.
Assistant
All three commands (coverage, run, check by path, check by name) now consistently discover the same eval suite. Let's verify check by name too and check the schema error is fixed now.
Assistant
Both check invocations now find the eval, matching coverage and run. Now let's test check . and no-arg workspace discovery to ensure multi-skill listing works too.
Assistant
Excellent! check . now correctly performs multi-skill discovery, matching coverage's output style, and only skill-creator (which has the real eval) shows ✅ for Eval, while placeholders (without eval.yaml) correctly show ⚠️. Let's run the full test suite now to make sure nothing broke.
Assistant
All tests pass. Now let's double-check the go vet and lint if available, and review the diff.
Assistant
Good — this confirms the pre-existing bug is now fixed too, and consistent with coverage.
Assistant
Good — same 4 skills discovered by both check . and coverage . now, confirming consistency (the yaml warnings there are unrelated preexisting things in this repo's own eval files, not something we should touch).
Let's run relevant existing tests specifically for check/coverage/workspace to be thorough:
Assistant
No FAIL lines found (grep found nothing => exit 1, expected). Let's confirm with a plain run:
Assistant
All pass. Let's clean up temporary test artifacts and remove the temporary binaries/dirs (not part of repo, but let's make sure we haven't left stray files in the repo).
Assistant
Only the intended source files are modified. Let's remove the temp binaries/dirs to keep things tidy (they're outside repo anyway, but good hygiene):
Assistant
No formatting issues. Let's view the final versions of the changed sections one more time for a sanity review.
Assistant
Let's re-run our repro scenarios end-to-end once more to confirm everything still works with this refinement, including the invalid-path edge case.
Assistant
All scenarios work correctly:
coverage, check <path>, check <name>, check ., and run all consistently discover the eval suite.
Invalid paths still correctly produce an error instead of silently falling back to scanning the whole workspace.
Let's run the full test suite one final time to make sure everything is solid, then clean up.
Assistant
All tests pass. Let's clean up temp artifacts.
Assistant
Summary
I've resolved the issue by fixing the root cause of the discovery inconsistency between , , and :
Assistant
Now let me go through the checklist explicitly:
Assistant
Checklist review:
If an error was reported in the issue description, I have successfully reproduced it. ✅ I built a synthetic workspace matching the exact structure from the issue (categorized skills under skills/<category>/<skill-name>/, evals under evals/<skill-name>/, root .waza.yaml) and confirmed both waza check skills/development/skill-creator (showed "Evaluation Suite: Not Found") and waza check skill-creator (showed "no SKILL.md found in ") reproduced exactly as described, while and succeeded — confirming the inconsistency.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
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-creator
Output includes:
text
Evaluation Suite: Not Found
waza check skill-creator
Output includes:
text
no SKILL.md found in <workspace root>
Expected behavior
waza check should discover the corresponding eval suite consistently when:
the workspace has a valid root .waza.yaml
the skill exists under skills/.../<skill-name>/SKILL.md
the eval exists under evals/<skill-name>/eval.yaml
coverage and run already succeed against the same workspace
At minimum, check should either:
locate the matching eval and report it, or
explain the discovery rule clearly enough that the user can resolve the mismatch
Why this matters
For new users, check looks like the natural readiness command. When it disagrees with coverage and run, it is hard to tell whether:
the workspace is invalid
the eval naming/path convention is wrong
or check is using different discovery rules
This makes initial adoption harder, especially in multi-skill repositories.
Additional note
This may be either:
a discovery bug in check, or
a documentation/UX gap where check expects a different invocation pattern than users would infer from coverage and run
Either way, the current behavior is surprising.
Possible improvements
Any of these would help:
Make check reuse the same discovery logic as coverage
Document the exact resolution rule from skill path/name to eval path
Add debug output showing where check looked for the eval
Improve the error message when the skill name/path is interpreted differently than expected
Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work.
For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state.
You can also reset all changes in the repository using git reset --hard command.
Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later.
Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands.
However you don't need to use git add or git commit before submitting your changes. In fact,
submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.
CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
If an error was reported in the issue description, I have successfully reproduced it.
If an error was reported in the issue description, I have confirmed that my fix resolves the error.
I have thought about edge cases and made sure my fix handles them as well.
I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass.
I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /waza, current file: none) bash-$
waza check
waza coverage
waza run
Root cause: internal/workspace/workspace.go's scanForSkills function (used by DetectContext, which underlies check's workspace detection) only scanned the immediate children of the skills/ directory for SKILL.md files. This meant category-style layouts like skills/development/skill-creator/SKILL.md were invisible to check. In contrast, waza coverage used filepath.WalkDir to recursively scan for SKILL.md files at any depth. This mismatch caused check to fail to find skills (and thus fail to find their evals) in exactly the kind of categorized, multi-skill workspace described in the issue.
Additionally, check's per-command eval-discovery fallback ignored .waza.yaml-configured skills/evals paths (didn't use configDetectOptions()), and the "looks like a path" argument branch never attempted workspace detection at all (passing nil context), so it couldn't find evals unless they were co-located.
Changes made:
internal/workspace/workspace.go: Added scanForSkillsRecursive (mirroring coverage's recursive WalkDir discovery) and used it for the configured skills/ and .github/skills/ directories, while keeping the original shallow scanForSkills for the generic "sibling directories in cwd" fallback (to avoid false positives there).
cmd/waza/workspace_resolve.go: Added configDetectOptionsForDir and detectWorkspaceForDir helpers that resolve .waza.yaml-based skills/evals conventions relative to an arbitrary directory (not just cwd), reusable by any command.
cmd/waza/cmd_check.go:
Passed a properly detected workspace context to checkReadiness in all code paths (path-arg, name-arg, and fallback) instead of nil.
Fixed the internal eval-discovery fallback in checkReadiness to use configDetectOptions() and to also try detection anchored at the skill directory itself.
Made waza check . (or any path without its own SKILL.md) fall back to full multi-skill workspace detection instead of erroring with "no SKILL.md found", while still correctly erroring for genuinely invalid/non-existent paths.
I verified the fix against a workspace reproducing the exact issue structure: waza coverage ., waza check skills/development/skill-creator, waza check skill-creator, waza check ., and waza run evals/skill-creator/eval.yaml ... all now consistently discover the same eval, and the full existing test suite (go test ./...) passes.
waza coverage .
waza run
If an error was reported in the issue description, I have confirmed that my fix resolves the error. ✅ After the fix, both waza check skills/development/skill-creator and waza check skill-creator now report "Evaluation Suite: Found" with the correct eval path, matching coverage and run. I also fixed a related pre-existing bug (waza check . failing in multi-skill workspaces with "no SKILL.md found"), which is part of the same discovery-consistency problem described in the issue's documented usage (waza check .).
I have thought about edge cases and made sure my fix handles them as well. ✅ Specifically handled: custom skillsDir/evalsDir names from .waza.yaml (via configDetectOptionsForDir), .github/skills/ convention, hidden/node_modules/vendor directory exclusion during recursive scan, avoiding false-positive "skill" detection at the scan root itself, and preserving correct error behavior for genuinely invalid/non-existent skill paths (verified with a skills/does-not-exist test — it still correctly errors instead of silently falling back to scanning the whole workspace).
I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. ✅ Ran go build ./..., go vet ./..., and go test ./... — all 43 packages with tests pass, including internal/workspace, cmd/waza, and cmd/waza/dev which are most directly affected.