# Template map and fidelity contract

## Retained assets

| Asset | SHA-256 | Reference render |
|---|---|---|
| `assets/application-template.docx` | `9caade3aef195b735fab2300de88b79de00f94055c1f8dae083d9d62c06ee6dd` | 2 pages |
| `assets/source-template.docx` | `9bb123d4cec560ce9d9f5206e511ca6bc748055587892d79394d041a405a5d6d` | 6 pages |
| `assets/manual-template.docx` | `3b6a68952b44f09299047b3de279641332553fc4a8a52ffd2fb1cfc0f8b29a96` | 21 pages after `.doc` to `.docx` conversion |

Do not modify these retained assets. Generate into a different output directory.

## Shared page system

- Page: A4 portrait, 8.27 × 11.69 inches.
- Margins: left/right 1.25 inches; top/bottom 1 inch.
- Section count: one.
- Keep the template-derived header line and page geometry.

## Application form

- Structure: one 30-row, 2-column table; no images.
- Preserve every row except the technical-information area identified by the following left-cell labels:
  - 开发的硬件环境
  - 运行的硬件环境
  - 开发该软件的操作系统
  - 软件开发环境/开发工具
  - 该软件的运行平台/操作系统
  - 软件运行支撑环境/支持软件
  - 编程语言
  - 源程序量
  - 开发目的
  - 面向行业/领域
  - 软件的主要功能
  - 软件的技术特点
  - 软件的种类, when a future compatible template contains this row
- Fill technical values in red 14 pt CJK sans, matching the screenshot convention. Select an installed CJK font (`Hiragino Sans GB`, `Microsoft YaHei`, or `Noto Sans CJK SC`) so render QA cannot lose Chinese glyphs. Use black for a dedicated software-kind row.
- Do not change software name, version, dates, applicant, address, contact, or any other non-screenshot field.
- Fidelity gate: compare all non-editable cell text with the retained template and fail on any difference.

## Source-program document

- Capacity: at most 3,930 source lines, derived from the retained body slots. Rebuild visible body lines with an installed monospaced font at 10.5 pt, 12 pt exact line spacing, zero after-spacing, and an explicit page break every 50 lines; use an installed CJK fallback for Chinese literals and comments.
- Header: software full name plus version, centered, with the source horizontal rule retained.
- Fill source lines in deterministic file-path order. When the project exceeds 3,930 physical lines, include equal-sized beginning and ending samples.
- Remove unused body slots when the project contains fewer lines. Do not add fabricated code or explanatory prose.
- Fidelity gate: header/title correct, body non-empty, template page geometry preserved, no clipped or unreadable code in the render.

## Operation manual

- Source patterns: centered cover title, `操作说明书` subtitle, system introduction, function chapters, explanatory prose, and interface screenshots.
- The retained case body is product-specific and is authorized for replacement. Rebuild the body while preserving the template's page system, styles baseline, header relationship, and header rule.
- Put the cover on page 1. Start introduction on page 2. Start each functional section on a new page.
- Scale screenshots proportionally to at most 6.35 × 4.65 inches so the heading, image, caption, and steps remain together on one page. Add a centered caption and real numbered-list paragraphs for steps.
- Fidelity gate: every requested screenshot is present once, title and version agree with the other documents, and every rendered page is free of clipping, overlap, broken image scaling, or excessive blank space.

## Package preservation

- Treat the three assets and their hashes as immutable baselines.
- On macOS render QA, use `assets/fontconfig-macos.xml` through the `FONTCONFIG_FILE` environment variable so headless LibreOffice discovers system CJK fonts.
- Application output may rewrite the table part while preserving visible content outside authorized cells.
- Source output may rewrite body paragraphs and header text while preserving section geometry and other package parts.
- Manual output may replace the case-specific body and media while preserving section geometry and the template-derived header design.
- Structural validation does not replace render QA. Render and inspect every final page before delivery.
