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.
@@ -0,0 +1,103 @@
1
+ # Auto-Invoke Policy
2
+
3
+ Scriveno can be proactive, but it must be proactive from disk evidence. Commands should inspect `.manuscript/`, reports, timestamps, config, and installed runtime surfaces before choosing an automatic helper.
4
+
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
+
7
+ ## Cross-Platform Agent Rules
8
+
9
+ Scriveno agent prompts live in `agents/*.md`. Each host runtime exposes them differently:
10
+
11
+ - Claude Code installs command files in `~/.claude/commands/` and agent prompts in `~/.claude/agents/`.
12
+ - Codex installs `$scr-*` skills, mirrored command files, agent prompts, and `.toml` metadata so Codex can expose agent types.
13
+ - Cursor, Gemini CLI, OpenCode, Copilot, Windsurf, and Antigravity install nested command directories and agent prompts in their runtime-specific agent directories.
14
+ - Manus and the generic skill runtime bundle `SKILL.md`, commands, and agents inside the skill directory.
15
+ - All runtimes share the same installed auto-invoke engine under the Scriveno shared asset directory.
16
+
17
+ When a host supports native fresh-context spawning, use the native agent or subagent mechanism. When it does not, load the installed agent prompt from the active runtime and run it in an isolated fresh context. When the action is only a file operation, report `Agent: none`.
18
+
19
+ Every automatic path must make the distinction visible.
20
+
21
+ ```text
22
+ Agent status:
23
+ Trigger: <command or state condition>
24
+ Spawned agents:
25
+ - <agent-name>: <count, none, or prompt-run fallback used>
26
+ Local operations:
27
+ - <operation>: <result>
28
+ Auto-invoked:
29
+ - <command or helper>: yes/no
30
+ Why: <one sentence tied to disk state>
31
+ ```
32
+
33
+ Use `Automation status:` for command chains and `Sync status:` for runtime install or sync checks.
34
+
35
+ ## Levels
36
+
37
+ | Level | Behavior | Default | Examples |
38
+ |-------|----------|---------|----------|
39
+ | 1 | Read-only suggestion | Run by default | `/scr:next` route, progress sweep, review queue surfacing |
40
+ | 2 | Safe local helper | Run when directly triggered | `CONTEXT.md` regeneration, `HISTORY.log` append, scan report, stats count |
41
+ | 3 | Scoped agent | Spawn when the command implies it or evidence is bounded | drafter, plan-checker, voice-checker, continuity-checker, translator, beta-reader |
42
+ | 4 | Writer-owned action | Require confirmation | publishing, destructive edits, merge decisions, accepting review findings |
43
+
44
+ ## Level 1: Auto-Suggest
45
+
46
+ Run these read-only checks in `/scr:next`, `/scr:progress`, and closeouts for major commands:
47
+
48
+ - If `STATE.md`, `CONTEXT.md`, `HISTORY.log`, or draft mtimes disagree, suggest `/scr:scan`.
49
+ - If voice or continuity reports have unresolved issues, suggest `/scr:voice-check`, `/scr:continuity-check`, or `/scr:editor-review`.
50
+ - If editor notes or track proposals exist, suggest `/scr:editor-review --notes`, `/scr:editor-review --respond`, or `/scr:track`.
51
+ - If translation folders exist or config lists target languages, suggest translation follow-ups.
52
+ - If export outputs are older than source files, suggest `/scr:export` or `/scr:publish`.
53
+ - If no save exists after recent manuscript changes, suggest `/scr:save`.
54
+
55
+ These checks must not mutate files.
56
+
57
+ ## Level 2: Auto-Run Local Helpers
58
+
59
+ Run these only when the current command directly owns the file operation:
60
+
61
+ - `/scr:save` regenerates `.manuscript/CONTEXT.md`, appends `HISTORY.log`, and commits `.manuscript/`.
62
+ - `/scr:scan --fix` applies deterministic state repairs after confirmation and appends `HISTORY.log`.
63
+ - `/scr:resume-work` may regenerate `CONTEXT.md` from disk state.
64
+ - `/scr:progress` may count drafts, submitted units, open record threads, and stale reports, but does not write.
65
+ - Runtime `/scr:sync --apply` runs the installer and verifies installed command, skill, and agent surfaces.
66
+
67
+ Report these as local operations, not spawned agents.
68
+
69
+ ## Level 3: Auto-Spawn Scoped Agents
70
+
71
+ Spawn or prompt-run fallback is appropriate when the command already implies a specialist role:
72
+
73
+ - `/scr:plan` invokes `plan-checker` per plan.
74
+ - `/scr:draft` invokes `drafter` per atomic unit and a voice diagnostic pass when a draft was produced.
75
+ - `/scr:voice-check` invokes `voice-checker`.
76
+ - `/scr:continuity-check` invokes `continuity-checker`.
77
+ - `/scr:translate` invokes `translator` per unit.
78
+ - `/scr:beta-reader` invokes a beta reader persona.
79
+ - `/scr:map-manuscript` invokes analysis workers, or isolated sequential analysis if parallel workers are unavailable.
80
+ - `/scr:editor-review` invokes revision diagnostics only for flagged issue groups.
81
+
82
+ Do not pretend command-local analysis workers are installed agent files unless they actually are.
83
+
84
+ ## Level 4: Manual Only
85
+
86
+ Never auto-run these without explicit writer confirmation:
87
+
88
+ - deleting or removing units
89
+ - accepting, rejecting, or applying editor decisions
90
+ - merging revision tracks
91
+ - clearing review findings
92
+ - final publish or submission packaging
93
+ - overwriting generated export packages
94
+ - destructive repair, reset, revert, or cleanup
95
+ - broad translation or cultural adaptation chains outside autopilot
96
+
97
+ ## Required Closeout
98
+
99
+ Every proactive command should end with:
100
+
101
+ - one recommended next command
102
+ - a short reason tied to disk state
103
+ - status showing whether agents spawned, local operations ran, or manual boundaries stopped automation
@@ -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.6",
60
+ "scriveno_version": "2.0.8",
61
61
  "work_type": "<chosen>",
62
62
  "group": "<group>",
63
63
  "command_unit": "<unit>",
@@ -24,6 +24,15 @@ This installs Scriveno into the runtime you choose. Command-directory and skills
24
24
 
25
25
  Once installed, Claude Code uses flat `/scr-*` commands such as `/scr-help` and `/scr-new-work`. Other command-directory runtimes currently keep `/scr:*`. Codex uses generated `$scr-*` skills such as `$scr-help` and `$scr-new-work`. Guided targets explain their supported setup path directly in the generated setup files.
26
26
 
27
+ You can also ask Scriveno for a read-only project status from any terminal:
28
+
29
+ ```
30
+ scriveno status --project .
31
+ scriveno status . --json
32
+ ```
33
+
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.
35
+
27
36
  ## Step 2: Explore the Demo (Optional)
28
37
 
29
38
  Not sure what Scriveno does? Try the demo before starting your own project:
@@ -181,6 +190,8 @@ $scr-next
181
190
 
182
191
  `/scr-next` reads your project state and runs the right next step automatically. A writer who only ever types `/scr-next` in Claude Code can complete an entire manuscript from start to finish.
183
192
 
193
+ For a terminal-readable version of the same project-state reasoning, run `scriveno status --project .`.
194
+
184
195
  Beyond the core workflow, Scriveno offers:
185
196
 
186
197
  - **Revision** -- `/scr-editor-review`, `/scr-line-edit`, `/scr-continuity-check`
@@ -194,5 +205,6 @@ For the full command list, see [Command Reference](command-reference.md).
194
205
  If you want the trust surfaces around installation and shipping details, continue with:
195
206
 
196
207
  - [Runtime Support](runtime-support.md) -- installer targets, support levels, and verification status
208
+ - [Auto-Invoke Policy](auto-invoke-policy.md) -- status engine, visible automation, and agent-spawn boundaries
197
209
  - [Shipped Assets](shipped-assets.md) -- what the npm package actually includes on the trust-critical surface
198
210
  - [Release Notes](release-notes.md) -- what changed in the latest package release
@@ -2,6 +2,74 @@
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.8 - 2026-05-16
6
+
7
+ ### What changed
8
+
9
+ - Scriveno now exposes proactive project status through `scriveno status --project .` and `scriveno status . --json`.
10
+ - A shared read-only engine at `lib/auto-invoke-engine.js` computes status from disk evidence and recommends the safest next command.
11
+ - The installer copies the engine into Scriveno shared assets for global and project installs, so Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Antigravity, Manus, Perplexity Desktop, and the generic fallback can share the same status contract.
12
+ - `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync` now try the public status CLI first, then fall back to source, global, or project engine paths.
13
+ - The README now includes a status CLI badge, quick-start status command, proactive status section, and a direct Auto-Invoke Policy link.
14
+ - Package and shipped metadata are aligned on `2.0.8`.
15
+
16
+ ### Why it matters
17
+
18
+ The previous release made automation visible. This release makes the safest read-only part executable as a real package surface. Users and host runtimes can now ask Scriveno what the project needs next without relying on a hidden background process or a Codex-only path.
19
+
20
+ The engine still does not mutate files or spawn agents by itself. It gives a consistent, inspectable status answer; command workflows decide what to run next.
21
+
22
+ ### Affected areas
23
+
24
+ - public CLI
25
+ - shared auto-invoke engine
26
+ - installer shared assets
27
+ - `/scr:next`, `/scr:progress`, `/scr:session-report`, and `/scr:sync`
28
+ - README badges and launch copy
29
+ - runtime support and auto-invoke documentation
30
+ - release metadata and package contents
31
+ - regression tests for CLI output, JSON output, install assets, and package inclusion
32
+
33
+ ### Verification
34
+
35
+ - `node --test`
36
+ - `npm run release:check`
37
+ - `npm pack --dry-run --json`
38
+ - `git diff --check`
39
+
40
+ ## 2.0.7 - 2026-05-16
41
+
42
+ ### What changed
43
+
44
+ - Codex installs now generate agent metadata beside Scriveno agent prompts so native agent spawning can work when the host exposes those roles.
45
+ - Non-Codex runtimes keep their own install surfaces: Claude Code flat commands and agents, command-directory runtimes, skill-file runtimes, Manus, guided Perplexity Desktop setup, and the generic fallback.
46
+ - Scriveno now has a shared auto-invoke policy for read-only suggestions, deterministic local helpers, scoped agent spawns, and manual-only writer actions.
47
+ - `/scr:next` and `/scr:progress` now do read-only proactive checks and explain what they found.
48
+ - `/scr:save`, `/scr:scan`, `/scr:health`, `/scr:session-report`, `/scr:sync`, and multi-agent workflows now show visible status blocks that say what spawned, what ran locally, and why.
49
+ - Package and shipped metadata are aligned on `2.0.7`.
50
+
51
+ ### Why it matters
52
+
53
+ Writers and developers should not have to guess whether Scriveno used a native agent, a prompt fallback, or a local file operation. This release makes those paths visible and keeps runtime behavior honest across Codex, Claude Code, and the other supported install targets.
54
+
55
+ The practical effect is calmer automation: Scriveno can be more proactive about the next safe move, while still keeping writer-owned actions like publishing, destructive edits, merges, and submissions behind explicit approval.
56
+
57
+ ### Affected areas
58
+
59
+ - Codex agent metadata generation
60
+ - Claude Code and other runtime install verification
61
+ - proactive command guidance
62
+ - local helper visibility
63
+ - `/scr:sync` status reporting
64
+ - README, changelog, release notes, and version metadata
65
+ - regression tests for agent spawning, prompt fallback, and runtime install surfaces
66
+
67
+ ### Verification
68
+
69
+ - `node --test`
70
+ - `npm run release:check`
71
+ - `git diff --check`
72
+
5
73
  ## 2.0.6 - 2026-05-15
6
74
 
7
75
  ### What changed
@@ -10,9 +10,11 @@ Node is required for:
10
10
 
11
11
  - running `npx scriveno@latest`
12
12
  - executing `bin/install.js`
13
+ - running `scriveno status --project .`
14
+ - executing the shared auto-invoke status engine at `lib/auto-invoke-engine.js`
13
15
  - running the repo's JavaScript test suite
14
16
 
15
- Node is not a runtime dependency for Scriveno's markdown command system itself. Once installed, Scriveno's command files, agent prompts, templates, and constraints are read by the host AI coding agent.
17
+ Node is not a runtime dependency for Scriveno's markdown command system itself. Once installed, Scriveno's command files, agent prompts, templates, constraints, and shared auto-invoke engine are read by the host AI coding agent. Runtimes that can run local shell commands can call the engine directly; runtimes that cannot should use the same command text as a fallback contract.
16
18
 
17
19
  ## Evidence Levels
18
20
 
@@ -34,23 +36,51 @@ Node is not a runtime dependency for Scriveno's markdown command system itself.
34
36
 
35
37
  - **Registry-tested**: installer registry shape is covered by automated tests.
36
38
  - **Repo-documented**: detection and install strategy are documented in the repo.
39
+ - **Install-surface tested**: automated tests run the installer logic for representative targets and assert command files, agent prompts, and runtime-specific metadata or manifests are written in the expected place.
37
40
  - **No host-runtime parity verification yet**: Scriveno does not currently ship an end-to-end verification artifact for behavior inside the host runtime.
38
41
 
39
42
  ## Runtime Compatibility Matrix
40
43
 
41
44
  | Runtime | Install Type | Install Path Shape | Repo Evidence | Support Level | Verification Status |
42
45
  |---------|--------------|--------------------|---------------|---------------|---------------------|
43
- | Claude Code | commands | `~/.claude/commands/scr-*.md` + `~/.claude/agents` or `.claude/commands/scr-*.md` + `.claude/agents` | Installer registry, registry-tested, repo-documented | Primary reference runtime | Registry-tested; repo-documented; no host-runtime parity verification yet |
44
- | Cursor | commands | `~/.cursor/commands/scr` + `~/.cursor/agents` or `.cursor/commands/scr` + `.cursor/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
45
- | Gemini CLI | commands | `~/.gemini/commands/scr` + `~/.gemini/agents` or `.gemini/commands/scr` + `.gemini/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
46
- | Codex | skills | `~/.codex/skills/scr-*` or `.codex/skills/scr-*` (with mirrored command files in `~/.codex/commands/scr` or `.codex/commands/scr`) | Installer registry, registry-tested, repo-documented | Skills installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
47
- | OpenCode | commands | `~/.config/opencode/commands/scr` + `~/.config/opencode/agents` or `.config/opencode/commands/scr` + `.config/opencode/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
48
- | GitHub Copilot | commands | `~/.github/commands/scr` + `~/.github/agents` or `.github/commands/scr` + `.github/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
49
- | Windsurf | commands | `~/.windsurf/commands/scr` + `~/.windsurf/agents` or `.windsurf/commands/scr` + `.windsurf/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
50
- | Antigravity | commands | `~/.gemini/antigravity/commands/scr` + `~/.gemini/antigravity/agents` or `.gemini/antigravity/commands/scr` + `.gemini/antigravity/agents` | Installer registry, registry-tested, repo-documented | Standard installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
51
- | Manus Desktop | skills | `~/.manus/skills/scriveno/SKILL.md` or `.manus/skills/scriveno/SKILL.md` | Installer registry, registry-tested, repo-documented | Skills installer target | Registry-tested; repo-documented; no host-runtime parity verification yet |
46
+ | Claude Code | commands | `~/.claude/commands/scr-*.md` + `~/.claude/agents` or `.claude/commands/scr-*.md` + `.claude/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Primary reference runtime | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
47
+ | Cursor | commands | `~/.cursor/commands/scr` + `~/.cursor/agents` or `.cursor/commands/scr` + `.cursor/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
48
+ | Gemini CLI | commands | `~/.gemini/commands/scr` + `~/.gemini/agents` or `.gemini/commands/scr` + `.gemini/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
49
+ | Codex | skills | `~/.codex/skills/scr-*` or `.codex/skills/scr-*` (with mirrored command files in `~/.codex/commands/scr` or `.codex/commands/scr`, plus agent prompts and `.toml` metadata in `~/.codex/agents` or `.codex/agents`) | Installer registry, registry-tested, install-surface tested, repo-documented | Skills installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
50
+ | OpenCode | commands | `~/.config/opencode/commands/scr` + `~/.config/opencode/agents` or `.config/opencode/commands/scr` + `.config/opencode/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
51
+ | GitHub Copilot | commands | `~/.github/commands/scr` + `~/.github/agents` or `.github/commands/scr` + `.github/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
52
+ | Windsurf | commands | `~/.windsurf/commands/scr` + `~/.windsurf/agents` or `.windsurf/commands/scr` + `.windsurf/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
53
+ | Antigravity | commands | `~/.gemini/antigravity/commands/scr` + `~/.gemini/antigravity/agents` or `.gemini/antigravity/commands/scr` + `.gemini/antigravity/agents` | Installer registry, registry-tested, install-surface tested, repo-documented | Standard installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
54
+ | Manus Desktop | skills | `~/.manus/skills/scriveno/SKILL.md` or `.manus/skills/scriveno/SKILL.md`, with mirrored `commands/scr/` and `agents/` inside the skill bundle | Installer registry, registry-tested, install-surface tested, repo-documented | Skills installer target | Registry-tested; install-surface tested; repo-documented; no host-runtime parity verification yet |
52
55
  | Perplexity Desktop | guided-mcp | `~/.scriveno/perplexity/SETUP.md` or `.scriveno/perplexity/SETUP.md` plus Perplexity Desktop Connectors setup | Installer registry, registry-tested, guided setup assets, repo-documented | Guided desktop MCP target | Registry-tested; repo-documented; no host-runtime parity verification yet |
53
- | Generic (SKILL.md) | skills | `~/.scriveno/skills/SKILL.md` or `.scriveno/skills/SKILL.md` | Installer registry, registry-tested | Generic skills fallback | Registry-tested; no host-runtime parity verification yet |
56
+ | Generic (SKILL.md) | skills | `~/.scriveno/skills/SKILL.md` or `.scriveno/skills/SKILL.md`, with mirrored `commands/scr/` and `agents/` inside the skill bundle | Installer registry, registry-tested, install-surface tested | Generic skills fallback | Registry-tested; install-surface tested; no host-runtime parity verification yet |
57
+
58
+ ## Agent Surface By Runtime
59
+
60
+ - Claude Code installs flat command files such as `scr-sync.md` plus agent prompts in its `agents` directory. It does not receive Codex `.toml` metadata.
61
+ - Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, and Antigravity install nested command directories plus agent prompts in their runtime-specific `agents` directory. They do not receive Codex `.toml` metadata.
62
+ - Codex installs per-command skills, mirrored command files, agent prompts, and `.toml` metadata because Codex uses that metadata to expose agents.
63
+ - Manus Desktop and the generic skills fallback install a manifest `SKILL.md`, mirrored command files, and agent prompts inside the skill bundle.
64
+ - Perplexity Desktop receives setup assets for a local-MCP connector. It does not receive writable command or agent prompt directories from the installer.
65
+
66
+ ## Shared Auto-Invoke Engine
67
+
68
+ Every install target receives the same read-only status engine through Scriveno's shared asset directory:
69
+
70
+ - global installs: `~/.scriveno/lib/auto-invoke-engine.js`
71
+ - project installs: `.scriveno/lib/auto-invoke-engine.js`
72
+ - source checkouts: `lib/auto-invoke-engine.js`
73
+
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.
75
+
76
+ The public CLI entrypoint is:
77
+
78
+ ```bash
79
+ scriveno status --project .
80
+ scriveno status . --json
81
+ ```
82
+
83
+ The JSON form is intended for CI, host adapters, and future runtime smoke tests.
54
84
 
55
85
  ## What Scriveno Proves Today
56
86
 
@@ -60,6 +90,7 @@ Scriveno currently proves all of the following in-repo:
60
90
  - each target has a declared install strategy (`commands`, `skills`, or `guided-mcp`)
61
91
  - each target has expected install-path properties in the installer registry
62
92
  - the runtime registry shape is covered by automated installer tests
93
+ - representative install surfaces are covered for Claude Code, standard command-directory runtimes, Codex, Manus Desktop, and the generic skills fallback
63
94
  - the high-level install strategies and detection rules are documented in [Architecture](architecture.md)
64
95
 
65
96
  Scriveno does not currently prove: