scriveno 2.0.8 → 2.0.10

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.
@@ -4,7 +4,7 @@ How Scriveno works under the hood -- for developers who want to understand the s
4
4
 
5
5
  ## Overview
6
6
 
7
- Scriveno is a pure skill system. There is no compiled code, no runtime library, no framework. AI coding agents (Claude Code, Cursor, Gemini CLI, and others) read markdown command files and follow their instructions using their built-in tools (Read, Write, Bash).
7
+ Scriveno is a markdown-first skill system with a small Node.js support layer. AI coding agents (Claude Code, Cursor, Gemini CLI, and others) read markdown command files and follow their instructions using their built-in tools (Read, Write, Bash). Node.js handles installation, packaging, runtime synchronization, and the shared read-only status engine.
8
8
 
9
9
  The entire system is a collection of files:
10
10
 
@@ -13,7 +13,7 @@ The entire system is a collection of files:
13
13
  - **CONSTRAINTS.json** is the central registry that controls which commands are available for which work types
14
14
  - **Templates** provide starting content for new projects
15
15
 
16
- Nothing compiles. Nothing bundles. Changes take effect immediately because the agent reads files at runtime.
16
+ Nothing compiles for the command layer. Changes to markdown commands take effect immediately because the agent reads files at runtime. Changes to the installer or shared status engine are tested and shipped through the npm package.
17
17
 
18
18
  ## Skill System Design
19
19
 
@@ -351,9 +351,27 @@ Codex uses a skill-native variation of this strategy. The installer generates on
351
351
 
352
352
  ### Shared status engine
353
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.
354
+ Scriveno also ships `lib/auto-invoke-engine.js`, exposed through `scriveno status --project .`, `scriveno status . --json`, `scriveno status --project . --apply-safe`, `scriveno sync --check`, `scriveno smoke`, `scriveno agents`, and `scriveno routes`. The installer copies this library into the shared Scriveno asset directory for global and project installs, so command surfaces can call a single status and audit engine before falling back to embedded markdown logic.
355
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.
356
+ The engine checks disk evidence only: project presence, required project files, STATE.md, CONTEXT.md freshness, plan files, draft files, review coverage, unresolved notes, revision-track proposals, translation work, publishing prerequisites, 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
+
358
+ The engine now reports three automation lanes:
359
+
360
+ - **Candidate agents**: bounded specialist routes that may spawn when the host supports it, such as `drafter`, `voice-checker`, `continuity-checker`, `translator`, `plan-checker`, beta-reader workers, and import analysis workers.
361
+ - **Candidate local helpers**: deterministic file or status helpers such as `/scr:save`, `/scr:scan`, `/scr:check-notes`, `/scr:progress`, `/scr:session-report`, and `/scr:sync`.
362
+ - **Manual gates**: writer-owned routes that need explicit confirmation, including publishing packages, export overwrites, and revision-track merge or proposal decisions.
363
+
364
+ Every command registry category has an automation lane through `getCommandAutomationPolicy()`. This makes route coverage testable: core routes are mixed, navigation routes are read-only, quality and review routes are agent-or-local, publishing and collaboration routes are manual-gated, utility and session routes are local-helper, and structure-management routes stay manual because they can rename or remove manuscript units.
365
+
366
+ This turns disconnected side features into visible routes. A plan without a draft recommends `/scr:draft` and lists the drafter route as a candidate agent path. Drafts without reviews recommend `/scr:editor-review` before export. Notes route to `/scr:check-notes`. Revision proposals route to `/scr:editor-review --proposal` or `/scr:track`. Publishing gaps route to `/scr:front-matter`, `/scr:back-matter`, `/scr:blurb`, `/scr:cover-art`, or `/scr:publish` depending on disk evidence.
367
+
368
+ The same engine now exposes:
369
+
370
+ - **Safe apply reporting**: `status --apply-safe` runs read-only checks, identifies safe helpers, lists agent candidates, and marks write-gated actions as skipped.
371
+ - **Sync check**: `sync --check` combines project status, safe apply, agent availability, and runtime smoke into one transcript.
372
+ - **Agent availability**: `agents` verifies prompt fallback readiness for non-Codex runtimes and metadata readiness for Codex.
373
+ - **Runtime smoke**: `smoke` checks installed command, skill, guide, agent, metadata, and shared-engine surfaces.
374
+ - **Route graph audit**: `routes` derives a command graph from constraints, command intents, dependencies, and automation lanes.
357
375
 
358
376
  ### Installation modes
359
377
 
@@ -366,7 +384,7 @@ The user chooses during installation. Guided local-MCP targets still write their
366
384
 
367
385
  ### Runtime credibility
368
386
 
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.
387
+ 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 proactive audit commands, the shared status engine, and the repo's JavaScript test suite, not to the markdown command system once files are installed.
370
388
 
371
389
  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).
372
390
 
@@ -4,6 +4,26 @@ Scriveno can be proactive, but it must be proactive from disk evidence. Commands
4
4
 
5
5
  The executable policy lives in `lib/auto-invoke-engine.js` and is exposed through `scriveno status --project .`. The installer copies it to `.scriveno/lib/auto-invoke-engine.js` for project installs and `~/.scriveno/lib/auto-invoke-engine.js` for global installs, so every runtime can use the same read-only status logic.
6
6
 
7
+ The engine reports candidates instead of silently acting. It can identify planned-but-undrafted work, drafts without review coverage, unresolved note files, revision proposals, translation follow-ups, publishing prerequisite gaps, stale exports, and stale session context. It then separates what could spawn an agent, what could run as a local helper, and what must stay behind a manual gate.
8
+
9
+ The same file exports `getCommandAutomationPolicy()`, which classifies every command registry route into an automation lane. Tests assert that every command category is covered, so newly added routes cannot sit outside the proactive policy by accident.
10
+
11
+ ## Safe Apply and Audit Commands
12
+
13
+ Scriveno now exposes the proactive layer as executable checks instead of documentation-only guidance:
14
+
15
+ ```bash
16
+ scriveno status --project . --apply-safe
17
+ scriveno sync --check
18
+ scriveno smoke --json
19
+ scriveno agents --json
20
+ scriveno routes --json
21
+ ```
22
+
23
+ `--apply-safe` runs the read-only status sweep, reports safe local helpers that are ready, lists agent candidates, and marks writer-owned or write-gated helpers as skipped instead of mutating files. It is intentionally conservative: `/scr:save`, `/scr:scan`, `/scr:sync --apply`, publish packaging, export overwrites, track merges, and undo remain explicit actions.
24
+
25
+ `sync --check` combines four reports: project status, safe apply, agent availability, and runtime smoke. `smoke` checks installed commands, skills, prompts, Codex metadata, and the shared engine path. `agents` checks prompt fallback readiness and Codex metadata readiness. `routes` builds a route graph from `data/CONSTRAINTS.json` and the automation policy so disconnected command flows are visible in one audit.
26
+
7
27
  ## Cross-Platform Agent Rules
8
28
 
9
29
  Scriveno agent prompts live in `agents/*.md`. Each host runtime exposes them differently:
@@ -23,8 +43,14 @@ Agent status:
23
43
  Trigger: <command or state condition>
24
44
  Spawned agents:
25
45
  - <agent-name>: <count, none, or prompt-run fallback used>
46
+ Candidate agents:
47
+ - <command>: <agent names or none>
26
48
  Local operations:
27
49
  - <operation>: <result>
50
+ Candidate local helpers:
51
+ - <command>: <reason or none>
52
+ Manual gates:
53
+ - <command>: <reason or none>
28
54
  Auto-invoked:
29
55
  - <command or helper>: yes/no
30
56
  Why: <one sentence tied to disk state>
@@ -47,8 +73,12 @@ Run these read-only checks in `/scr:next`, `/scr:progress`, and closeouts for ma
47
73
 
48
74
  - If `STATE.md`, `CONTEXT.md`, `HISTORY.log`, or draft mtimes disagree, suggest `/scr:scan`.
49
75
  - If voice or continuity reports have unresolved issues, suggest `/scr:voice-check`, `/scr:continuity-check`, or `/scr:editor-review`.
76
+ - If plan files exist with no corresponding drafts, suggest `/scr:draft` before reopening planning.
77
+ - If drafts exist without review coverage, suggest `/scr:editor-review` before export.
50
78
  - If editor notes or track proposals exist, suggest `/scr:editor-review --notes`, `/scr:editor-review --respond`, or `/scr:track`.
79
+ - If note files contain unresolved items, suggest `/scr:check-notes`.
51
80
  - If translation folders exist or config lists target languages, suggest translation follow-ups.
81
+ - If front matter, back matter, blurb, or cover handoff assets are missing, surface the specific publishing prerequisite before packaging.
52
82
  - If export outputs are older than source files, suggest `/scr:export` or `/scr:publish`.
53
83
  - If no save exists after recent manuscript changes, suggest `/scr:save`.
54
84
 
@@ -57,7 +57,7 @@ When a writer runs `/scr:new-work`, Scriveno creates `.manuscript/config.json`.
57
57
 
58
58
  ```json
59
59
  {
60
- "scriveno_version": "2.0.8",
60
+ "scriveno_version": "2.0.10",
61
61
  "work_type": "<chosen>",
62
62
  "group": "<group>",
63
63
  "command_unit": "<unit>",
@@ -29,9 +29,13 @@ You can also ask Scriveno for a read-only project status from any terminal:
29
29
  ```
30
30
  scriveno status --project .
31
31
  scriveno status . --json
32
+ scriveno status --project . --apply-safe
33
+ scriveno sync --check
32
34
  ```
33
35
 
34
- That status command is the same shared auto-invoke engine used by `/scr-next`, `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync` when local command execution is available. It recommends the next safest command, but does not mutate files or spawn agents by itself.
36
+ That status command is the same shared auto-invoke engine used by `/scr-next`, `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync` when local command execution is available. It recommends the next safest command, but does not mutate files or spawn agents by itself. Current status output separates candidate agents, candidate local helpers, and manual gates so you can tell whether Scriveno is pointing at a specialist route, a deterministic file helper, or a writer-owned decision.
37
+
38
+ Use `--apply-safe` when you want Scriveno to run the read-only checks and show which helpers are safe, skipped, or agent-ready. Use `sync --check` when you want the installed runtime surfaces checked too.
35
39
 
36
40
  ## Step 2: Explore the Demo (Optional)
37
41
 
@@ -2,6 +2,73 @@
2
2
 
3
3
  This document is the public-facing summary of what changed between package releases. For package history, see the root [CHANGELOG](../CHANGELOG.md).
4
4
 
5
+ ## 2.0.10 - 2026-05-16
6
+
7
+ ### What changed
8
+
9
+ - `scriveno status --project . --apply-safe` now runs the read-only proactive checks and reports safe helpers, agent candidates, and write-gated actions.
10
+ - `scriveno sync --check` now produces a read-only sync transcript with project status, safe apply, agent availability, and runtime smoke.
11
+ - `scriveno smoke`, `scriveno agents`, and `scriveno routes` expose installed-surface checks, agent prompt and metadata checks, and generated route graph audits.
12
+ - Runtime checks cover Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and the generic skill fallback through the shared engine.
13
+ - README badges, Runtime Support, Auto-Invoke Policy, Architecture, Getting Started, Testing, sync command docs, Route Graph Audit, changelog, and package metadata are aligned on `2.0.10`.
14
+
15
+ ### Why it matters
16
+
17
+ The previous releases made proactive routing visible. This release makes the support tooling executable. Users can now ask Scriveno what is safe to run, whether installed agent surfaces are present, whether Codex metadata is ready, and how every route fits into the automation graph without relying on a hidden host-specific behavior.
18
+
19
+ ### Affected areas
20
+
21
+ - shared auto-invoke engine
22
+ - public CLI audit commands
23
+ - runtime smoke and agent availability checks
24
+ - route graph audit docs
25
+ - README badges and launch copy
26
+ - architecture, runtime support, auto-invoke policy, getting started, testing, and sync command docs
27
+ - package metadata and generated project examples
28
+ - regression tests for safe apply, runtime smoke, agent availability, and route graph coverage
29
+
30
+ ### Verification
31
+
32
+ - `node --test test/auto-invoke-engine.test.js`
33
+ - `node --test test/installer.test.js`
34
+ - `npm test`
35
+ - `npm run release:check`
36
+ - `npm pack --json`
37
+ - `git diff --check`
38
+
39
+ ## 2.0.9 - 2026-05-16
40
+
41
+ ### What changed
42
+
43
+ - `scriveno status --project .` now detects connected workflow gaps instead of only broad project state.
44
+ - The shared engine can route planned-but-undrafted work to `/scr:draft`, drafts without review coverage to `/scr:editor-review`, unresolved notes to `/scr:check-notes`, revision proposals to `/scr:editor-review --proposal`, translation work to verification follow-ups, and publishing gaps to the specific missing prerequisite.
45
+ - Status output now separates `Candidate agents`, `Candidate local helpers`, and `Manual gates`.
46
+ - Every command registry category now has an automation lane through `getCommandAutomationPolicy()`.
47
+ - Markdown fallback contracts for `/scr:next`, `/scr:progress`, `/scr:session-report`, `/scr:save`, `/scr:scan`, and `/scr:health` now show the same route-intelligence shape when a host cannot call the Node engine.
48
+ - README badges, README status copy, Architecture, Auto-Invoke Policy, Configuration, changelog, and package metadata are aligned on `2.0.9`.
49
+
50
+ ### Why it matters
51
+
52
+ The status engine now connects previously separate flows. A writer can see whether Scriveno is recommending an agent-backed route, a deterministic local helper, or a writer-owned manual action. That makes automation more proactive without making it mysterious or pushy.
53
+
54
+ ### Affected areas
55
+
56
+ - shared auto-invoke engine
57
+ - public status CLI output
58
+ - route automation policy
59
+ - command fallback status blocks
60
+ - README badges and launch copy
61
+ - architecture and auto-invoke documentation
62
+ - package metadata and generated project examples
63
+ - regression tests for route intelligence and command policy coverage
64
+
65
+ ### Verification
66
+
67
+ - `npm test`
68
+ - `npm run release:check`
69
+ - `npm pack --json`
70
+ - `git diff --check`
71
+
5
72
  ## 2.0.8 - 2026-05-16
6
73
 
7
74
  ### What changed
@@ -0,0 +1,51 @@
1
+ # Route Graph Audit
2
+
3
+ Scriveno's route graph is generated from `data/CONSTRAINTS.json` and `lib/auto-invoke-engine.js`. It is not a separate hand-maintained registry.
4
+
5
+ Run the audit with:
6
+
7
+ ```bash
8
+ scriveno routes
9
+ scriveno routes --json
10
+ ```
11
+
12
+ The text report summarizes command count, graph edges, agent-capable routes, local-helper routes, manual-gated routes, read-only routes, and lane counts. The JSON report includes nodes and edges for host adapters, CI checks, and future visualizations.
13
+
14
+ ## Current Shape
15
+
16
+ As of `2.0.10`, the route graph contains:
17
+
18
+ - 112 commands
19
+ - intent-order edges from `command_intents`
20
+ - dependency-chain edges from `dependencies.core_chain`
21
+ - automation lanes from `getCommandAutomationPolicy()`
22
+ - route priority fixtures for high-value state transitions
23
+
24
+ ## Automation Lanes
25
+
26
+ Each command receives one lane:
27
+
28
+ - `read-only`: inspect and recommend
29
+ - `local-helper`: deterministic local helper, visible in status
30
+ - `agent-ready`: bounded specialist route with known agent prompts
31
+ - `agent-or-local`: route may use a specialist or local diagnostic pass
32
+ - `mixed`: lifecycle route whose behavior depends on project state
33
+ - `manual-gated`: writer-owned action that must stay explicit
34
+
35
+ ## Priority Fixtures
36
+
37
+ The engine exports priority fixtures for the flows most likely to regress:
38
+
39
+ - empty workspace routes to `/scr:new-work`
40
+ - scanned project without drafts routes to `/scr:plan`
41
+ - planned work without drafts routes to `/scr:draft`
42
+ - drafts without review coverage route to `/scr:editor-review`
43
+ - revision proposals route to `/scr:editor-review --proposal`
44
+ - translation work routes to `/scr:back-translate`
45
+ - publishing prerequisite gaps route to the first missing packaging prerequisite
46
+
47
+ These fixtures are covered by `test/auto-invoke-engine.test.js`.
48
+
49
+ ## Cross-Runtime Use
50
+
51
+ All runtimes use the same route graph audit. Claude Code, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, and Antigravity read command files and prompt agents. Codex reads generated `$scr-*` skills plus `.toml` agent metadata. Manus and the generic fallback read bundled skill files. Perplexity Desktop receives guided local-MCP setup. The graph stays shared even when the host's native spawning behavior differs.
@@ -11,6 +11,8 @@ Node is required for:
11
11
  - running `npx scriveno@latest`
12
12
  - executing `bin/install.js`
13
13
  - running `scriveno status --project .`
14
+ - running `scriveno status --project . --apply-safe`
15
+ - running `scriveno sync --check`, `scriveno smoke`, `scriveno agents`, and `scriveno routes`
14
16
  - executing the shared auto-invoke status engine at `lib/auto-invoke-engine.js`
15
17
  - running the repo's JavaScript test suite
16
18
 
@@ -71,17 +73,37 @@ Every install target receives the same read-only status engine through Scriveno'
71
73
  - project installs: `.scriveno/lib/auto-invoke-engine.js`
72
74
  - source checkouts: `lib/auto-invoke-engine.js`
73
75
 
74
- The engine computes proactive state from disk evidence: missing or stale context, unresolved review files, translation work, stale exports, missing history, and the recommended next command. It does not mutate manuscript files and does not spawn agents. Host commands such as `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync` should call it first when local command execution is available, then fall back to their embedded markdown logic when the host cannot run Node.
76
+ The engine computes proactive state from disk evidence: missing or stale context, plan and draft coverage, unresolved review files, unresolved notes, revision proposals, translation work, publishing prerequisites, stale exports, missing history, and the recommended next command. It does not mutate manuscript files and does not spawn agents. Host commands such as `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync` should call it first when local command execution is available, then fall back to their embedded markdown logic when the host cannot run Node.
75
77
 
76
78
  The public CLI entrypoint is:
77
79
 
78
80
  ```bash
79
81
  scriveno status --project .
80
82
  scriveno status . --json
83
+ scriveno status --project . --apply-safe
81
84
  ```
82
85
 
83
86
  The JSON form is intended for CI, host adapters, and future runtime smoke tests.
84
87
 
88
+ Status output uses the same route-intelligence shape across runtimes: `Candidate agents`, `Candidate local helpers`, and `Manual gates`. That keeps Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and generic skill installs aligned even when their native spawning mechanisms differ.
89
+
90
+ ## Runtime Smoke and Agent Checks
91
+
92
+ The package now exposes cross-runtime checks through the public CLI:
93
+
94
+ ```bash
95
+ scriveno sync --check
96
+ scriveno smoke --json
97
+ scriveno agents --json
98
+ scriveno routes --json
99
+ ```
100
+
101
+ `scriveno smoke` checks installed command surfaces, Codex skill directories, bundled skill manifests, agent prompt counts, Codex `.toml` metadata, guided Perplexity setup assets, and the shared engine under `~/.scriveno/lib/auto-invoke-engine.js`.
102
+
103
+ `scriveno agents` checks whether each runtime has the expected Scriveno agent prompts and reports the correct fallback: prompt-run fallback for Claude Code and standard command runtimes, metadata-ready for Codex when `.toml` files are present, guided setup for Perplexity Desktop, and bundled skill prompts for Manus or generic skill installs.
104
+
105
+ `scriveno routes` audits the command graph and automation lanes from `data/CONSTRAINTS.json`. It is useful when adding commands because it surfaces whether a route is read-only, local-helper, agent-ready, agent-or-local, mixed, or manual-gated.
106
+
85
107
  ## What Scriveno Proves Today
86
108
 
87
109
  Scriveno currently proves all of the following in-repo:
@@ -39,6 +39,7 @@ These files ship in `templates/` and `docs/` and provide the trust trio for sess
39
39
  ## Runtime Sync Asset Shipped Today
40
40
 
41
41
  - `commands/scr/sync.md` -- local runtime-surface synchronization command. It compares and refreshes installed Scriveno commands, Codex skills, command mirrors, and agent prompts from the current source tree by delegating to `bin/install.js`.
42
+ - `lib/auto-invoke-engine.js` -- shared project status, safe apply, runtime smoke, agent availability, and route graph audit engine used by `scriveno status`, `scriveno sync --check`, `scriveno smoke`, `scriveno agents`, and `scriveno routes`.
42
43
 
43
44
  ## Export Templates Shipped Today
44
45
 
package/docs/testing.md CHANGED
@@ -136,6 +136,16 @@ For the standard release gate, prefer:
136
136
  npm run release:check
137
137
  ```
138
138
 
139
+ When changing proactive routing, runtime install paths, or agent surfaces, also run:
140
+
141
+ ```bash
142
+ scriveno status --project . --apply-safe
143
+ scriveno sync --check
144
+ scriveno smoke --json
145
+ scriveno agents --json
146
+ scriveno routes --json
147
+ ```
148
+
139
149
  Use those for release prep so you can inspect what would ship without mutating the registry.
140
150
 
141
151
  ## Practical workflow