dotmd-cli 0.10.3 → 0.10.4

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.10.3",
3
+ "version": "0.10.4",
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",
package/src/index.mjs CHANGED
@@ -131,6 +131,7 @@ export function parseDocFile(filePath, config) {
131
131
  const executionMode = asString(parsedFrontmatter.execution_mode) ?? null;
132
132
  const checklist = extractChecklistCounts(body);
133
133
  const bodyLinks = extractBodyLinks(body);
134
+ const hasCloseout = /^##\s+Closeout/m.test(body);
134
135
 
135
136
  // Dynamic reference field extraction
136
137
  const refFields = {};
@@ -172,6 +173,7 @@ export function parseDocFile(filePath, config) {
172
173
  bodyLinks,
173
174
  refFields,
174
175
  checklistCompletionRate: computeChecklistCompletionRate(checklist),
176
+ hasCloseout,
175
177
  hasNextStep: Boolean(nextStep),
176
178
  hasBlockers: blockers.length > 0,
177
179
  daysSinceUpdate: computeDaysSinceUpdate(asString(parsedFrontmatter.updated) ?? null),
package/src/validate.mjs CHANGED
@@ -90,6 +90,11 @@ export function validateDoc(doc, frontmatter, headingTitle, config) {
90
90
  doc.warnings.push({ path: doc.path, level: 'warning', message: 'Missing `next_step`; command output will omit a clear immediate action.' });
91
91
  }
92
92
 
93
+ // Archived plans must have a ## Closeout section
94
+ if (config.lifecycle.archiveStatuses.has(doc.status) && doc.type === 'plan' && !doc.hasCloseout) {
95
+ doc.warnings.push({ path: doc.path, level: 'warning', message: 'Archived plan missing `## Closeout` section.' });
96
+ }
97
+
93
98
  // Validate reference fields resolve to existing files
94
99
  const docDir = path.dirname(path.join(config.repoRoot, doc.path));
95
100
  const allRefFields = [...(config.referenceFields.bidirectional || []), ...(config.referenceFields.unidirectional || [])];