Maintainer notes, not documentation. This file is the working state of paperforge's maintainer and its first instance (the G_Q2 paper), on one particular machine. If you are starting a paper with paperforge, nothing here applies to you: read README.md and docs/GETTING-STARTED.md. Everything a second project needs is in
docs/; no instance-specific behavior remains in the tool.
Started 2026-07-12; last refreshed 2026-08-01 (the second-project
readiness pass — see the bottom section). Working dir is usually
~/claude/lmfdb but ALL work is in ~/claude/paperforge (the general
tool) and ~/claude/gq2-paper (the first instance). Read the project
memory paper-pipeline-pretext.md first — it carries the deep,
chronological design record; this file is the actionable orientation layer
on top of it.
- paperforge = the tool:
ingest/(LaTeX→PreTeXt converter + crosswalk/notation/lean/novelty generators +trust_table.py),validators/(8 checks incl.artifact_drift),sitegen/(version footers + drift gate, homepage bg knowls, favicon gen/stamp, preview watcher),records/(three optional config-gated pipelines: token ledger, sanitized session corpora, dashboard apply/check),review/(the review server + injected paper-view JS),skills/(SKILL.md specs),templates/+pretext-template/(instance scaffold,@@PLACEHOLDER@@params filled by paper-init; now incl.content/authors.xml,apply-author-metadata.{sh,xsl},publication/arxiv.ptx),docs/(ARCHITECTURE, DIRECTIVES, PLAGIARISM, HTML-FEATURES, NOTATION, REFERENCES, NOVELTY, REVIEW, DEPLOYMENT, EDITOR, AI-POLICIES). - gq2-paper = the instance:
source/(generated PreTeXt — NEVER hand-edit),content/(insertions layer +authors.xmlsidecar),crosswalk/,notation/,references/,reviews/(the 2026-07-26/27 external-review documents + decision queue),scripts/(thin build/deploy wrappers calling$PFtools),records-pipeline/(config.json + exclusions + gq2's ground-truthvalidate_formalization.py+ gitignored work/),blueprint*/,docbuild*/,formalizations/(two submodules),web-assets/site/(the hand-authored project site). Draft of record:inputs/draft/gq2-paper.tex. - Live site: https://roed314.github.io/gq2/ — deployed by
gq2-paper/scripts/deploy.sh(direct push toroed314/gq2via thegithub-claudessh alias, NOT PRs;--testtargetsroed-math/gq2-testwith an isolated clone). Check currency withscripts/deploy.sh --dry-runbefore assuming the live site matches HEAD.
formalizations/gq2-lean was renamed formalizations/gq2-claude and
joined by formalizations/gq2-gpt (Turturean's independent GPT
formalization, module Q2Presentation, toolchain v4.28.0 ≠ GQ2's
v4.31.0-rc2). Both are fully connected: green badges → /lean/gq2-claude/,
indigo → /lean/gq2-gpt/, both with inline knowls; two Verso blueprints
ship (/blueprint/, /blueprint-gpt/ — the v4.28 branch lacks
:::proposition, mapped via --kind-map). The GPT repo vendors copies
of the Claude files under Induction/Roe*.lean — exclude them when
mining its declmap, else GQ2.* decls get mis-badged. Regen commands live
in crosswalk/CROSSWALK.md; the Claude map MUST use default
--cite-styles name,docstring, the GPT map all four styles + the exclude +
--lean-badge-cap gq2-gpt=1.
CRITICAL: use ~/miniforge3/bin/python3 (3.13, has tomllib + lxml).
Plain python3 on this machine is Xcode CLT 3.9. pretext (2.43.2) and
this python live in ~/miniforge3/bin; latexmk in /Library/TeX/texbin:
export PATH=~/miniforge3/bin:$PATH # do this first, every session
cd ~/claude/gq2-paper
scripts/build-web.sh # trust table -> ingest -> authors
# -> census + drift gate -> build
paperforge check # = python3 -m paperforge_validators.run_all
paperforge build arxiv --pdf
scripts/build-leandocs.sh
scripts/build-site.sh && scripts/deploy.sh # status stamp + bg knowls +
# favicon + assemble + publish
The instance still runs its own scripts/build-web.sh / build-site.sh;
paperforge build web / build site now do the same work generically
(build site delegates to an instance script when one exists). Migrating
gq2 onto the CLI is pending a byte-diff of the outputs.
Gate baseline (2026-07-27): 0 errors, 46 warnings (all plagiarism-
overlap notes, inherited-from-draft or pipeline-added-with-attribution).
The two drift gates (ingest/trust_table.py --check,
sitegen/gen_status.py --check) ride in build scripts AND in run_all
via the artifact_drift validator. Three sections run without summaries
by recorded waiver ([validators.section_summaries].exempt).
Review server: .claude/launch.json config gq2-review (port 8773),
already pinned to ~/miniforge3/bin/python3; start via the Browser pane's
preview_start {name:"gq2-review"}. Run exactly ONE server per instance
root (two servers once corrupted directives/marks.json; writes are
atomic + locked now, but a second server is still a second writer).
VERIFY-IN-BROWSER GOTCHAS (all confirmed the hard way):
- Always verify UI in the browser, never statically.
- The Browser pane starves lazy MathJax at depth: force
MathJax.startup.document.lazyTypesetAll(), wait ~8s; stage deep elements by zeroing scroll +translateYon.ptx-page. getComputedStyleLIES formjx-*elements in this pane — trust a probe<span>+ a screenshot.- After regenerating registries, re-cat the UI bundle and hard-reload with
?bust=— the pane caches aggressively.
gq2's release-eve tooling is now paperforge's; the instance calls $PF:
pretext-template/web-assets/byte-matches gq2 again (dark-mode keys on the theme's.dark-modeclass, a11y ARIA on injected knowls, homepage links, ToC default-open); paper-style.css keeps the variables idiom with gq2's verified dark palette as values.- Author-metadata sidecar (
content/authors.xml+apply-author-metadata.{sh,xsl}, XSL hooks in all three conversions, N-author pdfauthor) — scaffolded, skip-guarded for fresh instances. publication/arxiv.ptx+ component conventions (print = PDF-only notation index; details/background = HTML-only) + project.ptx wiring.sitegen/+ingest/trust_table.pyabsorbed the five release scripts, parameterized by paper.toml[site]/[trust_table]; byte-parity verified (only the stamp-note provenance strings changed, once).records/absorbed the seven records-pipeline scripts as optional pipelines; all identity/prose lives in the instance's records config; byte-parity verified end-to-end (only generated_utc differed).- Validators:
artifact_driftadded; the shared decl scanner learnedaxiom(trust-base badges resolve); section-summary waivers are config. gq2's 12 red findings → 0. - templates/, paper.toml examples, docs (HTML-FEATURES, DEPLOYMENT, REFERENCES locator pins), and five skills refreshed to match.
As of the 2026-08-01 refresh. Always git status + git log --oneline
before committing or pushing — you WILL see work you didn't make.
- paperforge:
origin/masteris at726cc7d(the port series is pushed; CI green on it, 2026-07-27). The 2026-08-01 readiness pass below is unpushed — so CI has not yet run the new macOS-integration matrix. Push when the user is ready. - gq2-paper: the port-consumption series plus
c6e6691(the readiness-pass reconciliation) are unpushed. The instance keeps its ownscripts/build-web.shandscripts/build-site.shand is unaffected by the tool-side script deletions — but the CLI now covers both, so migrating the instance topaperforge build web/build site(and deleting its copies) is the natural next step, done deliberately with a byte-diff of the output.paperforge migrate config --checkprints the new-shape config whenever the old-shape paper.toml is retired. - The live site is well behind HEAD:
scripts/deploy.sh --dry-runon 2026-08-01 showed 5408 files changed (the running example, popups, restamped footers, favicon). Not deployed.
.github/workflows/ci.yml, on roed-math/paperforge; inspect with
gh run list --repo roed-math/paperforge. A full run is ~1 minute: a
unit matrix (Ubuntu + macOS, 3.11/3.13) running pytest and the three
standalone validator fixtures, and an integration matrix (Ubuntu + macOS)
that installs the PreTeXt CLI, builds the fixture, and runs
paperforge selftest. pretext is installed UNPINNED, so CI has been
exercising 2.45.0 while this machine runs 2.43.2 — both pass.
gq2-paper has no CI (private, and a real build needs the Lean submodules);
its gate is paperforge check locally, at 0 errors / 46 warnings.
Prompted by a second author adopting paperforge. Three categories:
- Portability.
templates/build-web.shandtemplates/apply-author-metadata.shDELETED — both were superseded bypaperforge build web(postprocess/web.py+_stages.author_metadata) and the former carried the last BSD-onlysed -i ''.templates/build-site.shdeleted too: site assembly is nowpaperforge/postprocess/site.py(no rsync, no perl)..DS_Storeuntracked;.gitignorecovers macOS litter. CI runs the full fixture build andpaperforge selfteston macOS as well as Ubuntu. - Real bugs.
paperforge init --sitewrote ascripts/build-site.shthat re-enteredpaperforge build site→ fork bomb (193 processes in 12s when reproduced); the shim is gone andbuild siterefuses re-entry. The validators read only the deprecated[inputs] lean_project, sopaperforge checkcrashed on EVERY instanceinitcreates and on every--no-leanpaper (formalization_roots()now handles both shapes; same fix insitegen/_common.py).paper-style.cssimported afonts-cm.cssthe template never shipped (404 per page).paperforge review --port Npassed the port positionally and the server rejected it. - Genericity + onboarding. gq2 defaults removed from
templates/paper.toml(also rewritten in the new config shape),detail-ui.css(lean-proj-gq2-gpt),lean_knowls.py,blueprint_gen.py(--project/--modulenow required; title defaults to the paper's own),lean_ledger.py,lean_axioms.py,tex2ptx.py,trust_table.py, and five skills.records/sanitize.py's capacity redaction no longer eats math prose ("Lemma 9.2 core") — setsanitize.capacity_pattern = CAPACITY_PATTERN_LOOSEin the records config to reproduce the published gq2 corpus byte-for-byte. New:paperforge selftest(fixture end-to-end in a scratch dir),paperforge build print, and a rewrittendocs/GETTING-STARTED.md.initnow also scaffoldsagents.toml, the style-corpus/references guidance, a directive example, andrequirements.txt. - What gq2 had to absorb (
gq2-paperc6e6691): the records config PINSsanitize.capacity_patternto the old loose rule — the 20 published records really do contain its math-prose false positives ("Lemma [private capacity]"), sovalidate_formalization.pyonly stays green with the pin.crosswalk/CROSSWALK.mdgained the two blueprint-regen commands; both were verified to reproduce the committed chapter set, and--titlemust be passed or the shipped heading changes to the paper.toml-derived default. The build scripts and paper.toml now say what the CLI covers.
One logical change per commit. Trailer Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> for our edits; author-supplied changes carry
Generated-by: naming the model; proposal artifacts carry per-item
generator / top-level _generator. Deploy commits record source SHAs.
The review UI shows "proposed by" on every card.
Template/instance sync: pretext-template/ and templates/ track the gq2
instance across web-assets, xsl, publication and project.ptx (modulo
@@PLACEHOLDERS@@) — but genericity now outranks byte-parity. Where the
instance needs something named after itself (its second formalization's
badge color, its build scripts), the template carries the generic form and a
commented example, and the instance keeps its own copy.