@hanna84/mcp-writing 3.21.3 → 3.22.1

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/CHANGELOG.md CHANGED
@@ -4,9 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v3.22.1](https://github.com/hannasdev/mcp-writing/compare/v3.22.0...v3.22.1)
8
+
9
+ - docs: document sidecar compatibility migration [`#226`](https://github.com/hannasdev/mcp-writing/pull/226)
10
+
11
+ #### [v3.22.0](https://github.com/hannasdev/mcp-writing/compare/v3.21.3...v3.22.0)
12
+
13
+ > 28 May 2026
14
+
15
+ - feat(metadata): add outcome relationship workflows [`#225`](https://github.com/hannasdev/mcp-writing/pull/225)
16
+ - Release 3.22.0 [`972d6af`](https://github.com/hannasdev/mcp-writing/commit/972d6aff4e6b237cfa23f74830181be3486f75fa)
17
+
7
18
  #### [v3.21.3](https://github.com/hannasdev/mcp-writing/compare/v3.21.2...v3.21.3)
8
19
 
20
+ > 28 May 2026
21
+
9
22
  - fix(metadata): preserve sidecar structure fields on generic writes [`#224`](https://github.com/hannasdev/mcp-writing/pull/224)
23
+ - Release 3.21.3 [`91bc41f`](https://github.com/hannasdev/mcp-writing/commit/91bc41f98e6acf0f46cf93f329e1ecebad2e2305)
10
24
 
11
25
  #### [v3.21.2](https://github.com/hannasdev/mcp-writing/compare/v3.21.1...v3.21.2)
12
26
 
package/README.md CHANGED
@@ -27,10 +27,10 @@ For VS Code-native setup flows (including prose styleguide setup), use:
27
27
  Instead of feeding an entire manuscript to an AI and hoping it fits in the context window, `mcp-writing` builds a structured index from your scene files. The AI queries that index first — finding relevant characters, beats, and loglines — then loads only the specific prose it needs.
28
28
 
29
29
  **Current status:**
30
- - **Core platform complete:** Metadata-first analysis, sidecar-backed metadata maintenance, AI-assisted prose editing with confirmation + git history, review bundles, and Scrivener Direct extraction are all implemented.
30
+ - **Core platform complete:** Metadata-first analysis, SQLite-canonical structural and relationship metadata, compatibility sidecar maintenance, AI-assisted prose editing with confirmation + git history, review bundles, and Scrivener Direct extraction are all implemented.
31
31
  - **Recently completed:** Database Backup and Recovery added project backup export, freshness diagnostics, advisory operation history, automatic backup refresh after sanctioned project-scoped canonical mutations, dry-run restore planning, transactional restore application, and backup/restore operations guidance.
32
32
  - **Previous milestone:** Docker, CI, and Deployment Workflow made Docker a supported way to build, run, smoke-test, and deploy Writing MCP.
33
- - **Active development:** Post-initiative stabilization and backlog selection.
33
+ - **Active development:** Architecture Alignment Follow-up M5, documenting sidecar compatibility, migration, and deprecation expectations.
34
34
  - **Deferred backlog:** OpenClaw integration, client-agnostic setup, divisions, and embeddings search.
35
35
  - **Ideas and open questions:** tracked separately so future exploration does not distort the active roadmap.
36
36
 
@@ -48,6 +48,7 @@ Instead of feeding an entire manuscript to an AI and hoping it fits in the conte
48
48
  | [mcp-writing-vscode](https://github.com/hannasdev/mcp-writing-vscode) | VS Code extension for client-native setup flows |
49
49
  | [docs/guides/docker.md](docs/guides/docker.md) | Docker Compose, deployment operations, MCP gateway notes |
50
50
  | [docs/guides/backup-recovery.md](docs/guides/backup-recovery.md) | Project backup artifacts, diagnostics, and explicit restore workflow |
51
+ | [docs/guides/sidecar-compatibility.md](docs/guides/sidecar-compatibility.md) | Sidecar compatibility roles, migration posture, and daily-work authority boundaries |
51
52
  | [docs/foundations/managed-structure-contract.md](docs/foundations/managed-structure-contract.md) | Design boundaries for structural mutation, generated views, import, and maintenance workflows |
52
53
  | [docs/agents/tools.md](docs/agents/tools.md) | Full tool reference — auto-generated from source |
53
54
  | [docs/agents/README.md](docs/agents/README.md) | Index of agent-focused guidance, examples, and boot files |
@@ -142,7 +143,7 @@ Goal: make sure subplot threads progress intentionally and resolve on time.
142
143
 
143
144
  1. Run `list_threads` for the project.
144
145
  2. Use `get_thread_arc` to inspect scene order and beat labels for each thread.
145
- 3. When a beat is missing, call `upsert_thread_link` to add or update it on the right scene.
146
+ 3. When a beat is missing, call `track_thread_arc` to add or update it on the right scene.
146
147
  4. Re-run `get_thread_arc` to confirm pacing and coverage.
147
148
 
148
149
  Outcome: subplot structure stays visible and auditable, which reduces dropped threads in late drafts.
@@ -185,7 +186,7 @@ Outcome: character-link maintenance becomes a preview-first batch operation inst
185
186
  Goal: recover index confidence quickly when legacy upgrade warnings indicate ambiguous rows were skipped.
186
187
 
187
188
  1. Start by checking `get_runtime_config` (or `describe_workflows`) and confirm whether `db_migration_warnings` contains `LEGACY_JOIN_ROWS_SKIPPED`.
188
- 2. If present, run `sync` immediately to rebuild scene relationships from current sidecars and prose metadata.
189
+ 2. If present, run `sync` immediately to rebuild scene relationships from compatibility sidecars and prose metadata.
189
190
  3. Continue normal discovery (`find_scenes`, `get_arc`, `get_thread_arc`) and watch for stale-metadata warnings.
190
191
  4. When you touch stale scenes, run `enrich_scene(scene_id, project_id)` to recover metadata parity incrementally.
191
192
  5. If many scenes remain stale, switch to `enrich_scene_characters_batch` (dry-run first) for broader catch-up.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanna84/mcp-writing",
3
- "version": "3.21.3",
3
+ "version": "3.22.1",
4
4
  "description": "MCP service for AI-assisted reasoning and editing on long-form fiction projects",
5
5
  "homepage": "https://hannasdev.github.io/mcp-writing/",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -336,7 +336,7 @@ function createMcpServer() {
336
336
  // ---- describe_workflows --------------------------------------------------
337
337
  s.tool(
338
338
  "describe_workflows",
339
- "Return the default workflow map and current project context for this server. Call this first in most sessions and again whenever you are unsure what to do next. Never write scripts to invoke tools — call them directly.",
339
+ "Return the default workflow map and current project context for this server. Call this first in most sessions and again whenever you are unsure what to do next. Treat sidecars, frontmatter, Scrivener-derived fields, generated exports, and backups by their named compatibility, review, or recovery roles; use outcome workflows for current SQLite-canonical structure and relationship changes. Never write scripts to invoke tools — call them directly.",
340
340
  {},
341
341
  async () => {
342
342
  const projectRow = db.prepare(
@@ -453,6 +453,7 @@ function createMcpServer() {
453
453
  "When calling bootstrap_prose_styleguide_config or check_prose_styleguide_drift, set max_scenes to context.scene_count to avoid the default limit.",
454
454
  "Use context.setup_contract.styleguide_setup_status to decide whether styleguide setup is missing/invalid and advisory/blocking.",
455
455
  "Styleguide tools resolve config in priority order: project_root > universe_root > sync_root. If any styleguide_exists field is true, a config exists and styleguide tools will work. For invalid setup states, use setup_contract plan preview actions (which may set overwrite=true for repair).",
456
+ "Treat sidecars, frontmatter, Scrivener-derived fields, generated exports, and project backups by their named compatibility, review, or recovery roles. Use outcome workflows for current SQLite-canonical structure and relationship changes.",
456
457
  ...(DB_STARTUP_WARNINGS.length > 0
457
458
  ? ["Database migration warnings are present in context.db_migration_warnings. Run sync() now, then run enrich_scene(scene_id, project_id) for stale scenes you touch."]
458
459
  : []),
@@ -234,6 +234,15 @@ export async function runSceneCharacterBatch({ syncDir, args, onProgress, should
234
234
  cancelled: Boolean(typeof shouldCancel === "function" && shouldCancel() && processed_scenes < targetScenes.length),
235
235
  project_id,
236
236
  dry_run: Boolean(dry_run),
237
+ relationship_authority: {
238
+ canonical_owner: "SQLite scene_characters",
239
+ compatibility_source: "scene sidecar characters",
240
+ compatibility_mutation_surface: false,
241
+ apply_order: dry_run ? "preview_only" : "compatibility_output_then_sync_index",
242
+ note: dry_run
243
+ ? "Dry run only reviews prose-derived character repairs."
244
+ : "M4 retains this batch repair as a prose-derived compatibility path; completion syncs the SQLite relationship index and refreshes backups for changed scenes.",
245
+ },
237
246
  total_scenes: targetScenes.length,
238
247
  processed_scenes,
239
248
  scenes_changed,