Install
$ agentstack add skill-duketwocan-autonovel-agent-skills-autonovel-revision ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Autonovel — Phase 3a (Revision)
Iteratively revise a complete draft. Each cycle combines structural critique, reader-panel reactions, and mechanical cuts into a single revision brief, then executes targeted rewrites against it. Loops until quality plateaus or the cycle cap is hit.
When to use this skill
- State.json shows
"phase": "revision" - All chapters exist in
$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/chapters/(drafting complete) - A novel-level score has been recorded by
autonovel-drafting(the baseline this phase improves on)
Prerequisites
!`cd "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG" && ls chapters/ | wc -l && ls -la outline.md world.md characters.md voice.md canon.md genre_context/story-contract.md genre_context/compiled/evaluation-chapter.md genre_context/resolved.json`
!`cat "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/state.json"`
If chapters are missing or chapters_drafted
Run it separately for every chapter reviewed or rewritten. The block contains
only content tags assigned to that chapter by the coverage map. Do not reuse one
cycle-wide all-tags block. For the consolidated brief, concatenate the distinct
blocks under chapter headings as `PROFILE REQUIREMENTS BY CHAPTER`; for each
adversarial or rewrite prompt, pass only that chapter's block immediately before
the story contract and selected-pack evaluation packet. Rebuild affected blocks
after any state, outline, or resolution change.
## Workflow
Run the steps below as one cycle. Repeat until Step 7 says stop. Each cycle writes its critique artifacts under `critique/` using the current cycle number `N`.
### Step 1 — Adversarial structural edit
Read `${HERMES_SKILL_DIR}/references/adversarial-prompt.md`,
`genre_context/story-contract.md`, and
`genre_context/compiled/evaluation-chapter.md`. For each chapter file
`chapters/ch_{N:02d}.md`, run the prompt with both genre files — the model
identifies 10-20 specific passages to CUT or REWRITE and classifies each (FAT /
REDUNDANT / OVER-EXPLAIN / GENERIC / TELL / STRUCTURAL). It must also identify
any story-contract promise or required genre payoff the proposed cut would
damage; structural economy never overrides those requirements.
Concatenate per-chapter results into a single critique document and write to:
critique/adversarial_{N:02d}.md
Save the raw per-chapter JSON to `critique/adversarial_{N:02d}/ch{NN:02d}.json` for the brief step to consume.
### Step 2 — Reader panel consensus
Read `${HERMES_SKILL_DIR}/references/reader-panel-personas.md`. For each persona (4 total: editor, genre reader, writer, first reader), run an independent LLM call against an arc-summary view of the manuscript. Each persona's system prompt is in the reference file; the user prompt template (10 questions about the novel as a whole) is shared.
Write each persona's JSON output to:
critique/readerpanel{N:02d}_{PERSONA}.json
Then merge into a consensus document — for each question, list all four answers, identify chapters where readers DISAGREE (some flag a chapter for an issue, others don't — disagreements are where editorial decisions live), and write the merged file:
critique/readerpanel{N:02d}.md
If `arc_summary.md` doesn't exist yet for this novel, build it first by sampling chapter openings, closings, and key dialogue (~10% of each chapter's word count).
### Step 3 — Mechanical cuts
Identify regex-matchable issues per chapter:
!python3 ${HERMES_SKILL_DIR}/lib/slop_detect.py "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/chapters/ch_{NN:02d}.md" --genre-context "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/genre_context/resolved.json"
For each chapter, collect: banned-word matches (Tier 1 and Tier 2), em-dash density flags, and any filler-phrase hits. Apply the unambiguous ones directly to the chapter file (delete the matched span; for banned words, prefer a domain-specific substitute pulled from `voice.md` or `world.md` vocabulary). Save a log of what was applied to:
critique/cuts_{N:02d}.md
Anything ambiguous (e.g. a Tier-2 word that might be earned in this context) goes into the revision brief instead of being auto-applied.
### Step 4 — Generate revision brief
Read `${HERMES_SKILL_DIR}/references/revision-brief-prompt.md`. Feed the agent:
- The per-chapter adversarial JSON from Step 1
- The merged reader panel + disagreements from Step 2
- The mechanical-cuts log from Step 3
- The current `voice.md` rules
- `PROFILE REQUIREMENTS BY CHAPTER`, containing a separately assembled block
for every chapter with actionable feedback
- `genre_context/story-contract.md`
- `genre_context/compiled/evaluation-chapter.md`
The agent produces a consolidated, per-chapter revision plan in PROBLEM / WHAT TO KEEP / WHAT TO CHANGE / VOICE RULES / TARGET format. Write to:
critique/brief_{N:02d}.md
The brief should be specific and actionable — every "WHAT TO CHANGE" item names a chapter and quotes or describes the offending passage.
### Step 5 — Execute revision
Read `${HERMES_SKILL_DIR}/references/revision-execution-prompt.md`. For each chapter that the brief flags for change, run the rewrite prompt. Inputs per chapter:
- The brief section for that chapter
- The current chapter text (as raw material)
- `voice.md`, `characters.md`, `world.md` (full)
- The current chapter's separately assembled `PROFILE REQUIREMENTS` block
- `genre_context/story-contract.md` and
`genre_context/compiled/evaluation-chapter.md`
- The tail of the previous chapter and the head of the next chapter (continuity)
The model produces a full rewritten chapter — never a diff or partial. Save the
output to `critique/candidates/cycle_{N:02d}/ch_{NN:02d}.md`; do not touch the
persistent chapter yet. Run the same **ALL FIVE gates** used by Drafting
(`../autonovel-drafting/references/surgical-rewrite.md`) against this candidate:
1. Load patterns from `genre_context/resolved.json` and run the mechanical scan
on the candidate text.
2. Run manuscript repetition on a temporary manuscript view that substitutes
the candidate for chapter NN while leaving every other chapter unchanged.
3. Run sentence grading on the candidate.
4. Check profile/semantic genre compliance against the story contract and
evaluation packet, including every required genre payoff.
5. Enumerate every new story fact first disclosed in the candidate and cite the
exact outline `May reveal` clause or scene-card `Reveal` cell authorizing it;
reject uncited facts and all `Must withhold` disclosures.
If any gate fails, the original chapter remains unchanged. Route only the
flagged sentences or spans through Drafting's span-scoped surgical-rewrite loop,
apply all replacements for a round to the candidate through one
`lib/chapter_patch.py apply` batch, and rerun the responsible detector
or semantic check using the same two batch rewrite rounds and one deterministic
cut/merge pass shared by the whole chapter. Do not respond to a gate failure by
generating another whole chapter. If a span stalls, retain the original chapter
and record the candidate and unresolved finding in the cycle brief for manual
review. Reject any candidate that breaks a required genre payoff even when its
prose score improves; an improved 1-10 score never overrides a failed gate.
Only after all five gates pass, atomically replace
`chapters/ch_{NN:02d}.md` with the candidate and retain the candidate audit path
in the cycle log. Keep the pre-revision version in git history (commit before
overwriting).
Chapters that the brief marks as already-tight (no "WHAT TO CHANGE" items) are left alone for this cycle.
### Step 6 — Re-evaluate the novel-level score
Concatenate all chapters and run:
!cat "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/chapters"/*.md | python3 ${HERMES_SKILL_DIR}/lib/slop_detect.py /dev/stdin --genre-context "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/genre_context/resolved.json"
Record the new novel-level score and bump the revision-cycle counter:
```python
import sys
sys.path.insert(0, "${HERMES_SKILL_DIR}/lib")
from state import load_state, save_state, record_score, current_threshold
s = load_state("$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/state.json")
record_score(s, "novel", )
s["revision_cycle"] = s.get("revision_cycle", 0) + 1
save_state(s, "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/state.json")
Commit the rewritten chapters and critique artifacts.
Step 7 — Decide: continue or stop
Compare the new novel score to the previous cycle's novel score:
- Continue when
cycle = PLATEAU_DELTA(still improving meaningfully). Loop back to Step 1 withN = cycle + 1. - Stop when
cycle >= MAX_REVISION_CYCLES(cap reached), OR the score plateaued (delta = MIN_REVISION_CYCLES).
On stop: run the Final step (grammar pass) below, commit the grammar-fixed chapters, THEN update state.json phase to "consistency", commit, hand off.
Final step — Grammar pass (mechanical)
After the last revision cycle, run the bundled dependency-free LanguageTool client over each revised chapter. It defaults to http://localhost:8081/v2/check; set AUTONOVEL_LANGUAGETOOL_URL when the service uses another host or port:
!`python3 ${HERMES_SKILL_DIR}/lib/check_grammar.py "$AUTONOVEL_WORKSPACE/$NOVEL_SLUG/chapters/ch_{N:02d}.md"`
The checker returns JSON findings with exact offsets and lengths. Review each finding against its chapter context and add only clear mechanical errors to the surgical rewrite span list. Apply grammar, punctuation, spelling, capitalization, and confused-word fixes; skip style, register, voice, and false-positive suggestions. Re-run check_grammar.py after each batch and record applied and skipped rule IDs in the revision report.
If LanguageTool is unavailable, skip this pass with a warning. Do not replace it with an LLM grammar pass; the model has already completed prose revision and an additional generative pass can introduce broader changes.
Commit the grammar-fixed chapters before handing off.
Handoff
When this phase completes, invoke autonovel-consistency-pass.
Library utilities
lib/slop_detect.py— mechanical quality scoring (used in Steps 3 and 6, no LLM)lib/state.py— state.json read/write and adaptive thresholds (used in Step 6 for novel-score tracking)
See also
references/adversarial-prompt.md— structural critique prompt (Step 1)references/reader-panel-personas.md— 4 reader personas with system prompts and the shared 10-question user template (Step 2)references/revision-brief-prompt.md— consolidation prompt that turns critique + cuts + panel into a brief (Step 4)references/revision-execution-prompt.md— chapter-rewrite execution prompt (Step 5)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: DukeTwoCan
- Source: DukeTwoCan/autonovel-agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.