npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-ai-novel-factory

v1.1.0

Published

AI Novel Factory - Complete novel writing system for OpenCode

Downloads

182

Readme

OpenCode AI Novel Factory

A complete AI novel writing system plugin for OpenCode.

Features

  • Multi-Agent collaborative writing
  • Semi-automated chapter generation
  • Automatic memory maintenance
  • Long-form serialized writing support
  • Commercial-grade writing structure

Can stably support 100+ chapters of creation.

Installation

Method 1: npm (Recommended)

npm install -g opencode-ai-novel-factory

Or add to your project:

npm install opencode-ai-novel-factory

Then add to your opencode.json:

{
  "plugin": ["opencode-ai-novel-factory"]
}

Method 2: Local Installation

Clone the repository:

git clone https://github.com/tianxia--/ai-novel-factory.git

Add to your opencode.json:

{
  "plugin": ["./path/to/ai-novel-factory/packages/opencode-ai-novel-factory"]
}

Quick Start

1. Initialize Project

In OpenCode, run:

@novel-init

Or manually create the directory structure:

studio/
├── agents/
├── automation/
├── memory/
├── story/
├── characters/
├── style/
├── production/chapters/
└── state/

2. Fill in Basic Settings

Fill in the following files in order:

  1. studio/story/world.md - World settings
  2. studio/story/master_outline.md - Main story outline
  3. studio/characters/protagonist.md - Protagonist settings
  4. studio/style/*.md - Style guides (optional)

3. Start Writing

@daily_pipeline

Available Agents

| Agent | Purpose | |-------|---------| | @story_architect | Create world-building | | @volume_planner | Generate volume outline | | @writer | Write chapter content | | @editor | Quality review | | @memory_keeper | Maintain memory system |

Available Skills

| Skill | Purpose | |-------|---------| | @daily-pipeline | One-click chapter generation |

Available Tools

| Tool | Purpose | |------|---------| | novel-init | Initialize project structure | | novel-chapter | Generate new chapter | | novel-memory-update | Update memory files | | novel-consistency-check | Check consistency | | novel-status | Show project status |

Directory Structure

studio/
├── agents/              # Agent definitions
├── automation/          # Automation configs
├── memory/              # Memory system (core)
│   ├── canon.md              # Core settings (unbreakable)
│   ├── world_rules.md        # World rules
│   ├── characters_evolution.md # Character growth log
│   └── foreshadowing.md      # Foreshadowing tracking
├── story/               # Story outlines
│   ├── world.md             # World settings
│   └── master_outline.md    # Main outline
├── characters/          # Character settings
│   ├── protagonist.md       # Protagonist
│   └── character_template.md # Character template
├── style/               # Style control
│   ├── tone.md              # Overall tone
│   ├── rhythm.md            # Sentence rhythm
│   └── dialogue.md          # Dialogue style
├── production/          # Output directory
│   └── chapters/            # Chapter content
└── state/               # State management
    ├── current_chapter.txt   # Current chapter number
    └── pipeline_config.txt   # Pipeline configuration

Memory System

The memory system is the core stabilizer for long-form writing:

  • canon.md: Unchangeable core settings
  • world_rules.md: Expandable but bounded rules
  • characters_evolution.md: Character growth tracking
  • foreshadowing.md: Foreshadowing management

Anti-Collapse Strategies

To ensure long-form stability:

  • Power Control: Cannot break world_rules upper limit
  • Character Protection: Behavior must match growth trajectory
  • Timeline Validation: Update logical timeline each chapter
  • Foreshadowing Tracking: All unresolved foreshadowing must be recorded

Workflow

Daily Creation

@daily_pipeline

This automatically:

  1. Analyzes recent chapters
  2. Generates next chapter plan
  3. Writes chapter content
  4. Checks style consistency
  5. Updates memory system

Quality Control

Every 5 chapters, run:

@editor [chapter range]

Configuration

Edit studio/state/pipeline_config.txt:

target_word_count=2500
auto_skip_check=false
auto_memory_update=true
max_continuous_chapters=5
quality_threshold=7
style_check=true
consistency_check=true

License

MIT

Author

tianxia--

Links