dotmd-cli 0.87.1 → 0.87.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/README.md CHANGED
@@ -97,20 +97,21 @@ Restart Claude Code, or run `/reload-plugins`, after a plugin update.
97
97
  ```bash
98
98
  runlist init # create config, docs/, and the generated index
99
99
  runlist new plan auth-refresh # scaffold a typed document
100
- runlist briefing # compact active-work orientation
101
- runlist plans # live plan dashboard
100
+ runlist plans # compact live plan dashboard
101
+ runlist briefing # comprehensive active-work view
102
102
  runlist check # validate schema, references, and lifecycle shape
103
103
  runlist doctor # preview repairs; add --apply to write
104
104
  ```
105
105
 
106
- `runlist briefing` is the compact orientation view. `runlist context` is the fuller
106
+ `runlist plans` is the compact orientation view. `runlist briefing` lists live
107
+ plans with next steps and grows with the corpus. `runlist context` is the fuller
107
108
  human/LLM briefing, while `runlist agent-context` emits bounded structured JSON for
108
109
  agent integrations.
109
110
 
110
111
  ## Core Workflow
111
112
 
112
113
  ```bash
113
- runlist briefing
114
+ runlist plans
114
115
  runlist use docs/plans/auth-refresh.md
115
116
  runlist set awaiting docs/plans/auth-refresh.md --note "Need API owner decision"
116
117
  runlist set active docs/plans/auth-refresh.md --note "Decision received"
package/bin/dotmd.mjs CHANGED
@@ -676,10 +676,11 @@ Options:
676
676
  --json Output as JSON ({ owned, prompts, errors, previousSelf,
677
677
  fleet, recentRejections, misuseRecap, drift })`,
678
678
 
679
- briefing: `runlist briefing — compact summary for session start
679
+ briefing: `runlist briefing — comprehensive live-work summary
680
680
 
681
- Shows plan statuses with next steps, doc/research counts, and health
682
- in 5-10 lines. Designed for LLM context injection.
681
+ Shows every live plan with its next step, plus doc/research counts and health.
682
+ Output grows with the corpus; use \`runlist plans\` for compact orientation or
683
+ \`runlist agent-context\` for structured agent context.
683
684
 
684
685
  Options:
685
686
  --json Output as JSON`,
@@ -1983,7 +1984,15 @@ async function main() {
1983
1984
  if (command === 'glossary') { const { runGlossary } = await import('../src/glossary.mjs'); runGlossary(restArgs, config); return; }
1984
1985
  if (command === 'model') { const { runModel } = await import('../src/model.mjs'); await runModel(restArgs, config); return; }
1985
1986
  if (command === 'show') { const { runShow } = await import('../src/show.mjs'); runShow(restArgs, config); return; }
1986
- if (command === 'decisions') { const { runDecisions } = await import('../src/decisions.mjs'); runDecisions(restArgs, config); return; }
1987
+ if (command === 'decisions') {
1988
+ const { runDecisions } = await import('../src/decisions.mjs');
1989
+ const result = runDecisions(restArgs, config);
1990
+ if (result?.defects?.length) {
1991
+ const first = result.defects[0];
1992
+ _exitFailureMessage = `${result.defects.length} decision defect(s); first: ${first.doc}:${first.line} ${first.message}`;
1993
+ }
1994
+ return;
1995
+ }
1987
1996
  if (command === 'export') { const { runExport } = await import('../src/export.mjs'); runExport(restArgs, config, { dryRun, root: rootArg, type: typeArg }); return; }
1988
1997
 
1989
1998
  // Lifecycle commands
@@ -2175,7 +2184,10 @@ async function main() {
2175
2184
  writeCheckPreviewNote();
2176
2185
  process.stdout.write('\n' + renderCheck(freshIndex, config, { errorsOnly, noCollapse, verbose }));
2177
2186
  }
2178
- if (freshIndex.errors.length > 0) process.exitCode = 1;
2187
+ if (freshIndex.errors.length > 0) {
2188
+ process.exitCode = 1;
2189
+ _exitFailureMessage = checkFailureSummary(freshIndex.errors);
2190
+ }
2179
2191
  return;
2180
2192
  }
2181
2193
 
@@ -2185,13 +2197,19 @@ async function main() {
2185
2197
 
2186
2198
  if (args.includes('--json')) {
2187
2199
  process.stdout.write(JSON.stringify(checkJson(index), null, 2) + '\n');
2188
- if (index.errors.length > 0) process.exitCode = 1;
2200
+ if (index.errors.length > 0) {
2201
+ process.exitCode = 1;
2202
+ _exitFailureMessage = checkFailureSummary(index.errors);
2203
+ }
2189
2204
  return;
2190
2205
  }
2191
2206
 
2192
2207
  writeCheckPreviewNote();
2193
2208
  process.stdout.write(renderCheck(index, config, { errorsOnly, noCollapse, verbose }));
2194
- if (index.errors.length > 0) process.exitCode = 1;
2209
+ if (index.errors.length > 0) {
2210
+ process.exitCode = 1;
2211
+ _exitFailureMessage = checkFailureSummary(index.errors);
2212
+ }
2195
2213
  return;
2196
2214
  }
2197
2215
 
@@ -2416,9 +2434,15 @@ async function main() {
2416
2434
  let _resolvedConfig = null;
2417
2435
  let _resolvedCommand = null;
2418
2436
  let _suppressObservability = false;
2437
+ let _exitFailureMessage = null;
2419
2438
  const _startMs = Date.now();
2420
2439
  const _invocationArgs = process.argv.slice(2);
2421
2440
 
2441
+ function checkFailureSummary(errors) {
2442
+ const first = errors[0];
2443
+ return `${errors.length} check error(s); first: ${first.path ? `${first.path}: ` : ''}${first.message}`;
2444
+ }
2445
+
2422
2446
  function _journalExit(err) {
2423
2447
  if (_suppressObservability || _resolvedCommand === 'hud' || _invocationArgs.includes('--dry-run') || _invocationArgs.includes('-n')) return;
2424
2448
  try {
@@ -2433,7 +2457,7 @@ function _journalExit(err) {
2433
2457
  // A command that reports its own failure through the exit code (check with
2434
2458
  // errors, a failed update step) is a failure too.
2435
2459
  const code = Number(process.exitCode ?? 0);
2436
- const failure = err ?? (code !== 0 ? { name: 'ExitStatus', message: `exited with status ${code}` } : null);
2460
+ const failure = err ?? (code !== 0 ? { name: 'ExitStatus', message: _exitFailureMessage ?? `exited with status ${code}` } : null);
2437
2461
  if (failure) {
2438
2462
  try {
2439
2463
  recordGlobalError({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotmd-cli",
3
- "version": "0.87.1",
3
+ "version": "0.87.2",
4
4
  "description": "CLI for managing markdown documents with YAML frontmatter — index, query, validate, graph, export, lifecycle, and AI summaries.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/baton.mjs CHANGED
@@ -65,7 +65,7 @@ function pendingHandoffs(promptPath, planPath, config) {
65
65
  function refusePendingHandoff(pending) {
66
66
  const lines = pending.map(p => ` ${p}`).join('\n');
67
67
  const slug = path.basename(pending[0], '.md');
68
- die(`Nothing saved: a handoff for this is already pending:\n${lines}\nUse it (\`runlist use ${slug}\`) or archive it (\`runlist prompts archive ${pending[0]}\`), then run baton again.`);
68
+ die(`Nothing saved: a handoff for this is already pending:\n${lines}\nInspect it with \`runlist prompts show ${slug}\`. If it is current, keep it and do not hand off again. If it is stale, run \`runlist prompts archive ${pending[0]}\`, then run baton again.`);
69
69
  }
70
70
 
71
71
  // Is this positional a filesystem reference (must resolve, typos die) or a
package/src/decisions.mjs CHANGED
@@ -689,7 +689,7 @@ export function runDecisions(args, config) {
689
689
  process.stdout.write(`${items.length} decision items in ${docs.length} documents; ${defects.length} defects.\n`);
690
690
  }
691
691
  if (defects.length) process.exitCode = 1;
692
- return;
692
+ return { defects };
693
693
  }
694
694
 
695
695
  let docFilter = null;