dotmd-cli 0.45.2 → 0.45.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.45.2",
3
+ "version": "0.45.3",
4
4
  "description": "CLI for managing markdown documents with YAML frontmatter — index, query, validate, graph, export, Notion sync, AI summaries.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@ import { bold, green, dim } from './color.mjs';
10
10
  // the warning on the next few-word touch-up.
11
11
  const FIELDS = [
12
12
  { name: 'current_state', cap: 1500, target: 1200, heading: '## Current State' },
13
- { name: 'next_step', cap: 300, target: 200, heading: '## Next Step' },
13
+ { name: 'next_step', cap: 800, target: 600, heading: '## Next Step' },
14
14
  ];
15
15
 
16
16
  export function runFrontmatterFix(config, opts = {}) {
package/src/validate.mjs CHANGED
@@ -112,9 +112,18 @@ export function validateDoc(doc, frontmatter, headingTitle, config) {
112
112
  }
113
113
 
114
114
  if (config.validSurfaces && !config.lifecycle.skipWarningsFor.has(doc.status)) {
115
+ const knownSurfaces = [...config.validSurfaces];
115
116
  for (const surface of doc.surfaces) {
116
117
  if (!config.validSurfaces.has(surface)) {
117
- doc.warnings.push({ path: doc.path, level: 'warning', message: `Unknown surface \`${surface}\`; expected a known surface taxonomy value.` });
118
+ const suggestions = suggestCandidates(surface, knownSurfaces, 3);
119
+ const hint = suggestions.length
120
+ ? ` Did you mean: ${suggestions.map(s => `\`${s}\``).join(' | ')}?`
121
+ : '';
122
+ doc.warnings.push({
123
+ path: doc.path,
124
+ level: 'warning',
125
+ message: `Unknown surface \`${surface}\`; expected a known surface taxonomy value.${hint} Run \`dotmd surfaces\` to list all valid values.`,
126
+ });
118
127
  }
119
128
  }
120
129
  }
@@ -456,13 +465,17 @@ export function validatePlanShape(doc, body, frontmatter, config) {
456
465
  if (config.lifecycle.terminalStatuses.has(doc.status) || config.lifecycle.archiveStatuses.has(doc.status)) return;
457
466
  if (config.lifecycle.skipWarningsFor.has(doc.status)) return;
458
467
 
459
- // 1. next_step length cap (300 chars)
468
+ // 1. next_step length cap (800 chars). Was 300; raised in parallel with
469
+ // current_state for the same reason: agents need to encode "what to do next"
470
+ // with enough specificity (which file, which decision, which branch) that
471
+ // 300 chars often forced truncation into the body where the briefing
472
+ // doesn't read it.
460
473
  const nextStep = typeof frontmatter.next_step === 'string' ? frontmatter.next_step : '';
461
- if (nextStep.length > 300) {
474
+ if (nextStep.length > 800) {
462
475
  doc.warnings.push({
463
476
  path: doc.path,
464
477
  level: 'warning',
465
- message: `\`next_step\` is ${nextStep.length} chars (cap: 300). Long prose belongs in the body — keep next_step as a 1-2 line pointer.`,
478
+ message: `\`next_step\` is ${nextStep.length} chars (cap: 800). Long prose belongs in the body — keep next_step as a 1-2 sentence pointer.`,
466
479
  });
467
480
  }
468
481