原始内容
name: gongwen-draft description: Draft, revise, polish, review, lint, and export Chinese党政机关公文 and政务材料 with authority-first guardrails, policy-research/citation checking, material dossier/fact-ledger intake, language polishing, controlled Markdown/JSON specs, offline prompt-pack generation, strict official-document font checks, and optional Word .docx generation with generic red-head draft headers when authorized values are supplied. Use when the user asks for gongwen-draft, 公文, 公文写作, 公文起草, 机关文稿, 政务写作, 政策检索, 政策依据, 引用核验, 领导讲话, 会议精神, 素材收集, 素材整理, 事实台账, 语言润色, 通知, 请示, 报告, 函, 纪要, 通报, 批复, 意见, 决定, 公告, 通告, 工作总结, 工作方案, 调研报告, 汇报材料, 简报, 情况专报, 讲话稿, 回复函, 材料改写, 公文润色, 格式审核, Word公文导出, 离线提示词, JSON公文规格, 红头版头, 发文机关标志, 发文字号, 签发人, or to turn notes into formal official-style Chinese documents.
Gongwen Draft
Use this skill to produce practical,规范、准确、克制的中文公文和机关材料. The stable skill/repository name is gongwen-draft.
Treat the gathered local references as guidance, not as permission to invent facts, policies, authority, signatures, seals, dates, document numbers, or data.
Quick Workflow
- Identify the task:
draft,revise,review,format,template,extract,export, ortraining. - Apply four-position routing: 文种 -> 行文方向 -> 格式/交付 -> 语言口径.
- For policy-sensitive tasks, run policy research first: official source search -> citation ledger -> citation check -> draft.
- For messy materials, build a dossier with
scripts/prepare_dossier.pyor maintain a fact ledger:已确认事实,用户判断,待核实,建议措辞. - Check five anchors: purpose, audience, facts, structure, tone.
- If key facts are missing, either ask 1-3 focused questions or produce a fillable skeleton with bracketed placeholders.
- Draft with this order: define purpose -> choose文种 -> verify sources -> structure content -> write concise body -> self-review -> lint/export if requested.
- For source-sensitive claims, cite or ask for the specific policy/source. Do not fabricate policy basis, statistics,领导讲话,会议精神, or official decisions.
Load References As Needed
- For workflow routing, export behavior, and lessons absorbed from GitHub projects, read
references/engineering-workflow.md. - For quick command shapes, source modes, material boundaries, export sequencing, and versioning, read
references/operation-contract.md. - For the comparative learning summary of public
gongwen-writingprojects, readreferences/project-lessons.md. - For explicit community project citations and what was learned from each, read
references/citations.md. - For the product quality bar and user expectations this skill should meet, read
references/quality-bar.md. - For legal/制度底线 and official document types, read
references/core-rules.md. - For messy source materials, source hierarchy, and auditable fact ledgers, read
references/material-workflow.md. - For current policy, laws, official releases,领导讲话, meeting communiques, and citation ledgers, read
references/policy-research.md. - For concrete templates and section structures, read
references/document-types.md. - For writing method, style, revision strategy, and avoiding空心公文, read
references/writing-method.md. - For language polishing modes, empty wording, overclaiming, and official tone repair, read
references/language-polishing.md. - For punctuation, colon, quotation marks, hierarchy markers, and avoiding English punctuation in Chinese prose, read
references/punctuation-style.md. - For reviewing an existing draft, read
references/review-checklist.md. - For strict公文字体 checks, official font channels, and authorized font assets, read
references/font-policy.md. - For controlled Markdown/JSON and Word output conventions, read
references/format-output.md. - For provenance of the local materials used to build this skill, read
references/source-index.md.
Drafting Standards
- Write from the institution's position, not the author's personality.
- Prefer facts, responsibilities, timelines, measures, and enforceable wording over slogans.
- Keep language accurate, plain, and actionable. Avoid empty排比, over-grand claims, vague adjectives, and unsupported成果.
- Use Chinese full-width punctuation in Chinese prose; follow
一、->(一)->1.->(1), use:not:, and use“”/‘’not straight English quotes. - Match文种 to行文关系: 上行 usually 请示/报告; 下行 usually 通知/通报/批复/意见; 平行 or non-subordinate usually 函.
- Keep one main matter per request when drafting请示. Do not mix report and request functions.
- Use placeholders like
[发文机关],[日期],[依据文件名称]when facts are unknown. - For current policy or领导讲话 claims, use official-source citation ledgers. Authoritative media can be background or discovery leads, not a replacement for official policy originals.
- Preserve confidentiality: if user content appears涉密 or sensitive, warn and draft only with sanitized placeholders.
- Separate content drafting from formal issuance: do not add red headers, document numbers, signatories, seals, or approval language unless the user supplied authorized values or placeholders and the task is only preparing a draft.
- Prefer the user's current unit template over generic GB/T-style defaults when the user provides a template.
Lint And Export
- Before exporting, form a clean Markdown draft. Avoid Markdown tables, bold markers, block quotes, and decorative bullets unless the user requested an informal reading draft.
- If using JSON spec, run
scripts/render_spec.py <spec.json> -o <draft.md>before lint/export. - For offline assistants or web chat tools that cannot install skills, run
scripts/build_prompt_pack.py --doc-type <doc-type> --task <task> -o <prompt.md>and paste the generated prompt pack into the target tool. - For multiple raw material files, run
scripts/prepare_dossier.py <materials...> --task <task> -o <materials.md>before drafting, then draft from the dossier. - For policy-sensitive topics, run
scripts/policy_research.py --topic <topic> -o <policy-ledger.md>, fill the ledger from official sources, then runscripts/check_citations.py <policy-ledger.md> --require-citations. - Run
scripts/check_sections.py <doc-type> <draft.md>when reviewing or before file export. - Run
scripts/check_citations.py <draft.md>when the draft includes policy依据,法律法规,领导讲话,会议精神, official data, or standards. - Run
scripts/check_language.py <draft.md>when polishing, removing AI-like wording, or reviewing high-stakes drafts. - Run
scripts/check_fonts.py --verify-assetsafter changing bundled fonts, then runscripts/check_fonts.py --draft <draft.md>before Word export. If authorized font files are inassets/fonts, use--install-assets. - Run
scripts/generate_docx.py <draft.md> -o <output.docx> --doc-type <doc-type> --install-font-assetswhen the user asks for Word output. The script creates-vNNfiles instead of overwriting unless--overwriteis explicit. - Run
scripts/check_type_consistency.pyafter changing document types, templates, README coverage language, or lint document-type lists. - Run
scripts/self_test.pyafter modifying any script to verify basic correctness of all helper modules. - For generic红头版头 output, use controlled front matter such as
issuer_mark,doc_number, andissue_person; never invent real机关名称、发文字号、签发人、印章 or approval status. - Do not silently replace required公文字体 with generic fonts. If fonts are missing, stop and use official/authorized channels.
- If Python lacks
python-docx, install or use the bundled workspace Python/libraries when available. - Keep generated files outside the skill folder unless the user explicitly asks otherwise.
- If the user asks for a deliverable but not the format, ask whether they want Markdown or Word
.docx. - Community projects inspired this workflow; cite them when explaining the design or publishing derivative project documentation.
Output Patterns
When drafting from scratch, provide:
- A finished draft in formal Chinese.
- A short note listing assumptions/placeholders.
- Optional review suggestions if the user asked for polish or compliance.
When reviewing or revising, provide:
- Main issues by severity.
- Revised draft or targeted edits.
- A checklist of remaining facts the user must confirm.
When exporting, provide:
- The generated file path.
- Lint findings or a short "no high-risk issue found" note.
- Placeholders or facts that still require human confirmation.
Do Not
- Do not impersonate a real office, signatory, seal, or official approval.
- Do not invent legal basis, policy language, statistics, meeting outcomes, or document numbers.
- Do not quote long passages from reference articles. Summarize methods and cite source names where useful.
- Do not treat training articles or转载文章 as normative documents. Use official regulations and standards first.
- Do not copy another public project's long rules verbatim into outputs. Use inspected projects as engineering reference only.
- Do not confuse near-synonyms common in公文:
制定/制订,截至/截止,权利/权力,受权/授权,决定/决议,公告/通告,批复/复函. When in doubt, checkreview-checklist.mdSection F or the governing regulation. - Do not use abbreviated or informal names for行政区域, institutions, or official positions without the full formal name being established first in the same document.
- Do not remove community citations merely because a rule has been rewritten locally; provenance should remain visible.