@hanna84/mcp-writing 2.12.7 → 2.12.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,95 @@
1
+ export const WORKFLOW_CATALOGUE = [
2
+ {
3
+ id: "first_time_setup",
4
+ label: "First-time setup",
5
+ use_when: "Connecting to a project for the first time or verifying the runtime is correctly configured.",
6
+ steps: [
7
+ { tool: "get_runtime_config", note: "Verify sync dir, writability, and git availability." },
8
+ { tool: "sync", note: "Index scenes from disk." },
9
+ ],
10
+ },
11
+ {
12
+ id: "styleguide_setup_new",
13
+ label: "Styleguide setup (new project)",
14
+ use_when: "No prose styleguide config exists and you want to create one based on the manuscript's existing conventions.",
15
+ steps: [
16
+ { tool: "describe_workflows", note: "Check context.scene_count; use that value as max_scenes in the next call." },
17
+ { tool: "bootstrap_prose_styleguide_config", note: "Detect dominant conventions. Confirm suggestions with the user before applying." },
18
+ { tool: "setup_prose_styleguide_config", note: "Only if ALL context.styleguide_exists fields are false — a config at any scope is sufficient. Create at project_root scope (requires project_id and language e.g. 'english_us'), or sync_root if no project_id is known." },
19
+ { tool: "update_prose_styleguide_config", note: "Apply the fields accepted from bootstrap suggestions." },
20
+ ],
21
+ },
22
+ {
23
+ id: "styleguide_drift_check",
24
+ label: "Styleguide drift check",
25
+ use_when: "A styleguide config exists and you want to check whether recent scenes conform to it.",
26
+ steps: [
27
+ { tool: "get_prose_styleguide_config", note: "Confirm the currently resolved config." },
28
+ { tool: "check_prose_styleguide_drift", note: "Detect non-conforming scenes. Pass project_id from context.project_id and set max_scenes from context.scene_count." },
29
+ { tool: "update_prose_styleguide_config", note: "If drift found and user approves, update config or note the outliers." },
30
+ ],
31
+ },
32
+ {
33
+ id: "manuscript_exploration",
34
+ label: "Manuscript exploration",
35
+ use_when: "Answering questions about the manuscript, finding scenes, or getting an overview.",
36
+ steps: [
37
+ { tool: "find_scenes", note: "Filter by character, beat, tag, part, chapter, or POV. No filters returns all scenes." },
38
+ { tool: "get_scene_prose", note: "Load prose for specific scenes identified by find_scenes." },
39
+ { tool: "get_chapter_prose", note: "Load all prose for a chapter. Use sparingly — large chapters can overflow context." },
40
+ { tool: "search_metadata", note: "Full-text search across scene metadata fields." },
41
+ ],
42
+ },
43
+ {
44
+ id: "prose_editing",
45
+ label: "Prose editing",
46
+ use_when: "Revising scene prose. All edits require explicit user confirmation before writing.",
47
+ steps: [
48
+ { tool: "find_scenes", note: "Identify the target scene." },
49
+ { tool: "get_scene_prose", note: "Load the current prose." },
50
+ { tool: "propose_edit", note: "Stage a revision; returns a diff preview and a proposal_id." },
51
+ { tool: "commit_edit", note: "Write the revision after the user confirms. Runs preflight checks before writing." },
52
+ { tool: "discard_edit", note: "Reject the revision if the user does not approve." },
53
+ ],
54
+ },
55
+ {
56
+ id: "character_management",
57
+ label: "Character management",
58
+ use_when: "Finding characters, reading their sheets, or updating character details.",
59
+ steps: [
60
+ { tool: "list_characters", note: "Find character_id values." },
61
+ { tool: "get_character_sheet", note: "Read full character details." },
62
+ { tool: "create_character_sheet", note: "Create a new character. Requires exactly one of project_id or universe_id." },
63
+ { tool: "update_character_sheet", note: "Edit character metadata." },
64
+ ],
65
+ },
66
+ {
67
+ id: "place_management",
68
+ label: "Place management",
69
+ use_when: "Finding locations, reading place sheets, or updating place details.",
70
+ steps: [
71
+ { tool: "list_places", note: "Find place_id values." },
72
+ { tool: "get_place_sheet", note: "Read full place details." },
73
+ { tool: "create_place_sheet", note: "Create a new place. Requires exactly one of project_id or universe_id." },
74
+ { tool: "update_place_sheet", note: "Edit place metadata." },
75
+ ],
76
+ },
77
+ {
78
+ id: "review_bundle",
79
+ label: "Review bundle",
80
+ use_when: "Preparing a formatted bundle for human review (outline, editorial, or beta read profile).",
81
+ steps: [
82
+ { tool: "preview_review_bundle", note: "Check which scenes would be included and the estimated size. Requires project_id and profile." },
83
+ { tool: "create_review_bundle", note: "Generate the bundle. Requires project_id." },
84
+ ],
85
+ },
86
+ {
87
+ id: "async_job_tracking",
88
+ label: "Async job tracking",
89
+ use_when: "A tool returned a job_id instead of an immediate result (e.g. import_scrivener_sync_async).",
90
+ steps: [
91
+ { tool: "get_async_job_status", note: "Poll with the job_id until status is 'completed' or 'failed'." },
92
+ { tool: "sync", note: "Call after a completed job that modified files on disk." },
93
+ ],
94
+ },
95
+ ];
@@ -6,7 +6,7 @@ import {
6
6
  ReviewBundlePlanError,
7
7
  buildReviewBundlePlan,
8
8
  createReviewBundleArtifacts,
9
- } from "../review-bundles.js";
9
+ } from "../src/review-bundles/review-bundles.js";
10
10
  import { validateProjectId } from "../src/sync/importer.js";
11
11
  import { getHeadCommitHash } from "../src/core/git.js";
12
12
 
@@ -11,17 +11,17 @@ import {
11
11
  resolveStyleguideConfig,
12
12
  summarizeStyleguideConfig,
13
13
  updateStyleguideConfig,
14
- } from "../prose-styleguide.js";
14
+ } from "../src/styleguide/prose-styleguide.js";
15
15
  import {
16
16
  detectStyleguideSignals,
17
17
  analyzeSceneStyleguideDrift,
18
18
  suggestStyleguideUpdatesFromScenes,
19
- } from "../prose-styleguide-drift.js";
19
+ } from "../src/styleguide/prose-styleguide-drift.js";
20
20
  import {
21
21
  PROSE_STYLEGUIDE_SKILL_BASENAME,
22
22
  PROSE_STYLEGUIDE_SKILL_DIRNAME,
23
23
  buildProseStyleguideSkill,
24
- } from "../prose-styleguide-skill.js";
24
+ } from "../src/styleguide/prose-styleguide-skill.js";
25
25
  import { validateProjectId } from "../src/sync/importer.js";
26
26
 
27
27
  export function registerStyleguideTools(s, {
@@ -1,95 +1 @@
1
- export const WORKFLOW_CATALOGUE = [
2
- {
3
- id: "first_time_setup",
4
- label: "First-time setup",
5
- use_when: "Connecting to a project for the first time or verifying the runtime is correctly configured.",
6
- steps: [
7
- { tool: "get_runtime_config", note: "Verify sync dir, writability, and git availability." },
8
- { tool: "sync", note: "Index scenes from disk." },
9
- ],
10
- },
11
- {
12
- id: "styleguide_setup_new",
13
- label: "Styleguide setup (new project)",
14
- use_when: "No prose styleguide config exists and you want to create one based on the manuscript's existing conventions.",
15
- steps: [
16
- { tool: "describe_workflows", note: "Check context.scene_count; use that value as max_scenes in the next call." },
17
- { tool: "bootstrap_prose_styleguide_config", note: "Detect dominant conventions. Confirm suggestions with the user before applying." },
18
- { tool: "setup_prose_styleguide_config", note: "Only if ALL context.styleguide_exists fields are false — a config at any scope is sufficient. Create at project_root scope (requires project_id and language e.g. 'english_us'), or sync_root if no project_id is known." },
19
- { tool: "update_prose_styleguide_config", note: "Apply the fields accepted from bootstrap suggestions." },
20
- ],
21
- },
22
- {
23
- id: "styleguide_drift_check",
24
- label: "Styleguide drift check",
25
- use_when: "A styleguide config exists and you want to check whether recent scenes conform to it.",
26
- steps: [
27
- { tool: "get_prose_styleguide_config", note: "Confirm the currently resolved config." },
28
- { tool: "check_prose_styleguide_drift", note: "Detect non-conforming scenes. Pass project_id from context.project_id and set max_scenes from context.scene_count." },
29
- { tool: "update_prose_styleguide_config", note: "If drift found and user approves, update config or note the outliers." },
30
- ],
31
- },
32
- {
33
- id: "manuscript_exploration",
34
- label: "Manuscript exploration",
35
- use_when: "Answering questions about the manuscript, finding scenes, or getting an overview.",
36
- steps: [
37
- { tool: "find_scenes", note: "Filter by character, beat, tag, part, chapter, or POV. No filters returns all scenes." },
38
- { tool: "get_scene_prose", note: "Load prose for specific scenes identified by find_scenes." },
39
- { tool: "get_chapter_prose", note: "Load all prose for a chapter. Use sparingly — large chapters can overflow context." },
40
- { tool: "search_metadata", note: "Full-text search across scene metadata fields." },
41
- ],
42
- },
43
- {
44
- id: "prose_editing",
45
- label: "Prose editing",
46
- use_when: "Revising scene prose. All edits require explicit user confirmation before writing.",
47
- steps: [
48
- { tool: "find_scenes", note: "Identify the target scene." },
49
- { tool: "get_scene_prose", note: "Load the current prose." },
50
- { tool: "propose_edit", note: "Stage a revision; returns a diff preview and a proposal_id." },
51
- { tool: "commit_edit", note: "Write the revision after the user confirms. Runs preflight checks before writing." },
52
- { tool: "discard_edit", note: "Reject the revision if the user does not approve." },
53
- ],
54
- },
55
- {
56
- id: "character_management",
57
- label: "Character management",
58
- use_when: "Finding characters, reading their sheets, or updating character details.",
59
- steps: [
60
- { tool: "list_characters", note: "Find character_id values." },
61
- { tool: "get_character_sheet", note: "Read full character details." },
62
- { tool: "create_character_sheet", note: "Create a new character. Requires exactly one of project_id or universe_id." },
63
- { tool: "update_character_sheet", note: "Edit character metadata." },
64
- ],
65
- },
66
- {
67
- id: "place_management",
68
- label: "Place management",
69
- use_when: "Finding locations, reading place sheets, or updating place details.",
70
- steps: [
71
- { tool: "list_places", note: "Find place_id values." },
72
- { tool: "get_place_sheet", note: "Read full place details." },
73
- { tool: "create_place_sheet", note: "Create a new place. Requires exactly one of project_id or universe_id." },
74
- { tool: "update_place_sheet", note: "Edit place metadata." },
75
- ],
76
- },
77
- {
78
- id: "review_bundle",
79
- label: "Review bundle",
80
- use_when: "Preparing a formatted bundle for human review (outline, editorial, or beta read profile).",
81
- steps: [
82
- { tool: "preview_review_bundle", note: "Check which scenes would be included and the estimated size. Requires project_id and profile." },
83
- { tool: "create_review_bundle", note: "Generate the bundle. Requires project_id." },
84
- ],
85
- },
86
- {
87
- id: "async_job_tracking",
88
- label: "Async job tracking",
89
- use_when: "A tool returned a job_id instead of an immediate result (e.g. import_scrivener_sync_async).",
90
- steps: [
91
- { tool: "get_async_job_status", note: "Poll with the job_id until status is 'completed' or 'failed'." },
92
- { tool: "sync", note: "Call after a completed job that modified files on disk." },
93
- ],
94
- },
95
- ];
1
+ export * from "./src/workflows/workflow-catalogue.js";