Skip to content

Latest commit

 

History

History
309 lines (242 loc) · 14.1 KB

WORKFLOW.md

File metadata and controls

309 lines (242 loc) · 14.1 KB

Writing and revision workflow

The author's daily loop in the studio

Open the local page started by weaver studio --root ./my-book. On Home, check approved chapters, open findings, and the doctor footer. Read Book by chapter and scene; paragraph markers lead to the relevant finding. Character, Place, and Thread pages provide the current story context.

On Jobs, run a chapter review or bootstrap story-so-far state. Read each new state record there and explicitly accept it before release. Return to Findings, read the cited passage and suggested repair, then choose Fix this, It's intended, or Allow. Recheck a changed passage because its earlier ruling may lapse. Open Changes to compare approved and new paragraphs and their style findings. Approve or reject one chapter there. History records the decisions and offers a confirmed undo of the last approval. The studio calls the same engine operations as the matching commands below, including their doctor refusal.

Download report saves the same picture of the book as one offline HTML file to send to someone else; weaver report --out <file.html> does the same from a terminal and saves it outside the book folder. It contains manuscript excerpts, so share it only with people you trust.

0. Check the setup

The book can live in a subfolder of a larger Git project, and Weaver reads and commits only the book's own files.

Before working on a book, run:

weaver doctor --root ./my-book

Repair path

For each chapter, run weaver review --chapter N --run, then inspect weaver findings --chapter N. Use --all to see lower-priority review notes. Decide an item with weaver rule <finding-id> --decision fix|allow|intended. Work from weaver findings --to-fix --chapter N for requested repairs, rerun the reviews after prose changes, then approve the chapter. An allowed blocking style finding appears in the approval and check audit output by ID.

For a finished book, create a separate Weaver project with --empty; this removes the starter scene and starter critical-path fixture while preserving the generic project configuration. Importing never merges with existing scene files and never writes to the source document. A series uses one project per book.

weaver init ./my-book --id my-book --title "My Book" --empty
weaver import ./finished-book.docx --root ./my-book
weaver status --root ./my-book
weaver check --root ./my-book
weaver export --format docx --out ./repaired-book.docx --root ./my-book

The repair path uses the same deterministic style-rules gate: check reports blocking findings and release refuses them, while warnings remain advisory.

Importing picks made elsewhere

A picks file is a JSON export of choices you made in another writing or review tool. It pairs Weaver finding IDs (from weaver findings --json) with the replacement paragraphs you chose or with intended and allow decisions.

Run weaver picks check ./my-picks.json --root ./my-book to preview the rulings, ready and dropped edits, and remaining approval blockers without saving anything. Your AI can add --ready to keep a checked copy for you. On the author page, open Import picks, check the file name, and click Import these picks. You can also choose a different file. The check leaves your rulings, proposals, and manuscript as they are. Add --json to get the result as JSON.

weaver picks import ./my-picks.json --note "Reviewed the options" --root ./my-book

You can also open Import picks from Studio Home or Proposals. Import saves your rulings and prepares chapter proposals. Your scene text stays as it is until you accept each chapter on the Proposals page or run weaver proposal accept --chapter N. Weaver checks the whole chapter again when you accept.

A whole-book import or preview checks every pick against every rule and can take several minutes. The terminal prints each chapter as it is checked; Studio shows "checking chapter N (i of M)" and keeps the last result after a reload. While an import runs, Studio refuses other changes until it finishes.

An edit that would make a blocking check flag a different paragraph instead is dropped, even if the number of findings stays the same; the dropped reason names the paragraph.

  • Already in the book means the current paragraph already matches the replacement you chose.
  • Skipped explains which passages changed after the picks were made or which finding IDs are no longer open.
  • Still blocking lists what would prevent approval even with every ready edit applied. Dropped edits and choices the writing tool marked as Not imported are also listed.

For books set up before 0.3.7, run weaver hooks install once from the book folder to update the author guard rules. If the book settings are sealed, follow the doctor's instructions for resealing the intended update.

Bootstrap story state for an imported book

The import record under imports/ preserves the source hash, front matter, chapter and scene counts, POV decisions, and scene word counts. Imported books begin with missing or stale narrative state by design; check reports that state but does not fail on it until the project's state workflow is bootstrapped.

Before release, bootstrap the story-so-far records and facts ledger. The host answers deterministic packets, then the author reviews and accepts the records:

weaver state bootstrap --run --root ./my-book
weaver state:accept --through 3-2 --root ./my-book
weaver facts build --root ./my-book

The interactive route is weaver packet state --scene 1-1, followed by weaver submit <packet-id> --file answer.md. A malformed or deterministic validation failure gets one host repair attempt. Scene facts must use registry IDs (or world) and every quote must be a verbatim excerpt from that scene; invalid answers are never recorded, and the latest failed answer is kept in .weaver/packets/<packet-id>.answer.txt for diagnosis. Editing an earlier scene makes its state and downstream state stale again, so bootstrap in reading order.

The repair path uses the same author approval boundary: imported or AI-edited scene changes appear in weaver changes, and the author approves or rejects one chapter at a time before continuing to state review and export.

For imported books, seed the registry from the imported POV headers, then build profiles after the prose is in place:

weaver characters seed --root ./my-book
weaver voices build --root ./my-book
weaver voices check --root ./my-book

1. Lock the architecture

Before drafting, define the ending, scene-level beat map, reveal/reframe ledger, and forward seed plan. Forward drafting is good at local continuity; it cannot invent retroactive setup for an ending it did not know.

2. Prepare a scene

Run:

weaver grounding 1-1 --root ./my-book

Use the packet to establish the scene's structural position, entering character states, prior reader knowledge, required change, and causal beat chain. Beats should connect through complication or consequence, not merely chronology. The reusable role prompt is in prompts/architect.md.

3. Draft

Install both hosts' guards once for this book so style rules run around AI prose edits:

weaver hooks install --host both --root ./my-book

For Codex, trust the book folder and review and trust Weaver's hooks with /hooks, then restart the local session. See Hosts.

The pre-hook supplies the editorial rules before an edit. The post-hook checks the edited scene and reports or blocks deterministic findings. Hooks fail open, so a hook problem never interrupts an edit; the rules gate in check and release remains authoritative.

Write only the delta. Do not re-introduce familiar characters, settings, relationships, or rules unless the scene deliberately re-anchors something the reader may have forgotten. Preserve the project's voice constraints and end on a changed state or resonant image.

4. Review

Run weaver rules --root ./my-book during drafting or repair to inspect style findings directly. A blocking style finding makes check fail; warnings remain visible without failing the gate.

Per-character checks

Add quality/character-checks.json beside quality/rules.json. Its keys are check types and each value is an array of entries. Omit an unused type or give it an empty array. The schema lists the fields. This example configures a word substitution.

{
  "dialectSubstitution": [
    {
      "speakers": ["example-character"],
      "wrong": "reckon",
      "right": "think",
      "_source": "Use the same wording in this character's speech and narration."
    }
  ]
}

Use names or IDs from world-bible/characters.json to identify characters. For quoted lines Weaver prefers matching scene documentation, then uses its usual speaker attribution. For narration it uses the scene's **POV:** header for narration. A scene with no POV skips narration checks. Names in the prose match whole words with exact capitalization. For checks that depend on who is present, names in the prose or a comma-separated Present: line in the scene outline can establish presence.

Pattern fields take JavaScript regex source strings, with case ignored by default. Set "case_sensitive": true to match case. Optional from and to limits include both endpoints. Use a chapter number or a position such as "b01c03" for book 1, chapter 3. Weaver checks a single book, so positions for other books do not match.

Type What it checks
voice At least one listed marker appears in the character's lines or narration, per chapter for a tic or per scene for a beat.
dialectSubstitution Suggests right for each whole-word match of wrong in the listed characters' lines and narration.
stutterMechanism Within-word repeats use a hyphen and whole-word repeats use an em dash in the character's speech.
clippedVoice Flags figurative phrases such as “like a” and “as if” in the character's speech.
registerShift Limits words in a line addressed to a named listener or spoken immediately after them, when both characters are present.
titleAsAddress Flags a title used in direct address from the specified chapter onward when the character is present.
mechanicContradiction Flags a paragraph that puts the mechanic and a banned pattern together in the character's narration or when the character is named.
secretStated Flags listed claims when the character is named or their narration mentions a subject. Also checks first-person patterns in their narration.
unwantedDesire Flags desire when a named character is paired with an unpermitted character, or when their narration expresses desire without a permitted name.
ticRepetition Limits filler lines and tell paragraphs independently in each scene.
loreViolation Flags a paragraph that names a listed subject and matches a pattern, using the entry's note in the finding.
arcStages Flags patterns that belong to a later stage in the specified book and chapter range, with the expected stage voice in the finding.

Findings appear in weaver rules, the findings list, and repair packets. Each entry can add an author note in _source, shown in its findings. Severity defaults to warn. An entry's optional gate setting controls chapter approval and proposal acceptance. Set it to true to require a fix or an author ruling, or false to keep the finding advisory. When omitted, the project's approve_refuses_on list determines which severities gate. That list defaults to ["block"]. An active allow or intended ruling clears the gate for the finding. Run weaver doctor to locate invalid entries.

Run weaver voices check --scene <scene-id> --root ./my-book while revising a scene, or use --pending to inspect changed dialogue only. Voice findings show the evidence lines that informed the warning and never block check, approve, or release. Rebuild profiles after an accepted prose change with weaver voices build --root ./my-book.

Profiles are built from the approved manuscript at HEAD. Working-tree edits are checked against those profiles without making them stale; after weaver approve succeeds, Weaver rebuilds the ignored derived profiles from the new approval commit.

Run three independent lenses:

  1. Continuity — facts, timeline, geography, knowledge boundaries, and active threads.
  2. Style — voice, rhythm, imagery, dialogue, and project prohibitions.
  3. Critic — scene function, causation, pacing, clarity, emotion, and hook.

Revise until continuity is clear, style drift is resolved or accepted, and the critic passes. Major structural changes remain human-gated. The reviewer prompts live under prompts/reviewers/.

5. Approve or reject the chapter

The author controls when AI edits enter the book. Inspect pending scene edits with weaver changes --root ./my-book. Work on one chapter at a time:

weaver approve --chapter 1 --note "Reviewed opening" --root ./my-book

Approval creates a Git snapshot and refreshes each changed scene's derived word footer. If the author does not want the edits, use weaver reject --chapter 1 --root ./my-book; Weaver saves the rejected files under .weaver/rejected/ and restores the last approved text. Rejected copies stay on disk and are ignored by Git. weaver undo creates a new revert commit, and weaver history lists approvals and undos. Nothing is silently lost.

6. Update derived state

Update only what changed in narrative-state/<scene-id>.md and the cumulative reader ledger. Then accept reviewed state:

weaver state:accept --root ./my-book --through 1-1

If an early scene is revised later, re-derive every stale scene in order. prompts/state-extractor.md defines the generic delta format.

7. Verify and release

weaver check --root ./my-book
weaver release --root ./my-book --id beta-01

Use a new release ID whenever the manuscript changes. The generated manifest records source and artifact hashes for traceability. Each release also contains per-scene prose, the accepted narrative-state snapshot, and per-scene hashes in reading order.