Skip to content

feat: focused test generation in waza suggest (closes #357)#380

Merged
spboyer merged 5 commits into
mainfrom
spboyer-issue-357-suggest-enhance
Jun 28, 2026
Merged

feat: focused test generation in waza suggest (closes #357)#380
spboyer merged 5 commits into
mainfrom
spboyer-issue-357-suggest-enhance

Conversation

@spboyer

@spboyer spboyer commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Add waza suggest steering flags: --count, --focus, --force, alongside existing dry-run/apply behavior.
  • Include per-task confidence and rationale in suggestion output while keeping written task YAML schema-valid.
  • Make --apply merge-safe with task-id/path overwrite checks, force override, and clear diffs for task conflicts.
  • Validate generated eval/task content through schema validation before writing.
  • Document focused negative-trigger generation in README and site CLI reference.

Closes #357

Validation

  • PATH=/opt/homebrew/bin:$PATH go test ./...
  • PATH=/opt/homebrew/bin:$PATH make lint
  • cd site && PATH=/opt/homebrew/bin:$PATH npm ci --no-audit --no-fund && PATH=/opt/homebrew/bin:$PATH npm run build

Copilot AI added 2 commits June 28, 2026 06:51
Extend `waza suggest` with steerable generation and merge-safe apply:

- New flags: --count, --focus, --force (in addition to existing
  --dry-run / --apply / --model / --output-dir / --format)
- Per-case confidence (0-1) and rationale referencing the SKILL.md span
- --apply is merge-safe: existing eval.yaml is preserved (new task
  files picked up via existing tasks: glob), and existing task /
  fixture files (by path or task id) are never overwritten unless
  --force is also passed
- Generated tasks are schema-validated via internal/validation before
  being written to disk
- Focus categories: triggers, negative-triggers, edge-fixtures,
  do-not-use-for, parameters
- Tests cover focus directives, count guidance, overwrite safety
  (with and without --force), duplicate task id detection (in-batch
  and against existing tasks), and schema validation failures
- README.md and site CLI reference updated with new flags + worked
  examples

Closes #357

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 28, 2026 10:57

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

Adds steerable, merge-safe synthetic test generation to waza suggest, aligning with #357 by introducing focus/count controls, per-task metadata in dry-run/JSON output, overwrite safety checks, and schema validation before writing artifacts.

Changes:

  • Add --count, --focus, and --force flags to waza suggest, with validation and updated help/docs.
  • Extend suggestion payload to include per-task confidence/rationale (kept out of written task YAML), and validate generated eval/task YAML via JSON schema before writing.
  • Make --apply merge-safer by default (skip overwriting existing eval.yaml; refuse task/fixture overwrites unless forced; show diffs on task conflicts) and add tests for these behaviors.
Show a summary per file
File Description
site/src/content/docs/reference/cli.mdx Documents new waza suggest flags, merge-safety behavior, and a worked focused example.
README.md Updates waza suggest docs and examples to cover count/focus/force and metadata behavior.
internal/suggest/suggest.go Implements focus categories, schema validation, overwrite/id-collision safeguards, diff output, and force/merge-safe write options.
internal/suggest/prompt.go Updates LLM prompt schema/instructions to request confidence/rationale and honor count/focus directives.
cmd/waza/cmd_suggest.go Wires new CLI flags into generation + apply flow, including argument validation and force/apply constraints.
internal/suggest/suggest_test.go Updates existing tests for the new WriteToDir signature.
internal/suggest/suggest_apply_test.go Adds tests for focus directives, overwrite/id safety, and schema validation failures.
internal/suggest/resolve_test.go Updates tests for the new WriteToDir signature.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment thread internal/suggest/suggest.go
Comment thread internal/suggest/suggest.go
Comment thread internal/suggest/suggest.go
Comment thread cmd/waza/cmd_suggest.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 28, 2026 11:24

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.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment thread internal/suggest/suggest.go
Comment thread site/src/content/docs/reference/cli.mdx Outdated
Comment thread internal/suggest/suggest.go
Comment thread internal/suggest/suggest.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer spboyer merged commit c330899 into main Jun 28, 2026
9 checks passed
@spboyer spboyer deleted the spboyer-issue-357-suggest-enhance branch June 28, 2026 11:41
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.

feat: Synthetic test case generation from skill spec

3 participants