| name | paper-build-output-hygiene |
| description | Use this skill when validating AutoLabOS-generated TeX/PDF/paper bundles and keeping test/output coherent without manually substituting artifacts. |
| contract_version | 1 |
| contract_kind | codex_skill |
| runtime_contract | true |
| gate | paper_build_artifact_integrity |
| validation | paper_build_output_hygiene_review |
Paper Build Output Hygiene
Purpose
Ensure that AutoLabOS itself generates the paper-facing artifacts and that test/output/ remains a clean, operator-facing bundle.
This skill is about artifact integrity and output structure, not about overstating research quality.
Use this skill when
Use this skill when the user asks to:
- inspect generated TeX/PDF outputs
- clean up paper output structure
- remove duplicate or confusing bundles
- verify page-budget compliance
- determine whether TeX→PDF is wired correctly
- ensure the canonical output path is coherent
- verify that a live validation run used the intended brief, template, and workspace-local paper inputs
- investigate citation/reference ordering, repeated citations, bibliography style, or template-surface regressions in generated papers
Required validations
Always report:
- current output structure
- unnecessary file/folder status
- duplicate artifact status
- required artifact coverage
- TeX status
- PDF status
- page-budget compliance status
- wiring/path changes needed
- active brief/template/source workspace used for the generated paper
- rendered-page inspection status for layout, table overflow, figure presence, references, author metadata, font/template consistency, and text alignment
- bibliography-style status, including whether ACL templates use the expected ACL-compatible style and whether numeric references follow first-citation order
- repeated-citation-bundle status, especially whether the same
\cite{...} bundle is mechanically repeated across many paragraphs
Required principles
- AutoLabOS should generate the canonical paper artifacts itself.
- Do not manually substitute externally written TeX/PDF as if it were system output.
- Prefer one coherent canonical bundle over many partially overlapping bundles.
- Keep operator-facing outputs easy to inspect.
- Manuscript templates and style files used for live validation belong in the validation workspace, not in the repository, unless the project explicitly adds a public example template.
- The manuscript is not complete merely because TeX or PDF exists; inspect the rendered PDF when the user is evaluating paper quality.
- Tables must fit within the rendered text block. If a table visually crosses margins or covers body text, treat that as a paper-build blocker.
- Expected paper components include author metadata, references/citations, quantitative tables, and figures or charts when the brief or results require them.
- Algorithmic or conceptual figures may be generated by the workflow when appropriate, but they must be referenced, captioned, and checked against claims/results.
Guardrails
- Do not manually author TeX/PDF as a substitute for system output.
- Do not hand-patch generated
main.tex, .bib, or PDF as the final fix for output-quality defects. Fix the AutoLabOS generator, validator, review gate, or harness handoff, then rerun generation.
- Do not multiply output folders unless the contract explicitly requires it.
- Do not break canonical runtime paths while cleaning structure.
- Distinguish between "artifact exists" and "artifact is correctly wired and usable".
- Do not treat a fallback built-in preamble as equivalent to the requested submission template.
- Do not treat
template_applied=true as sufficient if the final rendered main.tex no longer preserves the requested template package/class (for example \usepackage[review]{ACL2023}) or if required sibling .sty/.bst files were not copied into the paper build directory.
- Do not inject template-absent front-matter elements such as an explicit
Keywords: line when a concrete manuscript template is supplied, unless the template itself asks for that surface.
- If the template package name and available
.sty filename differ by case, call it out as a build-risk and fix it in the workspace before rerunning.
- Do not mark paper-generation complete until rendered inspection has checked the concrete complaints or quality criteria the user raised.
Citation and Reference Hygiene
- Treat hardcoded
\bibliographystyle{plain} as a defect for submission-template output unless the template explicitly asks for it; plain can make numeric references appear alphabetically instead of in first-citation order.
- For ACL-style templates preserving
\usepackage[review]{ACL2023}, the generated TeX should preserve or infer an ACL-compatible bibliography style such as acl_natbib, and the build directory should include the sibling .bst file when available.
- If a concrete template contains
\bibliographystyle{...}, preserve that exact style in the generated paper unless the user explicitly requests a different one.
- Repeated citation bundles are a render-quality issue: the same
\cite{a,b,c} should not be appended to many paragraphs in the same section as a traceability fallback.
paper/render_validation.json, paper/citation_consistency.json, and review artifacts should expose bibliography-style mismatches and repeated citation bundles so meta-harness can route the problem back to the responsible node instead of treating it as cosmetic paper polish.
AutoLabOS-Owned Fix Loop
When the problem is in generated output:
- Reproduce or inspect the generated artifact that shows the defect.
- Identify the AutoLabOS source path that emitted or failed to validate it.
- Add the smallest generator/validator/review-gate change that prevents recurrence.
- Add or update a targeted test around the system behavior.
- Rerun the relevant generation, harness, or render validation path when practical.
- Report any remaining gap explicitly; do not present manual artifact edits as completion.