Skip to content

feat(#209): Add skill command verification to QA workflow - #216

Merged
admarble merged 2 commits into
mainfrom
feature/209-feat-qa-add-skill-command-verification-before-read
Jan 31, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/209-feat-qa-add-skill-command-verification-before-read

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Adds Section 6a "Skill Command Verification" to QA skill for validating CLI commands in skill files
  • Adds skill-specific adversarial prompts to self-evaluation (Section 5)
  • Gates READY_FOR_MERGE verdict on command verification passing
  • Prevents issues like feat(qa): Add CI status awareness to verdict logic #178 where gh pr checks --json conclusion passed QA but failed at runtime

Changes

New Section 6a: Skill Command Verification (REQUIRED for skill changes)

When .claude/skills/**/*.md files are modified:

  1. Detection: Identifies skill file changes using git diff
  2. Extraction: Pulls CLI commands (gh, npm, npx, git) from code blocks and inline backticks
  3. Verification: Validates command syntax using --help output
  4. JSON Field Validation: Verifies field names in commands like gh pr checks --json X
  5. Placeholder Handling: Skips execution for commands with <placeholder> or ${VAR}, but still verifies fields
  6. Verdict Gating: Failed verification blocks READY_FOR_MERGE

New Skill-Specific Self-Evaluation Prompts

Added to Section 5 (Adversarial Self-Evaluation) when skills are modified:

  • Command verified: Did you execute at least one referenced command?
  • Fields verified: For JSON commands, do field names match actual output?
  • Patterns complete: What variations might users write that aren't covered?
  • Dependencies explicit: What CLIs/tools does this skill assume are installed?

Updated Verdict Algorithm (Section 7)

Now includes skill_verification as a gate:

  • Passed → READY_FOR_MERGE allowed
  • Failed → AC_MET_BUT_NOT_A_PLUS (blocks merge)
  • Skipped → READY_FOR_MERGE with note
  • Not Required → No impact

Test Plan

  • Build passes (npm run build)
  • Manual: QA skill correctly detects skill file changes
  • Manual: Commands are extracted from modified skill files
  • Manual: JSON field validation works (e.g., gh pr checks --help)
  • Manual: Verdict blocks READY_FOR_MERGE when verification fails

Pre-existing Test Failures

Note: There are 12 failing tests in state-update-cli.test.ts and state-manager.test.ts related to PR commands. These failures exist on main branch and are unrelated to this PR (verified by running tests with stash).

Closes #209

🤖 Generated with Claude Code

Adds a new Section 6a "Skill Command Verification" to the QA skill that:
- Detects when .claude/skills/**/*.md files are modified
- Extracts CLI commands (gh, npm, npx, git) from skill files
- Verifies command syntax using --help output
- Validates JSON field names for commands like `gh pr checks --json`
- Handles placeholders gracefully (skip execution, still verify fields)
- Gates READY_FOR_MERGE verdict on verification passing

Also adds skill-specific adversarial prompts to self-evaluation (Section 5):
- Command verified: Did you execute at least one referenced command?
- Fields verified: For JSON commands, do field names match actual output?
- Patterns complete: What variations might users write that aren't covered?
- Dependencies explicit: What CLIs/tools does this skill assume are installed?

This prevents issues like #178 where `gh pr checks --json conclusion` passed QA but failed at runtime because "conclusion" field doesn't exist.

Closes #209

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add pre-requisite check for gh CLI availability in Section 6a
- Expand command extraction to capture subshell commands: $(gh ...)
- Add pattern for commands after pipe/semicolon: | gh ... or ; npm ...
- Add note about multi-line command limitations

Addresses QA feedback on extraction pattern gaps.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@admarble
admarble merged commit b31034e into main Jan 31, 2026
6 checks passed
@admarble
admarble deleted the feature/209-feat-qa-add-skill-command-verification-before-read branch January 31, 2026 18:45
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(qa): Add skill command verification before READY_FOR_MERGE

1 participant