Skip to content

docs: describe the generator in the present tense - #46

Merged
michen00 merged 3 commits into
mainfrom
docs/generator-as-it-is
Sep 9, 2026
Merged

docs: describe the generator in the present tense#46
michen00 merged 3 commits into
mainfrom
docs/generator-as-it-is

Conversation

@michen00

@michen00 michen00 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

What changes, and why

The templated-file list is one short. scripts/generate_mirrors.py's docstring names "the hook manifest, the build manifest, the readme and the contributing note". _TEMPLATED['rs'] has five entries — gitignore.gitignore too, explained by an inline comment thirty lines down but absent from the list. The paragraph frames the templated/verbatim split as "the whole design", so a reader auditing which files are authored per mirror finds four and stops. The live -rs mirror carries that .gitignore.

Both this docstring and CLAUDE.md spent three sentences on a kind of file that no longer exists — "there used to be a third", "that copy is gone", "retiring it removed the last duplicate rather than creating one". A reader who never saw the removed copy gains nothing from the narration, and the paragraph reads as though a third mirror kind might still be found in the tree.

The argument inside those sentences is worth keeping and does not need the history: each mirror authors its own hook manifest, and that is not a duplicate because this repository serves no hook ids and the two id sets are disjoint, so a derivation would have nothing to keep in step. Stated that way it answers the question a reader actually has — why aren't these derived from one file? — instead of the question of what changed.

Two smaller cuts of the same kind in CLAUDE.md: a now that dated the sentence about the mirror-diff window, and a clause naming the last file to have carried a DEVIATION comment, which the sentence immediately before it already covers by saying none does.

Verification

The generator's output is unchanged:

$ uv run --no-project python scripts/generate_mirrors.py after
$ diff -r before after
  byte-identical

Corpus

The corpus is the specification, and both implementations answer to it. Tick what applies.

  • This changes no behavior the corpus specifies.
  • This changes what gets joined, and a case in corpus/ pins the new behavior. The case was written first and failed first.
  • The change makes the tool join more than it did. The section above says what it will not eat.

A docstring and two CLAUDE.md sentences. No _TEMPLATED, _VERBATIM or code-path change — the fifth file was always emitted, only unlisted.

Checks

  • make check passes, or make test does and this touches no Rust.

make tidy — ruff, mypy, markdownlint and both spell gates — plus unwrap-markdown-prose-py --fail-on-change CLAUDE.md, and the generator run above.

The docstring enumerates what a mirror templates and comes up one short:
`_TEMPLATED['rs']` has five entries, and the `-rs` gitignore is the one
missing. That matters more than a count usually would, because the
paragraph frames the templated and verbatim split as the whole design,
so a reader auditing which files are authored per mirror finds four and
stops.

Both this docstring and CLAUDE.md then spent three sentences on a kind
of file that no longer exists, in the shape a reader who never saw it
gains nothing from: there used to be a third, that copy is gone,
retiring it removed a duplicate. The argument inside is worth keeping
and does not need the history -- each mirror authors its own manifest,
and that is not a duplicate because the two id sets are disjoint and
this repository serves neither. Stated that way it answers the question
a reader actually has, which is why the manifests are not derived from
one file.

Two smaller cuts of the same kind in CLAUDE.md: a `now` that dated a
sentence about the mirror-diff window, and a clause naming the last
file to have carried a DEVIATION comment, which the sentence before it
already covers by saying none does.

The generator's output is byte-identical before and after, checked by
building both mirrors and diffing the trees.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Document mirror generation in present tense

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Documents all five templated Rust mirror files, including .gitignore.
• Reframes hook manifest ownership around current disjoint mirror identifiers.
• Removes stale historical wording without changing generator behavior.
Diagram

graph TD
  A["CLAUDE guidance"] -->|"documents"| C["Generator design"] -->|"builds"| D["Python mirror"]
  B["Generator docstring"] -->|"documents"| C -->|"builds"| E["Rust mirror"]
Loading
High-Level Assessment

The present-tense documentation is the best approach because it explains the current mirror design directly. Retaining the removed-file history was considered but would obscure why independently authored hook manifests are correct today.

Files changed (2) +13 / -15

Documentation (2) +13 / -15
CLAUDE.mdDescribe the current mirror architecture without historical narration +2/-2

Describe the current mirror architecture without historical narration

• Replaces the removed third-file history with a direct explanation of why each mirror owns a distinct hook manifest. It also removes dated wording around the mirror-diff window and the last deleted deviation marker.

CLAUDE.md

generate_mirrors.pyComplete and modernize the generator file taxonomy +11/-13

Complete and modernize the generator file taxonomy

• Adds the Rust mirror's '.gitignore' to the templated-file documentation. Recasts hook manifest ownership in terms of the current disjoint identifier sets rather than a removed shared source.

scripts/generate_mirrors.py

@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.40%. Comparing base (5170fb5) to head (32d3b21).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #46   +/-   ##
=======================================
  Coverage   87.40%   87.40%           
=======================================
  Files           3        3           
  Lines         691      691           
=======================================
  Hits          604      604           
  Misses         87       87           

☔ 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.

The templated-file list conflicted: this branch added the `-rs` gitignore
to it and main added the security policy, in the same sentence. Both
belong, so the resolution names both. The `TEMPLATES` entries main added
for `SECURITY.md` are untouched, and the generator still writes it into
each mirror.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are documentation-only and accurately reflect the current generator/templates without affecting any code paths.

Pull request overview

Updates repository documentation to describe the mirror generator’s design in accurate present-tense terms, aligning scripts/generate_mirrors.py’s docstring and CLAUDE.md with the current mirror layout (including the -rs .gitignore) without changing generator behavior.

Changes:

  • Corrects and tightens scripts/generate_mirrors.py’s docstring to list all templated files (including the -rs gitignore) and remove historical narration.
  • Updates CLAUDE.md’s mirror-generation section to describe the hook-manifest authoring rationale without references to removed legacy structure.
File summaries
File Description
scripts/generate_mirrors.py Docstring now accurately enumerates templated vs. verbatim mirror files, including the -rs .gitignore, in present tense.
CLAUDE.md Removes outdated historical phrasing; keeps the rationale for per-mirror hook manifests and the mirror-diff window in present tense.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@michen00
michen00 merged commit a62dc8e into main Sep 9, 2026
25 checks passed
@michen00
michen00 deleted the docs/generator-as-it-is branch September 9, 2026 07:46
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.

3 participants