# larashero3-dotcom/lieflat-gongwen architecture

> Architecture diagram of the GitHub repository larashero3-dotcom/lieflat-gongwen, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/larashero3-dotcom/lieflat-gongwen
- Repository: https://github.com/larashero3-dotcom/lieflat-gongwen

## Overview

公文写作 DNA 是供兼容 AI agents 使用的公文写作 skill：它引导用户/agent 判定文体、查阅对应参数与风格材料、先出骨架再写正文，并用自检器检查文稿。主要能力包括六类公文与一类党建材料的风格指导、参数卡、标题与句子参考、DNA 语料分析和合成范文。关系依据 README 的工作流说明及自检器源码；未抽查的文档内部流程未作推断。

Main entry points: [`SKILL.md`](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md) (六步写作流程), [`公文语料`](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%AC%E6%96%87%E8%AF%AD%E6%96%99) (公文族DNA), [`党建语料`](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%9A%E5%BB%BA%E8%AF%AD%E6%96%99) (党建族DNA), [`参数卡.md`](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E5%8F%82%E6%95%B0%E5%8D%A1.md) (七类参数卡)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["写作流程与规则"]
  node_skill["六步写作流程<br/>[SKILL.md]"]
  node_parameter_card["七类参数卡<br/>[参数卡.md]"]
  node_genre_router["文体与文种判定<br/>[SKILL.md]"]
  node_outline["确认后成文<br/>[SKILL.md]"]
end

subgraph group_corpus["文体DNA与参数"]
  node_gongwen_dna["公文族DNA"]
  node_party_dna["党建族DNA"]
  node_gongwen_stats[("公文统计元数据")]
  node_party_stats[("党建统计元数据")]
end

subgraph group_reference["写作参考材料"]
  node_title_techniques["标题技法<br/>[标题技法库.md]"]
  node_sentence_pairs["句子对照<br/>[句子对照库.md]"]
  node_synthetic_examples["合成范文"]
  node_legal_samples["法定公文样例"]
end

subgraph group_validation["文稿自检"]
  node_parameter_checker["参数自检器<br/>[check_params.py]"]
end

node_writer(("用户 / Agent"))
node_draft["待检文稿"]

node_writer -->|"使用 skill"| node_skill
node_skill -->|"指导判定"| node_genre_router
node_skill -->|"要求查阅"| node_parameter_card
node_skill -->|"按文种查阅"| node_gongwen_dna
node_skill -->|"按文体查阅"| node_party_dna
node_skill -->|"要求参考"| node_synthetic_examples
node_skill -->|"提供参考"| node_title_techniques
node_skill -->|"提供参考"| node_sentence_pairs
node_skill -->|"引导起草"| node_outline
node_writer -->|"提交需求"| node_draft
node_draft -->|"读取分析"| node_parameter_checker
node_gongwen_dna -->|"配套统计"| node_gongwen_stats
node_party_dna -->|"配套统计"| node_party_stats
node_skill -->|"区分适用范围"| node_legal_samples

click node_skill "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md"
click node_parameter_card "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E5%8F%82%E6%95%B0%E5%8D%A1.md"
click node_genre_router "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md"
click node_outline "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md"
click node_gongwen_dna "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%AC%E6%96%87%E8%AF%AD%E6%96%99"
click node_party_dna "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%9A%E5%BB%BA%E8%AF%AD%E6%96%99"
click node_gongwen_stats "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%AC%E6%96%87%E8%AF%AD%E6%96%99/_meta"
click node_party_stats "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%9A%E5%BB%BA%E8%AF%AD%E6%96%99/_meta"
click node_title_techniques "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E6%A0%87%E9%A2%98%E6%8A%80%E6%B3%95%E5%BA%93.md"
click node_sentence_pairs "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E5%8F%A5%E5%AD%90%E5%AF%B9%E7%85%A7%E5%BA%93.md"
click node_synthetic_examples "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E7%A4%BA%E4%BE%8B"
click node_legal_samples "https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%8F%82%E8%80%83/%E6%B3%95%E5%AE%9A%E5%85%AC%E6%96%87%E6%A0%B7%E4%BE%8B"
click node_parameter_checker "https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/scripts/check_params.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,node_parameter_card,node_genre_router,node_outline toneBlue
class node_gongwen_dna,node_party_dna,node_gongwen_stats,node_party_stats toneAmber
class node_title_techniques,node_sentence_pairs,node_synthetic_examples,node_legal_samples toneMint
class node_parameter_checker toneRose
class node_writer,node_draft toneIndigo
```

## Components

### 写作流程与规则

- [六步写作流程](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md): `SKILL.md`
- [七类参数卡](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E5%8F%82%E6%95%B0%E5%8D%A1.md): `参数卡.md`
- [文体与文种判定](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md): `SKILL.md`
- [确认后成文](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/SKILL.md): `SKILL.md`

### 文体DNA与参数

- [公文族DNA](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%AC%E6%96%87%E8%AF%AD%E6%96%99): `公文语料`
- [党建族DNA](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%9A%E5%BB%BA%E8%AF%AD%E6%96%99): `党建语料`
- [公文统计元数据](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%AC%E6%96%87%E8%AF%AD%E6%96%99/_meta): `公文语料/_meta`
- [党建统计元数据](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%85%9A%E5%BB%BA%E8%AF%AD%E6%96%99/_meta): `党建语料/_meta`

### 写作参考材料

- [标题技法](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E6%A0%87%E9%A2%98%E6%8A%80%E6%B3%95%E5%BA%93.md): `标题技法库.md`
- [句子对照](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/%E5%8F%A5%E5%AD%90%E5%AF%B9%E7%85%A7%E5%BA%93.md): `句子对照库.md`
- [合成范文](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E7%A4%BA%E4%BE%8B): `示例`
- [法定公文样例](https://github.com/larashero3-dotcom/lieflat-gongwen/tree/main/%E5%8F%82%E8%80%83/%E6%B3%95%E5%AE%9A%E5%85%AC%E6%96%87%E6%A0%B7%E4%BE%8B): `参考/法定公文样例`

### 文稿自检

- [参数自检器](https://github.com/larashero3-dotcom/lieflat-gongwen/blob/main/scripts/check_params.py): `scripts/check_params.py`

### Other components

- **用户 / Agent**
- **待检文稿**

## Connections

- 用户 / Agent → 六步写作流程: 使用 skill (evidence: `README.md`)
- 六步写作流程 → 文体与文种判定: 指导判定 (evidence: `README.md`)
- 六步写作流程 → 七类参数卡: 要求查阅 (evidence: `README.md`)
- 六步写作流程 → 公文族DNA: 按文种查阅 (evidence: `README.md`)
- 六步写作流程 → 党建族DNA: 按文体查阅 (evidence: `README.md`)
- 六步写作流程 → 合成范文: 要求参考 (evidence: `README.md`)
- 六步写作流程 → 标题技法: 提供参考 (evidence: `README.md`)
- 六步写作流程 → 句子对照: 提供参考 (evidence: `README.md`)
- 六步写作流程 → 确认后成文: 引导起草 (evidence: `README.md`)
- 用户 / Agent → 待检文稿: 提交需求 (evidence: `README.md`)
- 待检文稿 → 参数自检器: 读取分析 (evidence: `scripts/check_params.py`)
- 公文族DNA → 公文统计元数据: 配套统计 (evidence: `README.md`)
- 党建族DNA → 党建统计元数据: 配套统计 (evidence: `README.md`)
- 六步写作流程 → 法定公文样例: 区分适用范围 (evidence: `README.md`)
