name: skill-edit-validation
description: Content-assertion sweep after editing SKILL.md files. Triggered when a task changes skill or prompt content that tests assert against. Prevents stale-assertion CI failures.
Skill Edit Validation
Trigger
After editing ANY .md file under .opencode/skills/, .claude/skills/, or .agents/skills/ that changes content wording (not just whitespace/formatting).
Protocol
- Extract changed phrases: Identify old wording vs new wording (e.g., "spec.md does NOT exist" changed to "NO effective spec exists")
- Targeted sweep: For each OLD phrase, grep test files:
rg "<old-phrase>" tests/ src/ --type ts -l
Focus on: *-audit*, *-security*, *-spec-gate*, *skill-mirror*, *soft-spec*, *prompt*, *workflow*
- For each match: Read the assertion context (surrounding 10 lines). Verify:
- Does the assertion still hold against the new content?
- Is it checking a substring containing the old phrase?
- Is it checking for the ABSENCE of a word the new wording introduces? (e.g.,
not.toContain('skip') catches "this check is skipped")
- Update stale assertions in the same changeset. Do NOT defer to CI.
- Preserve behavioral intent: When updating, preserve what the assertion TESTS (e.g., "the plan skill has a spec-absent branch"), not just the string match.
Constraint
Do NOT rubber-stamp brittle assertions. If an assertion tests implementation detail rather than behavioral intent, flag it for refactoring to a semantic check.
Root cause
A skill-content test registry would auto-adjust (issue #1746 item 3). This playbook is the manual safety net.
1---2name: skill-edit-validation-23description: "---"4---5---6name: skill-edit-validation7description: Content-assertion sweep after editing SKILL.md files. Triggered when a task changes skill or prompt content that tests assert against. Prevents stale-assertion CI failures.8---910# Skill Edit Validation1112## Trigger13After editing ANY `.md` file under `.opencode/skills/`, `.claude/skills/`, or `.agents/skills/` that changes content wording (not just whitespace/formatting).1415## Protocol161. **Extract changed phrases:** Identify old wording vs new wording (e.g., "spec.md does NOT exist" changed to "NO effective spec exists")172. **Targeted sweep:** For each OLD phrase, grep test files:18 ```19 rg "<old-phrase>" tests/ src/ --type ts -l20 ```21 Focus on: `*-audit*`, `*-security*`, `*-spec-gate*`, `*skill-mirror*`, `*soft-spec*`, `*prompt*`, `*workflow*`223. **For each match:** Read the assertion context (surrounding 10 lines). Verify:23 - Does the assertion still hold against the new content?24 - Is it checking a substring containing the old phrase?25 - Is it checking for the ABSENCE of a word the new wording introduces? (e.g., `not.toContain('skip')` catches "this check is skipped")264. **Update stale assertions in the same changeset.** Do NOT defer to CI.275. **Preserve behavioral intent:** When updating, preserve what the assertion TESTS (e.g., "the plan skill has a spec-absent branch"), not just the string match.2829## Constraint30Do NOT rubber-stamp brittle assertions. If an assertion tests implementation detail rather than behavioral intent, flag it for refactoring to a semantic check.3132## Root cause33A skill-content test registry would auto-adjust (issue #1746 item 3). This playbook is the manual safety net.