Skip to content

docs(statements): restructure the Statements feature guide for the current model - #606

Draft
rsalesc wants to merge 23 commits into
mainfrom
worktree-statements-docs-restructure
Draft

docs(statements): restructure the Statements feature guide for the current model#606
rsalesc wants to merge 23 commits into
mainfrom
worktree-statements-docs-restructure

Conversation

@rsalesc

@rsalesc rsalesc commented Jul 28, 2026

Copy link
Copy Markdown
Owner

What

Restructures Feature Guide → Statements to the current statement model as five focused, example-driven pages (plus the design + plan that produced them).

Five pages (Feature Guide → Statements):

  • Overview (index.md) — the mental model: (language, variant) sources of some type, the statements/tutorials/documents kinds, a formats-at-a-glance table, the build commands, and the pipeline.
  • Writing statements (writing.md, new) — rbxTeX-first authoring: blocks, \VAR{}/Jinja, samples & explanations, assets; short sections for Markdown/Jinja/LaTeX/PDF. Consolidates the old formats/{rbxtex,latex,pdf}.md pages.
  • Template context (context.md, new) — the params/vars/contest/problem/problems namespaces (render-specific, never merged), per-sample handles, and the LaTeX-Jinja filters (sci, rsci, escape, parent, stem).
  • Contest statements (contest.md) — the contest-owned standaloneProblemTemplate/contestProblemTemplate, the (language, variant) join, documents/infosheets, the no-contest fallback, and extends. Absorbs the old templates.md.
  • Tutorials (tutorials.md, new) — editorials via rbx tut b / rbx contest tut b.

Also: corrected the stale statements snippet + -l--languages in cheatsheet.md; repointed the {{rbxtex}} macro to writing; fixed dangling inbound links.

Why

The hand-written statement guide pages documented the pre-v2 schema (name/path/configure/match/joiner/override, statement-level vars) — all removed in the current model. Closes the docs scope of #570 (reference/feature-guide). The #438 contest-statements walkthrough remains a separate effort.

How it was built

Brainstormed the structure → design doc + task-by-task plan (docs/plans/2026-07-29-statements-docs-restructure*.md), then executed subagent-driven with per-page spec + quality review and a final holistic cross-page pass. Every user-facing claim was verified against the code (schema.py, context.py, resolver.py, expander.py, latex_jinja.py, the CLI).

Verification

  • uv run mkdocs build (non-strict) — no errors; only ~9 pre-existing unrelated warnings (autorefs dupes, docs/plans/* macro noise).
  • Staleness sweeps clean: no removed config keys, no links to retired pages, no dead sample handles (sample.explanation/inputPath/outputPath), no -l flag.

Status

Still a draft — the design doc + plan are included for review, and reviewers can walk the five pages. Ready to mark for review whenever you're happy with it.

🤖 Generated with Claude Code

Roberto Sales and others added 18 commits July 29, 2026 00:43
Records the approved 5-page structure (Overview, Writing statements,
Template context, Contest statements, Tutorials) for rewriting the
Statements feature-guide docs to the current (v2) statement model.
Scope is #570 (reference/feature-guide only); the #438 walkthrough
stays a separate effort.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Task-by-task plan to rewrite the five Statements pages to the current
statement model, with canonical (non-stale) YAML/tex examples, a
non-strict mkdocs-build + staleness-grep verification gate, and a
commit per page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Task 0 verification corrected several assumptions: --languages (no -l),
no `editorial` block / no engine block-allowlist, contest PDFs keyed by
statement name, `sample.explanation` is dead, render-specific namespaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…joins

Rewrite docs/setters/statements/contest.md for the v2 model: the two
contest-owned problem templates (standaloneProblemTemplate vs
contestProblemTemplate), the (language, variant) join and its 0/>1 rule,
building, documents (metadata-only), location/date, and the extends
allowlist merge. Fold in the template-authoring guidance from the retired
templates.md, delete that page, drop it from the nav, and repoint its
inbound links (writing.md, context.md) at contest.md sections.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unify template filenames on problem-standalone.rbx.tex /
problem-in-contest.rbx.tex across the doc set; show the shared body file
once; merge the two template subsections into a single "Custom blocks"
that states the block -> problem.blocks.foo mechanic once with one guarded
example; drop the duplicated bundled-default fallback note (kept canonical
in the 0/1/>1 join bullets) so the Building warning covers only the
unselected-dispatcher exception; make the tutorials note a clean
cross-reference. Anchors #the-contest-owns-the-templates and #custom-blocks
preserved, so inbound links from writing.md/context.md are untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Repoint the profiling guide's inbound link to the surviving #building
anchor on the statements overview, and anchor the context page's
"Documents" link to contest.md#documents.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The memoryLimit field is documented in MB; the infosheet limits-table
example mislabeled its column MiB. Align the label with the value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…paths)

Prefix the cheatsheet's in-statement var example with the required vars.
namespace, document the actual registered Jinja filters in context.md and
point the writing/contest "filters" links at it, standardize every statement
source path on the plural statements/ directory, add assets to the cheatsheet
extends inheritance list, and note positional variant selection (rbx st b
<variant>) in the guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rsalesc rsalesc changed the title docs(statements): restructure design + plan for the current statement model docs(statements): restructure the Statements feature guide for the current model Jul 29, 2026
Roberto Sales and others added 5 commits July 29, 2026 17:01
…'s voice

Restyle all five Statements pages (Overview, Writing, Template context,
Contest, Tutorials) to match the maintainer's authentic docs voice —
definition-first openings that motivate with a concrete "why", "let's"/
"you" register, opinionated guidance, short paragraphs, colon lead-ins +
plain-language recaps around snippets, intent-matched admonitions, and
point-onward sign-offs. Technical content (schema, examples, tables,
headings, anchors, links, macros) is preserved unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the repeated "the nice part" tic (index/contest/tutorials), drop
a redundant fallback note and padded emphasis in contest, fix a
"which...which" stutter in context, and trim a throwaway quip in the
overview. Prose-only; no technical content changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Persist the reverse-engineered author style guide (from the maintainer's
own docs) at docs/plans/docs-writing-style-guide.md, wrapped in a raw
block so mkdocs shows the {{...}} macro examples literally. Point CLAUDE.md
at it so future doc work follows the same voice. Adds the "introduce a
concept before you use it / no forward-references" principle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…riting

Rework the overview's "three kinds" to define joining, documents, and
tutorials before the summary table instead of dropping the terms cold.
In the writing guide, stop forward-referencing template/config mechanics
the reader hasn't met yet: remove the premature params example, the
\VAR{problem.blocks.legend} rendering detail, the vars-vs-params aside,
and the problem.samples handle -- deferring each to the page that owns it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The note introduced the editorial/tutorial concept in the writing guide
only to say a block doesn't exist. Tutorials own that topic; remove the
aside rather than raise a concept the reader hasn't met.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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