- Introduce publish-document skill with Epistemic Invariance Contract (Content & Weight) - Add layout principles, visual defect resolution order, and two-stage quality checklist - Implement verify_content_integrity.py to detect text omissions or semantic drift - Register skill in .agents/SKILLS.md and link from communicate-findings hand-off - Publish output/cuestionario-presencia-externa.typ and compile single-page PDF deliverable
2.9 KiB
2.9 KiB
name, description
| name | description |
|---|---|
| publish-document | Transform an approved communication artifact into a polished distributable document (PDF) while preserving semantic and epistemic invariance. |
Publish Document
Use when
- An approved communication artifact in Markdown (e.g. output/*.md) requires publication as a distributable PDF.
- Producing stakeholder-facing documents (questionnaires, reports, meeting guides, executive summaries).
- Not for drafting communication content or determining audience and goals (use communicate-findings).
- Not for internal repository documentation (use write_documentation).
Steps
- Ingest approved artifact. Verify the source Markdown artifact is approved. Confirm it has valid frontmatter and complete body text.
- Apply document contract. Bind to the Epistemic Invariance Contract in
references/document_contract.md. Treat source text as immutable: no text mutation, no semantic additions, no semantic deletions, and no weight distortion. - Design document layout. Map source sections into document markup (Typst) following
references/layout_principles.md. Configure page geometry, margins, typographic scale, and structural containers without breaking semantic units. - Compile document. Compile source markup to PDF using the project publishing toolchain (
nix-shell -p typst poppler-utils --run "typst compile <input.typ> <output.pdf>"). - Verify content integrity. Run
scripts/verify_content_integrity.pyor compare extracted text against source Markdown. Confirm zero dropped content, zero added claims, and preserved section hierarchy. - Execute visual QA loop. Visually inspect rendered pages of the generated PDF (using
view_fileon the PDF or rendered page images). Evaluate againstreferences/pdf_quality_checklist.md. - Resolve layout defects. If visual defects occur (overflow, orphan headings, awkward table splits), adjust layout parameters in this strict order:
- Geometry (margins, padding, spacing).
- Structural breaks (without splitting semantically tied findings or caveats).
- Typography (font size scale, leading).
- Never copy-fit or alter text prose. Recompile and repeat inspection until zero defects remain.
- Deliver published deliverable. Output the finished PDF under
output/pdf/and source underoutput/.
Your call
- Choice of layout profile or visual theme for the document.
- Layout collisions that cannot be solved by styling alone without structural compromise.
- Final approval of the compiled PDF before delivery to stakeholders.
Done when
- The PDF deliverable exists under
output/pdf/. - Content integrity verification passes with zero omissions or additions.
- Visual inspection confirms zero layout defects against the quality checklist.
- The user approves the final deliverable.
Hands off to
- Distribution to AMC stakeholders.
git-commit: to commit publication source and compiled PDF.