Skip to content

docs: the composition how-to shows a sum that one file defines and other files add terms to - #800

Merged
FBumann merged 2 commits into
feat/adds-tofrom
claude/adoring-archimedes-4lkou4
Sep 30, 2026
Merged

FBumann merged 2 commits into
feat/adds-tofrom
claude/adoring-archimedes-4lkou4

Conversation

@FBumann

@FBumann FBumann commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Prompt: Do a stacked PR fixing all of this

Note

The following content was generated by AI.

What this changes

This fixes the four doc findings from a review of #763. It adds a define-then-add step to the how-to, corrects a stale sentence in the tutorial, states what a one-line override patch keeps, and lists the Terms rules in the reference.

Why

The docs of #763 had one sentence that contradicts the code, one behaviour change they did not state clearly, no example of the case the second prompt of #763 asked for, and dense reference prose.

Changes, method, gates, what is not done

Changes.

  • docs/howto/compose.md, new step 5: network_slack.yaml defines Bus_injection as Bus_slack. merge(['network_slack.yaml', 'generator.yaml', 'load.yaml']) gives Bus_slack + Generator_injection + Load_injection, with the definer's dims: and description. I ran that merge on the head of feat/adds-to to get this result.
  • docs/howto/compose.md, the patch step: a one-line patch replaces only the body. The entry keeps dims:, the description and adds_to:, so the new body carries no dimension outside the kept dims:. On main, the string replaced the whole entry. I checked both halves: override with '2 * a' kept dims: [g] and the description, and 'b' over [s, g] was refused with a DimensionError.
  • docs/howto/compose.md, the adds_to: table row: cut to the definer rule, with a link to the Terms section.
  • docs/several-files.md, "Leave the network out": the prose said no file declares injection. It now says no file reads it, other than the two files that add to it. This matches the message printed below it.
  • docs/reference/language/declarations.md, Terms: the load-time checks and the merge rules are now two bulleted lists with bold lead-ins. The "one file alone reads" rule now states its reason. Two unevenly wrapped paragraphs are rewrapped.

Sentence measure (the docs-writing skill's script):

Page Before After
Terms section n 28, avg 17.5, median 19, over 25: 2 n 27, avg 18.2, median 19, over 25: 3
compose.md n 59, avg 15.4, median 15, over 25: 5 n 64, avg 15.4, median 15, over 25: 5

The three Terms sentences over 25 words are list items. The script joins two of them to their bold lead-ins.

Gates.

  • pixi run lint: clean.
  • pixi run ci: test gave 2611 passed. docs-build stopped on one warning, the unresolved pathlib.Path autoref: the session's proxy blocks docs.python.org/3/objects.inv. It reported no dead anchor. compile-tex did not run, because ci stopped before it. No file under examples/ changed.
  • tools.changelog entry accepts this title against the base changelog.
  • The new YAML in compose.md is a hand-written fence that no test reads. I loaded and merged it by hand, as above.

Not done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BNUaTy5JqkQCjytjg1FtTv

…her files add terms to

The how-to gains a step where the network defines Bus_injection as
Bus_slack and the component files add their terms after it. A one-line
override patch is said to keep dims:, the description and adds_to:. The
tutorial's refusal without the network says no file reads the sum,
which is what the message says. The Terms section of the language
reference lists its load checks and its merge rules as two lists, and the
compose table row links to it.

Terms section, sentence lengths: before n 28 avg 17.5 median 19 over25 2;
after n 27 avg 18.2 median 19 over25 3. compose.md: before n 59 avg 15.4
median 15 over25 5; after n 64 avg 15.4 median 15 over25 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BNUaTy5JqkQCjytjg1FtTv
…her files add terms to

Adds the changelog line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BNUaTy5JqkQCjytjg1FtTv
@read-the-docs-community

Copy link
Copy Markdown

@FBumann
FBumann merged commit 320da5e into feat/adds-to Sep 30, 2026
7 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.

2 participants