|
| 1 | +--- |
| 2 | +name: docforge |
| 3 | +description: Agent workflow for DocForge MCP — schema-first PDF generation. Use when producing business PDFs via DocForge tools. |
| 4 | +--- |
| 5 | + |
| 6 | +# DocForge Agent Skill |
| 7 | + |
| 8 | +## Rules |
| 9 | + |
| 10 | +1. **Never generate raw Typst** unless the user explicitly requests advanced mode. |
| 11 | +2. **Always** follow: `docforge_list_templates` → `docforge_get_template_schema` → `docforge_create_document`. |
| 12 | +3. Treat JSON data as the contract; validate against schema before calling create. |
| 13 | +4. Use LaTeX only for math fragments in designated schema fields (`equations[].latex` in research_report). |
| 14 | +5. **Always** `docforge_preview_document` before final delivery. |
| 15 | +6. **Always** `docforge_lint_document` before `docforge_export_document`. |
| 16 | +7. On compile failure: read `agent_action` and `suggested_repairs`, call `docforge_repair_document`, then recompile. Do not freestyle Typst fixes. |
| 17 | +8. After compile, call `docforge_visual_qa_document` for layout issues lint may miss. |
| 18 | +9. Use `docforge_generate_template_scaffold` + `docforge_register_custom_template` for custom templates. |
| 19 | +8. When data is incomplete, ask for missing required fields — do not invent summary/risks without labeling assumptions. |
| 20 | + |
| 21 | +## Workflow |
| 22 | + |
| 23 | +``` |
| 24 | +list_templates → get_template_schema → create_document → compile_document |
| 25 | +→ repair_document (if suggested_repairs) → compile_document |
| 26 | +→ save_document_version (before major edits) → lint_document → preview_document |
| 27 | +→ export_document → destroy_document (optional cleanup) |
| 28 | +``` |
| 29 | + |
| 30 | +## Templates |
| 31 | + |
| 32 | +| Template | Use case | |
| 33 | +|----------|----------| |
| 34 | +| `executive_memo` | Leadership/board memo | |
| 35 | +| `sales_proposal` | Client proposal from discovery | |
| 36 | +| `research_report` | Analytical report with citations appendix | |
| 37 | +| `incident_report` | Post-incident from transcript | |
| 38 | +| `kpi_report` | Board KPI update from CSV + notes | |
| 39 | +| `postmortem` | Blameless incident review | |
| 40 | +| `project_status` | Weekly status with RAG indicators | |
| 41 | +| `decision_record` | ADR-style decision documentation | |
| 42 | +| `meeting_brief` | Pre-meeting context doc | |
| 43 | +| `invoice` | Line-item invoice with computed totals | |
| 44 | +| `contract_summary` | Contract clause summary | |
| 45 | + |
| 46 | +## MCP resources |
| 47 | + |
| 48 | +- `docforge://templates` — catalog (built-in + marketplace) |
| 49 | +- `docforge://marketplace` — community templates only |
| 50 | +- `docforge://templates/{id}/readme` — agent README |
| 51 | +- `docforge://templates/{id}/sample` — sample JSON |
| 52 | + |
| 53 | +## PDF compliance |
| 54 | + |
| 55 | +Use `options.pdf_standard: "ua-1"` with `accessibility: true` (default) for PDF/UA. |
| 56 | +Use `options.pdf_standard: "a-2a"` with `options.accessibility: false` for PDF/A — **never both standards in one export**. |
| 57 | + |
| 58 | +Use `options.typst_snippets.footer_note` for constrained custom footer text only (plain text, no `#` commands). |
| 59 | + |
| 60 | +## MCP server |
| 61 | + |
| 62 | +```bash |
| 63 | +npm run build && npm start |
| 64 | +``` |
| 65 | + |
| 66 | +Requires `typst` CLI (0.14+) on PATH. |
0 commit comments