scriveno 2.5.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +6 -4
  2. package/agents/voice-checker.md +10 -0
  3. package/commands/scr/autopilot-publish.md +1 -1
  4. package/commands/scr/autopilot-translate.md +5 -6
  5. package/commands/scr/autopilot.md +10 -6
  6. package/commands/scr/beta-reader.md +6 -3
  7. package/commands/scr/build-ebook.md +1 -1
  8. package/commands/scr/build-print.md +2 -2
  9. package/commands/scr/continuity-check.md +1 -0
  10. package/commands/scr/copy-edit.md +1 -0
  11. package/commands/scr/dialogue-audit.md +1 -0
  12. package/commands/scr/discussion-questions.md +1 -0
  13. package/commands/scr/draft.md +5 -4
  14. package/commands/scr/editor-review.md +1 -0
  15. package/commands/scr/export.md +1 -1
  16. package/commands/scr/help.md +1 -1
  17. package/commands/scr/line-edit.md +1 -0
  18. package/commands/scr/manuscript-stats.md +7 -7
  19. package/commands/scr/map-manuscript.md +1 -0
  20. package/commands/scr/multi-publish.md +3 -2
  21. package/commands/scr/new-character.md +1 -0
  22. package/commands/scr/new-work.md +1 -1
  23. package/commands/scr/next.md +1 -0
  24. package/commands/scr/originality-check.md +1 -0
  25. package/commands/scr/outline.md +2 -2
  26. package/commands/scr/pacing-analysis.md +1 -0
  27. package/commands/scr/pause-work.md +1 -1
  28. package/commands/scr/polish.md +1 -0
  29. package/commands/scr/progress.md +15 -10
  30. package/commands/scr/quick-write.md +4 -1
  31. package/commands/scr/resume-work.md +1 -1
  32. package/commands/scr/save.md +7 -4
  33. package/commands/scr/scan.md +17 -3
  34. package/commands/scr/sensitivity-review.md +1 -0
  35. package/commands/scr/submit.md +2 -1
  36. package/commands/scr/synopsis.md +1 -0
  37. package/commands/scr/theme-tracker.md +1 -0
  38. package/commands/scr/timeline.md +1 -0
  39. package/commands/scr/track.md +2 -0
  40. package/commands/scr/translate.md +1 -1
  41. package/commands/scr/voice-check.md +1 -0
  42. package/data/CONSTRAINTS.json +6 -1
  43. package/data/export-templates/scriveno-book.typst +2 -2
  44. package/data/export-templates/scriveno-chapbook.typst +1 -1
  45. package/data/export-templates/scriveno-picturebook.typst +9 -0
  46. package/data/export-templates/scriveno-stageplay.typst +14 -4
  47. package/docs/architecture.md +6 -3
  48. package/docs/auto-invoke-policy.md +4 -3
  49. package/docs/command-reference.md +29 -24
  50. package/docs/configuration.md +28 -3
  51. package/docs/context-protocol.md +2 -1
  52. package/docs/contributing.md +2 -2
  53. package/docs/creative-context.md +1 -1
  54. package/docs/drafter-quality.md +1 -1
  55. package/docs/history-protocol.md +1 -1
  56. package/docs/progress-protocol.md +132 -0
  57. package/docs/release-notes.md +54 -0
  58. package/docs/route-graph.md +1 -1
  59. package/docs/shipped-assets.md +4 -2
  60. package/docs/translation.md +7 -11
  61. package/docs/voice-dna.md +3 -3
  62. package/lib/auto-invoke-engine.js +95 -0
  63. package/lib/track-safety.js +72 -0
  64. package/package.json +1 -1
  65. package/templates/PROGRESS.md +56 -0
  66. package/templates/config.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/aihxp/scriveno/actions/workflows/ci.yml/badge.svg)](https://github.com/aihxp/scriveno/actions/workflows/ci.yml)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
- [![Version](https://img.shields.io/badge/version-2.5.0-blue)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-2.7.1-blue)](CHANGELOG.md)
6
6
  [![npm](https://img.shields.io/npm/v/scriveno.svg)](https://www.npmjs.com/package/scriveno)
7
7
  [![Downloads](https://img.shields.io/npm/dm/scriveno.svg)](https://www.npmjs.com/package/scriveno)
8
8
  [![Status CLI](https://img.shields.io/badge/status%20CLI-scriveno%20status-blue)](docs/runtime-support.md#shared-auto-invoke-engine)
@@ -40,7 +40,7 @@ Scriveno is a command system that turns your AI coding agent into a voice-preser
40
40
  The wedge comes first: Scriveno profiles the writer, loads that voice into every drafting step, and keeps each unit on fresh context so the prose stays specific to the project. From there, it expands into 113 writing commands covering the rest of the pipeline:
41
41
 
42
42
  - **Create** -- Set up a project with tailored context files. Progressive onboarding, never overwhelming.
43
- - **Write** -- Discuss, plan, draft, and revise one unit at a time. The drafter agent loads your Voice DNA and writes in *your* voice, not generic AI prose.
43
+ - **Write** -- Discuss, plan, draft, and revise one unit at a time. The drafter agent loads your Voice DNA and writes in *your* voice, not generic AI prose. Run `/scr:progress` any time to open a per-unit ledger (`.manuscript/PROGRESS.md`) showing what is done, in progress, and untouched.
44
44
  - **Polish** -- Editor review, line edit, copy edit, continuity check, voice check, beta reader simulation, sensitivity review.
45
45
  - **Publish** -- Front/back matter, cover art, blurbs, query letters, KDP packages, IngramSpark packages, EPUB, PDF, Fountain, Final Draft, LaTeX.
46
46
  - **Translate** -- Deep translation with glossary management, cultural adaptation, back-translation verification, multi-language simultaneous publishing.
@@ -141,6 +141,8 @@ For sacred and historical texts, Voice DNA is supplemented by 10 sacred voice re
141
141
 
142
142
  **Interactive:** interactive fiction, game narrative
143
143
 
144
+ **Speech:** speech
145
+
144
146
  **Sacred & historical:** scripture (Biblical, Quranic, Torah, Vedic, Buddhist, generic), commentary/exegesis, devotional, liturgical text, historical chronicle, historical account, mythological collection, religious epic, sermon, homiletic collection
145
147
 
146
148
  Each work type has its own structural hierarchy and **industry-standard word count and page range guidance** -- a novel targets 70,000-100,000 words across 20-35 chapters, a screenplay targets 90-120 pages across 3-5 acts. These ranges guide outlining, progress tracking, and drafter pacing. The runnable command ids stay stable, while Scriveno adapts the wording around them -- a Torah commentary still runs `/scr:plan 3`, but frames that work as planning Parashah 3.
@@ -244,11 +246,11 @@ Scriveno currently ships installer targets for these AI tooling environments:
244
246
 
245
247
  ## Status
246
248
 
247
- **Version:** 2.5.0
249
+ **Version:** 2.7.1
248
250
 
249
251
  Scriveno's core command surface is stable across 113 commands, 50 work types, and 11 installer targets. The current repo baseline includes shipped planning milestones through `v2.0 Publishing Cover Packaging`, plus the creative-context, record-store, branching-next, runtime-sync, adaptive concierge, human-first writing-safeguard, authenticity-diagnostic, domain-grilling, installer-marker cleanup, cross-runtime agent metadata, visible automation status, the shared `scriveno status --project .` auto-invoke engine, route-intelligence lanes, safe apply reporting, runtime smoke checks, agent availability checks, route graph audits, the full audit repair pass through `2.0.11`, the first-run proof surface in `2.5.0`, and the executable `/scr:first-run` path. See [Quick Proof](docs/quick-proof.md) for the fastest proof path, [Shipped Assets](docs/shipped-assets.md) for the canonical asset inventory, and [Runtime Support](docs/runtime-support.md) for the runtime compatibility matrix.
250
252
 
251
- Version `2.5.0` publishes Scriveno under the package name `scriveno`, so the current install command is `npx scriveno@latest`. The older `scriveno-cli` package name is historical and was unpublished during the rename, so npm cannot attach a deprecation notice to it while it has no active registry record. The older `scriven-cli` package remains on npm only as a deprecated legacy name that points users to `scriveno`. Do not treat either legacy package name as active unless a deliberate compatibility shim is republished. See [CHANGELOG](CHANGELOG.md) for the full list and [docs/release-notes.md](docs/release-notes.md) for the public-facing summary.
253
+ Version `2.7.1` publishes Scriveno under the package name `scriveno`, so the current install command is `npx scriveno@latest`. The older `scriveno-cli` package name is historical and was unpublished during the rename, so npm cannot attach a deprecation notice to it while it has no active registry record. The older `scriven-cli` package remains on npm only as a deprecated legacy name that points users to `scriveno`. Do not treat either legacy package name as active unless a deliberate compatibility shim is republished. See [CHANGELOG](CHANGELOG.md) for the full list and [docs/release-notes.md](docs/release-notes.md) for the public-facing summary.
252
254
 
253
255
  Package history is tracked in [CHANGELOG.md](CHANGELOG.md), and the public-facing summary for this release is in [docs/release-notes.md](docs/release-notes.md).
254
256
 
@@ -147,6 +147,16 @@ Map the band to the existing tiers:
147
147
  - **60-74, Mixed signals (notable) / leaning AI:** Fail. Noticeable drift. Offer to re-draft problem sections.
148
148
  - **Below 60, Reads AI-generated:** Severe. Clustered dead-giveaways, uniform rhythm, or chat-artifact contamination. Do not proceed. Recommend re-drafting with an updated STYLE-GUIDE.md or running `/scr:voice-test` to recalibrate.
149
149
 
150
+ ### Normalized drift (for callers that need a 0-1 figure)
151
+
152
+ Some callers -- `/scr:draft`, `/scr:autopilot`, and the `voice.drift_threshold` config knob -- need drift on a 0-1 scale rather than this 0-100 score. Convert with:
153
+
154
+ ```
155
+ drift = (100 - score) / 100
156
+ ```
157
+
158
+ So a score of 100 is 0.00 drift, 90 is 0.10, 70 is 0.30, 60 is 0.40. The default `drift_threshold` of 0.3 therefore means "pause or offer a re-draft when the voice score falls below 70" -- the FAIL band and worse. This is the single definition of drift; callers reference it rather than inventing their own scale.
159
+
150
160
  Before finalizing a low score, re-read the strongest human markers you found and ask whether the band is honestly supported. Scoring genuine careful human prose low because it is formal or clean is this check's worst failure.
151
161
 
152
162
  ## Tone
@@ -78,7 +78,7 @@ Continuity check: 1 warning
78
78
  Proceeding with export. Review full reports after completion.
79
79
  ```
80
80
 
81
- **Quality gate policy (D-09):** Always proceed to the export pipeline regardless of quality gate results. The quality gate is advisory -- it gives the writer information, not a veto. Even if voice check scores FAIL (below 60) or continuity check finds major contradictions, log the warnings and continue.
81
+ **Quality gate policy (D-09):** The quality gate is advisory and never blocks. Always proceed to the export pipeline, including when the voice check or continuity check finds problems. autopilot-publish is the unattended path: it does not stop to ask the writer and it does not abort the run. The gate exists to make problems visible, not to veto. One case gets extra visibility: when the voice score is below 60 (the voice-checker's "Reads AI-generated / do not proceed" band), flag it prominently in the quality-gate summary, write the full voice-check report to the output directory, and list it as the top issue in the final completion report with an explicit recommendation to re-draft the flagged units before publishing. Still finish the export so the run stays unattended; the writer decides whether to publish the package or re-draft after reading the report.
82
82
 
83
83
  ---
84
84
 
@@ -56,8 +56,8 @@ RTL_LANGUAGES = ["ar", "he", "ur", "fa", "yi", "ps", "sd"]
56
56
  CJK_LANGUAGES = ["zh", "ja", "ko"]
57
57
  ```
58
58
 
59
- - RTL languages receive `--text-direction rtl` when passed to export commands
60
- - CJK languages receive appropriate font and spacing flags
59
+ - RTL languages: `/scr:multi-publish` derives text direction from the language code, so no extra flag is needed
60
+ - CJK languages: `/scr:multi-publish` applies CJK font and spacing handling from the language code
61
61
  - All other languages default to LTR
62
62
 
63
63
  Log the detection:
@@ -123,9 +123,8 @@ Log drift annotation counts:
123
123
 
124
124
  If `--skip-publish` is NOT set:
125
125
  - Determine text direction for this language (RTL/LTR/CJK from Step 2)
126
- - Run `/scr:multi-publish --language {lang}` for all available export formats
127
- - For RTL languages, pass `--text-direction rtl` to ensure correct PDF and EPUB output
128
- - For CJK languages, pass `--cjk-mode` to enable CJK-specific line breaking and font handling
126
+ - Run `/scr:multi-publish --languages {lang}` for all available export formats
127
+ - RTL and CJK output is handled automatically: `/scr:multi-publish` sets text direction and CJK line breaking from the language code, so no extra flags are required
129
128
 
130
129
  If `--skip-publish` IS set:
131
130
  - Log: `"[fr] Phase 6/6: Multi-publish skipped (--skip-publish)."`
@@ -209,7 +208,7 @@ Next Steps:
209
208
 
210
209
  - **NEVER** skip the glossary phase -- term consistency across the manuscript depends on it
211
210
  - **NEVER** run cultural adaptation before translation is complete for that language
212
- - **NEVER** export RTL languages without setting `--text-direction rtl` -- the PDF and EPUB will be unreadable
211
+ - **ALWAYS** confirm the language code is correct before export; `/scr:multi-publish` uses it to set RTL direction and CJK handling, and a wrong code yields unreadable PDF and EPUB
213
212
  - **NEVER** continue past a blocking error without logging it -- all errors must appear in the completion summary
214
213
  - **NEVER** modify the source manuscript -- translation works on copies in `.manuscript/translation/{lang}/`
215
214
 
@@ -38,7 +38,7 @@ FOR each unit in OUTLINE.md (starting from current position):
38
38
  If writer says "skip": advance to next unit, update STATE.md
39
39
  ```
40
40
 
41
- When the loop completes (all units through all stages), show a completion summary: total units, total word count, voice consistency across the manuscript, open record threads or promises, and any flags or issues encountered.
41
+ When the loop completes (all units through all stages), show a completion summary: total units, total word count, voice consistency across the manuscript, open record threads or promises, any flags or issues encountered, and a pointer to the per-unit ledger at `.manuscript/PROGRESS.md`.
42
42
 
43
43
  ## Profile rules
44
44
 
@@ -88,7 +88,7 @@ The writer trusts the pipeline. Autopilot runs until the entire manuscript is co
88
88
  **Pause behavior:** Run until ALL units are complete. Pause ONLY on these conditions:
89
89
 
90
90
  1. **Continuity contradiction** the agent cannot resolve (e.g., a character is in two places at once, a previously established fact is contradicted)
91
- 2. **Voice drift** exceeding `config.voice.drift_threshold` (default 0.3). After each unit, compare the drafted prose against STYLE-GUIDE.md. If drift exceeds threshold, pause.
91
+ 2. **Voice drift** exceeding `config.voice.drift_threshold` (default 0.3). After each unit, run the voice-checker agent against STYLE-GUIDE.md to get an Overall score (0-100). Compute normalized drift as `drift = (100 - score) / 100` (see the "Normalized drift" section of `voice-checker.md`) and pause when `drift` exceeds the threshold -- at the default 0.3 that means a voice score below 70, the voice-checker's FAIL band.
92
92
  3. **Plot hole** with no clear resolution path (e.g., a setup with no payoff, a character motivation gap)
93
93
  4. **Missing critical information** that prevents drafting (character motivation gap, setting inconsistency, unresolved plot dependency)
94
94
  5. **Record drift** against `.manuscript/RECORD.md` that the agent cannot resolve safely (e.g., a promised payoff is contradicted, an open thread is closed without being recorded, or a next-unit obligation is skipped)
@@ -108,7 +108,7 @@ The writer trusts the pipeline. Autopilot runs until the entire manuscript is co
108
108
  **On completion:** Show a comprehensive summary:
109
109
  - Total units drafted
110
110
  - Total word count
111
- - Voice consistency score across the manuscript
111
+ - Voice consistency: the voice-checker Overall score (0-100), averaged across the units that were voice-checked during the run
112
112
  - Open record threads, reader promises, and unresolved next-unit obligations from RECORD.md
113
113
  - Any flags or issues encountered during the run
114
114
  - List of any quality gate pauses that occurred and how they were resolved
@@ -141,6 +141,7 @@ After each stage execution:
141
141
  2. Update progress counters: `units_discussed`, `units_planned`, `units_drafted`, `units_reviewed`, `units_submitted`
142
142
  3. Update `current_unit` and next step
143
143
  4. Update `total_words` running count
144
+ 5. Refresh `.manuscript/PROGRESS.md` so the openable ledger advances unit by unit during the run, per `docs/progress-protocol.md`
144
145
 
145
146
  On pause or stop:
146
147
  1. Write current position to "Session handoff" section so `--resume` can pick up exactly where you left off
@@ -168,6 +169,7 @@ Spawned agents:
168
169
  - continuity-checker: {count}
169
170
  Local operations:
170
171
  - STATE.md updated: yes/no
172
+ - PROGRESS.md refreshed: yes/no
171
173
  - HISTORY.log updated: yes/no
172
174
  Pause:
173
175
  - status: none/guided/supervised/quality-gate/blocker
@@ -201,11 +203,13 @@ If the command stops because a prerequisite is missing, suggest the command that
201
203
 
202
204
  ## Tone
203
205
 
204
- **Progress updates:** Concise, one line per unit.
205
- - "Drafted chapter 3: 1,247 words. Voice check: passed."
206
+ **Progress updates:** Concise, one line per unit, anchored to the whole manuscript so progress is visible during the run.
207
+ - "Drafted chapter 3 (3 of 12, 25%): 1,247 words. Voice check: passed."
206
208
  - "Planned scenes 1-4 for chapter 5."
207
209
  - "Editor review complete for chapter 2: 3 notes."
208
210
 
211
+ Every few units, show a one-line manuscript bar pulled from the deliverable progress in `docs/progress-protocol.md`, for example: `████░░░░░░ 5/12 chapters done (42%)`. The full per-unit ledger is `.manuscript/PROGRESS.md`.
212
+
209
213
  **At pause points:** Warm, non-technical.
210
214
  - "Chapter 3 is ready for your review."
211
215
  - "The first act is complete -- 4 chapters, 12,340 words."
@@ -223,7 +227,7 @@ If the command stops because a prerequisite is missing, suggest the command that
223
227
 
224
228
  - **NEVER** run without updating STATE.md -- resume depends on accurate state
225
229
  - **NEVER** show raw git output in writer mode (when `developer_mode` is `false`)
226
- - **NEVER** skip the voice comparison after drafting -- even if the voice-check command from Phase 4 is not yet available, use the drafter's built-in self-check (Step 4 in drafter.md)
230
+ - **NEVER** skip the voice comparison after drafting -- run the voice-checker agent against STYLE-GUIDE.md; if the host runtime cannot spawn it, fall back to the drafter's built-in self-check (Step 4 in drafter.md)
227
231
  - **NEVER** re-draft a unit that STATE.md shows as already submitted -- submitted means the writer approved it
228
232
  - **NEVER** skip stages in the chain (discuss-plan-draft-review-submit) unless the writer explicitly says "skip"
229
233
  - **NEVER** continue past a quality gate pause in full-auto without writer input -- the whole point is that these are conditions the pipeline cannot resolve alone
@@ -1,10 +1,13 @@
1
1
  ---
2
- description: Simulate a beta reader's experience of the manuscript with cross-AI peer review.
2
+ description: Simulate a beta reader's experience of the manuscript using a fresh-context reader persona.
3
+ argument-hint: "[N] [--focus <area>]"
3
4
  ---
4
5
 
5
- # /scr:beta-reader -- Cross-AI Peer Review
6
+ # /scr:beta-reader -- Reader-Perspective Review
6
7
 
7
- Simulate a beta reader's experience of the manuscript.
8
+ Simulate a beta reader's experience of the manuscript using a fresh-context reader persona.
9
+
10
+ This command simulates an independent reader in a fresh context using the same model, not a second or external AI. Genuine cross-AI review would require an external CLI call that Scriveno does not currently wire.
8
11
 
9
12
  ## Usage
10
13
  ```
@@ -153,7 +153,7 @@ Apply tradition data to `.manuscript/output/metadata.yaml` (before STEP 3f write
153
153
  - `tibetan` script -> `bo`
154
154
  - `devanagari` script -> `sa` (Sanskrit)
155
155
  - `latin` script -> use the project language from config.json (default `en`)
156
- - Set `font-family:` to the first entry in the manifest's `font_stack`.
156
+ - Set `mainfont:` to the first entry in the manifest's `font_stack`. (For the EPUB itself the non-Latin font is applied through `scriveno-epub.css`; `mainfont` keeps the metadata key aligned with the print build.)
157
157
 
158
158
  If `rtl: true` in the manifest, add `--metadata dir=rtl` to the Pandoc invocation in STEP 4.
159
159
 
@@ -156,7 +156,7 @@ Apply tradition data to `.manuscript/output/metadata.yaml` (before STEP 3f write
156
156
  - `tibetan` script -> `bo`
157
157
  - `devanagari` script -> `sa` (Sanskrit)
158
158
  - `latin` script -> use the project language from config.json (default `en`)
159
- - Set `font-family:` to the first entry in the manifest's `font_stack`.
159
+ - Set `mainfont:` to the first entry in the manifest's `font_stack`. (`mainfont` is the Pandoc variable the Typst book/chapbook templates read for the body font; `font-family` is not.)
160
160
 
161
161
  If `rtl: true` in the manifest, add `--metadata dir=rtl` to the Pandoc invocation in STEP 4.
162
162
 
@@ -415,7 +415,7 @@ estimated_pages = Math.round(word_count / manifest.trim_sizes[trim].wpp)
415
415
 
416
416
  Compare against `manifest.max_pages`:
417
417
  - For paperback: compare against `manifest.max_pages.paperback`
418
- - For hardcover: only KDP hardcover applies -- compare against `manifest.max_pages.hardcover` only if `--hardcover` flag is passed (otherwise use paperback limit)
418
+ - For hardcover: the hardcover page limit applies to KDP only. Compare against `manifest.max_pages.hardcover` only if `--hardcover` was passed AND the platform is `kdp` AND the manifest defines `max_pages.hardcover`. For any other platform (for example `ingram`, which defines only `max_pages.paperback`), ignore `--hardcover` for the page-limit check and use `manifest.max_pages.paperback`.
419
419
 
420
420
  If `estimated_pages` exceeds the limit:
421
421
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Automated continuity verification to scan for narrative contradictions across the manuscript.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:continuity-check -- Scan for Narrative Contradictions
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Perform a correctness pass for grammar, spelling, punctuation, and consistency.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:copy-edit -- Grammar and Correctness Pass
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Audit dialogue for character voice differentiation, attribution clarity, and talking-head detection.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:dialogue-audit -- Character Dialogue Quality Audit
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Generate reading group discussion questions exploring themes, characters, and craft.
3
+ argument-hint: "[--count <N>]"
3
4
  ---
4
5
 
5
6
  # /scr:discussion-questions -- Reading Group Discussion Questions
@@ -35,7 +35,7 @@ Require `.manuscript/plans/{N}-*-PLAN.md` files to exist. If none exist, also ch
35
35
 
36
36
  3. **Save drafted output** to `.manuscript/drafts/body/{N}-{A}-DRAFT.md`.
37
37
 
38
- 4. **After all atomic units in the unit are drafted, do a voice-check pass.** Load the full drafted unit, compare against STYLE-GUIDE.md, flag any scenes that drift from the voice profile by more than the configured threshold. If drift is detected, offer to re-draft the problem scenes.
38
+ 4. **After all atomic units in the unit are drafted, run a voice-check pass.** Invoke the installed `voice-checker.md` agent in a fresh context on the drafted unit -- the same agent `/scr:voice-check` uses. It loads the unit and STYLE-GUIDE.md and returns an Overall score (0-100). Convert to normalized drift (`drift = (100 - score) / 100`; see the "Normalized drift" section of `voice-checker.md`) and, if drift exceeds `config.voice.drift_threshold` (default 0.3, i.e. a voice score below 70), flag the scenes that drove the score down and offer to re-draft them. If the host runtime cannot spawn the voice-checker, fall back to the drafter's built-in self-check (Step 4 in `drafter.md`) and say so in the status block.
39
39
 
40
40
  5. **Update RECORD.md.** After drafting, extract what the new draft establishes on page. Update `.manuscript/RECORD.md` with only durable, reader-visible changes:
41
41
  - established facts, claims, events, definitions, procedures, objects, relationships, or constraints
@@ -49,9 +49,9 @@ Require `.manuscript/plans/{N}-*-PLAN.md` files to exist. If none exist, also ch
49
49
 
50
50
  6. **Surface state nudges.** If the drafter emits `CHARACTER STATE NUDGE`, suggest `/scr:character-touch <name>` after drafting. If the drafter emits `SUBJECT DYNAMICS NUDGE`, suggest `/scr:subject-touch <subject>` after drafting. These nudges go to the writer, not into the draft file.
51
51
 
52
- 7. **Update STATE.md:** mark unit as drafted, note word count, flag any voice-check issues.
52
+ 7. **Update STATE.md:** mark unit as drafted, note word count, flag any voice-check issues. Then refresh `.manuscript/PROGRESS.md` so the ledger advances (this unit moves to in progress or done) per `docs/progress-protocol.md`.
53
53
 
54
- 8. **Tell the writer:** "Drafted {unit} {N}: X words across Y {atomic_units}. Voice consistency: Z%. Updated RECORD.md with what the draft established. Ready for editor review? Run `/scr:editor-review N` or `/scr:next`."
54
+ 8. **Tell the writer:** "Drafted {unit} {N} ({N} of {total}, {pct}% of the manuscript): X words across Y {atomic_units}. Voice consistency: Z% (the voice-checker Overall score for this unit; omit this figure if the voice-check could not run). Updated RECORD.md with what the draft established. Ready for editor review? Run `/scr:editor-review N` or `/scr:next`." The full per-unit ledger is in `.manuscript/PROGRESS.md`.
55
55
 
56
56
  ## Agent and Automation Status
57
57
 
@@ -67,6 +67,7 @@ Local operations:
67
67
  - draft files written: {count}
68
68
  - RECORD.md updated: yes/no
69
69
  - STATE.md updated: yes/no
70
+ - PROGRESS.md refreshed: yes/no
70
71
  Auto-invoked:
71
72
  - /scr:editor-review N: yes/no
72
73
  Why: {autopilot.enabled true, full-auto profile, supervised pause, or writer-facing manual mode}
@@ -113,6 +114,6 @@ If the command stops because a prerequisite is missing, suggest the command that
113
114
 
114
115
  ## Tone
115
116
 
116
- Don't narrate each atomic unit being drafted. That's noise. Show progress concisely: "Drafted scene 1/4... 2/4... 3/4... 4/4. Voice check: passed."
117
+ Don't narrate each atomic unit being drafted. That's noise. Show progress concisely, and anchor it to the whole manuscript so the writer sees momentum: "Drafted scene 1/4... 2/4... 3/4... 4/4. Voice check: passed. Chapter 5 of 12 done (42%)." Pull the unit-of-total figure and percent from the deliverable progress defined in `docs/progress-protocol.md`.
117
118
 
118
119
  Let the writer read the actual prose in the draft files. Your job is orchestration, not performance.
@@ -168,6 +168,7 @@ Write the standard review report to `.manuscript/reviews/{N}-REVIEW.md`. If an o
168
168
 
169
169
  If all beats passed:
170
170
  - Mark act as "reviewed" in STATE.md
171
+ - Refresh `.manuscript/PROGRESS.md` so the ledger reflects the new review status, per `docs/progress-protocol.md`
171
172
  - Apply confirmed compact updates to RECORD.md when the review established or corrected the work's durable content state
172
173
  - Suggest moving to `/scr:submit N` or `/scr:discuss {N+1}`
173
174
 
@@ -341,7 +341,7 @@ title: "[title from config.json]"
341
341
  subtitle: "[subtitle if available]"
342
342
  author:
343
343
  - name: "[author from config.json]"
344
- language: "[language from config.json, default en-US]"
344
+ lang: "[language from config.json, default en-US]"
345
345
  rights: "Copyright [year] [author]. All rights reserved."
346
346
  date: "[current year]"
347
347
  description: "[description if available]"
@@ -34,7 +34,7 @@ You are helping the user navigate Scriveno commands. Load Scriveno's installed/s
34
34
 
35
35
  ## The "getting started" view (no project yet)
36
36
 
37
- Ask the user what they want to do. Don't list 170 commands -- show them this:
37
+ Ask the user what they want to do. Don't list all 113 commands -- show them this:
38
38
 
39
39
  ```
40
40
  Scriveno -- ready to start.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Perform a line-level prose quality pass with inline annotations.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:line-edit -- Line-Level Prose Quality Pass
@@ -94,17 +94,17 @@ If the user passes `--detail`, append a per-unit breakdown table after the summa
94
94
  ```
95
95
  Unit Breakdown
96
96
  --------------
97
- Ch 1: The Beginning 3,200 words ~13 pages
98
- Ch 2: The Middle 4,100 words ~16 pages
99
- Ch 3: The Climax 2,800 words ~11 pages
100
- (not yet drafted)
101
- Ch 4: The Resolution --- words --- pages
97
+ Ch 1: The Beginning [x] done 3,200 words ~13 pages
98
+ Ch 2: The Middle [x] done 4,100 words ~16 pages
99
+ Ch 3: The Climax [~] in progress 2,800 words ~11 pages
100
+ Ch 4: The Resolution [ ] untouched --- words --- pages
102
101
  --------------
103
- Total 10,100 words ~40 pages
102
+ Total 10,100 words ~40 pages
104
103
  ```
105
104
 
106
105
  - Use the hierarchy's mid-level label (e.g., "Ch" for chapter, "Sc" for scene, "Sec" for section) from CONSTRAINTS.json.
107
- - For units not yet drafted, show `(not yet drafted)` with dashes for counts.
106
+ - Show each unit's status (`[x]` done, `[~]` in progress, `[ ]` untouched) derived from disk per `docs/progress-protocol.md`. The full per-unit ledger lives in `.manuscript/PROGRESS.md`.
107
+ - For units not yet drafted, show dashes for counts.
108
108
  - Right-align word counts and page counts for visual clarity.
109
109
  - Include a total row at the bottom.
110
110
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Spawn parallel analysis agents to understand an existing manuscript's voice, structure, characters, and themes.
3
+ argument-hint: "[area]"
3
4
  ---
4
5
 
5
6
  # /scr:map-manuscript -- Analyze Existing Manuscript
@@ -199,7 +199,7 @@ Determine text direction from language code:
199
199
 
200
200
  Set the appropriate direction for Pandoc and Typst output:
201
201
  - Pandoc: `--variable dir=rtl` or `--variable dir=ltr`
202
- - Typst: Uses `text-dir` parameter (already prepared in Phase 5 template)
202
+ - Typst: the book interior template reads the Pandoc `dir` variable set above to orient text
203
203
 
204
204
  #### 5d. Number Formatting
205
205
 
@@ -238,7 +238,7 @@ title: "[translated title]"
238
238
  subtitle: "[translated subtitle]"
239
239
  author:
240
240
  - name: "[author name]"
241
- language: "[lang code]"
241
+ lang: "[lang code]"
242
242
  dir: "[ltr or rtl]"
243
243
  rights: "Copyright [year] [author]. [Translated rights statement]."
244
244
  date: "[current year]"
@@ -274,6 +274,7 @@ pandoc .manuscript/translation/{lang}/assembled-manuscript.md \
274
274
  pandoc .manuscript/translation/{lang}/assembled-manuscript.md \
275
275
  -o .manuscript/output/translations/{lang}/manuscript-{lang}.pdf \
276
276
  --pdf-engine=typst \
277
+ --template=data/export-templates/scriveno-book.typst \
277
278
  --metadata-file=.manuscript/translation/{lang}/metadata.yaml \
278
279
  --toc --toc-depth=1 \
279
280
  -V dir={ltr|rtl}
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Build a complete character profile through guided interactive interview.
3
+ argument-hint: "<name>"
3
4
  ---
4
5
 
5
6
  # /scr:new-character -- Interactive Character Creation
@@ -69,7 +69,7 @@ Always create `RECORD.md` from `templates/RECORD.md` without renaming it. It is
69
69
  Write `.manuscript/config.json` by starting from `templates/config.json` and filling the project-specific values. The generated config must include the shared settings blocks that later commands read:
70
70
  ```json
71
71
  {
72
- "scriveno_version": "2.5.0",
72
+ "scriveno_version": "2.7.1",
73
73
  "work_type": "<chosen>",
74
74
  "group": "<group>",
75
75
  "command_unit": "<unit>",
@@ -62,6 +62,7 @@ Proactive checks:
62
62
  Translation: <none | follow-up available>
63
63
  Export: <fresh | stale, suggest /scr:export>
64
64
  Save: <clean | unsaved manuscript changes, suggest /scr:save>
65
+ Progress: <X/Y units done -- see .manuscript/PROGRESS.md or /scr:progress>
65
66
  ```
66
67
 
67
68
  ## Routing logic
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Scan drafted prose for AI-generated patterns and unintentional similarity to published works.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:originality-check -- AI Pattern & Similarity Scan
@@ -22,7 +22,7 @@ You are an outline manager. Load:
22
22
  - `.manuscript/config.json` (to get `work_type`)
23
23
  - Scriveno's installed/shared `CONSTRAINTS.json` (global `~/.scriveno/data/CONSTRAINTS.json` or project `.scriveno/data/CONSTRAINTS.json`) (to check `work_types[type].hierarchy` for unit labels, and `file_adaptations`)
24
24
  - `.manuscript/OUTLINE.md` (the outline data -- read it fully)
25
- - `.manuscript/STATE.md` (to get drafted/planned/pending status per unit)
25
+ - `.manuscript/STATE.md` (aggregate counters) plus each unit's files on disk (plans, drafts, reviews) to derive per-unit status -- see `docs/progress-protocol.md`. The persisted per-unit ledger is `.manuscript/PROGRESS.md` when present.
26
26
 
27
27
  **Work-type adaptation:** Read the hierarchy from CONSTRAINTS.json for the current work type to determine the correct unit terminology:
28
28
  - Novel: part > chapter > scene
@@ -56,7 +56,7 @@ Present the hierarchical outline with:
56
56
  2. **For each unit, show:**
57
57
  - Unit number and title
58
58
  - 1-line summary (from OUTLINE.md)
59
- - Status: drafted | planned | pending (from STATE.md)
59
+ - Status: drafted | planned | pending (derived from disk per `docs/progress-protocol.md`, not from STATE.md aggregates)
60
60
  - Word count (if drafted, from STATE.md or draft file)
61
61
  - Arc position (if mapped in PLOT-GRAPH.md)
62
62
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Generate a structure-aware pacing report analyzing scene tempo and narrative flow.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:pacing-analysis -- Structure-Aware Pacing Report
@@ -33,7 +33,7 @@ You are helping the writer pause their session gracefully. Your job is to captur
33
33
  - Outcome: `Paused session`
34
34
  Keep this pause marker in the Last actions table because `/scr:session-report` and future resume logic use it as a session boundary.
35
35
 
36
- 6. **Regenerate `.manuscript/CONTEXT.md`** using the `templates/CONTEXT.md` scaffold and the field set described in `/scr:save` step 7, with `{{LAST_COMMAND}}` set to `/scr:pause-work`. This is the file the next session reads first; refreshing it on pause means the writer (or a fresh AI session) returns to a current view without having to call `/scr:resume-work` to bootstrap.
36
+ 6. **Regenerate `.manuscript/CONTEXT.md`** using the `templates/CONTEXT.md` scaffold and the field set described in `/scr:save` step 7, with `{{LAST_COMMAND}}` set to `/scr:pause-work`. This is the file the next session reads first; refreshing it on pause means the writer (or a fresh AI session) returns to a current view without having to call `/scr:resume-work` to bootstrap. Also regenerate `.manuscript/PROGRESS.md` (the per-unit progress ledger) per `/scr:save` step 8 and `docs/progress-protocol.md`, so the saved ledger matches where the writer is pausing.
37
37
 
38
38
  7. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
39
39
  ```
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Chain line-edit, copy-edit, and voice-check for comprehensive prose polish.
3
+ argument-hint: "[N]"
3
4
  ---
4
5
 
5
6
  # /scr:polish -- Comprehensive Prose Polish
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Show current project state and next step. How far along, what is drafted, what is pending.
2
+ description: Show project progress -- a unit progress bar, what is done / in progress / untouched, pipeline position, and a pointer to the per-unit ledger.
3
3
  argument-hint: ""
4
4
  ---
5
5
 
@@ -18,7 +18,7 @@ node "$HOME/.scriveno/lib/auto-invoke-engine.js" --project "$PWD" --trigger /scr
18
18
  node .scriveno/lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:progress
19
19
  ```
20
20
 
21
- This engine is installed into Scriveno shared assets for every runtime, including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and the generic skill fallback. If the engine is not present, perform the read-only progress logic below.
21
+ This engine is installed into Scriveno shared assets for every runtime, including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and the generic skill fallback. The engine exposes `computeProgressLedger(manuscriptDir)` (see `lib/auto-invoke-engine.js` and `docs/progress-protocol.md`), which returns the deliverable bar, percent, and the done / in progress / untouched bucket counts deterministically from disk; a runtime that loads the module should prefer it over re-deriving counts by hand. If the engine is not present, perform the read-only progress logic below.
22
22
 
23
23
  ## Prerequisites
24
24
 
@@ -26,15 +26,19 @@ This engine is installed into Scriveno shared assets for every runtime, includin
26
26
 
27
27
  ## What to do
28
28
 
29
- 1. Load `.manuscript/STATE.md`, `.manuscript/OUTLINE.md`, `.manuscript/RECORD.md` when present, and `.manuscript/config.json`
30
- 2. Count total units, drafted units, submitted units, and pending units
31
- 3. Calculate word count from existing draft files
32
- 4. Determine the next step (what unit to discuss, plan, or draft next)
33
- 5. Display a progress summary:
34
- - "{drafted}/{total} units drafted. {submitted}/{total} submitted."
29
+ 1. Load `.manuscript/STATE.md`, `.manuscript/OUTLINE.md`, `.manuscript/config.json`, and `.manuscript/RECORD.md` when present. Read `.manuscript/PROGRESS.md` if it exists -- it is the saved ledger snapshot.
30
+ 2. Derive per-unit status from disk per `docs/progress-protocol.md`: for each outline unit, resolve its stage (untouched / discussed / planned / drafted / reviewed / submitted) and its headline bucket (done / in progress / untouched). Count units in each bucket plus the total, and calculate word count from existing draft files.
31
+ 3. Determine the pipeline position: the first incomplete stage on the writing lifecycle `seed > voice > outline > discuss > plan > draft > review > revise > publish > translate`, expressed as `Stage {index} of {total}: {Name}`.
32
+ 4. Determine the next step (what unit to discuss, plan, or draft next), using the work type's unit label from CONSTRAINTS.json (chapter, act, surah, section, and so on).
33
+ 5. Display the progress report, leading with the deliverable view:
34
+ - A progress bar over units, for example `████████░░ 4/5 scenes done (80%)` (block characters `U+2588` filled and `U+2591` empty; use the work type's plural unit label).
35
+ - "Done: {done} In progress: {in_progress} Untouched: {untouched}."
35
36
  - "{word_count} words so far."
37
+ - "Pipeline: Stage {index} of {total} ({stage_name})."
36
38
  - "{open_threads} open record threads." (only when RECORD.md exists)
37
39
  - "Next: {next_action}"
40
+ - "Full per-unit ledger: `.manuscript/PROGRESS.md`" -- the file the writer can open any time to see every unit's status. If it is missing or older than the newest draft, add: "(run `/scr:save` to refresh the saved ledger)".
41
+ When the project is small (20 units or fewer) or the writer asks, render the per-unit ledger table inline per `docs/progress-protocol.md` instead of only pointing at the file.
38
42
  6. Run the Level 1 proactive sweep:
39
43
  - If STATE.md counts disagree with draft files, suggest `/scr:scan`.
40
44
  - If reports show unresolved review items, suggest the matching review command.
@@ -55,14 +59,15 @@ Candidate agents:
55
59
  - <recommended agent route or none>
56
60
  Local operations:
57
61
  - progress counts computed: yes/no
62
+ - per-unit ledger rendered: yes/no
58
63
  - proactive sweep: read-only
59
64
  Candidate local helpers:
60
- - <recommended helper or none>
65
+ - /scr:save to refresh the saved .manuscript/PROGRESS.md when it is stale
61
66
  Manual gates:
62
67
  - <writer-owned route or none>
63
68
  Auto-invoked:
64
69
  - none
65
- Why: progress is read-only; it recommends next commands without mutating files
70
+ Why: progress is read-only; it renders the ledger live and points at .manuscript/PROGRESS.md without writing it
66
71
  ```
67
72
 
68
73
  ## Response Contract
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Write a scene, passage, or chapter outside the full planning workflow.
3
+ argument-hint: "[--discuss] [--research] [--full]"
3
4
  ---
4
5
 
5
6
  # /scr:quick-write -- Ad-Hoc Writing Without Full Planning
@@ -18,7 +19,7 @@ Write a scene, passage, or chapter outside the full planning workflow.
18
19
 
19
20
  ## Instruction
20
21
 
21
- Quick write gives you Scriveno guarantees (continuity tracking, voice consistency, atomic commits) with a faster path.
22
+ Quick write is the fast path. It loads STYLE-GUIDE.md, drafts in the current conversation context (not a fresh per-unit context), and commits atomically. It runs continuity and voice checks only when you pass `--full`. For voice-critical work, prefer `/scr:draft`, which drafts each unit in a fresh context and always runs a voice-check.
22
23
 
23
24
  ### STEP 1: GATHER INTENT
24
25
 
@@ -49,6 +50,8 @@ If the host runtime cannot spawn a focused researcher, run the research pass in
49
50
 
50
51
  Write the passage following all established style guide constraints. Target whatever length feels natural unless the writer specified a target.
51
52
 
53
+ Quick-write drafts in the current conversation context rather than spawning the drafter in a fresh per-unit context; this trades some voice isolation for speed. When fresh-context voice fidelity matters, use `/scr:draft` instead.
54
+
52
55
  ### STEP 4: VERIFY (if --full)
53
56
 
54
57
  Run continuity and voice checks against existing manuscript.
@@ -46,7 +46,7 @@ You are welcoming the writer back and orienting them. Your job is to read the se
46
46
  Example:
47
47
  > Last time you drafted chapter 3 (1,247 words across 4 scenes, voice check passed). You were working on chapter 4 -- you noted you wanted it shorter and more tense, with Marcus discovering the letter. I'd suggest starting with /scr:discuss 4 to shape the plan.
48
48
 
49
- 6. **Regenerate `.manuscript/CONTEXT.md`** using the `templates/CONTEXT.md` scaffold and the same field set described in `/scr:save` step 7, with `{{LAST_COMMAND}}` set to `/scr:resume-work`. This refreshes the bootstrap file so the next session opens to a current view -- the act of resuming is itself a state event worth recording.
49
+ 6. **Regenerate `.manuscript/CONTEXT.md`** using the `templates/CONTEXT.md` scaffold and the same field set described in `/scr:save` step 7, with `{{LAST_COMMAND}}` set to `/scr:resume-work`. This refreshes the bootstrap file so the next session opens to a current view -- the act of resuming is itself a state event worth recording. Also regenerate `.manuscript/PROGRESS.md` (the per-unit progress ledger) per `/scr:save` step 8 and `docs/progress-protocol.md`.
50
50
 
51
51
  7. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
52
52
  ```
@@ -56,20 +56,22 @@ Follow the auto-invoke policy. In the source repository it is documented at `doc
56
56
  - `{{LAST_SCAN}}`, `{{LAST_SCAN_VERDICT}}` -- from STATE.md if recorded; otherwise `never run` and `unknown`
57
57
  Save to `.manuscript/CONTEXT.md`. This file is committed alongside STATE.md.
58
58
 
59
- 8. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
59
+ 8. **Regenerate `.manuscript/PROGRESS.md`** before staging. This is the openable per-unit progress ledger. Use the `templates/PROGRESS.md` scaffold and derive per-unit status from disk per `docs/progress-protocol.md` (plan, draft, and review files reconciled with STATE.md). Fill the unit ledger, the deliverable progress bar, the pipeline position, and the bucket counts (done / in progress / untouched). Save to `.manuscript/PROGRESS.md`; it is committed alongside STATE.md and CONTEXT.md.
60
+
61
+ 9. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
60
62
  ```
61
63
  {ISO timestamp} | scr:save | message="{generated message}" | files={changed file count} | outcome=committed
62
64
  ```
63
65
  If HISTORY.log does not exist, create it. Do not stage it as a separate operation -- step 9 picks it up.
64
66
 
65
- 9. **Execute the save:**
67
+ 10. **Execute the save:**
66
68
  ```
67
69
  git add .manuscript/
68
70
  git commit -m "{generated message}"
69
71
  ```
70
- This commit must include the `STATE.md`, `CONTEXT.md`, and `HISTORY.log` updates from steps 6 through 8 so the worktree is clean immediately after a successful save.
72
+ This commit must include the `STATE.md`, `CONTEXT.md`, `PROGRESS.md`, and `HISTORY.log` updates from steps 6 through 9 so the worktree is clean immediately after a successful save.
71
73
 
72
- 10. **Tell the writer** the result (see output section below).
74
+ 11. **Tell the writer** the result (see output section below).
73
75
 
74
76
  ## Automation Status
75
77
 
@@ -85,6 +87,7 @@ Candidate agents:
85
87
  Local operations:
86
88
  - STATE.md updated: yes/no
87
89
  - CONTEXT.md regenerated: yes/no
90
+ - PROGRESS.md regenerated: yes/no
88
91
  - HISTORY.log appended: yes/no
89
92
  - manuscript files saved: yes/no
90
93
  Candidate local helpers: