NovelClaw

repository·main·Indexed 43 days ago

https://github.com/ilearn-lab/novelclaw

A structured writing workspace for long-form fiction featuring chapter drafting, memory-aware writing, and inspectable execution runs. It provides tools for maintaining continuity through storyboards, memory banks, and detailed runtime logs (worker.log, progress.log) to ensure coherence in serialized projects.

Tokens
39.2K
Snippets
103
Records
167
Agent score
53%

What's inside NovelClaw

  1. Overview of NovelClaw

    main

    NovelClaw is a structured long-form fiction writing workspace designed for chapter-based writing, observability, manuscript review, and memory-aware control. Unlike single-prompt tools, it organizes long-form creation into continuous sessions, run inspections, storyboards, and editable memory banks.

    Key components include:

    • Writing Workspace: Integrates conversation, chapter writing, run review, and continuation control.
    • Manuscript Interface: Provides persistent access to storyboard, manuscript, style, world, and character data.
    • Memory Control: Features an editable memory bank and chapter outputs to maintain continuity and facilitate revisions.
  2. Understand the NovelClaw workspace capabilities and outputs

    main

    NovelClaw provides a structured environment for long-form writing that avoids opaque prompt interactions by using a closed-loop architecture.

    Workspace Capabilities

    • Writing Sessions: Continuous writing sessions.
    • Views: Manuscript and storyboard views.
    • Workspaces: Dedicated interfaces for world, character, and style settings.
    • Memory Management: Editable memory bank tools.

    Inspectable Artifacts

    • Logs: Worker logs and progress traces.
    • Outputs: Chapter outputs and downloadable artifacts.
    • Review: Job details and run review interfaces.
  3. Review the NovelClaw repository layout

    main

    The repository is organized into functional layers:

    • apps/auth-portal/: The public entry layer.
    • apps/multiagent/: An optional layer for fast ideation.
    • apps/novelclaw/: The main writing workspace.
    • scripts/: Helpers for local bootstrapping, starting, and stopping services.
    • docs/: Screenshots and operator notes.
    • infra/: Infrastructure examples (e.g., nginx/ for reverse-proxy, systemd/ for service units, and env/ for safe environment templates).
    • state_snapshots/: Intended for public-safe releases (cleared regularly).
  4. What is NovelClaw and how does it differ from typical tools?

    main

    NovelClaw is a structured long-form fiction workspace designed for chapter-based writing, memory-aware drafting, and inspectable runs. Unlike typical fiction tools that treat writing as a single large prompt, NovelClaw treats it as an ongoing workspace.

    Key Differences

    FeatureTypical Fiction ToolNovelClaw
    ApproachOne large promptOngoing workspace with sessions and run inspection
    StateHidden behind opaque generationExposes progress.log, chapter files, and job details
    ContinuityStory state scattered in promptsKeeps manuscript, world, and character views in-workspace
    ControlDifficult to continue after first draftSupports repeated return via storyboards and memory banks
  5. Navigate the NovelClaw repository structure

    main

    The repository is organized into the following main directories:

    • apps/auth-portal/: The public entry point layer.
    • apps/multiagent/: An optional layer for rapid ideation.
    • apps/novelclaw/: The main writing workspace.
    • scripts/: Helper scripts for local initialization, starting, and stopping services.
    • docs/: Screenshots and operational documentation.
    • infra/: Infrastructure references (e.g., nginx/ for reverse proxy, systemd/ for service units, env/ for secure environment templates).
    • state_snapshots/: Intentionally cleared directory for public-safe releases.
    .|
    |-- apps/
    |   |-- auth-portal/       # 公开入口层
    |   |-- multiagent/        # 可选的快速构思层
    |   `-- novelclaw/         # 主写作工作区
    |-- scripts/               # 本地初始化 / 启动 / 停止辅助脚本
    |-- docs/                  # 截图与运维说明
    |-- infra/
    |   |-- nginx/             # 反向代理示例
    |   |-- systemd/           # 服务单元示例
    |   `-- env/               # 仅保留安全环境模板
    `-- state_snapshots/       # 为公开安全发布而刻意清空
  6. Understand the NovelClaw architecture and workflow

    main

    NovelClaw uses an inspectable loop architecture designed to support long-form writing projects. Instead of a single opaque prompt interaction, it links several stages together:

    1. Public Entry: The initial interface for users.
    2. Writing Sessions: Active sessions where content is generated.
    3. Run Execution: The actual processing of writing tasks.
    4. Manuscript Review: Surfaces for reviewing generated content.
    5. Memory-Aware Continuation: Using memory banks to ensure continuity in long projects.

    This loop allows the workspace to maintain context (world, character, and style) across extended writing sessions without losing coherence.

  7. Understand the NovelClaw Route Model

    main

    NovelClaw uses a multi-route architecture where different components are exposed at specific URL paths. When deploying, treat /claw/ as the primary application route.

    • / -> Portal (public entry point)
    • /multiagent/ -> MultiAgent (optional support workspace)
    • /claw/ -> NovelClaw (main writing workspace)
  8. Configure the recommended server directory structure

    main

    The provided systemd units and deployment guides assume a specific directory layout on your server. Ensure your files are organized as follows:

    Application Files:

    • /opt/novelclaw/.venv/ (Python virtual environment)
    • /opt/novelclaw/apps/ (Contains auth-portal/, multiagent/, and novelclaw/)

    Configuration Files:

    • /etc/novelclaw/ (Contains .env files for each service)
    text
    /opt/novelclaw/
    |-- .venv/
    `-- apps/
        |-- auth-portal/
        |-- multiagent/
        `-- novelclaw/
    
    /etc/novelclaw/
    |-- auth-portal.env
    |-- multiagent.env
    `-- novelclaw.env
  9. Understand the NovelClaw routing structure

    main

    NovelClaw is organized into three main functional layers, each mapped to a specific URL path. When deploying to a production server, /claw/ is considered the primary application route.

    • / -> Portal (Public entry point)
    • /multiagent/ -> MultiAgent (Optional auxiliary workspace)
    • /claw/ -> NovelClaw (Main writing workspace)
  10. Local environment configuration notes

    main

    When running locally, the following defaults are applied to simplify the preview experience:

    • Embeddings: EMBEDDING_MODEL=none and DISABLE_EMBEDDING_DOWNLOADS=1 are set by default to prevent heavy embedding downloads during the preview phase.
    • Authentication: The public version does not expose registration, login, password recovery, or email verification flows.
    • Web Server: Local preview does not require Nginx.
  11. Configure Data Persistence in Docker

    main

    NovelClaw uses Docker volumes to ensure data is not lost when containers are stopped or removed. The following directories are mounted for persistence:

    • Auth Portal Database: apps/auth-portal/local_web_portal/data
    • MultiAgent Data: apps/multiagent/local_web_portal/data
    • MultiAgent Runs/Outputs: apps/multiagent/local_web_portal/runs
    • NovelClaw Database: apps/novelclaw/local_web_portal/data
    • NovelClaw Runs/Outputs: apps/novelclaw/local_web_portal/runs
  12. Prepare environment variable files

    main

    Create the configuration directory and copy the provided templates to /etc/novelclaw/. You must manually edit these files to include real production values.

    Required configuration items to fill in:

    • Real domain names and public URLs
    • session secret and encryption key
    • Database URL
    • API keys or provider configurations
    • APP_BASE_PATH (must match your deployment routes)
    sudo mkdir -p /etc/novelclaw
    sudo cp infra/env/auth-portal.env.template /etc/novelclaw/auth-portal.env
    sudo cp infra/env/multiagent.env.template /etc/novelclaw/multiagent.env
    sudo cp infra/env/novelclaw.env.template /etc/novelclaw/novelclaw.env