# right-068/gongwen-writing-suite architecture

> Architecture diagram of the GitHub repository right-068/gongwen-writing-suite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/right-068/gongwen-writing-suite
- Repository: https://github.com/right-068/gongwen-writing-suite

## Overview

这是一个面向中国大陆党政机关公文与政务材料的 Codex Skill。用户提供材料或草稿后，可使用 Skill 起草、改写或审核；本地启发式脚本则由用户单独运行检查草稿。主要流程和能力见 README，脚本实现已采样；SKILL.md 与参考文档的具体调用关系未能从源码确认，因此不展开未证实的连线。

Main entry points: [`gongwen-writing-suite/scripts/gongwen_lint.py`](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/scripts/gongwen_lint.py) (启发式检查), [`gongwen-writing-suite/SKILL.md`](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/SKILL.md) (写作指引)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_skill["写作 Skill"]
  node_skill["写作指引<br/>[SKILL.md]"]
end

subgraph group_guidance["业务参考"]
  node_types["文种选择<br/>[document-types.md]"]
  node_drafting["起草流程"]
  node_sources["来源与核验<br/>[sources.md]"]
  node_review["审核与安全"]
  node_formatting["格式与交付"]
end

subgraph group_lint["本地检查"]
  node_lint["启发式检查<br/>[gongwen_lint.py]"]
end

node_user(("使用者"))
node_draft["待检查草稿"]
node_findings["检查提示"]

node_user -->|"请求写作或审核"| node_skill
node_user -->|"运行检查"| node_lint
node_draft -->|"读取草稿"| node_lint
node_lint -->|"输出提示"| node_findings

click node_skill "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/SKILL.md"
click node_types "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/document-types.md"
click node_drafting "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/drafting-workflow.md"
click node_sources "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/sources.md"
click node_review "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/review-and-safety.md"
click node_formatting "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/formatting-and-delivery.md"
click node_lint "https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/scripts/gongwen_lint.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill toneBlue
class node_types,node_drafting,node_sources,node_review,node_formatting toneAmber
class node_lint toneMint
class node_user,node_draft,node_findings toneIndigo
```

## Components

### 写作 Skill

- [写作指引](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/SKILL.md): `gongwen-writing-suite/SKILL.md`

### 业务参考

- [文种选择](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/document-types.md): `gongwen-writing-suite/references/document-types.md`
- [起草流程](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/drafting-workflow.md): `gongwen-writing-suite/references/drafting-workflow.md`
- [来源与核验](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/sources.md): `gongwen-writing-suite/references/sources.md`
- [审核与安全](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/review-and-safety.md): `gongwen-writing-suite/references/review-and-safety.md`
- [格式与交付](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/references/formatting-and-delivery.md): `gongwen-writing-suite/references/formatting-and-delivery.md`

### 本地检查

- [启发式检查](https://github.com/right-068/gongwen-writing-suite/blob/main/gongwen-writing-suite/scripts/gongwen_lint.py): `gongwen-writing-suite/scripts/gongwen_lint.py`

### Other components

- **使用者**
- **待检查草稿**
- **检查提示**

## Connections

- 使用者 → 写作指引: 请求写作或审核
- 使用者 → 启发式检查: 运行检查
- 待检查草稿 → 启发式检查: 读取草稿
- 启发式检查 → 检查提示: 输出提示
