Update Typst Grammar Authoring
Use this skill when a maintainer needs to refresh the portable
typst-grammar-authoring skill after changing the canonical grammar examples in
src/tutorial/reference-grammar.typ.
Inputs And Outputs
- Canonical source:
src/tutorial/reference-grammar.typ - Portable skill:
.codex/skills/typst-grammar-authoring/SKILL.md - Traceability artifact:
.codex/skills/update-typst-grammar-authoring/references/grammar-catalog.json
Workflow
Review the source edits in
src/tutorial/reference-grammar.typand confirm they are ready to publish into the portable skill.Regenerate the portable skill body and traceability artifact:
python .codex/skills/update-typst-grammar-authoring/scripts/generate_grammar_catalog.pyReview the generated diff for the portable skill and the traceability JSON:
git diff -- .codex/skills/typst-grammar-authoring/SKILL.md .codex/skills/update-typst-grammar-authoring/references/grammar-catalog.jsonVerify the portable skill stayed single-file:
Get-ChildItem -Force .codex/skills/typst-grammar-authoringVerify the portable skill's command examples stayed platform-neutral and did not reintroduce Windows absolute paths:
rg -n "[A-Za-z]:\\\\|path\\\\to|target\\\\typst-grammar-authoring-check|\\.codex\\\\skills|src\\\\tutorial" .codex/skills/typst-grammar-authoring/SKILL.mdIf the regenerated lookup looks correct, keep the portable skill focused on author guidance only. Any exact source mapping belongs in the updater-owned traceability JSON, not in the portable
SKILL.md.
Guardrails
- Keep the distributed
typst-grammar-authoringfolder limited toSKILL.md. - Treat
.codex/skills/update-typst-grammar-authoring/references/grammar-catalog.jsonas the source-mapping artifact for maintainers. - Keep maintenance-only commands, source-path references, and review steps in this updater skill rather than the portable one.
- If the generator output reveals a design issue in the portable skill, update the portable template first and rerun the generator before final review.
Source: typst-doc-cn/tutorial — distributed by TomeVault.