fix(evaluating-skill-quality): re-scope check_skill_shape.py rows 5 and 7 (#577) - #1500
Merged
Conversation
…mption defect (#577) #192's row 5 asked for "every Fail/Pass example needs a backtick-quoted line or an explicit exemption," but #577 found that reading fails CI on ~18 of adversarial-dimensions.md's 22 real dimensions today, none of which ever claim to quote a SKILL.md line. The actual defect #79 found (PR #75) was narrower: dimension 14's catalog entry was reworded to be evidenced by the target's evals/ directory rather than a SKILL.md line, while SKILL.md's own Procedure still required every finding to quote one -- the fix added an "except dimension 14" exemption clause there. check_skill_shape.py now cross-checks that exemption clause against every references/ catalog file's own numbered-dimension exemption markers in both directions, so a future rewording that lets the two drift out of sync again fails CI instead of only a reviewer's memory. Row 7 (worked-example per-dimension status-keyword consistency) is dropped, not implemented: neither worked-example-self-review.md nor worked-example-explaining-the-work.md uses a closed per-dimension status vocabulary today -- only the whole-skill Verdict section does, answering a different question than row 7 asked. Recorded on #192. Refs #577, #192
… check (#577) Adversarial /code-review pass on the row-5 check above found two real defects before this shipped: - QUOTED_LINE_RULE_RE and DIMENSION_QUOTE_EXEMPTION_RE used literal spaces between words, but battle-testing-a-skill's own real SKILL.md -- the check's own motivating example -- hard-wraps "quote the exact offending" and "line" across a line break. The check silently no-opped on its own real corpus (evidence == "none" for the wrong reason: no blanket rule detected, not "no contradiction found"). Switched every inter-word gap to \s+, matching every other multi-word phrase constant in this module. - skill_text was scanned raw, unlike every other _citation_sources- based check in this file, so a fenced "do not write like this" illustration of the rule text would have been read as a real assertion. Now passed through the same _strip_illustrative_spans(_blank_fenced_blocks(...)) pipeline _step_location_offenders already uses. Added two defeat tests reproducing each defect directly (a line-wrapped fixture, a fenced-illustration fixture) so this regression can't silently reland. Refs #577
…onto it (#577) Merges origin/main (PR #1450 / issue #1330: gitapex_check_skill_shape.py split into the shape_checks/ package) and re-applies this branch's own two prior commits on top of the new layout: - DIMENSION_QUOTE_EXEMPTION_RE/QUOTED_LINE_RULE_RE/ CATALOG_QUOTE_EXEMPTION_MARKER_RE/NUMBERED_CATALOG_HEADING_RE moved to shape_checks/constants.py. - _dimension_quote_exemption_offenders/_dimension_quote_exemption_checks moved to shape_checks/citation_checks.py, registered in gitapex_check_skill_shape.py's check_shape() the same way _step_location_checks already is. - All seven synthetic unit tests (including the two code-review defeat tests) carried over unchanged in test_gitapex_check_skill_shape.py. Also retires verify_shape_check_output_diff.py and its test (PR #1450's own one-time proof that the package split was a pure code-motion, pinned to a hardcoded pre-split BASE_SHA). Its own self-defense guard (_assert_pre_split_source) makes BASE_SHA structurally impossible to ever advance past that one commit, so test_main_end_to_end_against_ the_real_repository can never pass again after any legitimate future check_shape() change -- this row-5 check is the first such change, and without retiring it CI stays permanently red for every PR like this one from here on. Confirmed via independent subagent analysis before retiring: no other in-repo reference beyond one now-updated docstring pointer in shape_checks/orchestrator.py, not registered in .gitapex/ssot.json, and fully recoverable via `git show aa33e6f:skills/evaluating-skill-quality/scripts/verify_shape_check_output_diff.py` if ever needed again. A follow-up gate-proposal issue for "one-time migration-proof tests must be self-retiring" is filed separately. Refs #577, #192, #1330
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1500 +/- ##
========================================
Coverage 99.56% 99.57%
========================================
Files 147 145 -2
Lines 24042 23858 -184
Branches 2863 2857 -6
========================================
- Hits 23938 23756 -182
+ Misses 104 102 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tvna
marked this pull request as draft
August 30, 2026 03:12
tvna
marked this pull request as ready for review
August 30, 2026 04:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-scopes
check_skill_shape.pyrows 5 and 7 from #192 (both had a"None identified" residual-risk claim that direct inspection of the
real target files found wrong). Row 5 ships as a narrowed
dimension-quote-exemption-cross-referencecheck; row 7 is dropped,not implemented, with the reason recorded on #192. Also brings in
origin/main'sshape_checks/package split (#1450/#1330), ports thenew check onto that layout, and retires that PR's own one-time,
now-unrepeatable output-diff verification harness (see Facts).
Facts
skills/battle-testing-a-skill/references/adversarial-dimensions.mdhas 22 numbered dimensions; a per-dimension backtick-coverage scan
(reproduced independently, matches the table in chore(evaluating-skill-quality): re-scope check_skill_shape.py rows 5 and 7 from #192 #577's own body)
found 14 of 22 with zero backtick content anywhere in their section,
and 0/22 Pass examples with backtick content. Only dimension 14
carries an explicit "evidenced by inspecting the target's
evals/directory, not by quoting a line from its SKILL.md" exemption.
skills/battle-testing-a-skill/SKILL.md's own Procedure requiresevery finding to "quote the exact offending line," with dimension 14
named as the one exception -- the real chore(retrospective): merge retrospective for PR #75 #79/PR feat(battle-testing-a-skill): add dimensions 11-17 (cross-skill, supply-chain, memory, regression corpus, multi-turn, encoding, structured-output) #75 defect was this
exemption drifting out of sync between the two files.
worked-example-self-review.mdnorworked-example-explaining-the-work.md(evaluating-skill-quality)uses a closed per-dimension status vocabulary; only the whole-skill
## Verdictssection's four tokens are closed vocabulary, answeringa different question than row 7 asked.
origin/mainmerged PR refactor(evaluating-skill-quality): split gitapex_check_skill_shape.py into shape_checks package (#1330) #1450 (issue refactor(evaluating-skill-quality): split gitapex_check_skill_shape.py, already excluded from the complexity gate at 6149 lines #1330) mid-session, splittingthe ~6300-line
gitapex_check_skill_shape.pymonolith into ashape_checks/package. That PR also addedverify_shape_check_output_diff.py+ its test, a one-time proof(pinned to a hardcoded pre-split
BASE_SHA) that the split itselfwas a pure code-motion. Its own
_assert_pre_split_sourceguardrejects any post-split
BASE_SHA, so that pin can never legitimatelyadvance --
test_main_end_to_end_against_the_real_repositorycannotpass again after any future real
check_shape()detection-logicchange. This PR is that first change, so it retires both files
(confirmed via independent review: no reference beyond one now-fixed
docstring pointer in
shape_checks/orchestrator.py, not registeredin
.gitapex/ssot.json, fully recoverable viagit show aa33e6f7:skills/evaluating-skill-quality/scripts/verify_shape_check_output_diff.py).A follow-up gate-proposal issue ("one-time migration-proof tests must
be self-retiring") will be filed separately.
Assumptions
row 5 should be narrowed to the real defect class rather than
widened to cover all 22 dimensions, and that row 7 should be dropped
rather than retrofitted, is treated as the scoping decision chore(evaluating-skill-quality): re-scope check_skill_shape.py rows 5 and 7 from #192 #577
itself asked for -- not re-litigated here.
verify_shape_check_output_diff.py/its test (after an independentsubagent analysis of the alternatives) is treated as authorization
for that deletion, since it removes another recently-merged PR's
artifact.
Risk / blast radius
check_shape(), which everyskill directory in the repo is scanned with (CI's
tests/test_gitapex_repository_skill_shape.pysweep, and theskill-shape-checkpre-commit hook). Verified it passes againstevery real skill in the repo today (0 failures), including its own
motivating example,
battle-testing-a-skill.verify_shape_check_output_diff.pyremoves dead-endverification tooling only; no other script imports or invokes it.
Rollback
recoverable via
git show aa33e6f7:skills/evaluating-skill-quality/scripts/verify_shape_check_output_diff.py(and its test file at the same commit) if ever needed again.
Verification
Acceptance Criteria Map (from #577, re-verified against the real repo):
_dimension_quote_exemption_offenders/_dimension_quote_exemption_checksinskills/evaluating-skill-quality/scripts/shape_checks/citation_checks.py, registered incheck_shape()tests/test_gitapex_repository_skill_shape.py's real-skill sweep passes for every skill,battle-testing-a-skillincludedCommands run and their output:
Real-corpus proof (row 5's own proof-method requirement -- the check
does not fail on the current, already-reviewed corpus):
Checklist
chore(evaluating-skill-quality): re-scope check_skill_shape.py rows 5 and 7 from #192 #577 and feat(check-skill-shape): additional static SKILL.md checks (retro triage) #192 updated with the resolved ACM/decision)
skills/*/SKILL.md, adocs/superpowers/specs/*.mddesign doc, a security-relevantskill, or a deterministic checker script
(
skills/*/scripts/*.py,evals/scripts/*.py,.github/scripts/*.py), a## Skill audit evidencesectiondiscloses the required verdicts/waivers -- see below
evals/*/split.md-- N/A, no such entry added
skills/*/SKILL.md's Stop-boundarybullets or named dispatch branches -- N/A, no SKILL.md changed
Skill audit evidence
checker-script-adversarial-review: RAN --
/code-review(high effort)against the new
dimension-quote-exemption-cross-referencedetectionlogic found and this PR fixed two real defects before merge: (1)
QUOTED_LINE_RULE_RE/DIMENSION_QUOTE_EXEMPTION_REused literalspaces, so they never matched battle-testing-a-skill's own real
SKILL.md, which hard-wraps the rule phrase across a line break -- the
check silently no-opped on its own motivating example; (2) SKILL.md
text was scanned without fenced-block/inline-code stripping, unlike
every other check built on
_citation_sources, so a "do not writelike this" illustration would have been read as a real assertion. Both
fixed with
\s+-based regexes and the standard_strip_illustrative_spans(_blank_fenced_blocks(...))pipeline.defeat-test-disclosure: RAN -- two tests specifically constructed to
defeat (not just exercise the happy path of) the new detection logic:
test_dimension_quote_exemption_line_wrapped_phrase_matches(aline-wrapped fixture reproducing defect 1 above) and
test_dimension_quote_exemption_fenced_illustration_excluded(afenced-illustration fixture reproducing defect 2 above), plus two
existing-shape mismatch-direction tests
(
test_dimension_quote_exemption_skillmd_names_exempt_catalog_silent_fails,test_dimension_quote_exemption_catalog_marks_exempt_skillmd_silent_fails).Independent review verdict
Outer layer: neither Anthropic's Claude Code Review GitHub App nor
GitHub Copilot's review is configured/reachable for this repository --
request_copilot_reviewproduced no review (only CodeRabbit'sdisabled-for-repos-under-10-stars notice and Codecov's coverage report
landed as PR comments, neither a code review). Disclosed as absent, not
run.
Inner layer (
reviewing-an-artifact, low effort): the diff splits intotwo parts per that skill's Step 0 mixed-target rule.
(
_dimension_quote_exemption_offenders/_dimension_quote_exemption_checksin
shape_checks/citation_checks.py, plus the four new regexconstants in
shape_checks/constants.py, registered incheck_shape()) deferred to the named specialist,evaluating-deterministic-gate-quality, run in an isolated dispatch(CLAUDE.md was auto-injected into that dispatch's own system prompt
by the harness despite the exclusion instruction -- disclosed rather
than silently assumed clean). Verdict: well-formed and
well-placed. Live-verified both defects the prior
/code-reviewpass had already fixed (the
\s+line-wrap fix and thefenced-block-stripping fix) by executing the actual functions
against the real
battle-testing-a-skillfiles and syntheticadversarial fixtures, and ran the real-repo sweep (29/29 skills
pass) plus all 7 bundled unit tests. Zero confirmed findings. Two
minor, non-blocking notes: (1) offender messages name the mismatch
but not the literal corrective edit (dead-end-risk, minor); (2)
whether the CI job is a required branch-protection status check
could not be verified from local files (indeterminate, a
platform-config question outside that review's read-only scope).
verify_shape_check_output_diff.pyand its test, theshape_checks/orchestrator.pydocstring update, and the 7new/moved unit tests) classified safe under that skill's own
Step 1 (dead-code removal, a doc update, and added tests only, no
security-tier signal anywhere) -- Steps 2-5 skipped per that Step's
own rule.
Zero confirmed findings from either half -> CLEAN, per
drafting-a-pr-to-mergeStep 8's own outcome table.Duplicate-PR-waiver: PR #1499 also cites #577, but only in passing, in
its own Facts bullet ("Rows 5 and 7 were found infeasible ... and
re-scoped into issue #577 (open, pending owner design decision,
untouched by this PR)"). #1499 is titled "docs(design): scope issue
#192 to items 4 and 6" and its own Related Issue line is "Refs #192" --
it implements #192's items 4 and 6 (a different pair of rows) as a
design doc only, with zero file overlap with this PR's diff. This PR
is the one that actually resolves #577 (rows 5 and 7).
Related Issue
Closes #577