Skip to content

Work - #84

Open
yangda611 wants to merge 7 commits into
lingfengQAQ:masterfrom
yangda611:work
Open

Work#84
yangda611 wants to merge 7 commits into
lingfengQAQ:masterfrom
yangda611:work

Conversation

@yangda611

Copy link
Copy Markdown

No description provided.

codex and others added 7 commits May 5, 2026 16:04
… CLI and docs

### Motivation

- Provide a batch automation entrypoint to run write/heal/nightly pipelines across chapter ranges to reduce manual orchestration.
- Provide a tool to detect and optionally mark ASCII snake_case (pinyin/English) dirty entities for downstream cleanup.
- Expose these features through the unified CLI and document common plugin/CLI workflows for everyday and ops use.

### Description

- Extended the CLI in `webnovel-writer/scripts/data_modules/webnovel.py` to add `orchestrate` and `entity-clean` subcommands and forward them to new scripts.
- Added `webnovel-writer/scripts/orchestrate.py` which implements range parsing, runs `preflight`, optional `review-pipeline`, `chapter-commit`, and optional vector indexing repair, and emits a JSON report.
- Added `webnovel-writer/scripts/entity_cleanup.py` which scans the `entities` table for ASCII snake_case IDs/names and optionally writes rows into an `invalid_facts` table for later handling.
- Updated `README.md` and `docs/guides/commands.md` to include an overview of the new plugin commands, unified CLI examples, `orchestrate` usage, and a recommended repair workflow for large projects.

### Testing

- Ran basic CLI smoke checks by invoking `python -X utf8 "<CLAUDE_PLUGIN_ROOT>/scripts/webnovel.py" orchestrate --help` and `python -X utf8 "<CLAUDE_PLUGIN_ROOT>/scripts/webnovel.py" entity-clean --help`, which returned help text successfully.
- Executed `orchestrate` locally against a sample project with `--chapters 1-3` and `--json-report-out` to verify report generation and the script exit behavior, and the run completed and produced a JSON report.
- Ran `entity_cleanup.py` against a test SQLite `index.db` and validated that it listed dirty entities and inserted `invalid_facts` rows when `--mark-invalid` was passed.
Add safe chapter deletion with dry-run planning, precise read-model cleanup, and rewrite command guidance so chapters can be removed or regenerated without stale index/vector/entity data.
- Add fictional content disclaimer to webnovel-write Step 2
- Add fictional content disclaimer to webnovel-review Step 4
- Add missing allowed-tools to webnovel-plan
- Remove misspelled webnovel-rewirter directory

The disclaimer is added to internal AI prompts only, not shown to users.
Add fictional content declaration to agent system prompts:
- reviewer.md: works as an assistant in fictional novel creation review
- context-agent.md: works as an assistant in fictional novel creation context briefing

This ensures AI recognizes the content as fictional literary creation
before processing potentially sensitive themes like combat, intrigue,
or mystery, preventing API refusals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants