Skip to content

fix: detect APM-installed skills#402

Merged
spboyer merged 2 commits into
mainfrom
spboyer-support-apm-skill-detection
Jul 1, 2026
Merged

fix: detect APM-installed skills#402
spboyer merged 2 commits into
mainfrom
spboyer-support-apm-skill-detection

Conversation

@spboyer

@spboyer spboyer commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Detect APM-compiled skills at .apm/skills/<skill-name>/SKILL.md under configured skill roots while preserving top-level SKILL.md precedence.
  • Carry the detected compiled skill directory into waza run so skill injection works when eval specs omit skill_directories.
  • Document APM-managed workspace support in the README and docs site references.

Closes #400

Validation

  • go test ./...
  • cd site && npm run build
  • make build && make test && make lint

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 run defaults so skill injection works without explicit skill_directories.
  • Document APM-managed workspace support (including precedence of top-level SKILL.md over 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 thread internal/workspace/workspace.go Outdated
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
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@spboyer spboyer marked this pull request as ready for review July 1, 2026 16:30
@spboyer spboyer enabled auto-merge (squash) July 1, 2026 16:30
@spboyer spboyer merged commit ddb391c into main Jul 1, 2026
9 checks passed
@spboyer spboyer deleted the spboyer-support-apm-skill-detection branch July 1, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support skill detection in APM-installed projects (.apm/ convention)

3 participants