@hanna84/mcp-writing 3.1.0 → 3.1.2

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,11 +4,31 @@ 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.1.2](https://github.com/hannasdev/mcp-writing.git
8
+ /compare/v3.1.1...v3.1.2)
9
+
10
+ - refactor: move styleguide skill output to skills/prose-styleguide/SKILL.md [`#168`](https://github.com/hannasdev/mcp-writing.git
11
+ /pull/168)
12
+
13
+ #### [v3.1.1](https://github.com/hannasdev/mcp-writing.git
14
+ /compare/v3.1.0...v3.1.1)
15
+
16
+ > 3 May 2026
17
+
18
+ - fix: surface runtime warning for invalid PROSE_STYLEGUIDE_ENFORCEMENT_MODE [`#167`](https://github.com/hannasdev/mcp-writing.git
19
+ /pull/167)
20
+ - Release 3.1.1 [`0531168`](https://github.com/hannasdev/mcp-writing.git
21
+ /commit/0531168d60bde6f445a3465b3f4246fdca53bfba)
22
+
7
23
  #### [v3.1.0](https://github.com/hannasdev/mcp-writing.git
8
24
  /compare/v3.0.0...v3.1.0)
9
25
 
26
+ > 2 May 2026
27
+
10
28
  - feat(editing): enforce styleguide automatically in edit flow [`#166`](https://github.com/hannasdev/mcp-writing.git
11
29
  /pull/166)
30
+ - Release 3.1.0 [`ad1106c`](https://github.com/hannasdev/mcp-writing.git
31
+ /commit/ad1106ca4099777d9b05556dfd9cf75de4f030f1)
12
32
 
13
33
  ### [v3.0.0](https://github.com/hannasdev/mcp-writing.git
14
34
  /compare/v2.18.1...v3.0.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanna84/mcp-writing",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
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
@@ -78,6 +78,7 @@ const STYLEGUIDE_ENFORCEMENT_MODE = STYLEGUIDE_ENFORCEMENT_MODE_RAW === "off"
78
78
  ? STYLEGUIDE_ENFORCEMENT_MODE_RAW
79
79
  : "warn";
80
80
  const OWNERSHIP_GUARD_MODE_RAW_DISPLAY = JSON.stringify(OWNERSHIP_GUARD_MODE_RAW);
81
+ const STYLEGUIDE_ENFORCEMENT_MODE_RAW_DISPLAY = JSON.stringify(STYLEGUIDE_ENFORCEMENT_MODE_RAW);
81
82
  const __filename = fileURLToPath(import.meta.url);
82
83
  const __dirname = path.dirname(__filename);
83
84
  const ROOT_DIR = path.resolve(__dirname, "..");
@@ -219,6 +220,9 @@ const RUNTIME_DIAGNOSTICS = getRuntimeDiagnostics({
219
220
  ownershipGuardModeRaw: OWNERSHIP_GUARD_MODE_RAW,
220
221
  ownershipGuardMode: OWNERSHIP_GUARD_MODE,
221
222
  ownershipGuardModeRawDisplay: OWNERSHIP_GUARD_MODE_RAW_DISPLAY,
223
+ styleguideEnforcementModeRaw: STYLEGUIDE_ENFORCEMENT_MODE_RAW,
224
+ styleguideEnforcementMode: STYLEGUIDE_ENFORCEMENT_MODE,
225
+ styleguideEnforcementModeRawDisplay: STYLEGUIDE_ENFORCEMENT_MODE_RAW_DISPLAY,
222
226
  syncDirWritable: SYNC_DIR_WRITABLE,
223
227
  syncDirAbs: SYNC_DIR_ABS,
224
228
  syncOwnershipDiagnostics: SYNC_OWNERSHIP_DIAGNOSTICS,
@@ -6,9 +6,12 @@
6
6
  * is straightforward to test.
7
7
  *
8
8
  * @param {object} opts
9
- * @param {string} opts.ownershipGuardModeRaw Raw env value before normalisation
9
+ * @param {string} opts.ownershipGuardModeRaw Trimmed/lowercased env token before enum validation
10
10
  * @param {string} opts.ownershipGuardMode Normalised value ("warn" | "fail")
11
11
  * @param {string} opts.ownershipGuardModeRawDisplay JSON.stringify of the raw value
12
+ * @param {string} opts.styleguideEnforcementModeRaw Trimmed/lowercased env token before enum validation
13
+ * @param {string} opts.styleguideEnforcementMode Normalised value ("off" | "warn" | "required")
14
+ * @param {string} opts.styleguideEnforcementModeRawDisplay JSON.stringify of the raw value
12
15
  * @param {boolean} opts.syncDirWritable
13
16
  * @param {string} opts.syncDirAbs Resolved absolute path shown in messages
14
17
  * @param {object} opts.syncOwnershipDiagnostics Result of getSyncOwnershipDiagnostics()
@@ -20,6 +23,9 @@ export function getRuntimeDiagnostics({
20
23
  ownershipGuardModeRaw,
21
24
  ownershipGuardMode,
22
25
  ownershipGuardModeRawDisplay,
26
+ styleguideEnforcementModeRaw,
27
+ styleguideEnforcementMode,
28
+ styleguideEnforcementModeRawDisplay,
23
29
  syncDirWritable,
24
30
  syncDirAbs,
25
31
  syncOwnershipDiagnostics,
@@ -36,6 +42,13 @@ export function getRuntimeDiagnostics({
36
42
  recommendations.push("Set OWNERSHIP_GUARD_MODE to either 'warn' or 'fail'.");
37
43
  }
38
44
 
45
+ if (styleguideEnforcementModeRaw !== styleguideEnforcementMode) {
46
+ warnings.push(
47
+ `STYLEGUIDE_ENFORCEMENT_MODE_INVALID: Unsupported PROSE_STYLEGUIDE_ENFORCEMENT_MODE=${styleguideEnforcementModeRawDisplay}. Falling back to 'warn'.`
48
+ );
49
+ recommendations.push("Set PROSE_STYLEGUIDE_ENFORCEMENT_MODE to one of 'off', 'warn', or 'required'.");
50
+ }
51
+
39
52
  if (syncOwnershipDiagnostics.runtime_uid_override_ignored) {
40
53
  warnings.push("RUNTIME_UID_OVERRIDE_IGNORED: RUNTIME_UID_OVERRIDE is ignored unless NODE_ENV=test or ALLOW_RUNTIME_UID_OVERRIDE=1.");
41
54
  recommendations.push("Avoid RUNTIME_UID_OVERRIDE in production runtime environments.");
@@ -1,5 +1,5 @@
1
- export const PROSE_STYLEGUIDE_SKILL_DIRNAME = "skills";
2
- export const PROSE_STYLEGUIDE_SKILL_BASENAME = "prose-styleguide.md";
1
+ export const PROSE_STYLEGUIDE_SKILL_DIRNAME = "skills/prose-styleguide";
2
+ export const PROSE_STYLEGUIDE_SKILL_BASENAME = "SKILL.md";
3
3
 
4
4
  const LANGUAGE_LABELS = {
5
5
  english_us: "English (US)",
@@ -63,7 +63,7 @@ export function buildProseStyleguideSkill({ resolvedConfig, sources = [], projec
63
63
  ok: false,
64
64
  error: {
65
65
  code: "INVALID_STYLEGUIDE_CONFIG",
66
- message: "Cannot generate prose-styleguide.md without a resolved config object.",
66
+ message: "Cannot generate skills/prose-styleguide/SKILL.md without a resolved config object.",
67
67
  },
68
68
  };
69
69
  }
@@ -73,7 +73,7 @@ function resolveStyleguideSnapshot({ syncDir, projectId, errorResponse }) {
73
73
  ok: false,
74
74
  response: errorResponse(
75
75
  "STYLEGUIDE_SKILL_IO_ERROR",
76
- "Failed to read skills/prose-styleguide.md while resolving styleguide snapshot.",
76
+ "Failed to read skills/prose-styleguide/SKILL.md while resolving styleguide snapshot.",
77
77
  {
78
78
  file_path: skillPath,
79
79
  reason: err.message,
@@ -147,14 +147,14 @@ function evaluateStyleguidePolicy({
147
147
  ok: false,
148
148
  response: errorResponse(
149
149
  "STYLEGUIDE_SKILL_REQUIRED",
150
- "Cannot propose prose edits before skills/prose-styleguide.md exists.",
150
+ "Cannot propose prose edits before skills/prose-styleguide/SKILL.md exists.",
151
151
  {
152
152
  next_step: "Run setup_prose_styleguide_skill, then retry propose_edit.",
153
153
  }
154
154
  ),
155
155
  };
156
156
  }
157
- warnings.push("skills/prose-styleguide.md was not found at sync root.");
157
+ warnings.push("skills/prose-styleguide/SKILL.md was not found at sync root.");
158
158
  }
159
159
  }
160
160
 
@@ -603,10 +603,10 @@ export function registerStyleguideTools(s, {
603
603
 
604
604
  s.tool(
605
605
  "setup_prose_styleguide_skill",
606
- "Generate skills/prose-styleguide.md from the resolved prose styleguide config and universal craft rules.",
606
+ "Generate skills/prose-styleguide/SKILL.md from the resolved prose styleguide config and universal craft rules.",
607
607
  {
608
608
  project_id: z.string().optional().describe("Optional project ID for scoped config resolution (e.g. 'the-lamb' or 'universe-1/book-1')."),
609
- overwrite: z.boolean().optional().describe("If true, replaces an existing skills/prose-styleguide.md file."),
609
+ overwrite: z.boolean().optional().describe("If true, replaces an existing skills/prose-styleguide/SKILL.md file."),
610
610
  },
611
611
  async ({ project_id, overwrite = false }) => {
612
612
  if (project_id !== undefined) {
@@ -638,7 +638,7 @@ export function registerStyleguideTools(s, {
638
638
  if (resolved.setup_required || !resolved.resolved_config) {
639
639
  return errorResponse(
640
640
  "STYLEGUIDE_CONFIG_REQUIRED",
641
- "Cannot generate prose-styleguide.md before prose-styleguide.config.yaml is set up.",
641
+ "Cannot generate skills/prose-styleguide/SKILL.md before prose-styleguide.config.yaml is set up.",
642
642
  {
643
643
  project_id: project_id ?? null,
644
644
  next_step: "Run setup_prose_styleguide_config or bootstrap_prose_styleguide_config first.",
@@ -658,7 +658,7 @@ export function registerStyleguideTools(s, {
658
658
  if (fs.existsSync(skillPath) && !overwrite) {
659
659
  return errorResponse(
660
660
  "STYLEGUIDE_SKILL_EXISTS",
661
- "skills/prose-styleguide.md already exists. Set overwrite=true to replace it.",
661
+ "skills/prose-styleguide/SKILL.md already exists. Set overwrite=true to replace it.",
662
662
  { target_path: path.resolve(skillPath) }
663
663
  );
664
664
  }