# ethanvibe/xingainianzuowen architecture

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

- Interactive diagram: https://gitdiagram.com/ethanvibe/xingainianzuowen
- Repository: https://github.com/ethanvibe/xingainianzuowen

## Overview

This repository is a Chinese creative-writing style skill, with an optional Python self-check/reporting CLI. The main workflow is a user-provided story or draft, a skill-guided rewrite, then an eight-item check and a diff-style report. The README documents the style pillars, atomic editing operations, ethics boundary, and example materials. Source excerpts show the CLI’s file inputs, checks, report generation, and exit status; the skill and reference-file internals were not sampled, so their detailed runtime links are based only on README statements.

Main entry points: [`SKILL.md`](https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md) (Rewrite skill), [`scripts/style_diff.py`](https://github.com/ethanvibe/xingainianzuowen/blob/main/scripts/style_diff.py) (Self-check CLI), [`references/examples.md`](https://github.com/ethanvibe/xingainianzuowen/blob/main/references/examples.md) (Worked examples), [`examples`](https://github.com/ethanvibe/xingainianzuowen/tree/main/examples) (Example drafts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_writing["Writing skill"]
  node_skill["Rewrite skill<br/>[SKILL.md]"]
  node_ethics["Ethics boundary<br/>[SKILL.md]"]
end

subgraph group_guidance["Style guidance"]
  node_pillars["Four style pillars<br/>[SKILL.md]"]
  node_operations["Atomic edits<br/>[atomic_ops.md]"]
  node_fingerprint["Style fingerprint"]
  node_worked["Worked examples<br/>[examples.md]"]
  node_samples["Example drafts"]
end

subgraph group_checking["Validation and reports"]
  node_checklist["Eight-item checklist"]
  node_checker["Self-check CLI<br/>[style_diff.py]"]
  node_report["Diff report<br/>[style_diff.py]"]
end

node_user(("Writer"))
node_draft["Draft text"]
node_files[("Text files")]

node_user -->|"requests rewrite"| node_skill
node_draft -->|"provides text"| node_skill
node_skill -->|"screens subjects"| node_ethics
node_skill -->|"applies principles"| node_pillars
node_skill -->|"uses edits"| node_operations
node_skill -->|"follows profile"| node_fingerprint
node_skill -->|"consults examples"| node_worked
node_skill -->|"runs checks"| node_checker
node_checker -->|"reads rewrite and source"| node_files
node_checker -.->|"checks against"| node_checklist
node_checker -->|"formats results"| node_report
node_report -->|"optionally writes report"| node_files
node_samples -.->|"illustrate rewrites"| node_worked

click node_skill "https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md"
click node_ethics "https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md"
click node_pillars "https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md"
click node_operations "https://github.com/ethanvibe/xingainianzuowen/blob/main/references/atomic_ops.md"
click node_fingerprint "https://github.com/ethanvibe/xingainianzuowen/blob/main/references/source-fingerprint.md"
click node_checklist "https://github.com/ethanvibe/xingainianzuowen/blob/main/references/8-item-checklist.md"
click node_checker "https://github.com/ethanvibe/xingainianzuowen/blob/main/scripts/style_diff.py"
click node_report "https://github.com/ethanvibe/xingainianzuowen/blob/main/scripts/style_diff.py"
click node_worked "https://github.com/ethanvibe/xingainianzuowen/blob/main/references/examples.md"
click node_samples "https://github.com/ethanvibe/xingainianzuowen/tree/main/examples"

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_ethics toneBlue
class node_pillars,node_operations,node_fingerprint,node_worked,node_samples,node_files toneAmber
class node_checklist,node_checker,node_report toneMint
class node_user,node_draft toneIndigo
```

## Components

### Writing skill

- [Rewrite skill](https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md): `SKILL.md`
- [Ethics boundary](https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md): `SKILL.md`

### Style guidance

- [Four style pillars](https://github.com/ethanvibe/xingainianzuowen/blob/main/SKILL.md): `SKILL.md`
- [Atomic edits](https://github.com/ethanvibe/xingainianzuowen/blob/main/references/atomic_ops.md): `references/atomic_ops.md`
- [Style fingerprint](https://github.com/ethanvibe/xingainianzuowen/blob/main/references/source-fingerprint.md): `references/source-fingerprint.md`
- [Worked examples](https://github.com/ethanvibe/xingainianzuowen/blob/main/references/examples.md): `references/examples.md`
- [Example drafts](https://github.com/ethanvibe/xingainianzuowen/tree/main/examples): `examples`

### Validation and reports

- [Eight-item checklist](https://github.com/ethanvibe/xingainianzuowen/blob/main/references/8-item-checklist.md): `references/8-item-checklist.md`
- [Self-check CLI](https://github.com/ethanvibe/xingainianzuowen/blob/main/scripts/style_diff.py): `scripts/style_diff.py`
- [Diff report](https://github.com/ethanvibe/xingainianzuowen/blob/main/scripts/style_diff.py): `scripts/style_diff.py`

### Other components

- **Writer**
- **Draft text**
- **Text files**

## Connections

- Writer → Rewrite skill: requests rewrite (evidence: `README.md`)
- Draft text → Rewrite skill: provides text (evidence: `README.md`)
- Rewrite skill → Ethics boundary: screens subjects (evidence: `README.md`)
- Rewrite skill → Four style pillars: applies principles (evidence: `README.md`)
- Rewrite skill → Atomic edits: uses edits (evidence: `README.md`)
- Rewrite skill → Style fingerprint: follows profile (evidence: `README.md`)
- Rewrite skill → Worked examples: consults examples (evidence: `README.md`)
- Rewrite skill → Self-check CLI: runs checks (evidence: `README.md`)
- Self-check CLI → Text files: reads rewrite and source (evidence: `scripts/style_diff.py`)
- Self-check CLI → Eight-item checklist: checks against
- Self-check CLI → Diff report: formats results (evidence: `scripts/style_diff.py`)
- Diff report → Text files: optionally writes report (evidence: `scripts/style_diff.py`)
- Example drafts → Worked examples: illustrate rewrites
