监理通知单-docx
Overview
Generate a standard Chinese construction supervision notice (监理通知单) as a DOCX file. Parse the user's issue description and uploaded photos, retrieve applicable engineering codes and standards, and produce a professionally formatted document that matches the structure of the sample notices in the workspace.
When to Use
Activate this skill when the user asks for:
- Generating a 监理通知单 / 监理通知单 docx / 监理工程师通知单
- Creating a supervision notice from photos and a brief problem description
- Auto-filling a standard GB/T 50319 style supervision notice
- Producing a DOCX with bordered site photos attached
Required Presets
Before the first generation, ensure the following project metadata is available. If missing, ask the user to provide or confirm them:
project_name— 工程名称supervisor_name— 监理方名称 / 项目监理机构construction_party— 施工方名称engineer_name— 总监理工程师或专业监理工程师姓名
Store these values in a local config file so they persist across sessions:
<skill-config-path>/config.json
Example:
{
"project_name": "开元大道西延",
"supervisor_name": "XX项目监理部",
"construction_party": "河南六建",
"engineer_name": "李帅兵"
}
Default behavior: when a preset field is not provided, fill it with XX (e.g. 工程名称:XX, 编号:XX, 致:XX, 项目监理机构:XX(盖章) 总/专业监理工程师:XX). The date defaults to today's date when omitted.
Workflow
Step 1 — Collect Inputs
- Read the user's natural-language description of the problem (e.g., "沟槽开挖5米深未放坡").
- Collect any uploaded photos. Accept paths or image attachments.
- Ask for
notice_number(编号) anddate(日期) if not provided. Default date is today inYYYY-MM-DD. - Ask for the engineering specialty (专业) if it helps select the correct codes.
Step 2 — Build the Subject
- Compose a concise 事由 line in the form:
关于……的事由. - Do not include the word "事由" twice in the final output.
Step 3 — Retrieve Standards and Codes
Retrieve relevant national / industry standards to support the rectification requirements.
Priority order:
-
IMA knowledge base (preferred)
- If the user has configured an IMA knowledge base ID/name, use
ima-skill:knowledge-baseorima-skills:knowledge-baseto search for applicable norms. - Example query: "沟槽开挖 放坡 支护 规范 JGJ 120 GB 51004".
- If results are found, quote the exact standard number, name, and clause.
- If the user has configured an IMA knowledge base ID/name, use
-
Web search (fallback)
- If IMA is not configured or returns no results, search the web.
- Use queries that include the issue, standard number if known, and "规范" / "条文说明".
- Verify the standard number and clause are current and accurate. Prefer authoritative sources (国家标准化管理委员会, 住建部, 行业协会). Avoid blogs or unverified forums.
Record each cited standard as: 《规范名称》标准号 第X.X.X条.
Step 4 — Compose the Body
Structure the 内容 paragraph(s) in this order:
- Inspection finding — describe what was observed during the patrol/inspection.
- Problem list — enumerate issues (1、2、3…). Reference photos when relevant.
- Rectification requirements — for each problem, state:
- Specific corrective actions
- Basis standard / clause
- Completion and acceptance — require the construction party to rectify within X days, self-inspect, and report to the supervision team before proceeding.
Use formal engineering supervision language. Keep sentences clear and enforceable.
Step 5 — Generate the DOCX
- Build a JSON input for the generation script (
scripts/generate_jianli_docx.py). Omit any preset field to have it rendered asXX. - Run the script with the managed Python environment:
<python_venv>/Scripts/python.exe scripts/generate_jianli_docx.py <input.json> <output.docx>
- The script copies
assets/template.docxand replaces text, preserving the original formatting. - Verify the output file exists.
Step 6 — Present the Result
- Call
present_fileswith the generated DOCX. - Summarize the generated notice: project, recipient, subject, cited standards, and photo count.
Output Format
The generated DOCX is produced by copying assets/template.docx (which carries the exact fonts, sizes, borders and margins of the reference notices) and replacing placeholder text. This guarantees pixel-level fidelity with the samples.
Resulting layout:
- A 4-row table, 3 logical columns, table width 9350 dxa, indent 151 dxa, all borders 0.5pt (single, auto).
- Row 1 (merged): centered title
监理通知单, 黑体 16pt. - Row 2:
工程名称:{project_name}(left, merged 2 cols);编号:{notice_number}(right). - Row 3 (merged 3 cols, three paragraphs):
致:{construction_party}事由:{subject}(half-width colon, matching the sample)内容:{body}(justified, 12pt)
- Row 4: left cell blank; right cell (merged 2 cols) two paragraphs:
项目监理机构:{supervisor_name}(盖章) 总/专业监理工程师:{engineer_name}日 期 :{date}
If photos are provided, append a section titled 附件:现场照片. Each photo is placed in a single-cell bordered table (0.5pt border, matching the form) with a centered caption below.
IMA Knowledge Base Integration
- The skill reserves an IMA connection channel. Configurable via
config.json:
{
"ima_kb_id": "",
"ima_kb_name": ""
}
- When
ima_kb_idorima_kb_nameis set, query that knowledge base first for relevant standards. - If the user wants to configure IMA later, store empty values and fall back to web search until configured.
Script Reference
scripts/generate_jianli_docx.py— deterministic DOCX generator based on the bundled template.- Input: JSON file with fields described in the script docstring. Omitted preset fields default to
XX;datedefaults to today. - Output: DOCX file inheriting the reference notice's exact formatting.
assets/template.docx— the original-format template copied at generation time.
References
references/format_spec.md— detailed layout and typography rules derived from the sample notices.references/examples.md— deconstructed examples from the workspace for style reference.
微信扫一扫