# zenstory-ai/oh-story-claudecode architecture

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

- Interactive diagram: https://gitdiagram.com/zenstory-ai/oh-story-claudecode
- Repository: https://github.com/zenstory-ai/oh-story-claudecode

## Overview

Oh Story is a novel-writing skill package used through coding agents. Its documented workflow spans optional ranking and story analysis, writing and continuity management, deterministic prose checks, and cover generation; setup deploys agent-specific hooks and references. The tree and excerpts establish several runtime internals, but most skill instructions and the dashboard implementation were not sampled, so their internal calls are not inferred. Edges below reflect explicit README workflow statements or sampled imports/calls.

Main entry points: [`skills/story-long-write/scripts`](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-write/scripts) (Long-form writing), [`skills/story-long-analyze/scripts`](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-analyze/scripts) (Long-form analysis), [`skills/story-deslop/scripts/check-ai-patterns.js`](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-deslop/scripts/check-ai-patterns.js) (Prose refinement), [`skills/story-short-write/scripts`](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-short-write/scripts) (Short-form writing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Story discovery"]
  node_longscan["Long-form scan"]
  node_shortscan["Short-form scan"]
  node_longanalyze["Long-form analysis"]
  node_shortanalyze["Short-form analysis"]
  node_chapter_index["Chapter indexing"]
  node_asset_inspection["Existing assets"]
  node_analysis_runs["Analysis runs"]
  node_cdp["Browser CDP<br/>[cdp-utils.js]"]
  node_qidian["Qidian scraper"]
end

subgraph group_authoring["Writing workflow"]
  node_longwrite["Long-form writing"]
  node_shortwrite["Short-form writing"]
  node_import["Manuscript import"]
  node_cover["Cover generation"]
end

subgraph group_quality["Quality and memory"]
  node_deslop["Prose refinement"]
  node_review["Story review"]
  node_tracking["Continuity tracking<br/>[tracking_commit.py]"]
  node_memory["Author memory"]
  node_whitelist["Style whitelist<br/>[style-whitelist.js]"]
end

subgraph group_host["Agent integration"]
  node_setup["Host setup"]
  node_agent_hooks["Agent hooks"]
end

subgraph group_workspace["Local workspace"]
  node_dashboard["Project dashboard"]
  node_project_files[("Project files")]
end

node_author(("Author"))
node_platforms{{"Novel platforms"}}
node_external_agent(("Coding agent"))
node_external_llm{{"Agent model"}}

node_author -->|"deploys"| node_setup
node_setup -->|"installs"| node_agent_hooks
node_author -->|"requests scan"| node_longscan
node_author -->|"requests scan"| node_shortscan
node_longscan -.->|"collects rankings"| node_platforms
node_shortscan -.->|"collects rankings"| node_platforms
node_author -->|"requests analysis"| node_longanalyze
node_author -->|"requests analysis"| node_shortanalyze
node_author -->|"imports manuscript"| node_import
node_author -->|"requests writing"| node_longwrite
node_author -->|"requests writing"| node_shortwrite
node_longwrite -->|"generates prose"| node_external_llm
node_shortwrite -->|"generates prose"| node_external_llm
node_longwrite -->|"commits state"| node_tracking
node_longwrite -->|"checks prose"| node_deslop
node_shortwrite -.->|"checks prose"| node_deslop
node_author -->|"requests review"| node_deslop
node_deslop -->|"loads rules"| node_whitelist
node_agent_hooks -.->|"receives events"| node_external_agent
node_longanalyze -->|"indexes chapters"| node_chapter_index
node_longanalyze -->|"inspects assets"| node_asset_inspection
node_longanalyze -->|"manages batches"| node_analysis_runs
node_qidian -->|"uses browser tools"| node_cdp
node_author -->|"requests cover"| node_cover
node_author -->|"opens workspace"| node_dashboard
node_dashboard -->|"browses and edits"| node_project_files
node_longwrite -->|"reads and writes"| node_project_files
node_import -.->|"creates project"| node_project_files
node_review -.->|"reviews manuscript"| node_project_files
node_longwrite -.->|"updates memory"| node_memory

click node_longscan "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-scan/scripts"
click node_shortscan "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-short-scan/scripts"
click node_longanalyze "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-analyze/scripts"
click node_shortanalyze "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills"
click node_setup "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-setup/scripts"
click node_agent_hooks "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-setup/references"
click node_longwrite "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-write/scripts"
click node_shortwrite "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-short-write/scripts"
click node_import "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-import/scripts"
click node_deslop "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-deslop/scripts/check-ai-patterns.js"
click node_review "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-review/scripts"
click node_tracking "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-write/scripts/tracking_commit.py"
click node_memory "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-write/scripts/author_memory_commit.py"
click node_cover "https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills"
click node_dashboard "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story/scripts/dashboard-server.mjs"
click node_whitelist "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-deslop/scripts/style-whitelist.js"
click node_chapter_index "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/build_chapter_index.py"
click node_asset_inspection "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/inspect_existing_assets.py"
click node_analysis_runs "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/manage_analysis_run.py"
click node_cdp "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-scan/scripts/cdp-utils.js"
click node_qidian "https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-scan/scripts/qidian-rank-scraper.js"

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_longscan,node_shortscan,node_longanalyze,node_shortanalyze,node_chapter_index,node_asset_inspection,node_analysis_runs,node_cdp,node_qidian toneBlue
class node_longwrite,node_shortwrite,node_import,node_cover toneAmber
class node_deslop,node_review,node_tracking,node_memory,node_whitelist toneMint
class node_setup,node_agent_hooks toneRose
class node_dashboard,node_project_files,node_author,node_platforms,node_external_agent,node_external_llm toneIndigo
```

## Components

### Story discovery

- [Long-form scan](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-scan/scripts): `skills/story-long-scan/scripts`
- [Short-form scan](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-short-scan/scripts): `skills/story-short-scan/scripts`
- [Long-form analysis](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-analyze/scripts): `skills/story-long-analyze/scripts`
- [Short-form analysis](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills): `skills`
- [Chapter indexing](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/build_chapter_index.py): `skills/story-long-analyze/scripts/build_chapter_index.py`
- [Existing assets](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/inspect_existing_assets.py): `skills/story-long-analyze/scripts/inspect_existing_assets.py`
- [Analysis runs](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-analyze/scripts/manage_analysis_run.py): `skills/story-long-analyze/scripts/manage_analysis_run.py`
- [Browser CDP](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-scan/scripts/cdp-utils.js): `skills/story-long-scan/scripts/cdp-utils.js`
- [Qidian scraper](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-scan/scripts/qidian-rank-scraper.js): `skills/story-long-scan/scripts/qidian-rank-scraper.js`

### Writing workflow

- [Long-form writing](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-long-write/scripts): `skills/story-long-write/scripts`
- [Short-form writing](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-short-write/scripts): `skills/story-short-write/scripts`
- [Manuscript import](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-import/scripts): `skills/story-import/scripts`
- [Cover generation](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills): `skills`

### Quality and memory

- [Prose refinement](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-deslop/scripts/check-ai-patterns.js): `skills/story-deslop/scripts/check-ai-patterns.js`
- [Story review](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-review/scripts): `skills/story-review/scripts`
- [Continuity tracking](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-write/scripts/tracking_commit.py): `skills/story-long-write/scripts/tracking_commit.py`
- [Author memory](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-long-write/scripts/author_memory_commit.py): `skills/story-long-write/scripts/author_memory_commit.py`
- [Style whitelist](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story-deslop/scripts/style-whitelist.js): `skills/story-deslop/scripts/style-whitelist.js`

### Agent integration

- [Host setup](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-setup/scripts): `skills/story-setup/scripts`
- [Agent hooks](https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/story-setup/references): `skills/story-setup/references`

### Local workspace

- [Project dashboard](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/skills/story/scripts/dashboard-server.mjs): `skills/story/scripts/dashboard-server.mjs`
- **Project files**

### Other components

- **Author**
- **Novel platforms**
- **Coding agent**
- **Agent model**

## Connections

- Author → Host setup: deploys (evidence: `README.md`)
- Host setup → Agent hooks: installs (evidence: `README.md`)
- Author → Long-form scan: requests scan (evidence: `README.md`)
- Author → Short-form scan: requests scan (evidence: `README.md`)
- Long-form scan → Novel platforms: collects rankings
- Short-form scan → Novel platforms: collects rankings
- Author → Long-form analysis: requests analysis (evidence: `README.md`)
- Author → Short-form analysis: requests analysis (evidence: `README.md`)
- Author → Manuscript import: imports manuscript (evidence: `README.md`)
- Author → Long-form writing: requests writing (evidence: `README.md`)
- Author → Short-form writing: requests writing (evidence: `README.md`)
- Long-form writing → Agent model: generates prose (evidence: `README.md`)
- Short-form writing → Agent model: generates prose (evidence: `README.md`)
- Long-form writing → Continuity tracking: commits state (evidence: `README.md`)
- Long-form writing → Prose refinement: checks prose (evidence: `README.md`)
- Short-form writing → Prose refinement: checks prose
- Author → Prose refinement: requests review (evidence: `README.md`)
- Prose refinement → Style whitelist: loads rules (evidence: `skills/story-deslop/scripts/check-ai-patterns.js`)
- Agent hooks → Coding agent: receives events
- Long-form analysis → Chapter indexing: indexes chapters (evidence: `skills/story-long-analyze/scripts/inspect_existing_assets.py`)
- Long-form analysis → Existing assets: inspects assets (evidence: `skills/story-long-analyze/scripts/manage_analysis_run.py`)
- Long-form analysis → Analysis runs: manages batches (evidence: `README.md`)
- Qidian scraper → Browser CDP: uses browser tools (evidence: `skills/story-long-scan/scripts/qidian-rank-scraper.js`)
- Author → Cover generation: requests cover (evidence: `README.md`)
- Author → Project dashboard: opens workspace (evidence: `README.md`)
- Project dashboard → Project files: browses and edits (evidence: `README.md`)
- Long-form writing → Project files: reads and writes (evidence: `README.md`)
- Manuscript import → Project files: creates project
- Story review → Project files: reviews manuscript
- Long-form writing → Author memory: updates memory
