Skip to content

feat: add scope-reduction advisory check to waza check#219

Merged
spboyer merged 2 commits into
mainfrom
squad/183-scope-reduction-warning
Apr 22, 2026
Merged

feat: add scope-reduction advisory check to waza check#219
spboyer merged 2 commits into
mainfrom
squad/183-scope-reduction-warning

Conversation

@spboyer

@spboyer spboyer commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new scope-reduction advisory check to waza check that detects potential token-limit compression loss in SKILL.md files.

Closes #183

What it does

The checker parses SKILL.md for three capability signals:

Signal What it detects
USE FOR items Comma-separated items after USE FOR: lines
Level-2 headings ## Heading lines in the body
Numbered step sequences Consecutive 1. / 2. / 3. blocks

The total capability score is max(useForCount, headingCount, stepSequences). When the score falls below the threshold (default: 2), the checker emits a warning suggesting the skill may have lost capability scope due to token-limit compression.

Files changed

  • internal/checks/scope_reduction.go — New ScopeReductionChecker implementation
  • internal/checks/scope_reduction_test.go — 13 test cases covering all signal types and edge cases
  • internal/checks/score_checkers.go — Registered in AdvisoryCheckers() registry
  • cmd/waza/dev/display_test.go — Updated expected output strings (3 tests)
  • cmd/waza/dev/loop_test.go — Updated expected output strings (8 locations)
  • site/src/content/docs/reference/cli.mdx — Added scope-reduction documentation

Testing

  • 13 new unit tests for the checker itself
  • All existing tests updated and passing
  • go vet clean

Working as Linus (Backend Developer)

@github-actions github-actions Bot enabled auto-merge (squash) April 22, 2026 18:26
Copilot AI and others added 2 commits April 22, 2026 15:52
Add a new advisory checker (scope-reduction) that parses SKILL.md for
capability signals — USE FOR phrases, level-2 headings, and numbered
step sequences — and warns when few are detected, suggesting possible
token-limit compression loss.

- ScopeReductionChecker with configurable MinCapabilities threshold
- 13 unit tests covering all signal types and edge cases
- Updated display and loop tests for new advisory output line
- Added documentation in CLI reference (site/)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Run gofmt on scope_reduction.go and scope_reduction_test.go
- Fix unchecked type assertions (errcheck check-type-assertions: true)
  Use two-value form with require.True(t, ok) throughout test file
- Remove extra blank line between variable declarations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer spboyer force-pushed the squad/183-scope-reduction-warning branch from abecbce to a64496e Compare April 22, 2026 19:52
@spboyer spboyer merged commit 6aaebec into main Apr 22, 2026
6 checks passed
@spboyer spboyer deleted the squad/183-scope-reduction-warning branch April 22, 2026 19:56
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.

Waza compliance token limit forces scope reduction that silently degrades skill quality

2 participants