Manuscript cross references

From docxology/template · View interactive version

Manuscript cross references is an AI agent skill from the GitHub repository docxology/template. Audit or author registry-driven manuscript cross-refs — labels.yaml, [[FIG:]], [[THMREF:]], [[VAR:]] tokens. USE WHEN fixing figure/equation/theorem numbering, orphan registry keys, hard-coded "Theorem 7.3" in prose, or [[MISSING:]] injection failures — even for Pandoc projects that also use a YAML

How to use this skill

Skill file

Manuscript cross-references (registry tokens)

For Pandoc-crossref @fig: / [@key] exemplars, see CODE2. This skill is for YAML registry + inline tokens.

Convention, not built-in infrastructure. refs/labels.yaml and [[FIG:]]/[[THMREF:]]/[[VAR:]] tokens are a project-authored convention, not a dedicated parser in infrastructure/: no current public exemplar under projects/templates/ uses this style (all ship Pandoc-crossref), and there is no labels.yaml-specific validator. Validation for a project that adopts this convention still runs through the generic infrastructure.validation.cli markdown/prerender checks below plus project-local test coverage the project author writes — token expansion is the project's own manuscript_variables.py-style substitution, not a shared registry engine.

Natural invoke

Inputs to confirm

Workflow

  1. Registry truth — refs/labels.yaml (figures, equations, sections, theorems) and refs/citations.yaml or hybrid references.bib. Every token label must exist; every [@citekey] must resolve.
  1. No hard-coded numbers — prefer [[THMREF:…]], [[SECREF:…]], [[FIGREF:…]], [[EQREF:…]] over "Theorem 7.3", "§8", "Figure 2" in body prose.
  1. Captions — YAML-stored captions may not expand [[…]] unless renderer documents second pass.
  1. Sync — subsection headings and labels.yaml section/theorem numbers aligned; grep for stale numbers after renumbering.
  1. Bibliography — if 99_* uses [[CITELIST:all]], do not hand-maintain a parallel list.
  1. Report — missing/orphan/duplicate keys; hard-coded numbers to tokenize; concrete edits (file + snippet).

Verification commands

uv run python -m infrastructure.validation.cli markdown projects/<name>/manuscript/
uv run python -m infrastructure.validation.cli prerender projects/<name>/manuscript --repo-root .

When NOT to use

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.