Skip to content

Add check-claims.mjs / claim-briefs.mjs: mechanize the claim-verification pre-pass - #11

Merged
EdwardAngert merged 3 commits into
mainfrom
feat/claim-check-tooling
Jul 20, 2026
Merged

Add check-claims.mjs / claim-briefs.mjs: mechanize the claim-verification pre-pass#11
EdwardAngert merged 3 commits into
mainfrom
feat/claim-check-tooling

Conversation

@EdwardAngert

Copy link
Copy Markdown
Owner

Summary

  • check-facts.mjs already verifies the curated .docs-assist/reference.yml registry deterministically, but everything else in a doc set's claims (CLI flags, config keys, function/class names, file paths, version requirements) still relied on an agent re-deriving the same grep-and-compare work by hand.
  • assets/ci/check-claims.mjs extracts those identifier-shaped claims from the whole doc set and resolves each against the code with git grep/git ls-files, no agent involved. What it can't settle (described behavior, numeric assertions) goes to claims-needs-judgment.json, grouped by doc.
  • assets/ci/claim-briefs.mjs turns that judgment queue into one self-contained brief per doc, ready to hand to a doc-auditor fan-out per claim-verification.md's existing method.
  • Wired into /docs-assist:audit and claim-verification.md as the recommended first pass, and into /docs-assist:setup-hooks as an opt-in, non-strict-by-default CI check (assets/ci/github/check-claims.yml).

Why

Built and validated this end-to-end against a real 14-doc corpus (a Python weather-data repo, unrelated to this plugin): extracted and mechanically resolved 453 candidate claims in seconds, fanned the 192 that needed judgment out to 14 parallel agents, and found 6 real drifted or inconsistent claims — a stale numeric default, an inverted behavior claim, a fix presented as a to-do that was already applied, an internal count inconsistency, and a couple of wording mismatches. A lint pass alone would have caught none of them.

Two real bugs surfaced and got fixed during that validation run:

  • A claim pattern starting with -- (any CLI flag) was misparsed as a git grep option itself, dumping usage text instead of searching. Fixed by passing the pattern via -e.
  • git ls-files -- '**/basename' silently matches nothing without :(glob) pathspec magic — switched to filtering the full tracked-file listing in JS instead.

Test plan

  • node scripts/validate.mjs — 2038 checks passed
  • npx markdownlint-cli2 — 0 issues
  • npx cspell "**/*.md" ".docs-assist/**" — 0 issues
  • Ran check-claims.mjs + claim-briefs.mjs against this repo's own docs (caught a real gitignored-vendored-file edge case, documented rather than "fixed" — the tool correctly scopes to tracked content)
  • Ran both scripts against an external repo end-to-end, including the full agent fan-out, with real findings fixed as a result

🤖 Generated with Claude Code

EdwardAngert and others added 3 commits July 20, 2026 14:30
…tion pre-pass

check-facts.mjs already verifies the curated .docs-assist/reference.yml
registry deterministically. This extends the same approach to the whole
doc corpus, cold: check-claims.mjs extracts identifier-shaped claims
(CLI commands/flags, config/env keys, function/class names, file paths,
version requirements) from every doc and resolves each against the code
with git grep/git ls-files, no agent needed. What's left (described
behavior, numeric assertions) goes to claims-needs-judgment.json;
claim-briefs.mjs turns that into one self-contained brief per doc for
the doc-auditor fan-out claim-verification.md already describes.

Wired into /docs-assist:audit and claim-verification.md as the
recommended first pass, and into /docs-assist:setup-hooks as an opt-in
CI check (non-strict by default, since "missing" can also mean
gitignored-but-real rather than actually gone).

Built and validated against two real repos: 453 claims from a 14-doc
corpus resolved in seconds, 192 judgment-only claims fanned out to 14
parallel agents, 6 real drifted/inconsistent claims found. Fixed two
git-grep argument-parsing bugs (a leading "--" in a flag pattern being
read as a git-grep option; ** glob pathspecs silently matching nothing
without :(glob) magic) during that validation run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CI's Vale check caught one in claim-verification.md (a real error, not
a warning); swept the rest of this PR's changed files for the same
pattern in code comments and generated report text too, for consistency
with the plugin's own no_em_dashes convention even where Vale doesn't
lint (.mjs/.yml aren't in its [*.{md,mdx}] scope).

Verified with the same check CI runs: vale --config=assets/lint/vale/.vale.ini
--minAlertLevel=error . -> 0 errors, 0 warnings, 0 suggestions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Per the maintainer's explicit call, same policy as 0.9.6: the
check-claims.mjs / claim-briefs.mjs claim-verification tooling is a
real, notable addition worth a version bump past the 0.9.5 ceiling
agent-driven work otherwise caps at.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@EdwardAngert
EdwardAngert merged commit 96bf6f4 into main Jul 20, 2026
2 checks passed
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.

1 participant