scriveno 2.0.6 → 2.0.8
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/README.md +23 -5
- package/bin/install.js +216 -5
- package/commands/scr/autopilot-publish.md +28 -0
- package/commands/scr/autopilot-translate.md +29 -0
- package/commands/scr/autopilot.md +29 -0
- package/commands/scr/beta-reader.md +22 -0
- package/commands/scr/continuity-check.md +21 -0
- package/commands/scr/draft.md +21 -0
- package/commands/scr/editor-review.md +26 -0
- package/commands/scr/health.md +19 -0
- package/commands/scr/map-manuscript.md +26 -0
- package/commands/scr/new-work.md +1 -1
- package/commands/scr/next.md +51 -0
- package/commands/scr/plan.md +22 -0
- package/commands/scr/progress.md +36 -0
- package/commands/scr/quick-write.md +23 -0
- package/commands/scr/save.md +21 -0
- package/commands/scr/scan.md +20 -0
- package/commands/scr/session-report.md +30 -0
- package/commands/scr/sync.md +61 -2
- package/commands/scr/track.md +20 -0
- package/commands/scr/translate.md +25 -0
- package/commands/scr/voice-check.md +20 -0
- package/data/CONSTRAINTS.json +1 -1
- package/docs/architecture.md +7 -1
- package/docs/auto-invoke-policy.md +103 -0
- package/docs/configuration.md +1 -1
- package/docs/getting-started.md +12 -0
- package/docs/release-notes.md +68 -0
- package/docs/runtime-support.md +42 -11
- package/lib/auto-invoke-engine.js +520 -0
- package/package.json +1 -1
- package/templates/config.json +1 -1
package/commands/scr/health.md
CHANGED
|
@@ -7,6 +7,8 @@ argument-hint: "[--repair]"
|
|
|
7
7
|
|
|
8
8
|
You are a project health checker. Diagnose problems in the current Scriveno project and optionally fix what can be auto-fixed.
|
|
9
9
|
|
|
10
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:health` is local and diagnostic. It does not spawn agents.
|
|
11
|
+
|
|
10
12
|
## Diagnostic mode (default, no flags)
|
|
11
13
|
|
|
12
14
|
Run these checks in order and report results with status indicators:
|
|
@@ -85,6 +87,23 @@ With `--repair`, fix what can be auto-fixed:
|
|
|
85
87
|
|
|
86
88
|
After repair: re-run diagnostics and show the updated health report.
|
|
87
89
|
|
|
90
|
+
## Automation Status
|
|
91
|
+
|
|
92
|
+
Every response must include a compact status block:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Automation status:
|
|
96
|
+
Trigger: /scr:health {flags}
|
|
97
|
+
Spawned agents:
|
|
98
|
+
- none
|
|
99
|
+
Local operations:
|
|
100
|
+
- health checks run: {count}
|
|
101
|
+
- repairs applied: {count}
|
|
102
|
+
Auto-invoked:
|
|
103
|
+
- none
|
|
104
|
+
Why: health uses deterministic local checks; non-deterministic repairs stay manual
|
|
105
|
+
```
|
|
106
|
+
|
|
88
107
|
## Response Contract
|
|
89
108
|
|
|
90
109
|
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.
|
|
@@ -98,6 +98,8 @@ Spawn 6 parallel analysis agents:
|
|
|
98
98
|
</agent>
|
|
99
99
|
</analysis_agents>
|
|
100
100
|
|
|
101
|
+
If the host runtime cannot spawn these named analysis workers in parallel, run each selected analysis in an isolated fresh context sequentially. Report that fallback clearly. These analysis roles are command-local workers, not installed Scriveno agent prompt files.
|
|
102
|
+
|
|
101
103
|
### OUTPUT
|
|
102
104
|
|
|
103
105
|
Save all analysis files to `.manuscript/analysis/`
|
|
@@ -110,6 +112,30 @@ Present a summary to the writer showing:
|
|
|
110
112
|
|
|
111
113
|
This analysis is automatically loaded by `/scr:new-work` and `/scr:new-revision` when it exists.
|
|
112
114
|
|
|
115
|
+
## Agent and Automation Status
|
|
116
|
+
|
|
117
|
+
Every response must include a short status block that makes invocation visible:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
Agent status:
|
|
121
|
+
Trigger: /scr:map-manuscript {area}
|
|
122
|
+
Spawned agents:
|
|
123
|
+
- voice-analyst: yes/no
|
|
124
|
+
- structure-analyst: yes/no
|
|
125
|
+
- character-analyst: yes/no
|
|
126
|
+
- theme-analyst: yes/no
|
|
127
|
+
- world-analyst: yes/no
|
|
128
|
+
- pacing-analyst: yes/no
|
|
129
|
+
Local operations:
|
|
130
|
+
- manuscript files read: {count}
|
|
131
|
+
- analysis files written: {count}
|
|
132
|
+
Auto-invoked:
|
|
133
|
+
- none
|
|
134
|
+
Why: map-manuscript produces analysis artifacts that later commands load when present
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
If parallel worker spawning is unavailable, say `parallel unavailable; sequential isolated analysis used` in the status block.
|
|
138
|
+
|
|
113
139
|
## Response Contract
|
|
114
140
|
|
|
115
141
|
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.
|
package/commands/scr/new-work.md
CHANGED
|
@@ -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.0.
|
|
72
|
+
"scriveno_version": "2.0.8",
|
|
73
73
|
"work_type": "<chosen>",
|
|
74
74
|
"group": "<group>",
|
|
75
75
|
"command_unit": "<unit>",
|
package/commands/scr/next.md
CHANGED
|
@@ -6,6 +6,19 @@ description: Auto-detect what to do next in your workflow and run it. The one co
|
|
|
6
6
|
|
|
7
7
|
You are routing the writer to the right next step in their workflow. This command is the universal interface -- a writer who only ever types `/scr:next` should be able to complete an entire novel.
|
|
8
8
|
|
|
9
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:next` is Level 1 only by default: it may inspect disk state and suggest the safest next command, but it does not spawn agents or mutate files unless autopilot mode explicitly routes into another command.
|
|
10
|
+
|
|
11
|
+
Use the shared executable engine before falling back to manual inspection. Try the first available path:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
scriveno status --project "$PWD" --trigger /scr:next
|
|
15
|
+
node lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:next
|
|
16
|
+
node "$HOME/.scriveno/lib/auto-invoke-engine.js" --project "$PWD" --trigger /scr:next
|
|
17
|
+
node .scriveno/lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:next
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
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 sweep below.
|
|
21
|
+
|
|
9
22
|
## What to do
|
|
10
23
|
|
|
11
24
|
1. **Check for `.manuscript/` directory.** If none, the writer has no project. Run `/scr:new-work` to start one (or tell them to).
|
|
@@ -32,6 +45,25 @@ You are routing the writer to the right next step in their workflow. This comman
|
|
|
32
45
|
- "Chapter 4 has a plan but no draft yet -- drafting it."
|
|
33
46
|
- "You haven't discussed the next chapter -- shaping Chapter 5."
|
|
34
47
|
|
|
48
|
+
8. **Run the proactive sweep before choosing the final route.** This is read-only unless autopilot mode has already taken over:
|
|
49
|
+
- Check whether `CONTEXT.md` is missing, stale, or older than STATE.md or the newest draft.
|
|
50
|
+
- Check whether `HISTORY.log` is missing or the last command failed.
|
|
51
|
+
- Check whether voice, continuity, editor-review, beta-reader, or translation reports contain unresolved items.
|
|
52
|
+
- Check whether translation folders, target language config, editor notes, track proposals, stale exports, or unsaved manuscript changes imply a better next command than the linear lifecycle.
|
|
53
|
+
- Check whether STATE.md and disk disagree enough that `/scr:scan` should be recommended first.
|
|
54
|
+
|
|
55
|
+
Display a compact proactive block when any signal changes the recommendation:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Proactive checks:
|
|
59
|
+
State: <fresh | stale, suggest /scr:scan>
|
|
60
|
+
Session: <fresh | context stale, suggest /scr:resume-work>
|
|
61
|
+
Reviews: <none | N pending, suggest review command>
|
|
62
|
+
Translation: <none | follow-up available>
|
|
63
|
+
Export: <fresh | stale, suggest /scr:export>
|
|
64
|
+
Save: <clean | unsaved manuscript changes, suggest /scr:save>
|
|
65
|
+
```
|
|
66
|
+
|
|
35
67
|
## Routing logic
|
|
36
68
|
|
|
37
69
|
Use the core writing lifecycle as the default map:
|
|
@@ -93,6 +125,25 @@ Use progressive surfacing rules:
|
|
|
93
125
|
- **Non-blocking craft question or watchpoint** -- If only `QUESTION: Non-blocking`, `HUNCH`, or `WATCHPOINT` items remain, allow the next draft or review step and mention the watchpoint in one sentence.
|
|
94
126
|
- **Autopilot mode** -- If config has `autopilot.enabled: true`, run multiple steps in sequence without asking, pausing only per the profile's rules (guided, supervised, full-auto).
|
|
95
127
|
|
|
128
|
+
## Agent and Automation Status
|
|
129
|
+
|
|
130
|
+
Every `/scr:next` response must include a short status block when it inspected proactive signals or handed off to another command:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
Automation status:
|
|
134
|
+
Trigger: /scr:next
|
|
135
|
+
Spawned agents:
|
|
136
|
+
- none
|
|
137
|
+
Local operations:
|
|
138
|
+
- proactive sweep: read-only
|
|
139
|
+
- state route computed: yes/no
|
|
140
|
+
Auto-invoked:
|
|
141
|
+
- <recommended command>: yes/no
|
|
142
|
+
Why: /scr:next routes from disk state; it only runs follow-up commands under autopilot or explicit writer intent
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
If autopilot causes `/scr:next` to run another command, the follow-up command must provide its own agent or automation status block.
|
|
146
|
+
|
|
96
147
|
## Adaptive naming
|
|
97
148
|
|
|
98
149
|
Use canonical runnable commands, and adapt the terminology in prompts/output for the current work type. If `command_unit` is `surah`, run `/scr:draft` and frame the work as drafting a surah; keep the command id stable and treat unit labels as presentation only.
|
package/commands/scr/plan.md
CHANGED
|
@@ -78,12 +78,34 @@ Require `{N}-CONTEXT.md` to exist (from discuss phase). If it doesn't, offer to
|
|
|
78
78
|
|
|
79
79
|
7. **Update STATE.md** and suggest: "Ready to draft? Run `/scr:draft N`." (Suppress the draft suggestion if any plan came back NEEDS REVISION; suggest addressing the flagged items first.)
|
|
80
80
|
|
|
81
|
+
If `.manuscript/config.json` has `autopilot.enabled: true`, all plan checks are READY, and the active profile is `full-auto`, immediately proceed to `/scr:draft N` instead of stopping at a suggestion. In `supervised`, pause here and show the plan-check summary before drafting. In `guided`, ask for approval before drafting.
|
|
82
|
+
|
|
81
83
|
8. **Append one line to `.manuscript/HISTORY.log`** per `docs/history-protocol.md`:
|
|
82
84
|
```
|
|
83
85
|
{ISO timestamp} | scr:plan | unit={N} | atomic-units={count} | check={READY|N-flagged} | outcome=ok
|
|
84
86
|
```
|
|
85
87
|
If the run failed, use `outcome=failed:<short-reason>` instead. Create HISTORY.log if it does not exist.
|
|
86
88
|
|
|
89
|
+
## Agent and Automation Status
|
|
90
|
+
|
|
91
|
+
Every response must include a short status block that makes invocation visible:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Agent status:
|
|
95
|
+
Trigger: /scr:plan N
|
|
96
|
+
Spawned agents:
|
|
97
|
+
- plan-checker: {count} fresh-context invocation(s)
|
|
98
|
+
Local operations:
|
|
99
|
+
- plan files written: {count}
|
|
100
|
+
- STATE.md updated: yes/no
|
|
101
|
+
- HISTORY.log updated: yes/no
|
|
102
|
+
Auto-invoked:
|
|
103
|
+
- /scr:draft N: yes/no
|
|
104
|
+
Why: {all plans READY plus full-auto, supervised pause, guided approval needed, or plan check blocked}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If the host runtime cannot spawn a native `plan-checker` agent type, load the installed `agents/plan-checker.md` prompt from the active runtime and run it in an isolated fresh context. In the status block, write `Spawned agents: native unavailable; prompt-run fallback used`.
|
|
108
|
+
|
|
87
109
|
## Response Contract
|
|
88
110
|
|
|
89
111
|
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.
|
package/commands/scr/progress.md
CHANGED
|
@@ -7,6 +7,19 @@ argument-hint: ""
|
|
|
7
7
|
|
|
8
8
|
You are showing the writer their current project progress.
|
|
9
9
|
|
|
10
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:progress` is read-only: it can count, compare, and recommend, but it must not spawn agents or write files.
|
|
11
|
+
|
|
12
|
+
Use the shared executable engine before falling back to manual counts. Try the first available path:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
scriveno status --project "$PWD" --trigger /scr:progress
|
|
16
|
+
node lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:progress
|
|
17
|
+
node "$HOME/.scriveno/lib/auto-invoke-engine.js" --project "$PWD" --trigger /scr:progress
|
|
18
|
+
node .scriveno/lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:progress
|
|
19
|
+
```
|
|
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.
|
|
22
|
+
|
|
10
23
|
## Prerequisites
|
|
11
24
|
|
|
12
25
|
- `.manuscript/STATE.md` must exist
|
|
@@ -22,6 +35,29 @@ You are showing the writer their current project progress.
|
|
|
22
35
|
- "{word_count} words so far."
|
|
23
36
|
- "{open_threads} open record threads." (only when RECORD.md exists)
|
|
24
37
|
- "Next: {next_action}"
|
|
38
|
+
6. Run the Level 1 proactive sweep:
|
|
39
|
+
- If STATE.md counts disagree with draft files, suggest `/scr:scan`.
|
|
40
|
+
- If reports show unresolved review items, suggest the matching review command.
|
|
41
|
+
- If exports are stale, suggest `/scr:export` or `/scr:publish`.
|
|
42
|
+
- If translation work exists and follow-up reports are missing, suggest the next translation check.
|
|
43
|
+
- If unsaved manuscript changes exist, suggest `/scr:save`.
|
|
44
|
+
|
|
45
|
+
## Automation Status
|
|
46
|
+
|
|
47
|
+
Every response must include a compact status block:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
Automation status:
|
|
51
|
+
Trigger: /scr:progress
|
|
52
|
+
Spawned agents:
|
|
53
|
+
- none
|
|
54
|
+
Local operations:
|
|
55
|
+
- progress counts computed: yes/no
|
|
56
|
+
- proactive sweep: read-only
|
|
57
|
+
Auto-invoked:
|
|
58
|
+
- none
|
|
59
|
+
Why: progress is read-only; it recommends next commands without mutating files
|
|
60
|
+
```
|
|
25
61
|
|
|
26
62
|
## Response Contract
|
|
27
63
|
|
|
@@ -43,6 +43,8 @@ If `--discuss`: Ask 3-5 targeted questions about tone, pacing, and purpose for t
|
|
|
43
43
|
|
|
44
44
|
If `--research`: Spawn a focused researcher for technique guidance.
|
|
45
45
|
|
|
46
|
+
If the host runtime cannot spawn a focused researcher, run the research pass in an isolated fresh context and report `prompt-run fallback used` in the status block.
|
|
47
|
+
|
|
46
48
|
### STEP 3: DRAFT
|
|
47
49
|
|
|
48
50
|
Write the passage following all established style guide constraints. Target whatever length feels natural unless the writer specified a target.
|
|
@@ -58,6 +60,27 @@ Save plan (if generated) to `.manuscript/quick/{NNN}-{slug}/PLAN.md`
|
|
|
58
60
|
|
|
59
61
|
Commit: `quick: {slug}`
|
|
60
62
|
|
|
63
|
+
## Agent and Automation Status
|
|
64
|
+
|
|
65
|
+
Every response must include a short status block that makes invocation visible:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
Agent status:
|
|
69
|
+
Trigger: /scr:quick-write {flags}
|
|
70
|
+
Spawned agents:
|
|
71
|
+
- researcher: yes/no
|
|
72
|
+
Local operations:
|
|
73
|
+
- context files loaded: {count}
|
|
74
|
+
- draft file written: yes/no
|
|
75
|
+
- plan file written: yes/no
|
|
76
|
+
Auto-invoked:
|
|
77
|
+
- /scr:continuity-check: yes/no
|
|
78
|
+
- /scr:voice-check: yes/no
|
|
79
|
+
Why: --full runs verification after drafting; --research spawns a focused technique pass
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
In default mode, report `researcher: none` and both auto-invoked checks as `no`.
|
|
83
|
+
|
|
61
84
|
## Response Contract
|
|
62
85
|
|
|
63
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.
|
package/commands/scr/save.md
CHANGED
|
@@ -7,6 +7,8 @@ argument-hint: "[optional message]"
|
|
|
7
7
|
|
|
8
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
9
|
|
|
10
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:save` does not spawn agents. It owns safe local helpers for `STATE.md`, `CONTEXT.md`, and `HISTORY.log`, then saves `.manuscript/`.
|
|
11
|
+
|
|
10
12
|
## What to do
|
|
11
13
|
|
|
12
14
|
1. **Check for `.manuscript/` directory.** If missing: "No manuscript found. Start with `/scr:new-work`."
|
|
@@ -69,6 +71,25 @@ You are saving the writer's current work. Your job is to create a git commit wit
|
|
|
69
71
|
|
|
70
72
|
10. **Tell the writer** the result (see output section below).
|
|
71
73
|
|
|
74
|
+
## Automation Status
|
|
75
|
+
|
|
76
|
+
Every response must include a compact status block:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Automation status:
|
|
80
|
+
Trigger: /scr:save
|
|
81
|
+
Spawned agents:
|
|
82
|
+
- none
|
|
83
|
+
Local operations:
|
|
84
|
+
- STATE.md updated: yes/no
|
|
85
|
+
- CONTEXT.md regenerated: yes/no
|
|
86
|
+
- HISTORY.log appended: yes/no
|
|
87
|
+
- manuscript files saved: yes/no
|
|
88
|
+
Auto-invoked:
|
|
89
|
+
- /scr:next route computed for CONTEXT.md: yes/no
|
|
90
|
+
Why: save uses deterministic local bookkeeping, not a spawned agent
|
|
91
|
+
```
|
|
92
|
+
|
|
72
93
|
## Writer mode output
|
|
73
94
|
|
|
74
95
|
- **Writer mode** (`developer_mode: false`): "Saved. You can see your save history with `/scr:history`."
|
package/commands/scr/scan.md
CHANGED
|
@@ -7,6 +7,8 @@ argument-hint: "[--fix] [--quiet]"
|
|
|
7
7
|
|
|
8
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
9
|
|
|
10
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:scan` does not spawn agents. It may run deterministic local checks and, under `--fix` after confirmation, deterministic local repairs.
|
|
11
|
+
|
|
10
12
|
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
13
|
|
|
12
14
|
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.
|
|
@@ -261,6 +263,24 @@ After any auto-fix, append a single line to HISTORY.log per `docs/history-protoc
|
|
|
261
263
|
|
|
262
264
|
---
|
|
263
265
|
|
|
266
|
+
## Automation Status
|
|
267
|
+
|
|
268
|
+
Every response must include a compact status block:
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
Automation status:
|
|
272
|
+
Trigger: /scr:scan {flags}
|
|
273
|
+
Spawned agents:
|
|
274
|
+
- none
|
|
275
|
+
Local operations:
|
|
276
|
+
- drift checks run: {count}
|
|
277
|
+
- auto-fixes applied: {count}
|
|
278
|
+
- HISTORY.log appended: yes/no
|
|
279
|
+
Auto-invoked:
|
|
280
|
+
- none
|
|
281
|
+
Why: scan compares disk state locally; fixes require writer confirmation
|
|
282
|
+
```
|
|
283
|
+
|
|
264
284
|
## Response Contract
|
|
265
285
|
|
|
266
286
|
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.
|
|
@@ -7,6 +7,19 @@ argument-hint: ""
|
|
|
7
7
|
|
|
8
8
|
You are summarizing the writer's current session. Your job is to compute actionable metrics from STATE.md and present them clearly.
|
|
9
9
|
|
|
10
|
+
Follow the auto-invoke policy. In the source repository it is documented at `docs/auto-invoke-policy.md`. `/scr:session-report` is read-only and does not spawn agents.
|
|
11
|
+
|
|
12
|
+
Use the shared executable engine for the read-only status portion before computing session-specific metrics. Try the first available path:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
scriveno status --project "$PWD" --trigger /scr:session-report
|
|
16
|
+
node lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:session-report
|
|
17
|
+
node "$HOME/.scriveno/lib/auto-invoke-engine.js" --project "$PWD" --trigger /scr:session-report
|
|
18
|
+
node .scriveno/lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:session-report
|
|
19
|
+
```
|
|
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, continue with the read-only report logic below.
|
|
22
|
+
|
|
10
23
|
## What to do
|
|
11
24
|
|
|
12
25
|
1. **Read STATE.md "Last actions" table** to get the full history of actions.
|
|
@@ -44,6 +57,23 @@ Present the report in this format:
|
|
|
44
57
|
| 3:15 PM | Editor review complete |
|
|
45
58
|
```
|
|
46
59
|
|
|
60
|
+
## Automation Status
|
|
61
|
+
|
|
62
|
+
Every response must include a compact status block:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Automation status:
|
|
66
|
+
Trigger: /scr:session-report
|
|
67
|
+
Spawned agents:
|
|
68
|
+
- none
|
|
69
|
+
Local operations:
|
|
70
|
+
- session metrics computed: yes/no
|
|
71
|
+
- quality pass summary computed: yes/no
|
|
72
|
+
Auto-invoked:
|
|
73
|
+
- none
|
|
74
|
+
Why: session-report summarizes disk state without mutating files
|
|
75
|
+
```
|
|
76
|
+
|
|
47
77
|
## Edge cases
|
|
48
78
|
|
|
49
79
|
- **No actions this session:** If the Last actions table is empty or has no entries after the last pause/resume marker, say: "Nothing to report yet. Start working with `/scr:next`."
|
package/commands/scr/sync.md
CHANGED
|
@@ -7,10 +7,21 @@ argument-hint: "[--check] [--apply] [--runtime <key>] [--detected] [--global|--p
|
|
|
7
7
|
|
|
8
8
|
You are synchronizing Scriveno's installed agent surfaces with the current Scriveno source tree.
|
|
9
9
|
|
|
10
|
-
This command is for local runtime drift: Codex skills, Codex command mirrors, Claude command files,
|
|
10
|
+
This command is for local runtime drift: Codex skills, Codex command mirrors, Claude Code command files, command-directory runtimes, skills runtimes, guided setup assets, and agent prompts that no longer match the source files in the Scriveno package or repo.
|
|
11
11
|
|
|
12
12
|
This is not a package upgrade command. Do not fetch a newer Scriveno release, do not change npm dependencies, and do not modify manuscript content. If the writer wants a newer published package version, that belongs to a future `/scr:update` command.
|
|
13
13
|
|
|
14
|
+
The auto-invoke status engine is a shared runtime asset. It is copied for every install target and can be checked with one of these paths:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
scriveno status --project "$PWD" --trigger /scr:sync
|
|
18
|
+
node lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:sync
|
|
19
|
+
node "$HOME/.scriveno/lib/auto-invoke-engine.js" --project "$PWD" --trigger /scr:sync
|
|
20
|
+
node .scriveno/lib/auto-invoke-engine.js --project "$PWD" --trigger /scr:sync
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use it for read-only project status and next-command reasoning. Use `bin/install.js` for runtime file synchronization.
|
|
24
|
+
|
|
14
25
|
## Prerequisites
|
|
15
26
|
|
|
16
27
|
- Node.js >=20.0.0
|
|
@@ -47,9 +58,15 @@ If you cannot find a Scriveno source root, stop and explain that `/scr:sync` nee
|
|
|
47
58
|
- GitHub Copilot: `~/.github/commands/scr/`, `~/.github/agents/`
|
|
48
59
|
- Windsurf: `~/.windsurf/commands/scr/`, `~/.windsurf/agents/`
|
|
49
60
|
- Antigravity: `~/.gemini/antigravity/commands/scr/`, `~/.gemini/antigravity/agents/`
|
|
61
|
+
- Manus Desktop: `~/.manus/skills/scriveno/SKILL.md` plus mirrored `commands/scr/` and `agents/` inside that skill bundle
|
|
62
|
+
- Perplexity Desktop: `~/.scriveno/perplexity/SETUP.md` and `connector-command.txt`
|
|
63
|
+
- Generic skills fallback: `~/.scriveno/skills/SKILL.md` plus mirrored `commands/scr/` and `agents/`
|
|
50
64
|
4. Compare source files against installed files:
|
|
51
65
|
- Compare command counts.
|
|
52
66
|
- Compare a representative hash set for `commands/scr/autopilot.md`, `commands/scr/next.md`, `commands/scr/scan.md`, `commands/scr/sync.md`, and all generated Codex `SKILL.md` wrappers when present.
|
|
67
|
+
- Check that Claude Code flat commands include `/scr-*` invocation rewrites and source-marker behavior after reinstall.
|
|
68
|
+
- Check that standard command-directory runtimes preserve nested command paths under their `commands/scr/` directory.
|
|
69
|
+
- Check that skills runtimes include `SKILL.md`, mirrored commands, and mirrored agent prompts inside their skill bundle.
|
|
53
70
|
- Check that installed Codex commands include current response-contract and source-marker behavior after reinstall.
|
|
54
71
|
- Report each runtime as `current`, `stale`, `missing`, or `unknown`.
|
|
55
72
|
5. Decide mode:
|
|
@@ -70,15 +87,57 @@ Adjust flags from the command arguments:
|
|
|
70
87
|
7. After applying, verify:
|
|
71
88
|
- Re-read installed command counts.
|
|
72
89
|
- Confirm `sync.md` is installed for each target runtime.
|
|
90
|
+
- For Claude Code, confirm `scr-sync.md` exists and installed agent prompts are present in the chosen `agents/` directory.
|
|
91
|
+
- For standard command-directory runtimes, confirm `commands/scr/sync.md` and installed agent prompts are present.
|
|
92
|
+
- For skills runtimes, confirm `SKILL.md`, `commands/scr/sync.md`, and bundled agent prompts are present.
|
|
93
|
+
- For Perplexity Desktop, confirm the setup guide and connector recipe are present.
|
|
73
94
|
- For Codex, confirm both `~/.codex/commands/scr/sync.md` and `~/.codex/skills/scr-sync/SKILL.md` exist in the chosen scope.
|
|
95
|
+
- For Codex, confirm installed Scriveno agents have matching `.toml` metadata files in the chosen `agents/` directory when the Codex runtime supports agent metadata.
|
|
74
96
|
- Confirm no stale runtime files remain in the checked target set.
|
|
75
|
-
8. Report:
|
|
97
|
+
8. Report a compact sync status trail:
|
|
76
98
|
- Source version
|
|
77
99
|
- Runtime targets checked
|
|
78
100
|
- Runtime targets updated
|
|
79
101
|
- Any skipped targets and why
|
|
102
|
+
- Trigger: `check`, `apply`, or `prompted apply`
|
|
103
|
+
- Agent: `none` for this command
|
|
104
|
+
- Engine: `bin/install.js` when applying, or `hash/count comparison` when checking only
|
|
105
|
+
- Local operations: command files compared, Claude flat commands checked, standard command directories checked, skills manifests checked, guided setup assets checked, agent prompts checked, Codex skills checked, Codex command mirrors checked, Codex agent metadata checked when applicable
|
|
106
|
+
- Result counts: commands, skills, agent prompts, metadata files, stale files removed, and skipped targets
|
|
80
107
|
- Suggested project-level follow-up with `/scr:scan`
|
|
81
108
|
|
|
109
|
+
Use this report shape:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
Sync status:
|
|
113
|
+
Trigger: /scr:sync --apply --detected --global --developer
|
|
114
|
+
Agent: none
|
|
115
|
+
Why: runtime sync is installer-driven, not a writing or review agent task
|
|
116
|
+
Engine: bin/install.js
|
|
117
|
+
Checked:
|
|
118
|
+
- commands: 112 source, 112 installed
|
|
119
|
+
- Claude Code flat commands: 112 installed
|
|
120
|
+
- standard command directories: current
|
|
121
|
+
- skills manifests: current
|
|
122
|
+
- guided setup assets: current
|
|
123
|
+
- Codex skills: 112 installed
|
|
124
|
+
- agent prompts: 6 installed
|
|
125
|
+
- Codex agent metadata: 6 installed
|
|
126
|
+
Updated:
|
|
127
|
+
- Claude Code command files
|
|
128
|
+
- standard command directories
|
|
129
|
+
- skills manifests
|
|
130
|
+
- guided setup assets
|
|
131
|
+
- Codex command mirrors
|
|
132
|
+
- Codex skills
|
|
133
|
+
- Codex agent prompts
|
|
134
|
+
- Codex agent metadata
|
|
135
|
+
Skipped:
|
|
136
|
+
- none
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
If no files were changed, keep the same shape and set `Updated: none`. If an agent was not spawned, always say `Agent: none` and explain why.
|
|
140
|
+
|
|
82
141
|
## Safety Rules
|
|
83
142
|
|
|
84
143
|
- Only overwrite Scriveno-owned installed runtime files.
|
package/commands/scr/track.md
CHANGED
|
@@ -494,6 +494,26 @@ For standard revision tracks where only the track has changes (canon is unmodifi
|
|
|
494
494
|
|
|
495
495
|
The `.manuscript/merge-log.json` file accumulates entries from every co-writing merge. Each entry preserves both versions of contradictory passages, the resolution chosen, and any reconciled text. This provides a history of how parallel work was integrated and supports future continuity auditing.
|
|
496
496
|
|
|
497
|
+
### Automation Status
|
|
498
|
+
|
|
499
|
+
Every `track merge` response must include a compact status block:
|
|
500
|
+
|
|
501
|
+
```text
|
|
502
|
+
Automation status:
|
|
503
|
+
Trigger: /scr:track merge {track}
|
|
504
|
+
Auto-invoked:
|
|
505
|
+
- /scr:continuity-check equivalent: yes/no
|
|
506
|
+
Spawned agents:
|
|
507
|
+
- continuity-checker: yes/no
|
|
508
|
+
Local operations:
|
|
509
|
+
- track metadata checked: yes/no
|
|
510
|
+
- canon and track changes compared: yes/no
|
|
511
|
+
- merge log updated: yes/no
|
|
512
|
+
Why: co-writing or parallel canon changes require continuity verification before accepting revisions
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
If continuity verification did not run, say why: standard revision track, canon unchanged, or writer cancelled before merge. If native `continuity-checker` spawning is unavailable, use the installed prompt in an isolated fresh context and report `prompt-run fallback used`.
|
|
516
|
+
|
|
497
517
|
---
|
|
498
518
|
|
|
499
519
|
## Writer-Friendly Language Guide
|
|
@@ -171,6 +171,8 @@ Invoke the translator agent (`agents/translator.md`) with fresh context, providi
|
|
|
171
171
|
|
|
172
172
|
**Fresh context per unit is mandatory.** Each translator invocation is independent -- this prevents translation drift, glossary inconsistency, and register collapse across a long manuscript.
|
|
173
173
|
|
|
174
|
+
If the host runtime cannot spawn a native `translator` agent type, load the installed `agents/translator.md` prompt from the active runtime and run it in an isolated fresh context. Record that fallback in the status block.
|
|
175
|
+
|
|
174
176
|
**5d. Post-unit processing:**
|
|
175
177
|
|
|
176
178
|
After each unit translation:
|
|
@@ -214,6 +216,29 @@ After all units are translated, show a summary:
|
|
|
214
216
|
> - Back-translate to verify: `/scr:back-translate [lang]`
|
|
215
217
|
> - Export translation: `/scr:export --format [format] --language [lang]`
|
|
216
218
|
|
|
219
|
+
## Agent and Automation Status
|
|
220
|
+
|
|
221
|
+
Every response must include a short status block that makes invocation visible:
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
Agent status:
|
|
225
|
+
Trigger: /scr:translate {language}
|
|
226
|
+
Spawned agents:
|
|
227
|
+
- translator: {count} fresh-context invocation(s)
|
|
228
|
+
Local operations:
|
|
229
|
+
- glossary loaded: yes/no
|
|
230
|
+
- translation memory loaded: yes/no
|
|
231
|
+
- units written: {count}
|
|
232
|
+
- new glossary terms flagged: {count}
|
|
233
|
+
Auto-invoked:
|
|
234
|
+
- /scr:translation-memory {language} --build: yes/no
|
|
235
|
+
- /scr:cultural-adaptation {language}: yes/no
|
|
236
|
+
- /scr:back-translate {language}: yes/no
|
|
237
|
+
Why: {manual translation mode, autopilot-translate phase, or writer requested chained verification}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Plain `/scr:translate` does not auto-run translation memory, cultural adaptation, or back-translation unless the writer requested a chained verification or the command is being run inside `/scr:autopilot-translate`. Show `Auto-invoked: no` for those follow-up checks in manual mode.
|
|
241
|
+
|
|
217
242
|
## Response Contract
|
|
218
243
|
|
|
219
244
|
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.
|
|
@@ -45,6 +45,8 @@ Spawn the voice-checker agent (`agents/voice-checker.md`) with:
|
|
|
45
45
|
- The scoped drafted prose (unit `N` or all units)
|
|
46
46
|
- If available, previously approved units as reference anchors for comparison
|
|
47
47
|
|
|
48
|
+
If the host runtime cannot spawn a native `voice-checker` agent type, load the installed `agents/voice-checker.md` prompt from the active runtime and run it in an isolated fresh context. Record that fallback in the status block.
|
|
49
|
+
|
|
48
50
|
Because STYLE-GUIDE.md is present, this is voice-deviation framing: the agent measures deviation *from* the writer's voice, not against a generic ideal. An authentic writer habit is not a tell for that writer even when a generic catalog would flag it; STYLE-GUIDE.md wins.
|
|
49
51
|
|
|
50
52
|
The voice-checker agent runs its diagnostic discipline: a scrutiny pre-check (match scrutiny to evidence density; low density biases hard toward a high score), a mandatory false-positive audit with veto power (lone weak signals dropped without lowering the score; strong false positives reclassified as human markers that raise it), and an internal-consistency check (sharp register or sophistication seams flagged against the document's own baseline). It performs deep analysis across four dimensions:
|
|
@@ -109,6 +111,24 @@ Save the full report to `.manuscript/{scope}-VOICE-CHECK-REPORT.md` where `{scop
|
|
|
109
111
|
|
|
110
112
|
Present the score, status, and top issues to the writer. Offer to show the full report.
|
|
111
113
|
|
|
114
|
+
## Agent Status
|
|
115
|
+
|
|
116
|
+
Every response must include a short status block that makes invocation visible:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
Agent status:
|
|
120
|
+
Trigger: /scr:voice-check {scope}
|
|
121
|
+
Spawned agents:
|
|
122
|
+
- voice-checker: 1 fresh-context diagnostic invocation
|
|
123
|
+
Local operations:
|
|
124
|
+
- STYLE-GUIDE.md loaded: yes/no
|
|
125
|
+
- drafted files checked: {count}
|
|
126
|
+
- report written: yes/no
|
|
127
|
+
Auto-invoked:
|
|
128
|
+
- none
|
|
129
|
+
Why: voice-check is diagnostic only; fixes are writer-chosen handoffs
|
|
130
|
+
```
|
|
131
|
+
|
|
112
132
|
## Response Contract
|
|
113
133
|
|
|
114
134
|
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.
|
package/data/CONSTRAINTS.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./constraints.schema.json",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Scriveno constraint system: work types, command availability, exports, and dependencies. Every command checks this file at runtime.",
|
|
5
5
|
"_notes": {
|
|
6
6
|
"sacred_keys": "Sacred subcommands live at commands/scr/sacred/<name>.md and run as /scr:sacred:<name>. Their CONSTRAINTS keys use the sacred:<name> form so /scr:help can render the runnable slash-command path directly. The sacred-numbering-format entry is a separate flat command (commands/scr/sacred-numbering-format.md) that surfaces the active tradition's numbering format. It used to be named sacred-verse-numbering, which collided with sacred:verse-numbering at install time -- both flattened to scr-sacred-verse-numbering. Renamed in v1.6.x; the installer now refuses to install when two sources share a flat skill name."
|
package/docs/architecture.md
CHANGED
|
@@ -349,6 +349,12 @@ Codex uses a skill-native variation of this strategy. The installer generates on
|
|
|
349
349
|
|
|
350
350
|
**Guided local-MCP (type: `guided-mcp`).** Writes setup assets and connector recipes for runtimes that expose a documented local-MCP surface instead of a writable slash-command directory. Perplexity Desktop currently fits this model: Scriveno writes a setup guide and filesystem-server command recipe under `.scriveno/perplexity/`, and the user adds that command inside Perplexity Desktop's Connectors UI.
|
|
351
351
|
|
|
352
|
+
### Shared status engine
|
|
353
|
+
|
|
354
|
+
Scriveno also ships `lib/auto-invoke-engine.js`, exposed through `scriveno status --project .` and `scriveno status . --json`. The installer copies this library into the shared Scriveno asset directory for global and project installs, so command surfaces can call a single read-only status engine before falling back to embedded markdown logic.
|
|
355
|
+
|
|
356
|
+
The engine checks disk evidence only: project presence, STATE.md, CONTEXT.md freshness, review files, translation work, exports, history, and save signals. It recommends the next command, but it does not mutate files and does not spawn agents by itself. That boundary keeps proactive behavior portable across Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and the generic fallback.
|
|
357
|
+
|
|
352
358
|
### Installation modes
|
|
353
359
|
|
|
354
360
|
The installer supports two scopes:
|
|
@@ -360,7 +366,7 @@ The user chooses during installation. Guided local-MCP targets still write their
|
|
|
360
366
|
|
|
361
367
|
### Runtime credibility
|
|
362
368
|
|
|
363
|
-
Scriveno's installer compatibility floor is `Node.js >=20.0.0`. For new installs, prefer a currently supported LTS such as Node.js 24. The compatibility floor applies to `npx scriveno@latest`, `bin/install.js`, and the repo's JavaScript test suite, not to the markdown command system once files are installed.
|
|
369
|
+
Scriveno's installer compatibility floor is `Node.js >=20.0.0`. For new installs, prefer a currently supported LTS such as Node.js 24. The compatibility floor applies to `npx scriveno@latest`, `bin/install.js`, `scriveno status --project .`, the shared status engine, and the repo's JavaScript test suite, not to the markdown command system once files are installed.
|
|
364
370
|
|
|
365
371
|
This architecture doc is intentionally about mechanics: detection rules, install path shapes, `commands` versus `skills` versus `guided-mcp`, and global versus project scope. For the authoritative runtime matrix, support levels, and verification status, see [`docs/runtime-support.md`](runtime-support.md).
|
|
366
372
|
|