Skip to content

docs: each page keeps only what its reader needs, and a fact stated twice keeps one home - #686

Merged
FBumann merged 9 commits into
claude/docs-split-by-readerfrom
claude/docs-cut
Sep 25, 2026
Merged

FBumann merged 9 commits into
claude/docs-split-by-readerfrom
claude/docs-cut

Conversation

@FBumann

@FBumann FBumann commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Prompt: The stack does add more lines to the docs than it removes. I think much of the information in the docs isnt needed or not focused enough.

Note

The following content was generated by AI.

The user's follow-up was "Yes. As one big PR stacked ontop".

What this changes

The sections for model writers (Tutorials, How-to guides, Reference, About) go from 35,678 to about 24,200 words. Rationale, history, repeated rules and engine instructions are cut. Where a fact sat on two pages, the page that owns it keeps it and the other links to it. No rule of the language changes.

Method, gate output, alternatives

Rule for every cut: a page answers one question for the reader of its section. Cuts move or delete text; none rewrites a rule.

Words per top-level section, before → after this PR: Tutorials 1,438 → 779. How-to guides 3,181 → 2,771. Reference 25,260 → 15,400. About 5,799 → 5,256, most of which is the changelog. Development 30,504 → 35,909, because it now holds the notation page.

Which page owns a fact stated twice:

Per area:

  • Notation page: reference/notation.md moves to Development › Proofs of concept, because it renders the typesetting test model. The typeset and operators pages link the operator table instead.
  • Glossary: 1,588 → 616 words. It keeps only the words no reference page owns, and the table of words with two senses.
  • Tutorial: 1,419 → 767 words. Each new block is shown once, and the whole file once, folded. Every output was re-run and matches what the command prints.
  • Language reference: 13,104 → 10,595 words.
    • errors.md: the refusal table becomes a link to limits.md. The error-class table now shows the real hierarchy.
    • piecewise.md and assumptions.md: the derived assumptions have one table, checked against src/math_spec/piecewise.py. It fixes a wrong claim: the decreasing-breakpoints check applies to convex and lp only.
    • operators.md: two sentences about a null relation value contradicted the data contract, and are cut.
  • README, explanation pages, reading.md, typeset and how-tos: 12,310 → 9,797 words.
  • Anchors removed: limits.md#solver-capability (its one inbound link was repointed), limits.md#composition-component-libraries and typeset.md#printing-what-a-formulation-states.
  • Merging main (feat(language): a bound is null where it is open, never infinite, in the file and in the program #689):
  • History on this branch: a commit that moved the expand() docs was made here and then reverted (eb3c60c). It now lands as docs: what spec.expand() returns is documented on the model writer's python api page, and reading.md keeps only which program an engine reads #696, at the user's request that it be its own PR in the stack.

Gates (pixi is not installable in this session; a Python 3.12 venv stood in):

  • pytest -q: 1630 passed, 7 skipped.
  • mkdocs build --strict, with the blocked docs.python.org inventory removed: built, no warnings.
  • ruff, reuse lint, typos, prettier --check: clean.
  • Not run: pixi run ci, compile-tex.

Not done:

  • The PyPSA pages are untouched, as the user asked.
  • The module docstring of src/math_spec/exclusivity.py still says the case rule is stated in expressions.md; it is now in named.md.
  • One commit is marked "in progress". It was pushed as a checkpoint, and later commits complete it.

Why

Much of the text was not needed by the reader of its page, or it repeated another page. The stack added more than it removed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y

…s, and the notation page moves to development

The glossary keeps only the words no reference page owns, and the words with
two senses (1588 to 616 words). The tutorial shows each new block once, and
the whole file once, folded (1419 to 767 words); every output on it is what
the command prints. The notation page renders the typesetting test model, so
it moves to the Development tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
…how-tos lose what another page already says

README drops the "Why" section, the symbols paragraph, the shell block and the
Spec and Program section, and links the pages that own them. limits.md drops
"Solver capability", which what-counts-as-language owns, the composition
section and the history in its table. file-and-program keeps only the why.
reading.md keeps the API and drops the engine recipe and the instructions.
typeset shows the symbol table once. The how-tos drop rationale;
installation gives the one install command. Words, these files: 12310 to 9797.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
…rogress)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
…e, which moved to development

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

read-the-docs-community Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

@FBumann
FBumann added this pull request to stack #684 September 24, 2026 14:03
…python api page, and reading.md keeps only which program an engine reads

The Spec.expand docstring, which the Python API page in Reference renders, is
now the one home for the call: the kinds and their order, the ValueError, a
different model that takes the same data, itself where there is nothing to
write out, and no caching. It no longer says "the same math". reading.md's
section says which program an engine reads. Five links point at the API
entry. The three claims reading.md checked move to tests/test_expand.py, and
the page's claim count drops from 22 to 19. Schema regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
main's #689 makes an open bound null and a bound never infinite. The
variables section keeps that rule and drops the warning box, as this
branch's cut did. The quoted advice message on errors.md and check.md now
says "bounds.lower is open", which is what advice prints since #689, and
reading.md no longer names an infinite bound among what to_yaml leaves out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
…riter's python api page, and reading.md keeps only which program an engine reads"

This reverts commit 853b9b7. The change moves to its own PR at the top of
the stack, so this PR keeps only the cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation pages, guides, reference and README

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants