Skip to content

fix(#1566): the proseGate metric counts any test file that mentions SKILL.md — 34 of 76 counted files are not prose gates; count only files that read a SKILL.md and assert on it - #1569

Merged
admarble merged 3 commits into
mainfrom
feature/1566-fix-qa-the-prosegate-metric-counts-any-test-file-t
Oct 21, 2026

Conversation

@admarble

@admarble admarble commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

What changed in the rule (isProseGate in scripts/qa/health-report.ts): a file counts only if it calls toContain or toMatch after comments are stripped, and either:

  • it uses SKILL_ROOTS outside an import or a string literal, or
  • a read call's path names SKILL.md, directly or through a variable.

I also dropped one kind of variable: a path set to a bare relative literal like ".claude/skills/demo/SKILL.md". That is a file the test writes into a scratch directory, not a shipped skill.

The three QA items:

  1. String-literal case: SKILL_ROOTS mentioned only inside a string no longer counts, and there is a test for it.
  2. AC-2 listing: all 34 files that left the count are not a prose gate: rows in prose-gates.md. One file joined: __tests__/quality-checks-worktree-root.integration.test.ts, which reads through SKILL_ROOTS with no literal path. 63 − 34 + 1 = 30. The list is in /tmp/left.txt, so paste it into the PR body. The doc note and CHANGELOG line now give the 30 / 7,374 figures.
  3. The two path-only files: src/commands/update.integration.test.ts and src/lib/templates.test.ts both leave the count, through the relative-literal rule.

Formatting churn: I restored health-report.ts and its test from origin/main and reapplied only the real change. The diff is now +77 / −8 across 5 files. The baseline changes only proseGate; I put back the ungated testRatio28d values that regeneration had moved.

Known limit: a file that reads SKILL.md and calls toContain on unrelated output still counts. I could not tell the two apart without an AST, so I did not add that case.

Fixes #1566

QA verdict: AC_MET_BUT_NOT_A_PLUS — acceptance criteria met, but not A+. The run broke to this PR for review rather than entering the quality loop; see the QA review comment for improvement notes.

Follow-ups

  • A file that reads SKILL.md but calls toContain on unrelated output still counts and has no case — dropped: needs an AST, beyond a text heuristic
  • The line-comment strip also cuts at // inside a string literal — dropped: does no harm on the current files; the recomputed list matches the audit

🤖 Generated by sequant run

Entire-Checkpoint: 632683dfb237
Entire-Checkpoint: 94eb7321ad3f
…rt on it

Strip string literals before the SKILL_ROOTS check, drop scratch-fixture path variables, revert the 80-column re-wrapping, and add the string-literal case.

Entire-Checkpoint: b786aa61d6ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant