fix: detect APM-installed skills#402
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Waza’s workspace detection and waza run defaults to recognize APM-compiled skills located under .apm/skills/<name>/SKILL.md, ensuring these skills can be discovered and injected even when eval specs omit skill_directories. It also documents the APM layout and precedence rules across the README and docs site.
Changes:
- Extend workspace detection to find APM-compiled skills and track the originating “source” directory for eval discovery.
- Propagate detected skill directories into
waza rundefaults so skill injection works without explicitskill_directories. - Document APM-managed workspace support (including precedence of top-level
SKILL.mdover APM output).
Show a summary per file
| File | Description |
|---|---|
| site/src/content/docs/reference/waza-yaml.mdx | Documents APM compiled-skill detection and precedence in workspace discovery. |
| site/src/content/docs/reference/schema.mdx | Adds schema reference notes for APM skill detection and precedence behavior. |
| site/src/content/docs/reference/cli.mdx | Documents waza run support for APM-managed skills and updates --skills notes. |
| README.md | Adds APM workspace layout examples and precedence rules for SKILL.md selection. |
| internal/workspace/workspace.go | Implements APM compiled-skill scanning and SourceDir-aware eval lookup. |
| internal/workspace/workspace_test.go | Adds tests for APM layout detection, precedence, and eval lookup via SourceDir. |
| cmd/waza/cmd_run.go | Carries detected skill directories into default skill paths for skill injection. |
| cmd/waza/cmd_run_workspace_test.go | Adds an integration-style test ensuring waza run workspace detection works for APM skills. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Low
Comment on lines
+455
to
+463
| name := d.Name() | ||
| if name == ".apm" { | ||
| apmSkills, scanErr := scanDirectAPMSkills(filepath.Dir(path)) | ||
| if scanErr != nil { | ||
| return scanErr | ||
| } | ||
| skills = append(skills, apmSkills...) | ||
| return fs.SkipDir | ||
| } |
Member
Author
There was a problem hiding this comment.
Good call — refactored in 88ae76d. scanForAPMSkillsUnder now just os.ReadDirs the parent, checks each immediate child for <child>/.apm/skills, and stops there. No walk into tasks/, fixtures, etc.
…output Address review feedback on #402: instead of walking into every candidate skill directory until we hit a .apm folder, list direct children of the parent dir and check each one for <child>/.apm/skills. Skip anything without APM output so we never descend into tasks/, fixtures/, etc. in large skill repos. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.apm/skills/<skill-name>/SKILL.mdunder configured skill roots while preserving top-levelSKILL.mdprecedence.waza runso skill injection works when eval specs omitskill_directories.Closes #400
Validation
go test ./...cd site && npm run buildmake build && make test && make lint