Skip to content

Keep citation comments short: quote, clause, pointer (#760) - #763

Merged
derek73 merged 3 commits into
masterfrom
claude/citation-comments-760-b9bf40
Oct 19, 2026
Merged

derek73 merged 3 commits into
masterfrom
claude/citation-comments-760-b9bf40

Conversation

@derek73

@derek73 derek73 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Closes #760.

What changed

  • Convention (AGENTS.md, in the excerpt-discipline sentences of "Release-log claims"). A citation comment holds three things: the verbatim quote, a line saying which clause this code implements, and decisions/X (#N) pointers. A code-local reason a reader of that line needs may stay. Issue history, measurements and restated examples live in decisions/. The five blocks below are named as the case that earned the rule.
  • Five blocks trimmed in nameparser/_pipeline/, 398 comment lines down to 110:
    • _post_rules._mark_suffix_entries, R1: 100 → 28
    • _group.py, P3 both-sides test: 59 → 18
    • _group.py, S2/P2/P4 chain head: 86 → 24
    • _group.py, S4 chain emitter: 68 → 20
    • _script_segment._peel_honorific_tail, the peel's scope: 85 → 20. It had no citation; it now quotes rules/W3's decline sentence. The module already cited W3, so no implemented: line moves.
  • No fact lost. Each removed sentence was checked against docs/design/ and AGENTS.md. Anything not already there moved into a dated 2026-10-19 #760 — MOVED FROM … bullet in decisions/R1, P2, P3, S6 or W2, with behavioral claims re-run on this tree.

Found while moving

  • R1's policy example had stopped reaching its case. John Doe, MD nee Jones PhD now reads the comma as a family comma, so the marker is never dropped. Review found a current witness for the same code path, Smith, MD (nee Jones) PhD: it renders 'MD PhD' by default and 'MD, PhD' under extra_suffix_delimiters={" nee "}. Both are recorded.
  • The peel comment's "PhD a title" was stale. 田中さん, PhD puts PhD in suffix, as rules/W3's example line says.

Verification

  • Code untouched: ast.dump of each touched module is identical before and after.
  • Suites: uv run pytest -q gives 21870 passed. uv run mypy and uv run ruff check are clean.
  • The new W3 quote is checked: mutating one word of it fails test_doc_citations.
  • Reviews: the comment-analyzer and design-docs-reviewer agents reviewed the first commit; their findings are fixed in the second. The fix commit was then self-reviewed, and the third commit tidies two phrasings it turned up.

Does not touch mechanisms.md's structure or decisions/differential-ledger.md (#759 is restructuring those).

🤖 Generated with Claude Code

derek73 and others added 3 commits October 19, 2026 14:26
A citation comment now holds the quote, the clause the code implements
and a decisions pointer. The five longest blocks in _pipeline/ carried
issue history, measurements and examples that decisions/ already held,
plus a few facts it did not: those move into dated #760 bullets in
decisions/R1, P2, P3, S6 and W2. AGENTS.md states the convention beside
the excerpt discipline. Code is AST-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R1: the ungated core read has a witness after all, the bracketed
clause 'Smith, MD (nee Jones) PhD' ('MD PhD' default, 'MD, PhD' when
the policy lists ' nee '); the comment now names that shape for the
non-core dropped arm. Group: chain_lead's lead is the last
title-particle even when there is one, the neighbour-join loop alone
skips a frozen subject, bare issue numbers trimmed. Script segment:
keep why the run predicate is not the token predicate's plural. W2:
right function name, the given-name cost restored. AGENTS.md: pointers
plural, and the AGENTS.md-quotes sentence back beside its referent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added docs Documentation fixes and updates design labels Oct 19, 2026
@derek73 derek73 self-assigned this Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (fe85bb3) to head (8c4acb8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #763   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4642     4642           
=======================================
  Hits         4598     4598           
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73
derek73 merged commit ee4e92f into master Oct 19, 2026
12 checks passed
@derek73
derek73 deleted the claude/citation-comments-760-b9bf40 branch October 19, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design docs Documentation fixes and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep citation comments short: quote, clause, pointer

1 participant