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.
- package/LICENSE +21 -0
- package/README.md +222 -0
- package/agents/continuity-checker.md +85 -0
- package/agents/drafter.md +248 -0
- package/agents/plan-checker.md +209 -0
- package/agents/researcher.md +114 -0
- package/agents/translator.md +204 -0
- package/agents/voice-checker.md +154 -0
- package/bin/install.js +1620 -0
- package/commands/scr/add-note.md +51 -0
- package/commands/scr/add-unit.md +101 -0
- package/commands/scr/art-direction.md +225 -0
- package/commands/scr/autopilot-publish.md +210 -0
- package/commands/scr/autopilot-translate.md +237 -0
- package/commands/scr/autopilot.md +200 -0
- package/commands/scr/back-matter.md +630 -0
- package/commands/scr/back-translate.md +197 -0
- package/commands/scr/beta-reader.md +97 -0
- package/commands/scr/blurb.md +149 -0
- package/commands/scr/book-proposal.md +210 -0
- package/commands/scr/build-ebook.md +448 -0
- package/commands/scr/build-poetry-submission.md +202 -0
- package/commands/scr/build-print.md +598 -0
- package/commands/scr/build-smashwords.md +171 -0
- package/commands/scr/build-world.md +158 -0
- package/commands/scr/cast-list.md +104 -0
- package/commands/scr/chapter-header.md +158 -0
- package/commands/scr/character-arc.md +108 -0
- package/commands/scr/character-ref.md +160 -0
- package/commands/scr/character-sheet.md +143 -0
- package/commands/scr/character-touch.md +157 -0
- package/commands/scr/character-voice-sample.md +111 -0
- package/commands/scr/check-notes.md +50 -0
- package/commands/scr/cleanup.md +159 -0
- package/commands/scr/compare.md +112 -0
- package/commands/scr/complete-draft.md +49 -0
- package/commands/scr/continuity-check.md +129 -0
- package/commands/scr/copy-edit.md +118 -0
- package/commands/scr/cover-art.md +382 -0
- package/commands/scr/cultural-adaptation.md +177 -0
- package/commands/scr/demo.md +93 -0
- package/commands/scr/dialogue-audit.md +143 -0
- package/commands/scr/discuss.md +118 -0
- package/commands/scr/discussion-questions.md +129 -0
- package/commands/scr/do.md +68 -0
- package/commands/scr/draft.md +97 -0
- package/commands/scr/editor-review.md +466 -0
- package/commands/scr/export.md +942 -0
- package/commands/scr/fast.md +65 -0
- package/commands/scr/front-matter.md +696 -0
- package/commands/scr/health.md +113 -0
- package/commands/scr/help.md +121 -0
- package/commands/scr/history.md +92 -0
- package/commands/scr/illustrate-scene.md +211 -0
- package/commands/scr/import.md +95 -0
- package/commands/scr/insert-unit.md +108 -0
- package/commands/scr/line-edit.md +146 -0
- package/commands/scr/manager.md +77 -0
- package/commands/scr/manuscript-stats.md +139 -0
- package/commands/scr/map-illustration.md +213 -0
- package/commands/scr/map-manuscript.md +134 -0
- package/commands/scr/merge-units.md +136 -0
- package/commands/scr/multi-publish.md +344 -0
- package/commands/scr/new-character.md +167 -0
- package/commands/scr/new-revision.md +50 -0
- package/commands/scr/new-work.md +148 -0
- package/commands/scr/next.md +125 -0
- package/commands/scr/originality-check.md +170 -0
- package/commands/scr/outline.md +131 -0
- package/commands/scr/pacing-analysis.md +170 -0
- package/commands/scr/panel-layout.md +225 -0
- package/commands/scr/pause-work.md +88 -0
- package/commands/scr/plan.md +112 -0
- package/commands/scr/plant-seed.md +57 -0
- package/commands/scr/plot-graph.md +199 -0
- package/commands/scr/polish.md +141 -0
- package/commands/scr/profile-writer.md +154 -0
- package/commands/scr/progress.md +51 -0
- package/commands/scr/publish.md +455 -0
- package/commands/scr/query-letter.md +183 -0
- package/commands/scr/quick-write.md +82 -0
- package/commands/scr/relationship-map.md +129 -0
- package/commands/scr/remove-unit.md +120 -0
- package/commands/scr/reorder-units.md +126 -0
- package/commands/scr/resume-work.md +97 -0
- package/commands/scr/sacred/annotation-layer.md +105 -0
- package/commands/scr/sacred/chronology.md +121 -0
- package/commands/scr/sacred/concordance.md +88 -0
- package/commands/scr/sacred/cross-reference.md +97 -0
- package/commands/scr/sacred/doctrinal-check.md +129 -0
- package/commands/scr/sacred/genealogy.md +107 -0
- package/commands/scr/sacred/source-tracking.md +101 -0
- package/commands/scr/sacred/verse-numbering.md +103 -0
- package/commands/scr/sacred-numbering-format.md +103 -0
- package/commands/scr/save.md +109 -0
- package/commands/scr/scan.md +291 -0
- package/commands/scr/sensitivity-review.md +169 -0
- package/commands/scr/series-bible.md +127 -0
- package/commands/scr/session-report.md +80 -0
- package/commands/scr/settings.md +58 -0
- package/commands/scr/split-unit.md +123 -0
- package/commands/scr/spread-layout.md +187 -0
- package/commands/scr/storyboard.md +262 -0
- package/commands/scr/subject-touch.md +168 -0
- package/commands/scr/submit.md +50 -0
- package/commands/scr/subplot-map.md +147 -0
- package/commands/scr/sync.md +116 -0
- package/commands/scr/synopsis.md +137 -0
- package/commands/scr/theme-tracker.md +128 -0
- package/commands/scr/thread.md +83 -0
- package/commands/scr/timeline.md +141 -0
- package/commands/scr/track.md +564 -0
- package/commands/scr/translate.md +260 -0
- package/commands/scr/translation-glossary.md +298 -0
- package/commands/scr/translation-memory.md +310 -0
- package/commands/scr/troubleshoot.md +59 -0
- package/commands/scr/undo.md +106 -0
- package/commands/scr/validate.md +133 -0
- package/commands/scr/versions.md +94 -0
- package/commands/scr/voice-check.md +133 -0
- package/commands/scr/voice-test.md +68 -0
- package/data/CONSTRAINTS.json +1606 -0
- package/data/demo/.manuscript/BRIEF.md +37 -0
- package/data/demo/.manuscript/CHARACTERS.md +90 -0
- package/data/demo/.manuscript/OUTLINE.md +46 -0
- package/data/demo/.manuscript/PLOT-GRAPH.md +75 -0
- package/data/demo/.manuscript/STATE.md +44 -0
- package/data/demo/.manuscript/STYLE-GUIDE.md +119 -0
- package/data/demo/.manuscript/THEMES.md +51 -0
- package/data/demo/.manuscript/WORK.md +51 -0
- package/data/demo/.manuscript/config.json +59 -0
- package/data/demo/.manuscript/drafts/body/1-the-letter-DRAFT.md +51 -0
- package/data/demo/.manuscript/drafts/body/2-the-workshop-DRAFT.md +51 -0
- package/data/demo/.manuscript/drafts/body/3-the-pier-DRAFT.md +45 -0
- package/data/demo/.manuscript/drafts/body/4-the-clock-DRAFT.md +59 -0
- package/data/demo/.manuscript/plans/5-the-reunion-PLAN.md +52 -0
- package/data/demo/.manuscript/reviews/2-the-workshop-REVIEW.md +61 -0
- package/data/export-templates/scriveno-academic.latex +184 -0
- package/data/export-templates/scriveno-acm.latex +67 -0
- package/data/export-templates/scriveno-apa7.latex +83 -0
- package/data/export-templates/scriveno-book.typst +175 -0
- package/data/export-templates/scriveno-chapbook.typst +121 -0
- package/data/export-templates/scriveno-elsevier.latex +76 -0
- package/data/export-templates/scriveno-epub.css +386 -0
- package/data/export-templates/scriveno-fixed-layout-epub.css +76 -0
- package/data/export-templates/scriveno-fixed-layout.opf +23 -0
- package/data/export-templates/scriveno-ieee.latex +77 -0
- package/data/export-templates/scriveno-lncs.latex +79 -0
- package/data/export-templates/scriveno-picturebook.typst +113 -0
- package/data/export-templates/scriveno-poetry-submission-styles.md +45 -0
- package/data/export-templates/scriveno-poetry-submission.docx +0 -0
- package/data/export-templates/scriveno-smashwords-styles.md +45 -0
- package/data/export-templates/scriveno-smashwords.docx +0 -0
- package/data/export-templates/scriveno-stageplay.typst +129 -0
- package/data/proof/creative-context/README.md +79 -0
- package/data/proof/voice-dna/GUIDED-SAMPLE.md +19 -0
- package/data/proof/voice-dna/README.md +45 -0
- package/data/proof/voice-dna/STYLE-GUIDE-EXCERPT.md +43 -0
- package/data/proof/voice-dna/UNGUIDED-SAMPLE.md +11 -0
- package/data/proof/watchmaker-flow/README.md +78 -0
- package/docs/architecture.md +425 -0
- package/docs/command-reference.md +2384 -0
- package/docs/configuration.md +228 -0
- package/docs/context-protocol.md +81 -0
- package/docs/contributing.md +430 -0
- package/docs/creative-context.md +158 -0
- package/docs/development.md +152 -0
- package/docs/drafter-quality.md +127 -0
- package/docs/getting-started.md +198 -0
- package/docs/history-protocol.md +96 -0
- package/docs/proof-artifacts.md +56 -0
- package/docs/publishing.md +296 -0
- package/docs/release-notes.md +457 -0
- package/docs/runtime-support.md +77 -0
- package/docs/sacred-texts.md +296 -0
- package/docs/shipped-assets.md +129 -0
- package/docs/testing.md +156 -0
- package/docs/translation.md +343 -0
- package/docs/voice-dna.md +297 -0
- package/docs/work-types.md +339 -0
- package/lib/architectural-profiles.js +134 -0
- package/package.json +54 -0
- package/templates/BRIEF.md +51 -0
- package/templates/CHARACTERS.md +64 -0
- package/templates/CONTEXT.md +56 -0
- package/templates/OUTLINE.md +36 -0
- package/templates/RECORD.md +68 -0
- package/templates/STATE.md +50 -0
- package/templates/STYLE-GUIDE.md +121 -0
- package/templates/THEMES.md +36 -0
- package/templates/WORK.md +67 -0
- package/templates/WORLD.md +62 -0
- package/templates/WRITING-RULES.md +156 -0
- package/templates/academic/ARGUMENT-MAP.md +40 -0
- package/templates/academic/CONCEPTS.md +34 -0
- package/templates/academic/CONTEXT.md +29 -0
- package/templates/academic/PROPOSAL.md +37 -0
- package/templates/academic/QUESTIONS.md +24 -0
- package/templates/config.json +72 -0
- package/templates/pitfalls/comic.md +54 -0
- package/templates/pitfalls/commentary.md +62 -0
- package/templates/pitfalls/memoir.md +48 -0
- package/templates/pitfalls/novel.md +53 -0
- package/templates/pitfalls/poetry_collection.md +63 -0
- package/templates/pitfalls/research_paper.md +66 -0
- package/templates/pitfalls/runbook.md +64 -0
- package/templates/pitfalls/screenplay.md +54 -0
- package/templates/platforms/README.md +16 -0
- package/templates/platforms/apple/manifest.yaml +20 -0
- package/templates/platforms/bn/manifest.yaml +20 -0
- package/templates/platforms/d2d/manifest.yaml +20 -0
- package/templates/platforms/google/manifest.yaml +20 -0
- package/templates/platforms/ingram/manifest.yaml +44 -0
- package/templates/platforms/kdp/manifest.yaml +42 -0
- package/templates/platforms/kobo/manifest.yaml +20 -0
- package/templates/platforms/smashwords/manifest.yaml +26 -0
- package/templates/sacred/COSMOLOGY.md +88 -0
- package/templates/sacred/DOCTRINES.md +45 -0
- package/templates/sacred/FIGURES.md +69 -0
- package/templates/sacred/FRAMEWORK.md +98 -0
- package/templates/sacred/LINEAGES.md +52 -0
- package/templates/sacred/README.md +20 -0
- package/templates/sacred/THEOLOGICAL-ARC.md +69 -0
- package/templates/sacred/catholic/manifest.yaml +93 -0
- package/templates/sacred/islamic-hafs/manifest.yaml +134 -0
- package/templates/sacred/islamic-warsh/manifest.yaml +134 -0
- package/templates/sacred/jewish/manifest.yaml +56 -0
- package/templates/sacred/orthodox/manifest.yaml +98 -0
- package/templates/sacred/pali/manifest.yaml +20 -0
- package/templates/sacred/protestant/manifest.yaml +86 -0
- package/templates/sacred/sanskrit/manifest.yaml +20 -0
- package/templates/sacred/tewahedo/manifest.yaml +106 -0
- package/templates/sacred/tibetan/manifest.yaml +20 -0
- package/templates/technical/AUDIENCE.md +26 -0
- package/templates/technical/DEPENDENCIES.md +19 -0
- package/templates/technical/DOC-BRIEF.md +45 -0
- package/templates/technical/PROCEDURES.md +37 -0
- package/templates/technical/REFERENCES.md +36 -0
- package/templates/technical/SYSTEM.md +25 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Manage verse/ayah/pasuk numbering systems. Handles differences between traditions (Masoretic vs. Septuagint numbering, Hafs vs. Warsh Quranic numbering, etc.)
|
|
3
|
+
argument-hint: "[--system <system>] [--convert <from>-<to>] [--verify]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verse numbering
|
|
7
|
+
|
|
8
|
+
You manage verse numbering across tradition-specific systems. Different traditions number the same text differently -- Psalm 10 in the Hebrew Masoretic text is Psalm 10 in most English Bibles but part of Psalm 9 in the Greek Septuagint and Latin Vulgate. Quranic ayah counts differ between Hafs and Warsh transmissions.
|
|
9
|
+
|
|
10
|
+
## Availability
|
|
11
|
+
|
|
12
|
+
Sacred work types only. Requires at least one drafted unit.
|
|
13
|
+
|
|
14
|
+
## Supported systems
|
|
15
|
+
|
|
16
|
+
- **masoretic** -- Hebrew Bible (Jewish and most Protestant)
|
|
17
|
+
- **septuagint** -- Greek Old Testament (Orthodox, some Catholic)
|
|
18
|
+
- **vulgate** -- Latin (Catholic tradition)
|
|
19
|
+
- **quranic_hafs** -- Hafs recitation (most common Quran numbering)
|
|
20
|
+
- **quranic_warsh** -- Warsh recitation (North African Quran numbering)
|
|
21
|
+
- **pali_canon** -- Theravada Buddhist numbering
|
|
22
|
+
- **sanskrit_vedic** -- Vedic hymn numbering
|
|
23
|
+
- **custom** -- User-defined numbering scheme
|
|
24
|
+
|
|
25
|
+
## What to do
|
|
26
|
+
|
|
27
|
+
### No arguments
|
|
28
|
+
|
|
29
|
+
Show the current numbering system from config.json. List any drafted units and their current verse counts. Highlight any numbering inconsistencies (e.g., a unit has 40 verses in one place and 41 in another).
|
|
30
|
+
|
|
31
|
+
### --system <system>
|
|
32
|
+
|
|
33
|
+
Switch the project's verse numbering system. Warning: this is a significant change. Show the writer what will be renumbered and ask for confirmation. On yes, rewrite verse markers throughout drafted units and update `.manuscript/config.json` with top-level `verse_numbering_system`. For older projects that already contain `sacred.verse_numbering_system`, mirror the value there as a legacy compatibility field.
|
|
34
|
+
|
|
35
|
+
### --convert <from>-<to>
|
|
36
|
+
|
|
37
|
+
Generate a conversion table between two numbering systems. Useful for commentaries that need to reference both systems, or for translations aligning to a canonical target.
|
|
38
|
+
|
|
39
|
+
Output format:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Genesis 31:55 (Masoretic) = Genesis 32:1 (Septuagint)
|
|
43
|
+
Psalm 51:1 (English) = Psalm 51:3 (Hebrew)
|
|
44
|
+
...
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Save the conversion table to `.manuscript/verse-conversion-{from}-{to}.md` for reference.
|
|
48
|
+
|
|
49
|
+
### --dual
|
|
50
|
+
|
|
51
|
+
Show dual numbering side by side where two systems diverge. Useful for commentaries or translations that need to reference both systems:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Psalm 51:1 (English) / Psalm 51:3 (Hebrew Masoretic)
|
|
55
|
+
Genesis 31:55 (Masoretic) / Genesis 32:1 (Septuagint)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Store numbering metadata in `.manuscript/verse-map.json` with entries mapping each verse to its equivalent in other systems. This JSON file enables automated conversion and export in any numbering system.
|
|
59
|
+
|
|
60
|
+
### --verify
|
|
61
|
+
|
|
62
|
+
Scan all drafted units and flag any verse numbering issues:
|
|
63
|
+
- Non-sequential numbers (missing or duplicated)
|
|
64
|
+
- References to verses that don't exist
|
|
65
|
+
- Cross-references in CONCORDANCE.md that don't resolve
|
|
66
|
+
- Verses split or merged in ways that don't match the configured system
|
|
67
|
+
- Mixed systems in the same unit
|
|
68
|
+
|
|
69
|
+
Produce a report with specific file:line locations.
|
|
70
|
+
|
|
71
|
+
## Integration
|
|
72
|
+
|
|
73
|
+
- Export commands use verse numbering for pagination, cross-reference rendering, and index generation
|
|
74
|
+
- `/scr:sacred:concordance` and `/scr:sacred:cross-reference` use the numbering as primary keys
|
|
75
|
+
- `/scr:sacred:annotation-layer` uses verse numbers as anchors -- annotations are tied to specific verses
|
|
76
|
+
- Translation work must preserve the source numbering system (or explicitly convert)
|
|
77
|
+
|
|
78
|
+
## Response Contract
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
Use this format:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
Next commands:
|
|
86
|
+
- `/scr:...`: One short sentence explaining what this path will do.
|
|
87
|
+
- `/scr:...`: One short sentence explaining what this alternate path will do.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
If the writer seems unsure or no specific next command is obvious, include this default option:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
Next commands:
|
|
96
|
+
- `/scr:next`: Inspect the project state and choose the right next step.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
|
|
100
|
+
|
|
101
|
+
## Tone
|
|
102
|
+
|
|
103
|
+
Technical and exact. Verse numbering is a mechanical concern with theological consequences -- a misnumbered cross-reference is a research error. Precision over prose.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show verse numbering format for the active sacred tradition."
|
|
3
|
+
argument-hint: "[--example <text>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /scr:sacred-verse-numbering -- Tradition Verse Numbering Reference
|
|
7
|
+
|
|
8
|
+
Show the verse numbering format for the active sacred tradition. Reads the tradition profile from the project's config and displays the numbering system with example citations.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/scr:sacred-verse-numbering [--example <text>]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
If `--example <text>` is provided, format the given text as a citation in the tradition's numbering system.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
### STEP 1: LOAD TRADITION
|
|
21
|
+
|
|
22
|
+
Read top-level `tradition` from `.manuscript/config.json`. For older projects only, if top-level `tradition` is absent and `sacred.tradition` exists, use `sacred.tradition` as a legacy fallback.
|
|
23
|
+
|
|
24
|
+
If `tradition` is absent or null:
|
|
25
|
+
> **No tradition set.** Add `"tradition": "<slug>"` to `.manuscript/config.json` to use this command. Valid traditions: `catholic`, `orthodox`, `tewahedo`, `protestant`, `jewish`, `islamic-hafs`, `islamic-warsh`, `pali`, `tibetan`, `sanskrit`.
|
|
26
|
+
|
|
27
|
+
Then **stop**.
|
|
28
|
+
|
|
29
|
+
Validate the tradition slug against the accepted list:
|
|
30
|
+
`catholic`, `orthodox`, `tewahedo`, `protestant`, `jewish`, `islamic-hafs`, `islamic-warsh`, `pali`, `tibetan`, `sanskrit`
|
|
31
|
+
|
|
32
|
+
If the value is not in this list:
|
|
33
|
+
> **Unknown tradition "{tradition}".** Valid values: `catholic`, `orthodox`, `tewahedo`, `protestant`, `jewish`, `islamic-hafs`, `islamic-warsh`, `pali`, `tibetan`, `sanskrit`.
|
|
34
|
+
|
|
35
|
+
Then **stop**.
|
|
36
|
+
|
|
37
|
+
Load `templates/sacred/{tradition}/manifest.yaml`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### STEP 2: DISPLAY NUMBERING FORMAT
|
|
42
|
+
|
|
43
|
+
From the loaded manifest, read:
|
|
44
|
+
- `label` -- the tradition's human name
|
|
45
|
+
- `numbering.format` -- the citation format (e.g. `chapter:verse`, `surah:ayah`, `nikaya:sutta`)
|
|
46
|
+
- `numbering.separator` -- the separator character (e.g. `:` or `.`)
|
|
47
|
+
|
|
48
|
+
Display the numbering reference:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Tradition: {label}
|
|
52
|
+
Format: {numbering.format}
|
|
53
|
+
Separator: {numbering.separator}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then provide 3 example citations using the tradition's format:
|
|
57
|
+
|
|
58
|
+
| Tradition | Example 1 | Example 2 | Example 3 |
|
|
59
|
+
|-----------|-----------|-----------|-----------|
|
|
60
|
+
|
|
61
|
+
Use the following tradition-specific examples:
|
|
62
|
+
|
|
63
|
+
- **catholic / orthodox / protestant / tewahedo**: `Genesis 1:1`, `Psalms 23:1`, `John 3:16`
|
|
64
|
+
- **jewish**: `Genesis 1:1`, `Psalms 23:1`, `Isaiah 53:5`
|
|
65
|
+
- **islamic-hafs / islamic-warsh**: `1:1` (Al-Fatihah:1), `2:255` (Al-Baqarah:255, the Throne Verse), `112:1` (Al-Ikhlas:1)
|
|
66
|
+
- **pali**: `DN.1.1` (Digha Nikaya, Sutta 1, section 1), `MN.22.1`, `SN.35.1`
|
|
67
|
+
- **tibetan**: `1:1`, `2:3`, `5:12`
|
|
68
|
+
- **sanskrit**: `1:1`, `2:47`, `18:66`
|
|
69
|
+
|
|
70
|
+
If `--example <text>` was provided, also display:
|
|
71
|
+
> **Your citation formatted:** {text formatted as a citation in this tradition's style, e.g. inserting the separator between parts if the text contains numbers}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### STEP 3: APPROVAL BLOCK REMINDER (CONDITIONAL)
|
|
76
|
+
|
|
77
|
+
If `approval_block.required` is `true` in the loaded manifest:
|
|
78
|
+
> **Reminder:** This tradition requires a {approval_block.label} before publication. Run `/scr:front-matter` to generate the approval block scaffold.
|
|
79
|
+
|
|
80
|
+
If `approval_block.required` is `false`: skip this step silently.
|
|
81
|
+
|
|
82
|
+
## Response Contract
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
Use this format:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
Next commands:
|
|
90
|
+
- `/scr:...`: One short sentence explaining what this path will do.
|
|
91
|
+
- `/scr:...`: One short sentence explaining what this alternate path will do.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
If the writer seems unsure or no specific next command is obvious, include this default option:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
Next commands:
|
|
100
|
+
- `/scr:next`: Inspect the project state and choose the right next step.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
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,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Save your current work. Auto-generates a descriptive save message from context.
|
|
3
|
+
argument-hint: "[optional message]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Save
|
|
7
|
+
|
|
8
|
+
You are saving the writer's current work. Your job is to create a git commit with a writer-friendly message, without exposing any git terminology.
|
|
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:
|
|
15
|
+
- Read `.manuscript/config.json` for `developer_mode`.
|
|
16
|
+
- If `developer_mode: false` (writer mode): silently run `git init` in the project root. No output about this.
|
|
17
|
+
- If `developer_mode: true`: tell the writer "Initializing version tracking for this project." then run `git init`.
|
|
18
|
+
|
|
19
|
+
3. **Check for changes to save.** Run `git status --porcelain .manuscript/`. If nothing has changed:
|
|
20
|
+
- Look at the last entry in STATE.md "Last actions" table for the timestamp.
|
|
21
|
+
- Tell the writer: "Nothing new to save. Your last save was [timestamp from last action]."
|
|
22
|
+
- Stop here.
|
|
23
|
+
|
|
24
|
+
4. **Read `.manuscript/STATE.md`** to determine context:
|
|
25
|
+
- Current stage (discuss/plan/draft/review/submit)
|
|
26
|
+
- Current unit name and number (from config.json `command_unit` and STATE.md `Current unit`)
|
|
27
|
+
- Last command run (from "Last actions" table)
|
|
28
|
+
- Record highlights from `.manuscript/RECORD.md` when present: open threads, next-unit obligations, and recent established items
|
|
29
|
+
|
|
30
|
+
5. **Auto-generate the commit message** based on context:
|
|
31
|
+
- If the writer provided an optional message argument: `"Saved: {writer's message}"`
|
|
32
|
+
- After drafting (last command was `draft`): `"Saved after drafting {unit_name} {N}"`
|
|
33
|
+
- After review (last command was `editor-review`): `"Saved after editor review of {unit_name} {N}"`
|
|
34
|
+
- After revision (last command was `revise`): `"Saved after revising {unit_name} {N}"`
|
|
35
|
+
- After planning (last command was `plan`): `"Saved after planning {unit_name} {N}"`
|
|
36
|
+
- After discussion (last command was `discuss`): `"Saved after discussing {unit_name} {N}"`
|
|
37
|
+
- Default / manual save: `"Saved work in progress on {unit_name} {N}"`
|
|
38
|
+
|
|
39
|
+
6. **Update STATE.md** "Last actions" table with a new row:
|
|
40
|
+
- Timestamp: current date/time
|
|
41
|
+
- Command: `save`
|
|
42
|
+
- Unit: current unit from STATE.md
|
|
43
|
+
- Outcome: the generated message
|
|
44
|
+
|
|
45
|
+
7. **Regenerate `.manuscript/CONTEXT.md`** before staging. This file is the bootstrap any new session reads first. Use the `templates/CONTEXT.md` scaffold and fill every `{{TOKEN}}`:
|
|
46
|
+
- `{{LAST_UPDATED}}` -- ISO 8601 timestamp of this save
|
|
47
|
+
- `{{LAST_COMMAND}}` -- `/scr:save`
|
|
48
|
+
- `{{TITLE}}`, `{{WORK_TYPE}}` -- from `.manuscript/config.json`
|
|
49
|
+
- `{{PHASE}}`, `{{CURRENT_UNIT}}` -- from STATE.md (the values you computed in step 6)
|
|
50
|
+
- `{{RECENT_ACTIONS}}` -- the last 5 lines of `.manuscript/HISTORY.log` rendered as table rows. If HISTORY.log is missing, use the last 5 entries from STATE.md "Last actions" instead.
|
|
51
|
+
- `{{UNITS_PENDING_REVIEW}}`, `{{UNITS_PENDING_DRAFT}}`, `{{VOICE_WARNINGS}}`, `{{CONTINUITY_FLAGS}}`, `{{SCAFFOLD_MARKERS}}` -- from STATE.md "Pending"
|
|
52
|
+
- `{{RECORD_HIGHLIGHTS}}` -- a compact 3-5 line summary from RECORD.md: open threads, promises needing payoff, and next-unit obligations. If RECORD.md is missing, use `No RECORD.md found yet.`
|
|
53
|
+
- `{{NEXT_STEP}}` -- the same suggestion `/scr:next` would emit
|
|
54
|
+
- `{{LAST_SCAN}}`, `{{LAST_SCAN_VERDICT}}` -- from STATE.md if recorded; otherwise `never run` and `unknown`
|
|
55
|
+
Save to `.manuscript/CONTEXT.md`. This file is committed alongside STATE.md.
|
|
56
|
+
|
|
57
|
+
8. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
|
|
58
|
+
```
|
|
59
|
+
{ISO timestamp} | scr:save | message="{generated message}" | files={changed file count} | outcome=committed
|
|
60
|
+
```
|
|
61
|
+
If HISTORY.log does not exist, create it. Do not stage it as a separate operation -- step 9 picks it up.
|
|
62
|
+
|
|
63
|
+
9. **Execute the save:**
|
|
64
|
+
```
|
|
65
|
+
git add .manuscript/
|
|
66
|
+
git commit -m "{generated message}"
|
|
67
|
+
```
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
10. **Tell the writer** the result (see output section below).
|
|
71
|
+
|
|
72
|
+
## Writer mode output
|
|
73
|
+
|
|
74
|
+
- **Writer mode** (`developer_mode: false`): "Saved. You can see your save history with `/scr:history`."
|
|
75
|
+
- **Developer mode** (`developer_mode: true`): Show full git commit output including the short hash and message: "Committed: {hash} - {message}"
|
|
76
|
+
|
|
77
|
+
## Edge cases
|
|
78
|
+
|
|
79
|
+
- **No changes to save:** "Nothing new to save. Your last save was [timestamp]."
|
|
80
|
+
- **Not in a Scriveno project** (no `.manuscript/` directory): "No manuscript found. Start with `/scr:new-work`."
|
|
81
|
+
- **Git repo corrupted or in bad state:** In writer mode, say "Something went wrong saving your work. Try again, or ask for help." In developer mode, show the git error.
|
|
82
|
+
- **Very first save** (no previous commits): Auto-generate message as "Initial save of {work title}" using the title from `.manuscript/WORK.md` if available.
|
|
83
|
+
|
|
84
|
+
## Response Contract
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
Use this format:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
Next commands:
|
|
92
|
+
- `/scr:...`: One short sentence explaining what this path will do.
|
|
93
|
+
- `/scr:...`: One short sentence explaining what this alternate path will do.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
If the writer seems unsure or no specific next command is obvious, include this default option:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
Next commands:
|
|
102
|
+
- `/scr:next`: Inspect the project state and choose the right next step.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
|
|
106
|
+
|
|
107
|
+
## Tone
|
|
108
|
+
|
|
109
|
+
Brief. Reassuring. The writer should feel that their work is safely stored. Don't explain what git did -- just confirm it's saved.
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Scan the project for context drift between recorded state and what is actually on disk.
|
|
3
|
+
argument-hint: "[--fix] [--quiet]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /scr:scan -- Context Drift Scanner
|
|
7
|
+
|
|
8
|
+
You are the project's drift detector. Trust nothing. Compare what `.manuscript/STATE.md`, `OUTLINE.md`, `RECORD.md`, `config.json`, and the various structural files **claim** against what the filesystem actually contains, and report every mismatch.
|
|
9
|
+
|
|
10
|
+
This is the defense against context corruption. A fresh Claude session, a writer who hand-edited files between sessions, an interrupted command, or a partial revert can all leave the project in an internally inconsistent state. STATE.md says 12 units drafted; the disk has 14. OUTLINE.md lists "Chapter 8" but no draft file exists. RECORD.md says a promise is still open but the draft paid it off. STYLE-GUIDE.md was edited yesterday but no voice-check has run since. `/scr:scan` finds those.
|
|
11
|
+
|
|
12
|
+
This complements `/scr:health` (which fixes structural issues like missing directories) and `/scr:resume-work` (which reads recorded state). `/scr:scan` interrogates whether the recorded state is true.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/scr:scan # report-only
|
|
18
|
+
/scr:scan --fix # offer to fix the auto-fixable mismatches
|
|
19
|
+
/scr:scan --quiet # only show drift; suppress the all-clear summary
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Instruction
|
|
23
|
+
|
|
24
|
+
Load `.manuscript/config.json`, `.manuscript/STATE.md`, `.manuscript/OUTLINE.md`, and `.manuscript/RECORD.md` when present. Each check below produces a finding with one of three severities:
|
|
25
|
+
|
|
26
|
+
- **DRIFT** -- recorded state contradicts disk reality. Trust nothing downstream until resolved.
|
|
27
|
+
- **WARNING** -- an artifact is stale or out of date. Downstream work may be silently using outdated input.
|
|
28
|
+
- **INFO** -- worth noticing but not actionable.
|
|
29
|
+
|
|
30
|
+
Run every check. Do not stop on first finding. Bundle them all into one report.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### CHECK 1: STATE.md unit counts vs. filesystem
|
|
35
|
+
|
|
36
|
+
Read `STATE.md` for `Units drafted`, `Units planned`, `Units reviewed`, and `Total words`. Then count what is actually on disk:
|
|
37
|
+
|
|
38
|
+
- **Units drafted** = files matching `.manuscript/drafts/body/*-DRAFT.md`
|
|
39
|
+
- **Units planned** = files matching `.manuscript/*-*-PLAN.md` (numeric-prefixed plan files)
|
|
40
|
+
- **Units reviewed** = files matching `.manuscript/*-EDITOR-NOTES.md`
|
|
41
|
+
- **Total words** = `wc -w` summed across all `drafts/body/*-DRAFT.md` files
|
|
42
|
+
|
|
43
|
+
For each metric where STATE.md value != filesystem value, emit:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
DRIFT STATE.md units-drafted = 12, on disk = 14 (delta +2)
|
|
47
|
+
Likely cause: drafts written outside /scr:draft, or STATE.md not updated.
|
|
48
|
+
Fix: re-run /scr:draft on the missing units, or update STATE.md to match disk.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For total words, allow a 10-word slack (writers tweak prose without re-saving).
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### CHECK 2: OUTLINE.md units vs. draft files
|
|
56
|
+
|
|
57
|
+
Parse `OUTLINE.md` for the ordered unit list. Compare against `.manuscript/drafts/body/`:
|
|
58
|
+
|
|
59
|
+
- **Outline orphans** -- units listed in OUTLINE.md with no draft file. Severity: INFO if the unit was added recently and has no plan yet; DRIFT if a plan file exists but no draft.
|
|
60
|
+
- **Draft orphans** -- draft files that do not appear in OUTLINE.md. Severity: DRIFT (an orphan draft will not be assembled at export time and the writer may not know).
|
|
61
|
+
|
|
62
|
+
For each orphan, emit one finding with the unit identifier and the file path.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### CHECK 3: Plan vs. draft alignment
|
|
67
|
+
|
|
68
|
+
For each `*-PLAN.md` file in `.manuscript/`, check whether the corresponding `*-DRAFT.md` exists in `drafts/body/`. If a plan exists but no draft:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
INFO Unit 8 has a plan ({N}-{A}-PLAN.md) but no draft yet.
|
|
72
|
+
Next: /scr:draft 8
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For each draft, check whether the corresponding plan exists. If a draft exists but no plan:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
WARNING Unit 12 was drafted without a plan file.
|
|
79
|
+
Drafter ran on inferred context. Voice check may be uneven.
|
|
80
|
+
Fix: backfill the plan via /scr:plan 12, or accept and move on.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### CHECK 4: STYLE-GUIDE.md vs. last drafter run
|
|
86
|
+
|
|
87
|
+
Compare the modification timestamp of `STYLE-GUIDE.md` against the modification timestamp of the **newest** `*-DRAFT.md` file in `drafts/body/`.
|
|
88
|
+
|
|
89
|
+
If STYLE-GUIDE.md is newer than every draft file, voice DNA has changed since the last draft was written. Emit:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
WARNING STYLE-GUIDE.md was edited at 2026-05-09T14:22:00Z
|
|
93
|
+
Newest draft: 12-B-DRAFT.md at 2026-05-08T11:05:00Z
|
|
94
|
+
Drafts written before the style guide edit may not reflect the current voice.
|
|
95
|
+
Fix: /scr:voice-check N for any unit drafted before 2026-05-09.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If the most recent voice-check run is recorded in STATE.md and is older than STYLE-GUIDE.md's edit, also flag.
|
|
99
|
+
|
|
100
|
+
Use the appropriate stat command for the platform (per `/scr:export` STEP 1.6b conventions):
|
|
101
|
+
- macOS: `stat -f %m <file>`
|
|
102
|
+
- Linux: `stat -c %Y <file>`
|
|
103
|
+
- Windows: `(Get-Item '<file>').LastWriteTimeUtc.Ticks`
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### CHECK 5: Front-matter scaffolds still pending
|
|
108
|
+
|
|
109
|
+
Scan `.manuscript/front-matter/*.md`. For each file with `scaffold: true` in its YAML header, emit:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
INFO Front matter element "12-preface.md" still has scaffold: true
|
|
113
|
+
It will be excluded from publication exports until you set scaffold: false.
|
|
114
|
+
Edit the file or run /scr:front-matter --element preface to draft it.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
This is informational, not drift -- the scaffold gate is intentional.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### CHECK 6: Stale export outputs
|
|
122
|
+
|
|
123
|
+
Scan `.manuscript/output/`. For each output file (`manuscript.pdf`, `manuscript.docx`, `manuscript.epub`, `manuscript-print.pdf`, etc.), compare its modification timestamp against the newest source file (any `drafts/body/*-DRAFT.md` or `front-matter/*.md` or `back-matter/*.md`).
|
|
124
|
+
|
|
125
|
+
If any source is newer than the export, emit:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
WARNING .manuscript/output/manuscript.epub is older than the newest draft.
|
|
129
|
+
Last exported: 2026-05-07T09:14:00Z
|
|
130
|
+
Newest source: drafts/body/12-B-DRAFT.md at 2026-05-09T16:42:00Z
|
|
131
|
+
Re-export: /scr:export --format epub
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Group all stale outputs into one finding when the same source is newer than multiple outputs.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### CHECK 7: CONTEXT.md staleness
|
|
139
|
+
|
|
140
|
+
If `.manuscript/CONTEXT.md` exists, compare its mtime against STATE.md and the newest draft. If CONTEXT.md is older than either, emit:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
WARNING .manuscript/CONTEXT.md is older than the recorded state.
|
|
144
|
+
A fresh session reading CONTEXT.md will get an outdated picture.
|
|
145
|
+
Fix: /scr:resume-work to regenerate it (or /scr:scan --fix).
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If CONTEXT.md does not exist, emit INFO with a one-line suggestion to run `/scr:resume-work` once to generate it.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### CHECK 8: HISTORY.log integrity
|
|
153
|
+
|
|
154
|
+
If `.manuscript/HISTORY.log` exists, scan the last 50 lines for malformed entries (lines that don't match the pipe-delimited contract from `docs/history-protocol.md`). Report the count of malformed lines as INFO. Do not auto-fix.
|
|
155
|
+
|
|
156
|
+
If HISTORY.log does not exist, emit INFO that history-tracking is not active.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### CHECK 9: Sacred-tradition config vs. shipped templates
|
|
161
|
+
|
|
162
|
+
If `config.json` has a `tradition:` key set, verify that `templates/sacred/<tradition>/manifest.yaml` exists in the installed Scriveno templates. If not, emit:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
DRIFT config.json declares tradition: "{value}"
|
|
166
|
+
But templates/sacred/{value}/manifest.yaml does not exist.
|
|
167
|
+
Sacred-aware commands will fall back to defaults silently.
|
|
168
|
+
Fix: pick a shipped tradition (list via /scr:settings) or add the manifest.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### CHECK 10: CHARACTERS.md vs. drafts
|
|
174
|
+
|
|
175
|
+
Parse `.manuscript/CHARACTERS.md` (or FIGURES.md for sacred works) for character/figure names. Grep all draft files for proper-noun strings that look like character names (capitalized, two or more occurrences) but do not appear in CHARACTERS.md. Emit each unknown name as INFO with the first draft file it appears in:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
INFO "Marcus" appears in 4 drafts but is not in CHARACTERS.md.
|
|
179
|
+
Either add a character entry via /scr:new-character "Marcus", or this is a one-off mention.
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This is best-effort. False positives (locations, brands, common nouns capitalized at sentence start) are expected. Group similar findings.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### CHECK 11: RECORD.md integrity
|
|
187
|
+
|
|
188
|
+
If `.manuscript/RECORD.md` does not exist, emit INFO for older projects:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
INFO RECORD.md is missing.
|
|
192
|
+
This project can still work, but Scriveno has no compact store for what the work has established.
|
|
193
|
+
Fix: /scr:scan --fix can initialize RECORD.md from the installed template.
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
If RECORD.md exists, check it against drafted content as a compact best-effort audit:
|
|
197
|
+
|
|
198
|
+
- **Staleness** -- If the newest draft is newer than RECORD.md and no later editor review or save mentions record updates, emit WARNING that RECORD.md may not include the latest established content.
|
|
199
|
+
- **Empty store after drafts** -- If draft files exist but RECORD.md still contains only placeholders, emit WARNING.
|
|
200
|
+
- **Resolved thread still marked open** -- If a thread is listed as open but review reports or later draft text clearly mark it resolved, emit INFO with a suggested update.
|
|
201
|
+
- **Record contradiction** -- If a durable fact in RECORD.md directly contradicts a later draft, emit DRIFT and cite both locations when possible.
|
|
202
|
+
|
|
203
|
+
Do not over-claim. RECORD.md is an interpretive store, so uncertain findings should be INFO or WARNING unless the contradiction is explicit.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### REPORT
|
|
208
|
+
|
|
209
|
+
Output a single structured report:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
Scriveno context scan
|
|
213
|
+
====================
|
|
214
|
+
Project: [title from config.json]
|
|
215
|
+
Scanned: [N] checks across .manuscript/
|
|
216
|
+
Findings: [X] drift, [Y] warnings, [Z] info
|
|
217
|
+
|
|
218
|
+
DRIFT (must resolve before downstream commands can be trusted)
|
|
219
|
+
--------------------------------------------------------------
|
|
220
|
+
[finding 1 with fix command]
|
|
221
|
+
[finding 2 with fix command]
|
|
222
|
+
...
|
|
223
|
+
|
|
224
|
+
WARNINGS (downstream may be using stale input)
|
|
225
|
+
-----------------------------------------------
|
|
226
|
+
[finding 1]
|
|
227
|
+
[finding 2]
|
|
228
|
+
...
|
|
229
|
+
|
|
230
|
+
INFO (notice and move on if desired)
|
|
231
|
+
-------------------------------------
|
|
232
|
+
[finding 1]
|
|
233
|
+
[finding 2]
|
|
234
|
+
...
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
If there are zero findings AND `--quiet` was not passed, end with:
|
|
238
|
+
|
|
239
|
+
> All checks passed. Recorded state matches disk reality.
|
|
240
|
+
|
|
241
|
+
If `--quiet` was passed and there are zero findings, exit silently with no output.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### --fix MODE
|
|
246
|
+
|
|
247
|
+
When `--fix` is passed, after the report, group findings by auto-fixability:
|
|
248
|
+
|
|
249
|
+
- **Auto-fixable now** -- finding has a deterministic fix Scriveno can apply (e.g. update STATE.md unit counts to match disk, initialize missing RECORD.md from the installed template, regenerate stale CONTEXT.md, sort orphan drafts into a `_unsorted/` review directory). For each, ask the writer once:
|
|
250
|
+
> Apply [N] auto-fixes? (yes / no / show me what each does)
|
|
251
|
+
- **Requires writer decision** -- finding needs a judgment call (e.g. character orphans, scaffold pending, voice drift). List with suggested next command.
|
|
252
|
+
- **Manual** -- finding requires manual cleanup (e.g. malformed HISTORY.log lines).
|
|
253
|
+
|
|
254
|
+
If the writer accepts auto-fixes, apply them in one batch and re-emit the affected findings as RESOLVED.
|
|
255
|
+
|
|
256
|
+
After any auto-fix, append a single line to HISTORY.log per `docs/history-protocol.md`:
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
[ISO timestamp] | scr:scan --fix | files=STATE.md,CONTEXT.md | outcome=fixed-N
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Response Contract
|
|
265
|
+
|
|
266
|
+
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.
|
|
267
|
+
|
|
268
|
+
Use this format:
|
|
269
|
+
|
|
270
|
+
```markdown
|
|
271
|
+
Next commands:
|
|
272
|
+
- `/scr:...`: One short sentence explaining what this path will do.
|
|
273
|
+
- `/scr:...`: One short sentence explaining what this alternate path will do.
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
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.
|
|
277
|
+
|
|
278
|
+
If the writer seems unsure or no specific next command is obvious, include this default option:
|
|
279
|
+
|
|
280
|
+
```markdown
|
|
281
|
+
Next commands:
|
|
282
|
+
- `/scr:next`: Inspect the project state and choose the right next step.
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
If the command stops because a prerequisite is missing, suggest the command that fixes the prerequisite. Keep every explanation practical and writer-facing.
|
|
286
|
+
|
|
287
|
+
## Tone
|
|
288
|
+
|
|
289
|
+
This command is the trust layer. Be precise, blunt, and actionable. Do not soften DRIFT findings into "you might want to consider" -- a drift finding means downstream commands cannot be trusted until resolved. Say so. WARNINGS should still be specific enough that the writer knows whether to act.
|
|
290
|
+
|
|
291
|
+
A scan with zero drift findings is not noise. It is the writer earning the right to trust `/scr:next`, `/scr:export`, and `/scr:publish` for the rest of the session.
|