Work - #84
Open
yangda611 wants to merge 7 commits into
Open
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.