Skip to content

docs: clear prose-hook findings repo-wide and fix stale Python references - #1002

Merged
godofecht merged 19 commits into
mainfrom
docs/prose-cleanup-and-python-refs
Sep 29, 2026
Merged

godofecht merged 19 commits into
mainfrom
docs/prose-cleanup-and-python-refs

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

What

The prose pre-commit hook (slop.py) blocks any commit that touches a file holding em dashes, en dashes used as separators, curly quotes, emoji section markers or the "X, not Y" construction, even when the text predates the edit. That kept doc updates for the Python-to-Flow ports from landing. This PR clears every blocking finding in tracked prose and fixes docs that name deleted Python files.

slop.py over all 2,794 tracked .md, .txt, .tex and .html files: 5,925 blocking findings in 2,536 files before, 0 after.

Hand-written docs

About 230 files. Each dash became a full stop, comma, colon, parentheses or a split sentence, chosen per sentence. Numeric ranges use a hyphen or "to". Empty table cells use "-". Code blocks and inline code are untouched. docs/project/CHANGELOG.md gets punctuation only, plus one rewording where punctuation could not clear a finding.

Generated files

Generated files were fixed through their generators:

  • docs/library/stdlib-api.md: regenerated by scripts/gen_stdlib_docs.py. The placeholder for an undocumented function is now "-", and the lib/stdlib doc comments that fed dashes into the table are rewritten.
  • Proof artifacts (examples/verify/**, lib/verify/*.proof.{md,tex}, .proof.svg, .proof-diagram.tex): the strings in src/flow/proof_document.py, math_prose.py, claim_path.py and geometry_diagram.py changed, and the # @from comments in the verify sources use a colon. The checked-in artifacts drift from a clean regeneration in other ways, so the same punctuation edits were applied to them. A regenerated Euclid I.1 artifact is byte-identical to the checked-in one. The proof tests pass.
  • site/wasm/**: the templates in scripts/wasm_build.py and scripts/build_wasm_gallery.py changed, and the same edits were applied to the pages. A full rebuild needs emcc and was not run.
  • The repo stats counter (scripts/update_repo_stats.py and its Flow port) now writes "-" for the empty registry cell. The two still agree.

ROADMAP.md

scripts/sync_roadmap.sh derives slugs from item titles. Only punctuation changed, and the slugger folds punctuation runs into one hyphen. ./scripts/sync_roadmap.sh --dry-run --verbose plans the same creates, adoptions and closes before and after. Only the section labels in the plan differ.

Stale Python references

References left alone on purpose: the history entries in CHANGELOG, an archived tree listing in docs/project/archive/, and the "Was (deleted)" column in python-in-flow.

Checks

  • ./scripts/check_doc_links.sh: all relative links and fragments resolve
  • ./scripts/check_doc_coverage.sh: every feature has a documented home
  • ./scripts/sync_version.sh --check: in sync
  • python3 scripts/build_wiki.py then ./scripts/check_wiki_links.sh: Wiki links OK
  • pytest tests/unit/test_proof_document.py tests/unit/test_proof_bundle.py: 28 passed

Follow-ups

  • tools: port the remaining scripts/*.py to Flow #971 deletes gen_stdlib_docs.py, build_wasm_gallery.py and build_wiki.py. That will conflict with the template edits here, and its Flow ports should emit plain punctuation too.
  • The Flow ports in compiler/src/math_prose.flow and proof_document.flow still hold the old dash strings. Changing them means regenerating the bootstrap C, so they are left for a compiler PR.
  • update_repo_stats.sh --check already fails on main because the stats are stale. This PR does not refresh them.

The generator now writes a hyphen for an undocumented function, and the
stdlib doc comments that fed dashes and curly quotes into the table are
rewritten with plain punctuation.
Page titles use a bar separator. The two build scripts and the checked-in
pages they emitted get the same edits, so a rebuild reproduces them.
Covers the language guides from README through modules, plus the discord
webhook page and the Schur lattice formal note. Meaning is unchanged.
Also covers the runtime-in-flow, self-hosting and vgpu-parity project notes
and the compiler architecture paper source.
Two in-page links in the variable-size tiny pointer notes follow the
renamed heading anchors.
…ground

The changelog changes punctuation only, plus one rewording where a comma
construction could not be fixed with punctuation alone.
Headings and source lines use a colon. The definition and axiom openers
become two sentences, and the exhaustive-case step is split the same way.
Source lines, headings and tier openers in the checked-in proof markdown
and LaTeX now match what the updated generator emits. The @from comments
in the verify sources use a colon, and the diagram SVGs are regenerated
from the updated caption strings.
Dashes, curly quotes and emoji heading markers are gone. Item titles keep
their words, so every roadmap slug is unchanged: a dry run of
scripts/sync_roadmap.sh plans the same creates, adoptions and closes as
before. The sync is named as scripts/sync_roadmap.sh, since the Python
script was deleted in #959.
Adds the scripts and tools ported to Flow in #959, #965 and #981, notes
that flow run needs no Python since #960, and lists open pull requests
as in progress. The LSP is Python and the only server; the Flow REPL is
in open PR #987.
The README names the flow-lsp launcher, since there is no flow lsp
subcommand. Reproducible-build docs point at the test that exists. The
mathlib TOC drops the Euclid generators removed in #965, and the tests
inventory drops a Python test that tests/lang now covers.
The Python counter and its Flow port change together, so they still
agree and the README stats block keeps plain punctuation.
@godofecht
godofecht force-pushed the docs/prose-cleanup-and-python-refs branch from 1294a4b to 1de46df Compare September 29, 2026 06:15
godofecht added a commit that referenced this pull request Sep 29, 2026
PR #1002 rewrote the em dashes in the Python proof generators. The Flow
ports of math_prose, proof_document and claim_path now emit the same
sentences, so both hosts produce the same text.
@godofecht
godofecht merged commit 23e7ebf into main Sep 29, 2026
28 checks passed
godofecht added a commit that referenced this pull request Sep 29, 2026
PR #1002 rewrote the em dashes in the Python proof generators. The Flow
ports of math_prose, proof_document and claim_path now emit the same
sentences, so both hosts produce the same text.
godofecht added a commit that referenced this pull request Sep 29, 2026
#1002 made the repo-stats generator write '-' where it wrote 'n/a' and
left test_repo_stats expecting the old text, which turned Python tests red
on main.
godofecht added a commit that referenced this pull request Sep 29, 2026
…libc externs, diagnostics (#1003)

Stage-A fixes: Python operator precedence, sort modifier words as names, name types resolved from the declaration in scope, return followed by not or dbg, located parse errors, portable libc externs, unexported functions of imports in bundle typecheck, dash-free proof prose matching the Python generators, time.h off the prototype path, and no Gen0 recursion in ensure_flowc. Bootstrap C regenerated on main (fixed point, bootstrap_from_c --verify, self_host_full pass). Also fixes test_repo_stats after #1002.
@godofecht
godofecht deleted the docs/prose-cleanup-and-python-refs branch October 1, 2026 12:49
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.

1 participant