WenShape  by unitagain

Agent-based system for long-form novel writing, tackling LLM memory loss

Created 3 months ago
312 stars

Top 86.6% on SourcePulse

GitHubView on GitHub
Project Summary

WenShape: Deep Context-Aware Agent-Based Novel Writing System

WenShape is a Context Engineering system addressing LLM memory loss and contradictions in long-form novel writing (tens of thousands of words). It targets writers and researchers by providing an orchestrated workflow, dynamic fact tracking, and precise token management to maintain narrative consistency and coherence over extended lengths.

How It Works The system employs an Orchestrated Writing Process, scheduling specialized modules (Archivist, Context Engine, Writer, Editor) via a central Orchestrator. Key innovations include a Context Engine selecting relevant information within strict token budgets using a hybrid deterministic/retrieval strategy (BM25 + word overlap), and a Dynamic Fact Table (Canon) extracting and storing narrative facts (character states, plot points) in JSONL format after each chapter. This ensures long-term consistency and enables iterative refinement via a revision loop with patch operations and diff previews.

Quick Start & Requirements For immediate use, download the Windows Release (.exe) from the project's Releases page; no Python/Node.js installation is required. Source installation demands Python 3.10+ and Node.js 18+, with start.bat (Windows) or ./start.sh (macOS/Linux) automating setup. API keys for supported LLM providers (e.g., OpenAI, Anthropic) are necessary; a mock mode is available. Configuration is managed via .env and config.yaml.

Highlighted Details

  • Git-Native Storage: Plain text data (YAML, Markdown, JSONL) enables seamless Git version control.
  • Multi-LLM Support: Integrates over 9 LLM providers, allowing dynamic switching and per-module configuration.
  • Fanfiction Import: Features wiki scraping (萌娘百科, Fandom, Wikipedia) to parse and structure character/world-building info into editable cards.
  • IDE-like Interface: Frontend presents an intuitive three-panel IDE layout.
  • Token Budget Management: Detailed token allocation strategy across system rules, cards, facts, draft, and output.

Maintenance & Community Contribution guidelines are provided for bug reports, features, code, and documentation. Specific details on maintainers, sponsorships, or community channels (Discord/Slack) are not present.

Licensing & Compatibility WenShape is released under the PolyForm Noncommercial License 1.0.0. This license strictly prohibits any commercial use, including internal enterprise applications, while permitting personal, non-commercial use, learning, and research. Commercial licensing inquiries can be directed to the provided email.

Limitations & Caveats The primary limitation is the non-commercial restriction of the PolyForm Noncommercial License, precluding its use in any business or enterprise context. Performance and consistency may vary based on the chosen LLM provider and its configuration.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
10
Issues (30d)
5
Star History
67 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.