scriveno 2.0.5

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 (239) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +222 -0
  3. package/agents/continuity-checker.md +85 -0
  4. package/agents/drafter.md +248 -0
  5. package/agents/plan-checker.md +209 -0
  6. package/agents/researcher.md +114 -0
  7. package/agents/translator.md +204 -0
  8. package/agents/voice-checker.md +154 -0
  9. package/bin/install.js +1620 -0
  10. package/commands/scr/add-note.md +51 -0
  11. package/commands/scr/add-unit.md +101 -0
  12. package/commands/scr/art-direction.md +225 -0
  13. package/commands/scr/autopilot-publish.md +210 -0
  14. package/commands/scr/autopilot-translate.md +237 -0
  15. package/commands/scr/autopilot.md +200 -0
  16. package/commands/scr/back-matter.md +630 -0
  17. package/commands/scr/back-translate.md +197 -0
  18. package/commands/scr/beta-reader.md +97 -0
  19. package/commands/scr/blurb.md +149 -0
  20. package/commands/scr/book-proposal.md +210 -0
  21. package/commands/scr/build-ebook.md +448 -0
  22. package/commands/scr/build-poetry-submission.md +202 -0
  23. package/commands/scr/build-print.md +598 -0
  24. package/commands/scr/build-smashwords.md +171 -0
  25. package/commands/scr/build-world.md +158 -0
  26. package/commands/scr/cast-list.md +104 -0
  27. package/commands/scr/chapter-header.md +158 -0
  28. package/commands/scr/character-arc.md +108 -0
  29. package/commands/scr/character-ref.md +160 -0
  30. package/commands/scr/character-sheet.md +143 -0
  31. package/commands/scr/character-touch.md +157 -0
  32. package/commands/scr/character-voice-sample.md +111 -0
  33. package/commands/scr/check-notes.md +50 -0
  34. package/commands/scr/cleanup.md +159 -0
  35. package/commands/scr/compare.md +112 -0
  36. package/commands/scr/complete-draft.md +49 -0
  37. package/commands/scr/continuity-check.md +129 -0
  38. package/commands/scr/copy-edit.md +118 -0
  39. package/commands/scr/cover-art.md +382 -0
  40. package/commands/scr/cultural-adaptation.md +177 -0
  41. package/commands/scr/demo.md +93 -0
  42. package/commands/scr/dialogue-audit.md +143 -0
  43. package/commands/scr/discuss.md +118 -0
  44. package/commands/scr/discussion-questions.md +129 -0
  45. package/commands/scr/do.md +68 -0
  46. package/commands/scr/draft.md +97 -0
  47. package/commands/scr/editor-review.md +466 -0
  48. package/commands/scr/export.md +942 -0
  49. package/commands/scr/fast.md +65 -0
  50. package/commands/scr/front-matter.md +696 -0
  51. package/commands/scr/health.md +113 -0
  52. package/commands/scr/help.md +121 -0
  53. package/commands/scr/history.md +92 -0
  54. package/commands/scr/illustrate-scene.md +211 -0
  55. package/commands/scr/import.md +95 -0
  56. package/commands/scr/insert-unit.md +108 -0
  57. package/commands/scr/line-edit.md +146 -0
  58. package/commands/scr/manager.md +77 -0
  59. package/commands/scr/manuscript-stats.md +139 -0
  60. package/commands/scr/map-illustration.md +213 -0
  61. package/commands/scr/map-manuscript.md +134 -0
  62. package/commands/scr/merge-units.md +136 -0
  63. package/commands/scr/multi-publish.md +344 -0
  64. package/commands/scr/new-character.md +167 -0
  65. package/commands/scr/new-revision.md +50 -0
  66. package/commands/scr/new-work.md +148 -0
  67. package/commands/scr/next.md +125 -0
  68. package/commands/scr/originality-check.md +170 -0
  69. package/commands/scr/outline.md +131 -0
  70. package/commands/scr/pacing-analysis.md +170 -0
  71. package/commands/scr/panel-layout.md +225 -0
  72. package/commands/scr/pause-work.md +88 -0
  73. package/commands/scr/plan.md +112 -0
  74. package/commands/scr/plant-seed.md +57 -0
  75. package/commands/scr/plot-graph.md +199 -0
  76. package/commands/scr/polish.md +141 -0
  77. package/commands/scr/profile-writer.md +154 -0
  78. package/commands/scr/progress.md +51 -0
  79. package/commands/scr/publish.md +455 -0
  80. package/commands/scr/query-letter.md +183 -0
  81. package/commands/scr/quick-write.md +82 -0
  82. package/commands/scr/relationship-map.md +129 -0
  83. package/commands/scr/remove-unit.md +120 -0
  84. package/commands/scr/reorder-units.md +126 -0
  85. package/commands/scr/resume-work.md +97 -0
  86. package/commands/scr/sacred/annotation-layer.md +105 -0
  87. package/commands/scr/sacred/chronology.md +121 -0
  88. package/commands/scr/sacred/concordance.md +88 -0
  89. package/commands/scr/sacred/cross-reference.md +97 -0
  90. package/commands/scr/sacred/doctrinal-check.md +129 -0
  91. package/commands/scr/sacred/genealogy.md +107 -0
  92. package/commands/scr/sacred/source-tracking.md +101 -0
  93. package/commands/scr/sacred/verse-numbering.md +103 -0
  94. package/commands/scr/sacred-numbering-format.md +103 -0
  95. package/commands/scr/save.md +109 -0
  96. package/commands/scr/scan.md +291 -0
  97. package/commands/scr/sensitivity-review.md +169 -0
  98. package/commands/scr/series-bible.md +127 -0
  99. package/commands/scr/session-report.md +80 -0
  100. package/commands/scr/settings.md +58 -0
  101. package/commands/scr/split-unit.md +123 -0
  102. package/commands/scr/spread-layout.md +187 -0
  103. package/commands/scr/storyboard.md +262 -0
  104. package/commands/scr/subject-touch.md +168 -0
  105. package/commands/scr/submit.md +50 -0
  106. package/commands/scr/subplot-map.md +147 -0
  107. package/commands/scr/sync.md +116 -0
  108. package/commands/scr/synopsis.md +137 -0
  109. package/commands/scr/theme-tracker.md +128 -0
  110. package/commands/scr/thread.md +83 -0
  111. package/commands/scr/timeline.md +141 -0
  112. package/commands/scr/track.md +564 -0
  113. package/commands/scr/translate.md +260 -0
  114. package/commands/scr/translation-glossary.md +298 -0
  115. package/commands/scr/translation-memory.md +310 -0
  116. package/commands/scr/troubleshoot.md +59 -0
  117. package/commands/scr/undo.md +106 -0
  118. package/commands/scr/validate.md +133 -0
  119. package/commands/scr/versions.md +94 -0
  120. package/commands/scr/voice-check.md +133 -0
  121. package/commands/scr/voice-test.md +68 -0
  122. package/data/CONSTRAINTS.json +1606 -0
  123. package/data/demo/.manuscript/BRIEF.md +37 -0
  124. package/data/demo/.manuscript/CHARACTERS.md +90 -0
  125. package/data/demo/.manuscript/OUTLINE.md +46 -0
  126. package/data/demo/.manuscript/PLOT-GRAPH.md +75 -0
  127. package/data/demo/.manuscript/STATE.md +44 -0
  128. package/data/demo/.manuscript/STYLE-GUIDE.md +119 -0
  129. package/data/demo/.manuscript/THEMES.md +51 -0
  130. package/data/demo/.manuscript/WORK.md +51 -0
  131. package/data/demo/.manuscript/config.json +59 -0
  132. package/data/demo/.manuscript/drafts/body/1-the-letter-DRAFT.md +51 -0
  133. package/data/demo/.manuscript/drafts/body/2-the-workshop-DRAFT.md +51 -0
  134. package/data/demo/.manuscript/drafts/body/3-the-pier-DRAFT.md +45 -0
  135. package/data/demo/.manuscript/drafts/body/4-the-clock-DRAFT.md +59 -0
  136. package/data/demo/.manuscript/plans/5-the-reunion-PLAN.md +52 -0
  137. package/data/demo/.manuscript/reviews/2-the-workshop-REVIEW.md +61 -0
  138. package/data/export-templates/scriveno-academic.latex +184 -0
  139. package/data/export-templates/scriveno-acm.latex +67 -0
  140. package/data/export-templates/scriveno-apa7.latex +83 -0
  141. package/data/export-templates/scriveno-book.typst +175 -0
  142. package/data/export-templates/scriveno-chapbook.typst +121 -0
  143. package/data/export-templates/scriveno-elsevier.latex +76 -0
  144. package/data/export-templates/scriveno-epub.css +386 -0
  145. package/data/export-templates/scriveno-fixed-layout-epub.css +76 -0
  146. package/data/export-templates/scriveno-fixed-layout.opf +23 -0
  147. package/data/export-templates/scriveno-ieee.latex +77 -0
  148. package/data/export-templates/scriveno-lncs.latex +79 -0
  149. package/data/export-templates/scriveno-picturebook.typst +113 -0
  150. package/data/export-templates/scriveno-poetry-submission-styles.md +45 -0
  151. package/data/export-templates/scriveno-poetry-submission.docx +0 -0
  152. package/data/export-templates/scriveno-smashwords-styles.md +45 -0
  153. package/data/export-templates/scriveno-smashwords.docx +0 -0
  154. package/data/export-templates/scriveno-stageplay.typst +129 -0
  155. package/data/proof/creative-context/README.md +79 -0
  156. package/data/proof/voice-dna/GUIDED-SAMPLE.md +19 -0
  157. package/data/proof/voice-dna/README.md +45 -0
  158. package/data/proof/voice-dna/STYLE-GUIDE-EXCERPT.md +43 -0
  159. package/data/proof/voice-dna/UNGUIDED-SAMPLE.md +11 -0
  160. package/data/proof/watchmaker-flow/README.md +78 -0
  161. package/docs/architecture.md +425 -0
  162. package/docs/command-reference.md +2384 -0
  163. package/docs/configuration.md +228 -0
  164. package/docs/context-protocol.md +81 -0
  165. package/docs/contributing.md +430 -0
  166. package/docs/creative-context.md +158 -0
  167. package/docs/development.md +152 -0
  168. package/docs/drafter-quality.md +127 -0
  169. package/docs/getting-started.md +198 -0
  170. package/docs/history-protocol.md +96 -0
  171. package/docs/proof-artifacts.md +56 -0
  172. package/docs/publishing.md +296 -0
  173. package/docs/release-notes.md +457 -0
  174. package/docs/runtime-support.md +77 -0
  175. package/docs/sacred-texts.md +296 -0
  176. package/docs/shipped-assets.md +129 -0
  177. package/docs/testing.md +156 -0
  178. package/docs/translation.md +343 -0
  179. package/docs/voice-dna.md +297 -0
  180. package/docs/work-types.md +339 -0
  181. package/lib/architectural-profiles.js +134 -0
  182. package/package.json +54 -0
  183. package/templates/BRIEF.md +51 -0
  184. package/templates/CHARACTERS.md +64 -0
  185. package/templates/CONTEXT.md +56 -0
  186. package/templates/OUTLINE.md +36 -0
  187. package/templates/RECORD.md +68 -0
  188. package/templates/STATE.md +50 -0
  189. package/templates/STYLE-GUIDE.md +121 -0
  190. package/templates/THEMES.md +36 -0
  191. package/templates/WORK.md +67 -0
  192. package/templates/WORLD.md +62 -0
  193. package/templates/WRITING-RULES.md +156 -0
  194. package/templates/academic/ARGUMENT-MAP.md +40 -0
  195. package/templates/academic/CONCEPTS.md +34 -0
  196. package/templates/academic/CONTEXT.md +29 -0
  197. package/templates/academic/PROPOSAL.md +37 -0
  198. package/templates/academic/QUESTIONS.md +24 -0
  199. package/templates/config.json +72 -0
  200. package/templates/pitfalls/comic.md +54 -0
  201. package/templates/pitfalls/commentary.md +62 -0
  202. package/templates/pitfalls/memoir.md +48 -0
  203. package/templates/pitfalls/novel.md +53 -0
  204. package/templates/pitfalls/poetry_collection.md +63 -0
  205. package/templates/pitfalls/research_paper.md +66 -0
  206. package/templates/pitfalls/runbook.md +64 -0
  207. package/templates/pitfalls/screenplay.md +54 -0
  208. package/templates/platforms/README.md +16 -0
  209. package/templates/platforms/apple/manifest.yaml +20 -0
  210. package/templates/platforms/bn/manifest.yaml +20 -0
  211. package/templates/platforms/d2d/manifest.yaml +20 -0
  212. package/templates/platforms/google/manifest.yaml +20 -0
  213. package/templates/platforms/ingram/manifest.yaml +44 -0
  214. package/templates/platforms/kdp/manifest.yaml +42 -0
  215. package/templates/platforms/kobo/manifest.yaml +20 -0
  216. package/templates/platforms/smashwords/manifest.yaml +26 -0
  217. package/templates/sacred/COSMOLOGY.md +88 -0
  218. package/templates/sacred/DOCTRINES.md +45 -0
  219. package/templates/sacred/FIGURES.md +69 -0
  220. package/templates/sacred/FRAMEWORK.md +98 -0
  221. package/templates/sacred/LINEAGES.md +52 -0
  222. package/templates/sacred/README.md +20 -0
  223. package/templates/sacred/THEOLOGICAL-ARC.md +69 -0
  224. package/templates/sacred/catholic/manifest.yaml +93 -0
  225. package/templates/sacred/islamic-hafs/manifest.yaml +134 -0
  226. package/templates/sacred/islamic-warsh/manifest.yaml +134 -0
  227. package/templates/sacred/jewish/manifest.yaml +56 -0
  228. package/templates/sacred/orthodox/manifest.yaml +98 -0
  229. package/templates/sacred/pali/manifest.yaml +20 -0
  230. package/templates/sacred/protestant/manifest.yaml +86 -0
  231. package/templates/sacred/sanskrit/manifest.yaml +20 -0
  232. package/templates/sacred/tewahedo/manifest.yaml +106 -0
  233. package/templates/sacred/tibetan/manifest.yaml +20 -0
  234. package/templates/technical/AUDIENCE.md +26 -0
  235. package/templates/technical/DEPENDENCIES.md +19 -0
  236. package/templates/technical/DOC-BRIEF.md +45 -0
  237. package/templates/technical/PROCEDURES.md +37 -0
  238. package/templates/technical/REFERENCES.md +36 -0
  239. package/templates/technical/SYSTEM.md +25 -0
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Review all project notes.
3
+ argument-hint: "[--clear]"
4
+ ---
5
+
6
+ # Check Notes
7
+
8
+ You are displaying the writer's project notes.
9
+
10
+ ## Default (no flags)
11
+
12
+ 1. Read `.manuscript/NOTES.md`
13
+ 2. Display all notes as-is
14
+ 3. If the file doesn't exist or is empty: "No notes yet. Add one with `/scr:add-note <text>`"
15
+
16
+ ## --clear
17
+
18
+ Archive existing notes and start fresh:
19
+
20
+ 1. Create `.manuscript/archive/` directory if it doesn't exist
21
+ 2. Copy current NOTES.md to `.manuscript/archive/notes-{YYYY-MM-DD}.md`
22
+ 3. Replace NOTES.md with a fresh header: `# Project Notes\n\n`
23
+ 4. Confirm: "Notes archived to archive/notes-{date}.md. Fresh notes file ready."
24
+
25
+ ## Response Contract
26
+
27
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
28
+
29
+ Use this format:
30
+
31
+ ```markdown
32
+ Next commands:
33
+ - `/scr:...`: One short sentence explaining what this path will do.
34
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
35
+ ```
36
+
37
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
38
+
39
+ If the writer seems unsure or no specific next command is obvious, include this default option:
40
+
41
+ ```markdown
42
+ Next commands:
43
+ - `/scr:next`: Inspect the project state and choose the right next step.
44
+ ```
45
+
46
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
47
+
48
+ ## Tone
49
+
50
+ Simple. Show the notes, get out of the way.
@@ -0,0 +1,159 @@
1
+ ---
2
+ description: Strip template scaffold markers from draft files. Dry-run by default.
3
+ argument-hint: "[--apply]"
4
+ ---
5
+
6
+ # /scr:cleanup -- Scaffold Cleanup
7
+
8
+ Strip bracket markers, Alternate blocks, and duplicate H1 headings from `.manuscript/drafts/`. Dry-run by default -- shows what would be removed without modifying any files. Pass `--apply` to execute changes in place.
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /scr:cleanup [--apply]
14
+ ```
15
+
16
+ **Flags:**
17
+ - `--apply` -- Modify files in place and show diff summary. Default: dry-run only.
18
+
19
+ ## Instruction
20
+
21
+ You are a **manuscript cleanup specialist**. Your job is to identify and optionally remove template scaffold markers left over from draft generation.
22
+
23
+ ---
24
+
25
+ ### STEP 1: LOAD CONTEXT
26
+
27
+ 1. Read `.manuscript/config.json` to get `title`, `author`, and `work_type`.
28
+ 2. Read Scriveno's installed/shared `CONSTRAINTS.json` (global `~/.scriveno/data/CONSTRAINTS.json` or project `.scriveno/data/CONSTRAINTS.json`) to verify project context.
29
+ 3. **Prerequisite guard:** If `.manuscript/drafts/` does not exist or contains no `.md` files:
30
+
31
+ > **No draft files found.** Run `/scr:draft` to create your first draft unit before running cleanup.
32
+
33
+ Then **stop** -- do not proceed.
34
+
35
+ ---
36
+
37
+ ### STEP 2: SCAN DRAFT FILES
38
+
39
+ Scan all `.md` files in `.manuscript/drafts/` recursively. For each file, check line by line for the following scaffold marker classes:
40
+
41
+ **Bracket markers (line-based):**
42
+ - Lines containing `[Fill in` -- covers `[Fill in:]` and `[Fill in or delete:]`
43
+ - Lines containing `[Delete if not applicable:]`
44
+
45
+ **Alternate blocks:**
46
+ - Lines containing `Alternate 1:` or `Alternate 2:` (at line start or inline)
47
+ - Record the full block extent: from the `Alternate N:` line through the first of:
48
+ - (a) the next blank line (any standalone blank line stops the block), or
49
+ - (b) the next line containing `Alternate M:` (another Alternate header), or
50
+ - (c) a line starting with `## ` or `# ` (section heading boundary), or
51
+ - (d) end of file
52
+
53
+ **Duplicate H1 headings:**
54
+ - Identify all lines matching `^# ` (single hash + space, top-level heading) in the file
55
+ - The FIRST occurrence is the canonical heading
56
+ - All subsequent `# ` heading lines are duplicates and are flagged for removal
57
+
58
+ **IMPORTANT:** Do NOT flag or strip `{{VAR}}` tokens. These are unfinished writer content placeholders, not scaffold markers. `{{VAR}}` is out of scope for cleanup.
59
+
60
+ Build a per-file list of: file path, line number, marker type and text.
61
+
62
+ ---
63
+
64
+ ### STEP 3: APPLY OR REPORT
65
+
66
+ Branch on whether `--apply` was passed:
67
+
68
+ ---
69
+
70
+ #### Dry-run (default, no `--apply` flag)
71
+
72
+ If no markers found across any file, output:
73
+
74
+ ```
75
+ No scaffold markers found. Your manuscript is clean.
76
+ ```
77
+
78
+ For each file with markers, output the dry-run format:
79
+
80
+ ```
81
+ Would remove from chapter-01.md:
82
+ - line 3: [Fill in or delete:]
83
+ - line 47: Alternate 1: block (lines 47-52)
84
+ - line 89: [Fill in:]
85
+
86
+ Summary: 3 bracket markers, 1 Alternate block, 0 duplicate H1 headings across 1 file(s).
87
+ Run `/scr:cleanup --apply` to apply these changes.
88
+ ```
89
+
90
+ Show each file's list in full before the summary. The summary line must include counts for all three marker classes.
91
+
92
+ ---
93
+
94
+ #### Apply mode (`--apply` flag passed)
95
+
96
+ For each file with markers:
97
+
98
+ 1. Edit the file in place, removing the identified markers:
99
+ - **Bracket markers:** Remove the entire line containing `[Fill in`, `[Fill in or delete:]`, or `[Delete if not applicable:]`
100
+ - **Alternate blocks:** Remove from the `Alternate N:` line through the block boundary (as defined in STEP 2)
101
+ - **Duplicate H1 headings:** Remove all `# ` heading lines after the first one in each file
102
+
103
+ 2. After editing each file, output:
104
+
105
+ ```
106
+ Cleaned chapter-01.md:
107
+ - Removed 3 bracket markers
108
+ - Removed 1 Alternate block
109
+ - Removed 0 duplicate H1 headings
110
+ ```
111
+
112
+ After all files are processed, output the final summary:
113
+
114
+ ```
115
+ Summary: 3 bracket markers, 1 Alternate block, 0 duplicate H1 headings removed from 1 file(s).
116
+ ```
117
+
118
+ If nothing was found (all files already clean), output:
119
+
120
+ ```
121
+ No scaffold markers found. Manuscript already clean.
122
+ ```
123
+
124
+ ---
125
+
126
+ ### Marker definitions (reference)
127
+
128
+ | Marker class | Pattern | Action |
129
+ |---|---|---|
130
+ | Bracket marker | Line contains `[Fill in` | Remove line |
131
+ | Bracket marker | Line contains `[Delete if not applicable:]` | Remove line |
132
+ | Alternate block | Line contains `Alternate 1:` or `Alternate 2:` | Remove block through boundary |
133
+ | Duplicate H1 | File has >1 line matching `^# ` | Remove all `# ` lines after first |
134
+ | `{{VAR}}` token | Any `{{...}}` pattern | **NOT scaffold -- do not strip** |
135
+
136
+ File scope is strictly `.manuscript/drafts/`. Front-matter files (under `.manuscript/front-matter/`) and back-matter files are excluded by this explicit path restriction.
137
+
138
+ ## Response Contract
139
+
140
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
141
+
142
+ Use this format:
143
+
144
+ ```markdown
145
+ Next commands:
146
+ - `/scr:...`: One short sentence explaining what this path will do.
147
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
148
+ ```
149
+
150
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
151
+
152
+ If the writer seems unsure or no specific next command is obvious, include this default option:
153
+
154
+ ```markdown
155
+ Next commands:
156
+ - `/scr:next`: Inspect the project state and choose the right next step.
157
+ ```
158
+
159
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
@@ -0,0 +1,112 @@
1
+ ---
2
+ description: Compare your current work with a previous save. Shows changes in plain prose, not code diff.
3
+ argument-hint: "[save number or 'last']"
4
+ ---
5
+
6
+ # Compare
7
+
8
+ You are showing the writer how their prose has changed. Your job is to format git diff output as readable prose comparisons with NO technical diff markers.
9
+
10
+ ## What to do
11
+
12
+ 1. **Check for `.manuscript/` directory.** If missing: "No manuscript found. Start with `/scr:new-work`."
13
+
14
+ 2. **Check for `.git/` directory.** If missing: "No save history to compare. Save your work first with `/scr:save`."
15
+
16
+ 3. **Load the save history, not the raw manuscript history.** Run:
17
+ ```
18
+ git log --format="%H|%s" --grep="^(Saved|Initial save)" --extended-regexp .manuscript/ 2>/dev/null
19
+ ```
20
+ This command compares against actual saves only. Do not count administrative manuscript commits such as revision-track creation, proposals, or merges.
21
+ - If the save list is empty: "No save history to compare. Save your work first with `/scr:save`."
22
+ - If the writer asks to compare save N or save M and that numbered save does not exist in the filtered save list: "I couldn't find that save number. Use `/scr:versions` to see the available saves first."
23
+
24
+ 4. **Read `.manuscript/config.json`** for `developer_mode` and `command_unit`.
25
+
26
+ 5. **Determine what to compare:**
27
+ - No argument or `last`: compare the current working tree against the most recent save hash from the filtered save list
28
+ - A number N: compare the current working tree against save N from the filtered save list (1 = most recent save, 2 = the save before that, and so on)
29
+ - Two numbers "N M": compare save N with save M using the corresponding hashes from the filtered save list
30
+ - Run the appropriate diff against those resolved save hashes, for example:
31
+ - `git diff {save-hash-1} -- .manuscript/`
32
+ - `git diff {save-hash-N} {save-hash-M} -- .manuscript/`
33
+ Never resolve save numbers with raw ancestry offsets, because manuscript history may include non-save checkpoints.
34
+
35
+ 6. **Parse the diff output** into changed prose pairs:
36
+ - For each changed file in `.manuscript/`, extract the diff hunks
37
+ - Map file paths to unit names (e.g., `.manuscript/drafts/body/3-2-DRAFT.md` becomes the unit name from the file content or outline)
38
+ - Group changes by unit (chapter/scene/section)
39
+
40
+ 7. **Format as Before/After blocks:**
41
+
42
+ ```
43
+ ## {Unit Name} -- Changes
44
+
45
+ **Before:**
46
+ > Marcus walked through the empty corridor, his footsteps echoing against the marble walls.
47
+
48
+ **After:**
49
+ > Marcus moved through the silent corridor, each footstep a small detonation against the marble.
50
+
51
+ ---
52
+
53
+ **Before:**
54
+ > She looked at him with concern.
55
+
56
+ **After:**
57
+ > She studied him, her eyes narrowing at something she found in his expression.
58
+ ```
59
+
60
+ 8. **Show the formatted comparison to the writer.**
61
+
62
+ ## Formatting rules
63
+
64
+ - **NEVER show:** `+`, `-`, `@@`, line numbers, file paths, commit hashes, `diff --git`, `index`, `---`, `+++`
65
+ - Use blockquotes (`>`) for prose passages
66
+ - Group changes by unit (chapter/scene) with `##` headings
67
+ - Show 1 sentence of unchanged context before and after each change for readability
68
+ - If a section was added (no previous version): use "**New:**" instead of Before/After
69
+ - If a section was removed: use "**Removed:**" with the deleted text in a blockquote
70
+ - If only whitespace or formatting changed: skip it silently
71
+ - Separate multiple changes within a unit with `---` horizontal rules
72
+
73
+ ## Writer mode output
74
+
75
+ - **Writer mode** (`developer_mode: false`): Show ONLY the formatted Before/After blocks as described above. No technical information whatsoever.
76
+ - **Developer mode** (`developer_mode: true`): Show standard unified diff output with file paths and line numbers. Include commit hashes being compared.
77
+
78
+ ## Edge cases
79
+
80
+ - **No changes:** "No differences found. Your current work matches your last save."
81
+ - **Only one save:** Comparing the current working tree against that save is fine. If the writer asks for a second numbered save that does not exist, explain that only one save is available so far.
82
+ - **Binary files changed** (images, etc.): Skip them silently in writer mode. Mention them in developer mode.
83
+ - **New files added since last save:** Show under a "**New files:**" heading with the content.
84
+ - **Files deleted since last save:** Show under a "**Removed files:**" heading.
85
+ - **Very large diff** (more than 50 changed passages): Summarize with counts per unit, then show the first 10 changes. Mention: "Showing 10 of [N] changes. There were significant changes across [M] sections."
86
+
87
+ ## Response Contract
88
+
89
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
90
+
91
+ Use this format:
92
+
93
+ ```markdown
94
+ Next commands:
95
+ - `/scr:...`: One short sentence explaining what this path will do.
96
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
97
+ ```
98
+
99
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
100
+
101
+ If the writer seems unsure or no specific next command is obvious, include this default option:
102
+
103
+ ```markdown
104
+ Next commands:
105
+ - `/scr:next`: Inspect the project state and choose the right next step.
106
+ ```
107
+
108
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
109
+
110
+ ## Tone
111
+
112
+ Neutral. Observational. Present the changes without judgment. Don't comment on whether changes are improvements -- that's the editor's job.
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: Mark the entire manuscript draft as complete.
3
+ argument-hint: ""
4
+ ---
5
+
6
+ # Complete Draft
7
+
8
+ You are marking the entire manuscript draft as complete.
9
+
10
+ ## Prerequisites
11
+
12
+ - All units must be submitted
13
+
14
+ ## What to do
15
+
16
+ 0. **Bootstrap (context-cost protocol).** Read `.manuscript/CONTEXT.md` first if it exists. If its `Updated` timestamp is newer than `.manuscript/STATE.md` and newer than the newest file in `.manuscript/drafts/body/`, use it for orientation (project title, work type, total units, units submitted). Step 1 still needs `OUTLINE.md` (the verification in step 2 walks the unit list directly) but you may skip the STATE.md read for the unit-submission counts CONTEXT.md surfaces. If CONTEXT.md is missing or stale, run step 1 unchanged. See `docs/context-protocol.md`.
17
+
18
+ 1. Load `.manuscript/STATE.md` and `.manuscript/OUTLINE.md`
19
+ 2. Verify all units in the outline have been submitted
20
+ 3. If any units are not submitted, list them and ask the writer to complete them first
21
+ 4. If all units are submitted, update STATE.md to mark the draft as complete
22
+ 5. Report: "Draft complete. {total_words} words across {total_units} units. Publishing, export, and translation commands are now available."
23
+
24
+ ## Response Contract
25
+
26
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
27
+
28
+ Use this format:
29
+
30
+ ```markdown
31
+ Next commands:
32
+ - `/scr:...`: One short sentence explaining what this path will do.
33
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
34
+ ```
35
+
36
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
37
+
38
+ If the writer seems unsure or no specific next command is obvious, include this default option:
39
+
40
+ ```markdown
41
+ Next commands:
42
+ - `/scr:next`: Inspect the project state and choose the right next step.
43
+ ```
44
+
45
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
46
+
47
+ ## Tone
48
+
49
+ Celebratory but brief. Completing a draft is a milestone.
@@ -0,0 +1,129 @@
1
+ ---
2
+ description: Automated continuity verification to scan for narrative contradictions across the manuscript.
3
+ ---
4
+
5
+ # /scr:continuity-check -- Scan for Narrative Contradictions
6
+
7
+ Automated continuity verification across the manuscript.
8
+
9
+ ## Usage
10
+ ```
11
+ /scr:continuity-check [N]
12
+ ```
13
+
14
+ If `N` is provided, checks only Act N against previous acts. Otherwise checks entire manuscript.
15
+
16
+ ## Instruction
17
+
18
+ Load `.manuscript/config.json` to get `work_type`. Load Scriveno's installed/shared `CONSTRAINTS.json` (global `~/.scriveno/data/CONSTRAINTS.json` or project `.scriveno/data/CONSTRAINTS.json`) to check command adaptations. For sacred work types, this command is called 'doctrinal-check' and should additionally verify doctrinal consistency and canonical alignment. For academic work types, this command is called 'citation-check' and should additionally verify citation consistency and reference accuracy. For technical work types, this command is called 'consistency-check' and should additionally verify terminology consistency, prerequisite order, command syntax, version references, and recovery steps. Use adapted terminology throughout all output.
19
+
20
+ Invoke the installed `continuity-checker.md` agent for the writer's active Scriveno runtime (for example the runtime's global or project-scoped `agents/continuity-checker.md`) in a fresh context. Pass it:
21
+
22
+ - The full set of drafted units (`.manuscript/drafts/body/{N}-{A}-DRAFT.md` files in scope -- all units, or only Act `N` and prior acts when scoped)
23
+ - RECORD.md when present, as the compact store of established facts, open threads, promises, payoffs, and continuity obligations
24
+ - CHARACTERS.md (or FIGURES.md for sacred works)
25
+ - WORLD.md (or COSMOLOGY.md for sacred works)
26
+ - PLOT-GRAPH.md (or THEOLOGICAL-ARC.md for sacred works)
27
+ - DOCTRINES.md, LINEAGES.md, and CHRONOLOGY.md when present (sacred only)
28
+ - The previous continuity report if one exists, so the agent can verify resolved issues stayed resolved instead of re-flagging them
29
+
30
+ The agent reads all drafted scenes and checks:
31
+
32
+ If RECORD.md contradicts the drafted text, flag the mismatch as a RECORD drift finding. If the drafted text reveals established facts or open threads that are missing from RECORD.md, list compact suggested updates under a "Record updates" section without rewriting the file unless the writer asked for fixes.
33
+
34
+ <continuity_checks>
35
+ <check name="character_consistency">
36
+ - Physical descriptions match across scenes (eye color, height, scars, etc.)
37
+ - Character names are spelled consistently
38
+ - Age references are consistent with timeline
39
+ - Skills/abilities don't appear or disappear without explanation
40
+ - Knowledge: characters only know what they've been told or witnessed
41
+ - Emotional states follow logically from preceding events
42
+ </check>
43
+
44
+ <check name="timeline_logic">
45
+ - Days of the week and dates are consistent
46
+ - Travel time between locations is realistic
47
+ - Seasonal references match the timeline
48
+ - Character ages align with time jumps
49
+ - "Three days ago" type references check out
50
+ - Meals, sleep, and time-of-day references are consistent
51
+ </check>
52
+
53
+ <check name="object_tracking">
54
+ - Props and objects are where they should be
55
+ - If a character picks up an item, it's tracked
56
+ - Vehicles, weapons, keys, phones -- all accounted for
57
+ - Clothing changes are consistent with context
58
+ - Food/drink orders match what's consumed
59
+ </check>
60
+
61
+ <check name="spatial_consistency">
62
+ - Room layouts don't change between scenes
63
+ - Geographic distances are maintained
64
+ - Characters move logically between locations
65
+ - Building/space descriptions are consistent
66
+ - Left/right, north/south orientations hold
67
+ </check>
68
+
69
+ <check name="information_flow">
70
+ - Characters don't reference information they haven't received
71
+ - Secrets stay secret until revealed
72
+ - Dramatic irony is intentional, not accidental
73
+ - "As you know, Bob" violations flagged
74
+ - Overheard conversations: who could realistically hear what
75
+ </check>
76
+
77
+ <check name="world_rules">
78
+ - Magic/technology systems follow established rules
79
+ - Social norms are consistently applied
80
+ - Economic realities are consistent
81
+ - Laws of physics respected (or consistently broken in speculative fiction)
82
+ </check>
83
+ </continuity_checks>
84
+
85
+ For technical work types, reinterpret the checks above through a documentation lens:
86
+ - "character consistency" becomes audience/role consistency
87
+ - "timeline logic" becomes procedure order and escalation order
88
+ - "object tracking" becomes command, file, flag, and artifact tracking
89
+ - "spatial consistency" becomes environment/platform consistency
90
+ - "information flow" becomes prerequisite and dependency disclosure
91
+ - "world rules" becomes system constraints, supported-version, and safety consistency
92
+
93
+ ### OUTPUT
94
+
95
+ Generate a continuity report with:
96
+ - [ok] Areas that check out
97
+ - WARNING Minor inconsistencies (easy fixes)
98
+ - [major] Major contradictions (require scene revision)
99
+
100
+ For each issue:
101
+ - What the contradiction is
102
+ - Where it appears (file, paragraph reference)
103
+ - What the established fact was and where it was established
104
+ - Suggested fix
105
+
106
+ Save to `.manuscript/{act_num}-CONTINUITY-REPORT.md` or `.manuscript/FULL-CONTINUITY-REPORT.md`. For technical work types, use `CONSISTENCY-REPORT` in the writer-facing title even if the file path stays the same.
107
+
108
+ ## Response Contract
109
+
110
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
111
+
112
+ Use this format:
113
+
114
+ ```markdown
115
+ Next commands:
116
+ - `/scr:...`: One short sentence explaining what this path will do.
117
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
118
+ ```
119
+
120
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
121
+
122
+ If the writer seems unsure or no specific next command is obvious, include this default option:
123
+
124
+ ```markdown
125
+ Next commands:
126
+ - `/scr:next`: Inspect the project state and choose the right next step.
127
+ ```
128
+
129
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
@@ -0,0 +1,118 @@
1
+ ---
2
+ description: Perform a correctness pass for grammar, spelling, punctuation, and consistency.
3
+ ---
4
+
5
+ # /scr:copy-edit -- Grammar and Correctness Pass
6
+
7
+ Perform a mechanical correctness pass on drafted prose, checking grammar, spelling, punctuation, and internal consistency.
8
+
9
+ ## Usage
10
+ ```
11
+ /scr:copy-edit [N]
12
+ ```
13
+
14
+ - `N` -- Scope to a specific unit (act, chapter, surah, etc. per work type). Omit for full manuscript.
15
+
16
+ ## Instruction
17
+
18
+ You are a **copy editor**. Your job is mechanical correctness -- grammar, spelling, punctuation, and consistency. You are not making stylistic judgments, not rewriting for voice, and not suggesting creative alternatives. If it's correct, leave it alone. Even if you'd write it differently, leave it alone.
19
+
20
+ ---
21
+
22
+ ### STEP 1: LOAD CONTEXT
23
+
24
+ 1. Load `config.json` -- determine work type and structural hierarchy
25
+ 2. Load Scriveno's installed/shared `CONSTRAINTS.json` (global `~/.scriveno/data/CONSTRAINTS.json` or project `.scriveno/data/CONSTRAINTS.json`) -- check for adapted command name and prerequisites
26
+ 3. Load drafted prose from `.manuscript/drafts/body/`
27
+ - If `N` is provided, load only unit `N`
28
+ - If omitted, load all drafted units
29
+ 4. If `CHARACTERS.md` exists, load it for proper noun reference (character names, place names)
30
+
31
+ **Do NOT load STYLE-GUIDE.md** -- copy editing is mechanical, not stylistic. Voice and style are the line editor's concern.
32
+
33
+ **Prerequisite check:** If no drafts exist, tell the writer to run `/scr:draft` first.
34
+
35
+ ---
36
+
37
+ ### STEP 2: CHECK BY CATEGORY
38
+
39
+ #### Grammar
40
+ - **Subject-verb agreement** -- Flag mismatches, especially across clauses or with collective nouns.
41
+ - **Tense consistency** -- Flag unintentional tense shifts within a scene or passage. Note: deliberate shifts (flashbacks, internal monologue) are acceptable -- flag only unclear shifts.
42
+ - **Dangling modifiers** -- Flag participial phrases that attach to the wrong noun ("Running down the street, the building came into view").
43
+ - **Pronoun reference** -- Flag ambiguous pronoun references where "he," "she," or "they" could refer to multiple antecedents.
44
+
45
+ #### Spelling
46
+ - **Typos** -- Flag misspelled words, including words that are spelled correctly but used incorrectly ("their/there/they're," "its/it's").
47
+ - **Homophones** -- Flag homophone errors ("discrete" vs. "discreet," "affect" vs. "effect," "complement" vs. "compliment").
48
+ - **Proper nouns** -- Cross-reference character and place names against CHARACTERS.md and earlier usage for consistent spelling.
49
+
50
+ #### Punctuation
51
+ - **Comma usage** -- Flag comma splices, missing serial commas (if the manuscript uses them), and missing commas after introductory clauses.
52
+ - **Dialogue punctuation** -- Verify dialogue tags use commas not periods ("Hello," she said -- not "Hello." She said), and that action beats use periods ("Hello." She waved).
53
+ - **Dash policy** -- Flag em dashes and en dashes as prohibited by Scriveno writing policy. Suggest commas, colons, semicolons, parentheses, periods, or a rewritten sentence. Preserve ordinary hyphens for compounds and number ranges.
54
+ - **Quotation marks** -- Verify consistent style (curly vs. straight) and proper nesting of single/double quotes.
55
+
56
+ #### Consistency
57
+ - **Character name spelling** -- Flag any variation in spelling of character names across the manuscript.
58
+ - **Place name spelling** -- Flag any variation in spelling of locations, organizations, or proper nouns.
59
+ - **Terminology usage** -- Flag inconsistent use of terms (e.g., "cellphone" vs. "cell phone" vs. "mobile" -- pick one).
60
+ - **Hyphenation choices** -- Flag inconsistent hyphenation ("old-fashioned" vs. "old fashioned," "well-known" vs. "well known").
61
+ - **Number style** -- Flag inconsistent number rendering (spelling out vs. numerals -- "twelve" vs. "12"). Note the manuscript's convention and flag deviations.
62
+
63
+ ---
64
+
65
+ ### STEP 3: GENERATE CORRECTIONS
66
+
67
+ For each issue found, present a correction:
68
+
69
+ ```
70
+ **Original:** "John laid down on the sofa, he was very tired."
71
+ **Correction:** "John lay down on the sofa. He was very tired."
72
+ **Category:** grammar (lay/laid), punctuation (comma splice)
73
+ **Location:** Chapter 3, paragraph 12
74
+ ```
75
+
76
+ ---
77
+
78
+ ### STEP 4: CONSISTENCY TABLE
79
+
80
+ Generate a consistency reference table for the manuscript:
81
+
82
+ | Term | Chosen Form | Alternatives Found | Locations |
83
+ |------|------------|-------------------|-----------|
84
+ | Character name | "MacAllister" | "Macallister" (ch. 7) | ch. 1, 3, 5, 7 |
85
+ | Hyphenation | "old-fashioned" | "old fashioned" (ch. 4) | ch. 2, 4, 6 |
86
+
87
+ This table helps the writer see at a glance where consistency breaks occur.
88
+
89
+ ---
90
+
91
+ ### OUTPUT
92
+
93
+ Save the full correction report to `.manuscript/{scope}-COPY-EDIT-REPORT.md` where `{scope}` is the unit identifier (e.g., `act-1`, `chapter-3`) or `full` for the entire manuscript.
94
+
95
+ Present a summary: "Found X issues: Y grammar, Z spelling, W punctuation, V consistency."
96
+
97
+ ## Response Contract
98
+
99
+ Every writer-facing response must end with one to four next-command suggestions. Each suggestion must include a short explanation of what that path will do.
100
+
101
+ Use this format:
102
+
103
+ ```markdown
104
+ Next commands:
105
+ - `/scr:...`: One short sentence explaining what this path will do.
106
+ - `/scr:...`: One short sentence explaining what this alternate path will do.
107
+ ```
108
+
109
+ If exactly one path is clearly best, provide one suggestion. If two, three, or four useful paths exist, show them as alternatives. Do not force a linear path when the writer has a real choice.
110
+
111
+ If the writer seems unsure or no specific next command is obvious, include this default option:
112
+
113
+ ```markdown
114
+ Next commands:
115
+ - `/scr:next`: Inspect the project state and choose the right next step.
116
+ ```
117
+
118
+ If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.