SuperAPI AI Directory

document-qa

Office & productivity

View repository

Updated 10-16 09:45

About this skill

Official Document Quality Check

Performfinishedstructural and quality checks on Chinese official documents. Opposite direction from "drafting": it does not generate content, it only checks where the draft is incomplete and where it is nonstandard.

File Index

src/scripts/check_sections.py        # 章节齐全度 + 层级结构 + 篇幅自动校验(CLI)
docs/references/style-rules.md         # 「质量检查清单」与行文规范(人工核对项)
prompts/core/doc-type-guardrails.md  # 防编造强制约束(事实性核对的依据)
prompts/doc-types/<id>-<文种>/spec.md  # 各文种应有板块与职责(结构核对依据)

Automated Check (Script)

src/scripts/check_sections.py Covers all 22 document types (one-to-one with the 22 document-type templates under assets/templates/ ), automatically checking:

  • Section completeness: missing agreed sections are reported directly as errors.
  • Hierarchical structure: reminders are given for skipped heading levels,一是/二是/三是 being treated as a formal heading, drilling down to third-level headings within 10 pages, and so on.
  • Content machine check: leftover placeholders, whether the closing wording matches the document type.
  • Format red lines(GB/T 9704): whether the document number uses hexagonal brackets 〔〕 without adding 「第」 and without zero-padding, whether the month and day in the completion date are zero-padded, whether a period is mistakenly added to the title, whether 「主题词」 remains.
  • 0-hallucination audit(--strict-facts): list thenon-placeholderspecific values in the finished draft (document number/date/percentage/amount/quantity) for item-by-item source verification—turning "do not fabricate" from a slogan into a verifiable checklist; advisory, does not affect the exit code.
  • --strict-structure treat structural reminders as errors.
python3 src/scripts/check_sections.py notice 成稿.md
python3 src/scripts/check_sections.py report 成稿.md --strict-structure
python3 src/scripts/check_sections.py report 成稿.md --strict-facts   # 0 幻觉核对:列出具体值供查来源

Manual Verification (Checklist)

For semantic items that the script cannot cover, verify item by item according to the "Quality Check Checklist" in docs/references/style-rules.md :

  • Whether the document type is correct and the direction of issuance is reasonable
  • Whether the title is single-focused, and whether there is unnecessary punctuation or improper line wrapping
  • Whether the paragraph hierarchy is clear and whether the closing wording matches the document type
  • Whether the signature and date are complete and whether the date is written in a standard way
  • Whether there are facts, data, or bases not provided by the user (compare with prompts/core/doc-type-guardrails.md)

Default Process

  1. Determine the document type of the draft → first run check_sections.py <文种> 成稿.md to obtain structural conclusions (all 22 document types are covered).
  2. Then add --strict-facts and run the 0-hallucination audit to obtain the list of "non-placeholder specific values", and verify item by item whether there is a verifiable source (those without a source should be changed to placeholders or marked "to be verified").
  3. Then perform semantic verification according to the "Quality Check Checklist".
  4. Output "which sections are missing / where the structure is nonstandard / which specific values are suspected of having no basis", and indicate the corresponding primary-source rules.
  5. Only report problems and bases; do not rewrite without authorization; when revision is needed, hand it back to the "Official Document Writing" skill.

Boundaries

  • The script covers therequired sectionsof all 22 document types, but it only verifies structure and does not judge semantics; whether the content holds still requires the manual verification checklist.
  • REQUIRED_SECTIONS only includes required sections;(可选) sections (attachments, notes, etc.) are not counted; section names are based on the template primary source spec.md ; if the script is out of sync with the template, spec.md shall prevail and it shall be regarded as an item for the script to supplement (tests/test_template_sections.py guards the synchronization of the two).