zcode-app-cli 3.3.5-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +642 -0
  3. package/bin/zcode.js +848 -0
  4. package/config.example.json +110 -0
  5. package/package.json +81 -0
  6. package/vendor/.node-bundle-meta.json +6 -0
  7. package/vendor/extraction.json +11 -0
  8. package/vendor/node_modules/@zcode/tui/dist/index.js +161875 -0
  9. package/vendor/node_modules/@zcode/tui/package.json +14 -0
  10. package/vendor/packages/android-emulator-plugin/.mcp.json +19 -0
  11. package/vendor/packages/android-emulator-plugin/.zcode-plugin/plugin.json +63 -0
  12. package/vendor/packages/android-emulator-plugin/README.md +134 -0
  13. package/vendor/packages/android-emulator-plugin/commands/android-dev.md +11 -0
  14. package/vendor/packages/android-emulator-plugin/dist/lib/path.d.ts +4 -0
  15. package/vendor/packages/android-emulator-plugin/dist/lib/path.js +17 -0
  16. package/vendor/packages/android-emulator-plugin/dist/lib/result.d.ts +5 -0
  17. package/vendor/packages/android-emulator-plugin/dist/lib/result.js +22 -0
  18. package/vendor/packages/android-emulator-plugin/dist/lib/run.d.ts +18 -0
  19. package/vendor/packages/android-emulator-plugin/dist/lib/run.js +99 -0
  20. package/vendor/packages/android-emulator-plugin/dist/mcp/server.d.ts +3 -0
  21. package/vendor/packages/android-emulator-plugin/dist/mcp/server.js +47607 -0
  22. package/vendor/packages/android-emulator-plugin/dist/providers/app.d.ts +39 -0
  23. package/vendor/packages/android-emulator-plugin/dist/providers/app.js +50 -0
  24. package/vendor/packages/android-emulator-plugin/dist/providers/avd.d.ts +37 -0
  25. package/vendor/packages/android-emulator-plugin/dist/providers/avd.js +185 -0
  26. package/vendor/packages/android-emulator-plugin/dist/providers/build.d.ts +68 -0
  27. package/vendor/packages/android-emulator-plugin/dist/providers/build.js +131 -0
  28. package/vendor/packages/android-emulator-plugin/dist/providers/config.d.ts +7 -0
  29. package/vendor/packages/android-emulator-plugin/dist/providers/config.js +29 -0
  30. package/vendor/packages/android-emulator-plugin/dist/providers/device.d.ts +20 -0
  31. package/vendor/packages/android-emulator-plugin/dist/providers/device.js +91 -0
  32. package/vendor/packages/android-emulator-plugin/dist/providers/logs.d.ts +15 -0
  33. package/vendor/packages/android-emulator-plugin/dist/providers/logs.js +31 -0
  34. package/vendor/packages/android-emulator-plugin/dist/providers/preflight.d.ts +15 -0
  35. package/vendor/packages/android-emulator-plugin/dist/providers/preflight.js +123 -0
  36. package/vendor/packages/android-emulator-plugin/dist/providers/project-template.d.ts +13 -0
  37. package/vendor/packages/android-emulator-plugin/dist/providers/project-template.js +211 -0
  38. package/vendor/packages/android-emulator-plugin/dist/providers/project.d.ts +33 -0
  39. package/vendor/packages/android-emulator-plugin/dist/providers/project.js +195 -0
  40. package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.d.ts +14 -0
  41. package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.js +73 -0
  42. package/vendor/packages/android-emulator-plugin/dist/providers/sdk.d.ts +14 -0
  43. package/vendor/packages/android-emulator-plugin/dist/providers/sdk.js +185 -0
  44. package/vendor/packages/android-emulator-plugin/dist/providers/ui.d.ts +92 -0
  45. package/vendor/packages/android-emulator-plugin/dist/providers/ui.js +146 -0
  46. package/vendor/packages/android-emulator-plugin/hooks/hooks.json +3 -0
  47. package/vendor/packages/android-emulator-plugin/package.json +35 -0
  48. package/vendor/packages/android-emulator-plugin/skills/android-dev/INSTALL_ENVIRONMENT.md +357 -0
  49. package/vendor/packages/android-emulator-plugin/skills/android-dev/SKILL.md +73 -0
  50. package/vendor/packages/android-emulator-plugin/templates/compose-app/README.md +5 -0
  51. package/vendor/packages/document-skills-plugin/.zcode-plugin/plugin.json +8 -0
  52. package/vendor/packages/document-skills-plugin/package.json +8 -0
  53. package/vendor/packages/document-skills-plugin/skills/docx/LICENSE.txt +13 -0
  54. package/vendor/packages/document-skills-plugin/skills/docx/SKILL.md +201 -0
  55. package/vendor/packages/document-skills-plugin/skills/docx/references/chart-templates.md +386 -0
  56. package/vendor/packages/document-skills-plugin/skills/docx/references/common-rules.md +419 -0
  57. package/vendor/packages/document-skills-plugin/skills/docx/references/decorations.md +537 -0
  58. package/vendor/packages/document-skills-plugin/skills/docx/references/design-system.md +1797 -0
  59. package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-advanced.md +257 -0
  60. package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-core.md +332 -0
  61. package/vendor/packages/document-skills-plugin/skills/docx/references/faq.md +323 -0
  62. package/vendor/packages/document-skills-plugin/skills/docx/references/math-formulas.md +276 -0
  63. package/vendor/packages/document-skills-plugin/skills/docx/references/ooxml.md +222 -0
  64. package/vendor/packages/document-skills-plugin/skills/docx/references/toc.md +264 -0
  65. package/vendor/packages/document-skills-plugin/skills/docx/routes/comment.md +88 -0
  66. package/vendor/packages/document-skills-plugin/skills/docx/routes/create.md +207 -0
  67. package/vendor/packages/document-skills-plugin/skills/docx/routes/edit.md +115 -0
  68. package/vendor/packages/document-skills-plugin/skills/docx/routes/format.md +120 -0
  69. package/vendor/packages/document-skills-plugin/skills/docx/routes/read.md +114 -0
  70. package/vendor/packages/document-skills-plugin/skills/docx/scenes/academic.md +783 -0
  71. package/vendor/packages/document-skills-plugin/skills/docx/scenes/contract.md +463 -0
  72. package/vendor/packages/document-skills-plugin/skills/docx/scenes/copywriting.md +139 -0
  73. package/vendor/packages/document-skills-plugin/skills/docx/scenes/exam.md +698 -0
  74. package/vendor/packages/document-skills-plugin/skills/docx/scenes/official-doc.md +411 -0
  75. package/vendor/packages/document-skills-plugin/skills/docx/scenes/report.md +340 -0
  76. package/vendor/packages/document-skills-plugin/skills/docx/scenes/resume.md +534 -0
  77. package/vendor/packages/document-skills-plugin/skills/docx/scripts/__init__.py +1 -0
  78. package/vendor/packages/document-skills-plugin/skills/docx/scripts/add_toc_placeholders.py +749 -0
  79. package/vendor/packages/document-skills-plugin/skills/docx/scripts/document.py +1333 -0
  80. package/vendor/packages/document-skills-plugin/skills/docx/scripts/postcheck.py +807 -0
  81. package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/comments.xml +3 -0
  82. package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  83. package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  84. package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsIds.xml +3 -0
  85. package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/people.xml +3 -0
  86. package/vendor/packages/document-skills-plugin/skills/docx/scripts/utilities.py +374 -0
  87. package/vendor/packages/document-skills-plugin/skills/docx/setup.sh +177 -0
  88. package/vendor/packages/document-skills-plugin/skills/pdf/LICENSE.txt +13 -0
  89. package/vendor/packages/document-skills-plugin/skills/pdf/SKILL.md +919 -0
  90. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/academic.md +1058 -0
  91. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/creative.md +770 -0
  92. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/poster.md +702 -0
  93. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process-advanced.md +284 -0
  94. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process.md +319 -0
  95. package/vendor/packages/document-skills-plugin/skills/pdf/briefs/report.md +1659 -0
  96. package/vendor/packages/document-skills-plugin/skills/pdf/configs/components.md +153 -0
  97. package/vendor/packages/document-skills-plugin/skills/pdf/configs/fonts.md +93 -0
  98. package/vendor/packages/document-skills-plugin/skills/pdf/configs/visual_framework.md +263 -0
  99. package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-academic.tex +130 -0
  100. package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-altacv.tex +190 -0
  101. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/cover_validate.js +367 -0
  102. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/design_engine.py +2816 -0
  103. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2pdf-next.js +754 -0
  104. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2poster.js +256 -0
  105. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf.py +2959 -0
  106. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf_qa.py +901 -0
  107. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/poster_validate.py +1337 -0
  108. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/setup.sh +269 -0
  109. package/vendor/packages/document-skills-plugin/skills/pdf/scripts/toc_validate.py +2075 -0
  110. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/charts.md +320 -0
  111. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover-backgrounds.md +384 -0
  112. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover.md +1442 -0
  113. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/fill-engine.md +527 -0
  114. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/geometry.md +142 -0
  115. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/overflow.md +630 -0
  116. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/pagination.md +367 -0
  117. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/palette.md +217 -0
  118. package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/typography.md +20 -0
  119. package/vendor/packages/ios-simulator-plugin/.mcp.json +15 -0
  120. package/vendor/packages/ios-simulator-plugin/.zcode-plugin/plugin.json +34 -0
  121. package/vendor/packages/ios-simulator-plugin/README.md +111 -0
  122. package/vendor/packages/ios-simulator-plugin/commands/ios-dev.md +11 -0
  123. package/vendor/packages/ios-simulator-plugin/dist/lib/path.d.ts +4 -0
  124. package/vendor/packages/ios-simulator-plugin/dist/lib/path.js +18 -0
  125. package/vendor/packages/ios-simulator-plugin/dist/lib/result.d.ts +5 -0
  126. package/vendor/packages/ios-simulator-plugin/dist/lib/result.js +20 -0
  127. package/vendor/packages/ios-simulator-plugin/dist/lib/run.d.ts +17 -0
  128. package/vendor/packages/ios-simulator-plugin/dist/lib/run.js +83 -0
  129. package/vendor/packages/ios-simulator-plugin/dist/mcp/server.d.ts +3 -0
  130. package/vendor/packages/ios-simulator-plugin/dist/mcp/server.js +46833 -0
  131. package/vendor/packages/ios-simulator-plugin/dist/providers/build.d.ts +112 -0
  132. package/vendor/packages/ios-simulator-plugin/dist/providers/build.js +99 -0
  133. package/vendor/packages/ios-simulator-plugin/dist/providers/logs.d.ts +21 -0
  134. package/vendor/packages/ios-simulator-plugin/dist/providers/logs.js +26 -0
  135. package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.d.ts +12 -0
  136. package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.js +62 -0
  137. package/vendor/packages/ios-simulator-plugin/dist/providers/project.d.ts +35 -0
  138. package/vendor/packages/ios-simulator-plugin/dist/providers/project.js +288 -0
  139. package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.d.ts +22 -0
  140. package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.js +30 -0
  141. package/vendor/packages/ios-simulator-plugin/dist/providers/sim.d.ts +60 -0
  142. package/vendor/packages/ios-simulator-plugin/dist/providers/sim.js +116 -0
  143. package/vendor/packages/ios-simulator-plugin/dist/providers/ui.d.ts +57 -0
  144. package/vendor/packages/ios-simulator-plugin/dist/providers/ui.js +67 -0
  145. package/vendor/packages/ios-simulator-plugin/hooks/hooks.json +3 -0
  146. package/vendor/packages/ios-simulator-plugin/package.json +35 -0
  147. package/vendor/packages/ios-simulator-plugin/skills/ios-dev/SKILL.md +45 -0
  148. package/vendor/packages/ios-simulator-plugin/templates/swiftui-app/README.md +5 -0
  149. package/vendor/packages/restore-legacy-sessions-plugin/.zcode-plugin/plugin.json +9 -0
  150. package/vendor/packages/restore-legacy-sessions-plugin/README.md +35 -0
  151. package/vendor/packages/restore-legacy-sessions-plugin/commands/restore-legacy-sessions.md +11 -0
  152. package/vendor/packages/restore-legacy-sessions-plugin/package.json +8 -0
  153. package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/SKILL.md +92 -0
  154. package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/restore-conversation.mjs +648 -0
  155. package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/scan-legacy-sessions.mjs +422 -0
  156. package/vendor/packages/skill-creator-plugin/.zcode-plugin/plugin.json +8 -0
  157. package/vendor/packages/skill-creator-plugin/package.json +8 -0
  158. package/vendor/packages/skill-creator-plugin/skills/skill-creator/SKILL.md +159 -0
  159. package/vendor/packages/zcode-guide-plugin/.zcode-plugin/plugin.json +8 -0
  160. package/vendor/packages/zcode-guide-plugin/README.md +22 -0
  161. package/vendor/packages/zcode-guide-plugin/package.json +8 -0
  162. package/vendor/packages/zcode-guide-plugin/skills/diagnosing-commands/SKILL.md +66 -0
  163. package/vendor/packages/zcode-guide-plugin/skills/diagnosing-hooks/SKILL.md +66 -0
  164. package/vendor/packages/zcode-guide-plugin/skills/diagnosing-mcp/SKILL.md +97 -0
  165. package/vendor/packages/zcode-guide-plugin/skills/diagnosing-plugins/SKILL.md +59 -0
  166. package/vendor/packages/zcode-guide-plugin/skills/diagnosing-skills/SKILL.md +61 -0
  167. package/vendor/packages/zcode-guide-plugin/skills/zcode-configuration-guide/SKILL.md +99 -0
  168. package/vendor/zcode.cjs +2926 -0
  169. package/zcode-runtime.lock.json +8 -0
@@ -0,0 +1,411 @@
1
+ # Scene: Official Document (Government Notice / Letter / Reply / Minutes)
2
+
3
+ ## Goal
4
+
5
+ Generate a complete, formal, properly structured official document ready for Word delivery. Must simultaneously meet:
6
+ - Correct document type, complete structure, clear elements
7
+ - Formal government register, stable hierarchy, reliable layout
8
+ - Ready for approval, circulation, filing, issuance, or formal internal communication
9
+
10
+ **Forbidden:** Producing outlines-only / sample paragraphs / writing advice / half-finished drafts; outputting chat-style explanations.
11
+
12
+ → Placeholder convention & universal prohibitions — see `references/common-rules.md`
13
+ → **Note:** This scene uses its OWN font and layout specs (not Profile A defaults), because official documents follow GB/T 9704 standards.
14
+
15
+ ---
16
+
17
+ ## Scope & Document Type Boundaries
18
+
19
+ This scene covers:
20
+ 1. **Notice** — assigning work, communicating requirements, forwarding documents
21
+ 2. **Official Letter** — between non-subordinate organizations: negotiation, inquiry, assistance requests, replies
22
+ 3. **Reply (to Request)** — superior authority answering a subordinate's formal request
23
+ 4. **Meeting Minutes** — recording key outcomes and agreed items
24
+
25
+ **Important boundaries:**
26
+ - "Red header" is a format/layout, not a document type — it typically carries notices, letters, or replies
27
+ - **Not all official documents need red headers / document numbers / colophons** — only enable when user explicitly requests "red header format", "GB/T 9704 format", or "formal issuance format"
28
+ - Internal enterprise notices, business letters, meeting minutes often do NOT use full GB/T standard format
29
+ - This scene does NOT cover: speeches, press releases, promotional materials, papers, summary reports, contracts, or legal opinions
30
+
31
+ ---
32
+
33
+ ## Document Type Routing
34
+
35
+ ```js
36
+ function selectOfficialType(keywords, purpose) {
37
+ if (/minutes|meeting/.test(keywords)) return "minutes";
38
+ if (/reply|respond to request/.test(keywords)) return "reply";
39
+ if (/letter|inquiry|negotiation/.test(keywords)) return "letter";
40
+ return "notice"; // default
41
+ }
42
+ ```
43
+
44
+ ### Red Header Activation
45
+
46
+ ```js
47
+ function needsRedHeader(userRequest) {
48
+ // Only activate when explicitly requested
49
+ return /red header|GB\/T 9704|formal issuance|official format/.test(userRequest);
50
+ }
51
+ ```
52
+
53
+ **Rules:**
54
+ - `needsRedHeader = true` → Enable red header, document number, colophon (full formal elements)
55
+ - `needsRedHeader = false` → Maintain formal style but no mandatory red header; keep only title + addressee + body + signature
56
+
57
+ ---
58
+
59
+ ## Standard Template Structures
60
+
61
+ ### Template A: Notice
62
+ 1. Red header area (if applicable)
63
+ 2. Document number (if applicable)
64
+ 3. Title
65
+ 4. Addressee
66
+ 5. Reason for issuance
67
+ 6. "The relevant matters are hereby notified as follows:"
68
+ 7. Notice items (expanded by hierarchy)
69
+ 8. Requirements
70
+ 9. Attachment notes (if any)
71
+ 10. Signature (if applicable)
72
+ 11. Date (if applicable)
73
+ 12. Colophon (if applicable)
74
+
75
+ **Closing phrase:** "This notice is hereby given." or "Please implement accordingly."
76
+
77
+ ### Template B: Official Letter
78
+ 1. Red header area (if applicable)
79
+ 2. Document number (if applicable)
80
+ 3. Title
81
+ 4. Addressee
82
+ 5. Reason / reference to incoming letter
83
+ 6. Negotiation / inquiry / reply items
84
+ 7. Closing
85
+ 8. Signature (if applicable)
86
+ 9. Date (if applicable)
87
+ 10. Colophon (if applicable)
88
+
89
+ **Closing phrases:** "Please reply by letter." / "This letter is hereby sent." / "This is in reply."
90
+
91
+ ### Template C: Reply
92
+ 1–11. Similar to Notice structure
93
+ - Addressee is typically the single requesting organization
94
+ - Must reference the incoming request document
95
+ - "After review, the reply is as follows:"
96
+ - Closing: "This is the reply."
97
+
98
+ ### Template D: Meeting Minutes
99
+ 1. Title (meeting name + "Minutes")
100
+ 2. Meeting overview (time, place, chair, attendees)
101
+ 3. Agreed items
102
+ 4. Responsibility assignments / follow-up requirements (if applicable)
103
+ 5. Distribution scope (if applicable)
104
+
105
+ **Notes:**
106
+ - Minutes record "agreed items", not a transcript of speeches
107
+ - Minutes generally do NOT follow standard red header format
108
+ - Unless user explicitly requests organizational template compliance
109
+
110
+ ---
111
+
112
+ ## Input Recognition & Completion
113
+
114
+ ### Processing Rules
115
+ 1. If user provides a template, historical document, or organizational standard → **always follow it first**
116
+ 2. If information is incomplete → fill conservatively, formally, and appropriately for the government context
117
+ 3. **Never fabricate** policy bases, incoming document numbers, leadership directives, meeting decisions, or official organization names
118
+ 4. If critical info is missing → use standardized placeholders
119
+ 5. Never present a draft as if it were already formally issued
120
+
121
+ ---
122
+
123
+ ## Title Drafting Rules
124
+
125
+ The title is the most critical identifying element — must accurately, concisely reflect the issuing body, subject matter, and document type.
126
+
127
+ | Type | Format | Example |
128
+ |------|--------|---------|
129
+ | Notice | Issuing body + "regarding" + subject + "notice" | XX Municipal Government Notice on Issuing the XX Management Measures |
130
+ | Letter | Issuing body + "regarding" + subject + "letter" | XX Company Letter Regarding Land Use for XX Project |
131
+ | Reply | Issuing body + "regarding" + subject + "reply" | XX Bureau Reply on Approving Establishment of XX Branch |
132
+ | Minutes | Meeting name + "minutes" | XX Company Third General Manager Meeting Minutes |
133
+
134
+ **Rules:**
135
+ 1. Title must specify the subject — no vague titles ("Notice on Relevant Matters")
136
+ 2. Titles generally do not use periods
137
+ 3. Title length should be moderate — avoid excessive length
138
+
139
+ ---
140
+
141
+ ## Addressee & CC
142
+
143
+ ### Addressee
144
+ 1. The primary recipient of the document
145
+ 2. On its own line, between title and body
146
+ 3. Followed by full-width colon
147
+ 4. Replies typically address only one requesting organization
148
+ 5. Meeting minutes generally do not have a standard addressee
149
+
150
+ ### CC (Carbon Copy)
151
+ 1. CC recipients are NOT addressees — do not mix them
152
+ 2. CC information typically appears in the colophon area
153
+ 3. Non-red-header documents should not mechanically add "CC:" lines
154
+
155
+ ---
156
+
157
+ ## Writing Style & Register
158
+
159
+ ### Language Style
160
+ 1. Must be **solemn, plain, precise, rigorous, concise**
161
+ 2. **Forbidden:** Literary devices (metaphor, personification, hyperbole, rhetorical questions, exclamations)
162
+ 3. **Forbidden:** Vague expressions ("approximately", "recently", "relevant departments", "as soon as possible") — unless user explicitly requires vague wording
163
+ 4. Time, location, organization, scope, milestones should be as specific as possible
164
+ 5. No sloganeering filler or obvious "AI boilerplate" feel
165
+
166
+ ### Common Phrase Patterns
167
+
168
+ **Purpose phrases:**
169
+ - "In order to implement..."
170
+ - "To further standardize..."
171
+ - "To effectively carry out..."
172
+
173
+ **Basis phrases:**
174
+ - "In accordance with the provisions of..."
175
+ - "As required by..."
176
+ - "Pursuant to relevant regulations"
177
+
178
+ **Transition phrases:**
179
+ - Notice: "The relevant matters are hereby notified as follows:"
180
+ - Letter: "The following is hereby communicated:"
181
+ - Reply: "After review, the reply is as follows:"
182
+ - Minutes: "The agreed items of the meeting are recorded as follows:"
183
+
184
+ **Closing phrases (must match document type):**
185
+ - Notice: "This notice is hereby given."
186
+ - Letter: "Please reply." / "This is hereby communicated." / "This is in reply."
187
+ - Reply: "This is the reply."
188
+ - Minutes: generally no fixed closing phrase
189
+
190
+ ### Conciseness
191
+ 1. Use "because" not "due to the reason that..."
192
+ 2. Use "to" not "for the purpose of..."
193
+ 3. Name specific entities — not "relevant parties" or "related departments"
194
+ 4. Name responsible units — not "all units should ensure implementation" (vague ending)
195
+
196
+ ---
197
+
198
+ ## Body Hierarchy & Numbering
199
+
200
+ Official document body must strictly follow the standard Chinese government numbering system:
201
+
202
+ ```
203
+ I. General matters
204
+ (1) Sub-items
205
+ 1. Specific points
206
+ (1) Detail supplements
207
+ ```
208
+
209
+ Original Chinese numbering:
210
+ ```
211
+ 一、General matters
212
+ (一)Sub-items
213
+ 1. Specific points
214
+ (1)Detail supplements
215
+ ```
216
+
217
+ **Rules:**
218
+ 1. No level-skipping
219
+ 2. **Forbidden:** Markdown list markers (`-` `*`)
220
+ 3. No switching between numbering styles at the same level
221
+ 4. Level 1: major tasks; Level 2: sub-items; Levels 3–4: only when truly necessary
222
+
223
+ ---
224
+
225
+ ## Truthfulness & Caution
226
+ 1. **Never fabricate** issuing bodies, incoming organizations, document numbers, leadership directives, meeting decisions, or policy bases
227
+ 2. **Never** write "per the spirit of XX meeting" or "per XX directive" unless user explicitly provides these
228
+ 3. **Never** fabricate titles and numbers of referenced documents in replies or letters
229
+ 4. **Never** present a draft as already formally issued
230
+ 5. When information is insufficient → use placeholders, never pretend elements are complete
231
+
232
+ ---
233
+
234
+ ## Attachment Notes
235
+ 1. Placed after body text, before signature
236
+ 2. "Attachment:" followed by attachment name
237
+ 3. Multiple attachments: numbered sequentially (Attachment 1, Attachment 2...)
238
+ 4. Attachment names must be clear and specific — never fabricate unknown attachments
239
+
240
+ ---
241
+
242
+ ## Signature & Date
243
+
244
+ 1. Document types requiring signatures should have issuing body name and date
245
+ 2. Not all types mechanically require signatures (minutes typically do not)
246
+ 3. Formal document dates must use Chinese numeral format with proper "〇" character
247
+ - Example: March 31, 2026 → 二〇二六年三月三十一日
248
+ 4. Document numbers use tortoiseshell brackets "〔〕" (not square brackets "[]")
249
+ - Example: X政发〔2026〕1号
250
+ 5. Date format must be consistent throughout
251
+
252
+ ---
253
+
254
+ ## Palette
255
+
256
+ **NO decorative colors.** Pure black text on white background. The only color is red header text.
257
+
258
+ ```js
259
+ const palette = { primary:"#000000", body:"#000000", accent:"#000000", surface:"#FFFFFF" };
260
+ const RED_HEADER = "FF0000"; // Only for red header text
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Page Layout (GB/T 9704-2012 Standard)
266
+
267
+ **Only for formal GB/T red-header documents.** Non-GB/T scenarios may use standard margins.
268
+
269
+ | Property | Value | Twips |
270
+ |----------|-------|-------|
271
+ | Top margin | 3.7 cm | 2098 |
272
+ | Bottom margin | 3.5 cm | 1984 |
273
+ | Left margin | 2.8 cm | 1588 |
274
+ | Right margin | 2.6 cm | 1474 |
275
+
276
+ ```js
277
+ // GB/T red header layout
278
+ page: { size: { width: 11906, height: 16838 }, margin: { top: 2098, bottom: 1984, left: 1588, right: 1474 } }
279
+ // Non-GB/T formal documents may use standard margins:
280
+ // margin: { top: 1440, bottom: 1440, left: 1701, right: 1417 }
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Font Specifications (GB/T 9704)
286
+
287
+ | Element | Font | Size | Style |
288
+ |---------|------|------|-------|
289
+ | Red header org name | STXiaoBiaoSong / SimSun Bold | As determined by org | Red (#FF0000), centered |
290
+ | Document title | STXiaoBiaoSong / SimSun Bold | Er Hao 22pt (size: 44) | Centered |
291
+
292
+ **Font fallback for STXiaoBiaoSong:** This font is not installed by default on all systems. WPS ships FZXiaoBiaoSong-S13 instead. Use this fallback chain:
293
+ - Preferred: `STXiaoBiaoSong` (华文小标宋)
294
+ - Fallback 1: `FZXiaoBiaoSong-S13` (方正小标宋, available in WPS)
295
+ - Fallback 2: `SimSun` with Bold (宋体加粗, universally available)
296
+
297
+ In code, set primary font and note the fallback:
298
+ ```js
299
+ font: { eastAsia: "STXiaoBiaoSong" }
300
+ // Fallback: FZXiaoBiaoSong-S13 → SimSun Bold. User may need to install STXiaoBiaoSong for exact rendering.
301
+ ```
302
+ | Addressee | FangSong | San Hao 16pt (size: 32) | Left-aligned |
303
+ | Body | FangSong | San Hao 16pt (size: 32) | Justified, indent 640 |
304
+ | Level 1 heading | SimHei | San Hao 16pt (size: 32) | Bold |
305
+ | Level 2 heading | KaiTi | San Hao 16pt (size: 32) | Normal |
306
+ | Level 3 heading | FangSong | San Hao 16pt (size: 32) | Bold |
307
+ | Attachment notes | FangSong | San Hao 16pt (size: 32) | Left-aligned |
308
+ | Signature/date | FangSong | San Hao 16pt (size: 32) | Right-aligned |
309
+ | Page number | FangSong | Si Hao 14pt (size: 28) | Centered, "— X —" |
310
+
311
+ ```js
312
+ styles: {
313
+ default: {
314
+ document: {
315
+ run: { font: { ascii: "Times New Roman", eastAsia: "FangSong" }, size: 32, color: "000000" },
316
+ paragraph: { spacing: { line: 560 } }, // Fixed 28pt line spacing
317
+ },
318
+ heading1: {
319
+ run: { font: { eastAsia: "SimHei" }, size: 32, bold: true, color: "000000" },
320
+ },
321
+ heading2: {
322
+ run: { font: { eastAsia: "KaiTi" }, size: 32, color: "000000" },
323
+ },
324
+ },
325
+ }
326
+ ```
327
+
328
+ **Note:** For "formal administrative style" (not strict GB/T), retain the style logic but do not rigidly require every GB/T element.
329
+
330
+ ---
331
+
332
+ ## Code Examples
333
+
334
+ ### Red Header (red-header documents only)
335
+
336
+ ```js
337
+ new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 0, after: 200, line: Math.ceil(26 * 23), lineRule: "atLeast" },
338
+ children: [new TextRun({ text: "XX Municipal Government", font: { eastAsia: "SimSun" },
339
+ size: 52, bold: true, color: "FF0000" })] })
340
+ new Paragraph({ border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "FF0000" } },
341
+ spacing: { after: 40 }, children: [] })
342
+ ```
343
+
344
+ ### Page Number Footer
345
+
346
+ ```js
347
+ footers: { default: new Footer({ children: [new Paragraph({
348
+ alignment: AlignmentType.CENTER,
349
+ children: [
350
+ new TextRun({ text: "\u2014 ", size: 28 }),
351
+ new TextRun({ children: [PageNumber.CURRENT], size: 28 }),
352
+ new TextRun({ text: " \u2014", size: 28 }),
353
+ ],
354
+ })] }) }
355
+ ```
356
+
357
+ ---
358
+
359
+ ## Style Rules
360
+
361
+ 1. **Strictly follow official document format — no decorative elements**
362
+ 2. NO cover page
363
+ 3. NO TOC
364
+ 4. NO headers (only page numbers in footer)
365
+ 5. NO colors except red header (red-header documents only)
366
+ 6. NO images or charts (unless integral to document content)
367
+ 7. NO fancy fonts — only FangSong, SimHei, KaiTi, STXiaoBiaoSong
368
+ 8. Line spacing: fixed 28pt (`line: 560`) — **NOT** the default 1.5x
369
+
370
+ ---
371
+
372
+ ## Scene-Specific Prohibitions
373
+
374
+ In addition to universal prohibitions (see `references/common-rules.md`):
375
+
376
+ 1. Must not write official documents as chat replies, promotional copy, speeches, or papers
377
+ 2. Must not use Markdown headings/lists/bold/italic for document hierarchy
378
+ 3. Must not apply red header/document number/colophon to all document types indiscriminately
379
+ 4. Must not format meeting minutes as a standard red-header notice
380
+ 5. Must not use literary rhetoric, colloquial expressions, or strongly emotional language
381
+ 6. Must not fabricate incoming documents, policies, document numbers, meeting decisions, or superior directives
382
+ 7. Must not use excessive blank lines to create "formal appearance"
383
+ 8. Must not let the document read like a report, paper, or marketing copy
384
+
385
+ ---
386
+
387
+ ## Scene-Specific Quality Checks
388
+
389
+ In addition to universal checks (see `references/common-rules.md`):
390
+
391
+ ### Format
392
+ - [ ] Red header text is #FF0000 and only red header uses color (red-header scenarios)
393
+ - [ ] Line spacing fixed at 28pt (line: 560)
394
+ - [ ] FangSong / SimHei / KaiTi correctly applied
395
+ - [ ] Signature right-aligned, date format correct
396
+ - [ ] No cover page, no TOC, no header
397
+ - [ ] Page number format "— X —"
398
+ - [ ] Red header / document number / colophon only where appropriate
399
+
400
+ ### Content
401
+ - [ ] Document type correctly identified, structure matches
402
+ - [ ] Title is accurate, specific, document type clear (not vague)
403
+ - [ ] Addressee, attachments, signature, colophon used appropriately
404
+ - [ ] Closing phrase matches document type
405
+ - [ ] Body hierarchy strictly follows: 一、(Level 1) →(一)(Level 2) → 1. (Level 3) →(1)(Level 4)
406
+ - [ ] No Markdown headings/lists/bold/italic mixed in
407
+ - [ ] Meeting minutes not incorrectly given standard document signature and colophon
408
+ - [ ] Date uses Chinese numerals with proper "〇" character
409
+ - [ ] Document number uses tortoiseshell brackets "〔〕"
410
+ - [ ] No fabricated incoming documents / policy bases / organizational elements
411
+ - [ ] Register is solemn and plain — no colloquial / literary / promotional tone