Repository navigation
Add check-citation-authors: flag author names typed beside their citation - #2149
Conversation
…tion psw#679's rule "Let the citation name the source": an in-text @key already prints the author names, so a sentence should not type them again beside the citation. The check flags a capitalized word within six words before a citation key when the key starts with that word in lower case, as in "James et al. [@james2021islr, Figure 6.7]". Diff-scoped and warn-only by default, on check-write-idiom's engine. Measured whole-tree on psw, rme, and lds: 2, 2, and 190 hits, nearly all true. Closes #2144. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDkNzpX17QNruwBjGgDqfM
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Claude finished review — View run I fetched PR #2149 live and ran the suite, and the earlier verdict holds. The PR is open, not a draft and not merged, and its head is
The findings are unchanged: none, and the prior round's clean verdict still stands (posted 2026-11-20T07:50:27Z). VerdictReady for merge Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "ce96f24231abb232cadbf7838fae2b39cfae5ec9",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "Ran the check-citation-authors suite after installing pytest: 43 passed and 1 skipped, the skip being the restored-workflows guard in the defaults-agreement test.",
"holistic_assessment": "PR confirmed open at the reviewed head, the two new commits only fix the prior round's noted artifacts, and wiring issue 2150 still covers rollout."
}Reviewed commit: ce96f24 |
Built to branch |
|
Merged under Ezra's
The cross-harness review was waived because no reviewer could run from this session. The agy, codex, cursor-agent, gemini, and opencode CLIs are not installed. The egress proxy refused opencode.ai with a 403. Generated by Claude Code |
Requested by Ezra · project thread
Closes #2144.
What
A new diff-scoped check for psw's rule Let the citation name the source (psw#679).
The figure follows the layout of a figure in James et al. [@james2021islr, Figure 6.7].The figure follows the layout of @james2021islr [Figure 6.7].A capitalized word within six words before a citation key is flagged when the key starts with that word in lower case.
The comparison folds case and accents, drops a possessive
's, and joins a lowercase particle (van Buurenand@vanbuuren2018).The window reaches back onto the previous line of the paragraph and stops at the previous sentence end (
et al.and initials don't end one).Not flagged: an author-suppressed
[-@key], crossrefs, emails, names in link text or emphasis ([Cook's distance](#def-x),**Cox proportional hazards**), and a line with<!-- check-citation-authors: allow: <reason> -->(reason required, as the issue asks).It reuses
check-write-idiom's engine likecheck-avoided-words: added lines only, moved lines exempt, skip-not-fall-back. Warn-only by default, per the issue.Measurement (whole tree, 2026-11-20)
Bienaymé derived the bound [@bienayme1853](psw's own ✅ example in#exm-cite-original, which this rule now contradicts), andISO 80000-2:2019 [@iso80000_2_2019](false: a standard's name)Allen and Cady [@AllenCady1982]across a line break, and*Applied Linear Regression* by Sanford Weisberg [@weisberg2005applied]. Both trueStarmer explains [x](url) [@starmer2018x],Hastie ... [@hastie2023statlearning]). One false:the Elman recurrent layer [@elman1990time](eponym outside emphasis)Before link and emphasis masking were added, rme also hit
[Cook's distance],**Cox proportional hazards**and*Practical R for Epidemiologists*; those now pass.Files
check-citation-authors/(action, script, 44 pytest cases; 5 mutations confirmed to turn a case red).github/workflows/check-citation-authors.yml,examples/check-citation-authors.yml,website/reference/check-citation-authors.qmd_selftest.ymlcitation-authorsjob,website/_quarto.yml, README table row and lists, CLAUDE.md lists, layout and tests notes, changelog fragmentChecked locally:
check-diff-scoped.sh(new-line-breaks, phi, math-letters, serial-comma) clean,check-avoided-wordsandcheck-write-idiomclean,lint-qmdclean.typosnot run locally (not installed); CI covers it.After merge, the
v3slide and caller PRs in the notes repos follow (wiring issue to be filed).Generated by Claude Code