dotmd-cli 0.50.0 → 0.50.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.50.0",
3
+ "version": "0.50.2",
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",
@@ -41,7 +41,7 @@
41
41
  "test": "node --test test/*.test.mjs",
42
42
  "preversion": "npm test",
43
43
  "version": "node bin/dotmd.mjs hud >/dev/null 2>&1; git add .claude/commands docs/docs.md 2>/dev/null; true",
44
- "postversion": "git push origin main --tags && gh release create v$npm_package_version --generate-notes --title v$npm_package_version && sleep 5 && gh run watch $(gh run list --workflow=publish.yml --limit 1 --json databaseId --jq '.[0].databaseId') --exit-status && sleep 10 && npm cache clean --force && npm install -g dotmd-cli@$npm_package_version"
44
+ "postversion": "bash scripts/postversion.sh"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=20"
@@ -100,7 +100,7 @@ function generateBatonCommand(config, version) {
100
100
  const lines = [...frontmatterFor('baton', config), markerFor(version), ''];
101
101
  lines.push('Wrap this session. Two commands:');
102
102
  lines.push('');
103
- lines.push('1. **Save the resume prompt.** `dotmd new prompt resume-<plan-slug>` — pipe stdin or pass `@path`. 10-20 line body: the next concrete decision plus any gotchas. NOT a recap of the plan body. The saved prompt IS the handoff — never print it into chat for copy-paste.');
103
+ lines.push('1. **Save the resume prompt.** `dotmd new prompt resume-<plan-slug>` — pipe stdin or pass `@path`. 10-20 line body: the next concrete decision plus any gotchas. NOT a recap of the plan body. The saved prompt IS the handoff — never print it into chat for copy-paste. Treat `docs/prompts/` as local session state: it is often gitignored and should not be committed just because you created a handoff prompt.');
104
104
  lines.push('');
105
105
  lines.push('2. **Close out via `dotmd set <status>`.** Pick the status that matches reality:');
106
106
  lines.push(' - `dotmd set active <file>` — work continues, return the plan to the active queue');
@@ -133,7 +133,7 @@ function generateDocsCommand(config, version) {
133
133
 
134
134
  lines.push('Commands for working with docs:');
135
135
  lines.push('- `dotmd context` — LLM-oriented briefing across all types');
136
- lines.push('- `dotmd doctor` — auto-fix everything in one pass (refs, lint, dates, index)');
136
+ lines.push('- `dotmd doctor --apply` — auto-fix everything in one pass (refs, lint, dates, index; bare `dotmd doctor` previews only)');
137
137
  lines.push('- `dotmd query [filters]` — search by status, keyword, module, surface, type, staleness');
138
138
  lines.push('- `dotmd health` — plan pipeline, velocity, aging');
139
139
  lines.push('- `dotmd stats` — doc health dashboard (completeness, checklists, audit coverage)');
package/src/render.mjs CHANGED
@@ -493,7 +493,7 @@ function _renderCheck(index, opts = {}) {
493
493
  }
494
494
  lines.push('');
495
495
  } else {
496
- lines.push(dim(`Run \`dotmd check --verbose\` for per-doc detail. \`dotmd doctor\` auto-fixes supported issues; remaining issues need the suggested manual command.`));
496
+ lines.push(dim(`Run \`dotmd check --verbose\` for per-doc detail. \`dotmd doctor --apply\` auto-fixes supported issues (bare \`dotmd doctor\` previews only); remaining issues need the suggested manual command.`));
497
497
  lines.push('');
498
498
  }
499
499
  }
package/src/validate.mjs CHANGED
@@ -416,7 +416,10 @@ export function checkBidirectionalReferences(docs, config) {
416
416
  // rendering), so divergence almost always means the agent forgot the back-link.
417
417
  // Warning fires on the CHILD (that's the file that needs the edit). Skips
418
418
  // terminal/archive statuses on either side — runlists referencing closed work
419
- // are a normal history pattern.
419
+ // are a normal history pattern. A `>`-prefixed (one-way) runlist entry opts
420
+ // that child out of the back-pointer requirement — the same per-ref escape
421
+ // hatch the bidirectional reciprocity check honors (A4) — so a hub can order a
422
+ // child it doesn't own without nagging the child to add `parent_plan:`.
420
423
  export function checkRunlistBackPointers(docs, config) {
421
424
  const warnings = [];
422
425
  const skipStatuses = new Set([
@@ -428,10 +431,13 @@ export function checkRunlistBackPointers(docs, config) {
428
431
  for (const hub of docs) {
429
432
  if (skipStatuses.has(hub.status)) continue;
430
433
  const runlistRefs = hub.refFields?.runlist ?? [];
434
+ const runlistDirs = hub.refFieldDirections?.runlist ?? [];
431
435
  if (runlistRefs.length === 0) continue;
432
436
  const hubDir = path.dirname(path.join(config.repoRoot, hub.path));
433
437
 
434
- for (const ref of runlistRefs) {
438
+ for (let i = 0; i < runlistRefs.length; i++) {
439
+ const ref = runlistRefs[i];
440
+ if (runlistDirs[i] === 'one-way') continue; // `> child.md` → ordered but no back-pointer expected
435
441
  const resolved = resolveRefPath(ref, hubDir, config.repoRoot);
436
442
  if (!resolved) continue; // unresolved refs already get their own existence error
437
443
  const childPath = toRepoPath(resolved, config.repoRoot);