# penglonghuang/chinese-novelist-skill architecture

> Architecture diagram of the GitHub repository penglonghuang/chinese-novelist-skill, 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/penglonghuang/chinese-novelist-skill
- Repository: https://github.com/penglonghuang/chinese-novelist-skill

## Overview

This repository is a Claude Code skill that guides an AI through planning and writing a complete Chinese novel. The documented user workflow moves from preference-aware initialization and layered questions through planning, writing-mode selection, chapter production, and final validation; the output is a novel project containing an outline, character profiles, a writing plan, and chapters. Flow documents describe the stages, while writing guides provide craft support. The README documents these relationships; the sampled word-count script implements a portion of validation, but the other runtime details are not sampled.

Main entry points: [`references/flows/phase3-writing.md`](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase3-writing.md) (Writing modes), [`references/flows/phase0-initialization.md`](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase0-initialization.md) (Initialization), [`references/flows/phase1-layer2-customize.md`](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer2-customize.md) (Customization), [`references/flows/phase2-planning.md`](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase2-planning.md) (Story planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Novel workflow"]
  node_skill["Novel skill<br/>[SKILL.md]"]
  node_init["Initialization"]
  node_core_qa["Core questions"]
  node_custom_qa["Customization"]
  node_planning["Story planning<br/>[phase2-planning.md]"]
  node_mode["Writing modes<br/>[phase3-writing.md]"]
  node_shared["Shared infrastructure"]
end

subgraph group_writing["Writing support"]
  node_title["Title guidance"]
  node_guides["Writing guides"]
end

subgraph group_outputs["State and outputs"]
  node_preferences[("User preferences")]
  node_novel_project["Novel project"]
end

subgraph group_quality["Quality checks"]
  node_validation["Manuscript validation"]
  node_wordcount["Word-count checker"]
end

node_author(("Novel author"))

node_author -->|"starts"| node_skill
node_skill -->|"begins with"| node_init
node_init -->|"loads preferences"| node_shared
node_init -->|"continues to"| node_core_qa
node_core_qa -->|"offers"| node_custom_qa
node_custom_qa -.->|"then supports"| node_title
node_custom_qa -->|"advances to"| node_planning
node_planning -->|"selects"| node_mode
node_mode -->|"writes chapters"| node_novel_project
node_mode -.->|"uses craft guidance"| node_guides
node_mode -->|"finishes with"| node_validation
node_validation -->|"checks chapter length"| node_wordcount
node_shared -->|"stores preferences"| node_preferences
node_planning -->|"produces plan"| node_novel_project

click node_skill "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/SKILL.md"
click node_init "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase0-initialization.md"
click node_core_qa "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer1-core.md"
click node_custom_qa "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer2-customize.md"
click node_title "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer3-title.md"
click node_planning "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase2-planning.md"
click node_mode "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase3-writing.md"
click node_validation "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase4-validation.md"
click node_shared "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/shared-infrastructure.md"
click node_guides "https://github.com/penglonghuang/chinese-novelist-skill/tree/master/references/guides"
click node_wordcount "https://github.com/penglonghuang/chinese-novelist-skill/blob/master/scripts/check_chapter_wordcount.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_init,node_core_qa,node_custom_qa,node_planning,node_mode,node_shared toneBlue
class node_title,node_guides toneAmber
class node_preferences,node_novel_project toneMint
class node_validation,node_wordcount toneRose
class node_author toneIndigo
```

## Components

### Novel workflow

- [Novel skill](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/SKILL.md): `SKILL.md`
- [Initialization](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase0-initialization.md): `references/flows/phase0-initialization.md`
- [Core questions](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer1-core.md): `references/flows/phase1-layer1-core.md`
- [Customization](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer2-customize.md): `references/flows/phase1-layer2-customize.md`
- [Story planning](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase2-planning.md): `references/flows/phase2-planning.md`
- [Writing modes](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase3-writing.md): `references/flows/phase3-writing.md`
- [Shared infrastructure](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/shared-infrastructure.md): `references/flows/shared-infrastructure.md`

### Writing support

- [Title guidance](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase1-layer3-title.md): `references/flows/phase1-layer3-title.md`
- [Writing guides](https://github.com/penglonghuang/chinese-novelist-skill/tree/master/references/guides): `references/guides`

### State and outputs

- **User preferences**
- **Novel project**

### Quality checks

- [Manuscript validation](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/references/flows/phase4-validation.md): `references/flows/phase4-validation.md`
- [Word-count checker](https://github.com/penglonghuang/chinese-novelist-skill/blob/master/scripts/check_chapter_wordcount.py): `scripts/check_chapter_wordcount.py`

### Other components

- **Novel author**

## Connections

- Novel author → Novel skill: starts (evidence: `README.md`)
- Novel skill → Initialization: begins with (evidence: `README.md`)
- Initialization → Shared infrastructure: loads preferences (evidence: `README.md`)
- Initialization → Core questions: continues to (evidence: `README.md`)
- Core questions → Customization: offers (evidence: `README.md`)
- Customization → Title guidance: then supports
- Customization → Story planning: advances to (evidence: `README.md`)
- Story planning → Writing modes: selects (evidence: `README.md`)
- Writing modes → Novel project: writes chapters (evidence: `README.md`)
- Writing modes → Writing guides: uses craft guidance
- Writing modes → Manuscript validation: finishes with (evidence: `README.md`)
- Manuscript validation → Word-count checker: checks chapter length (evidence: `README.md`)
- Shared infrastructure → User preferences: stores preferences (evidence: `README.md`)
- Story planning → Novel project: produces plan (evidence: `README.md`)
