dotmd-cli 0.10.4 → 0.10.6
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 +7 -2
- package/bin/dotmd.mjs +24 -1
- package/dotmd.config.example.mjs +5 -2
- package/package.json +1 -1
- package/src/completions.mjs +4 -1
- package/src/config.mjs +1 -0
- package/src/validate.mjs +5 -4
package/README.md
CHANGED
|
@@ -116,6 +116,9 @@ dotmd deps [file] Dependency tree or overview
|
|
|
116
116
|
dotmd context [--summarize] Compact briefing (LLM-oriented)
|
|
117
117
|
dotmd focus [status] Detailed view for one status group
|
|
118
118
|
dotmd query [filters] Filtered search
|
|
119
|
+
dotmd plans List all plans
|
|
120
|
+
dotmd stale List stale docs
|
|
121
|
+
dotmd actionable List docs with next steps
|
|
119
122
|
dotmd index [--write] Generate/update docs.md index block
|
|
120
123
|
dotmd status <file> <status> Transition document status
|
|
121
124
|
dotmd archive <file> Archive (status + move + update refs)
|
|
@@ -339,14 +342,16 @@ dotmd migrate module auth identity # rename a module
|
|
|
339
342
|
|
|
340
343
|
### Preset Aliases
|
|
341
344
|
|
|
345
|
+
Built-in presets: `plans`, `stale`, `actionable`. Add your own in config:
|
|
346
|
+
|
|
342
347
|
```js
|
|
343
348
|
export const presets = {
|
|
344
|
-
stale: ['--status', 'active,ready', '--stale', '--sort', 'updated', '--all'],
|
|
345
349
|
mine: ['--owner', 'robert', '--status', 'active', '--all'],
|
|
350
|
+
blocked: ['--status', 'blocked', '--all'],
|
|
346
351
|
};
|
|
347
352
|
```
|
|
348
353
|
|
|
349
|
-
Then run `dotmd
|
|
354
|
+
Then run `dotmd mine` or `dotmd blocked` as shorthand. All presets support query flags (`--json`, `--sort`, etc.).
|
|
350
355
|
|
|
351
356
|
### Watch Mode
|
|
352
357
|
|
package/bin/dotmd.mjs
CHANGED
|
@@ -45,6 +45,9 @@ View & Query:
|
|
|
45
45
|
graph [--dot] [--json] Visualize document relationships
|
|
46
46
|
deps [file] [--json] Dependency tree or overview
|
|
47
47
|
diff [file] [--summarize] Show changes since last updated date
|
|
48
|
+
plans List all plans (shortcut for query --type plan)
|
|
49
|
+
stale List stale docs across all statuses
|
|
50
|
+
actionable List docs with a next step ready to act on
|
|
48
51
|
summary <file> [--json] AI summary of a document
|
|
49
52
|
|
|
50
53
|
Validate & Fix:
|
|
@@ -341,6 +344,26 @@ directory. Skips any files that already exist.
|
|
|
341
344
|
|
|
342
345
|
If docs/ already contains .md files, auto-detects statuses, surfaces,
|
|
343
346
|
modules, and reference fields to pre-populate the config.`,
|
|
347
|
+
|
|
348
|
+
plans: `dotmd plans — list all plans
|
|
349
|
+
|
|
350
|
+
Shows all documents with type: plan, sorted by status.
|
|
351
|
+
Supports all query flags (--status, --json, --sort, etc.)
|
|
352
|
+
|
|
353
|
+
Examples:
|
|
354
|
+
dotmd plans # all plans
|
|
355
|
+
dotmd plans --status active # active plans only
|
|
356
|
+
dotmd plans --json # JSON output`,
|
|
357
|
+
|
|
358
|
+
stale: `dotmd stale — list stale documents
|
|
359
|
+
|
|
360
|
+
Shows docs that haven't been updated within their staleness threshold.
|
|
361
|
+
Supports all query flags (--status, --json, --sort, etc.)`,
|
|
362
|
+
|
|
363
|
+
actionable: `dotmd actionable — list docs with next steps
|
|
364
|
+
|
|
365
|
+
Shows active/ready docs that have a next_step defined.
|
|
366
|
+
Supports all query flags (--status, --json, --sort, etc.)`,
|
|
344
367
|
};
|
|
345
368
|
|
|
346
369
|
async function main() {
|
|
@@ -665,7 +688,7 @@ async function main() {
|
|
|
665
688
|
// Unknown command — suggest closest match
|
|
666
689
|
const allCommands = [
|
|
667
690
|
'list', 'json', 'check', 'coverage', 'stats', 'graph', 'deps', 'context',
|
|
668
|
-
'focus', 'query', 'index', 'status', 'archive', 'touch', 'doctor',
|
|
691
|
+
'focus', 'query', 'plans', 'stale', 'actionable', 'index', 'status', 'archive', 'touch', 'doctor',
|
|
669
692
|
'fix-refs', 'lint', 'rename', 'migrate', 'notion', 'export', 'summary',
|
|
670
693
|
'watch', 'diff', 'new', 'init', 'completions',
|
|
671
694
|
];
|
package/dotmd.config.example.mjs
CHANGED
|
@@ -99,9 +99,12 @@ export const referenceFields = {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
// Query presets — expand to filter args when used as commands
|
|
102
|
+
// Built-in: plans, stale, actionable. Add your own here:
|
|
102
103
|
export const presets = {
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
// plans: ['--type', 'plan', '--sort', 'status', '--all'], // built-in
|
|
105
|
+
// stale: ['--status', '...', '--stale', '--sort', 'updated', '--all'], // built-in
|
|
106
|
+
// actionable: ['--status', 'active,ready', '--has-next-step', ...], // built-in
|
|
107
|
+
mine: ['--owner', 'robert', '--status', 'active', '--all'],
|
|
105
108
|
};
|
|
106
109
|
|
|
107
110
|
// ─── Notion ──────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
package/src/completions.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { die } from './util.mjs';
|
|
|
2
2
|
|
|
3
3
|
const COMMANDS = [
|
|
4
4
|
'list', 'json', 'check', 'coverage', 'stats', 'graph', 'deps', 'context', 'focus', 'query',
|
|
5
|
-
'index', 'status', 'archive', 'touch', 'doctor', 'lint', 'rename', 'migrate',
|
|
5
|
+
'plans', 'stale', 'actionable', 'index', 'status', 'archive', 'touch', 'doctor', 'lint', 'rename', 'migrate',
|
|
6
6
|
'fix-refs', 'notion', 'export', 'summary', 'watch', 'diff', 'init', 'new', 'completions',
|
|
7
7
|
];
|
|
8
8
|
|
|
@@ -25,6 +25,9 @@ const COMMAND_FLAGS = {
|
|
|
25
25
|
notion: ['import', 'export', 'sync', '--force', '--dry-run'],
|
|
26
26
|
export: ['--format', '--output', '--status', '--module', '--root', '--type'],
|
|
27
27
|
focus: ['--json'],
|
|
28
|
+
plans: ['--status', '--json', '--sort', '--limit', '--all', '--stale', '--has-next-step'],
|
|
29
|
+
stale: ['--json', '--sort', '--limit', '--all'],
|
|
30
|
+
actionable: ['--json', '--sort', '--limit', '--all'],
|
|
28
31
|
status: [],
|
|
29
32
|
archive: [],
|
|
30
33
|
doctor: [],
|
package/src/config.mjs
CHANGED
|
@@ -79,6 +79,7 @@ const DEFAULTS = {
|
|
|
79
79
|
notion: null,
|
|
80
80
|
|
|
81
81
|
presets: {
|
|
82
|
+
plans: ['--type', 'plan', '--sort', 'status', '--all'],
|
|
82
83
|
stale: ['--status', 'active,ready,planned,blocked,research', '--stale', '--sort', 'updated', '--all'],
|
|
83
84
|
actionable: ['--status', 'active,ready', '--has-next-step', '--sort', 'updated', '--all'],
|
|
84
85
|
},
|
package/src/validate.mjs
CHANGED
|
@@ -79,14 +79,15 @@ export function validateDoc(doc, frontmatter, headingTitle, config) {
|
|
|
79
79
|
doc.warnings.push({ path: doc.path, level: 'warning', message: 'Missing `summary` and no blockquote fallback found.' });
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// Determine which statuses should have current_state and next_step
|
|
83
|
-
const
|
|
82
|
+
// Determine which statuses should have current_state and next_step (plans only, not docs/research)
|
|
83
|
+
const isPlanWork = knownStatus && doc.status && (!doc.type || doc.type === 'plan')
|
|
84
|
+
&& !config.lifecycle.terminalStatuses.has(doc.status) && !config.lifecycle.skipWarningsFor.has(doc.status);
|
|
84
85
|
|
|
85
|
-
if (
|
|
86
|
+
if (isPlanWork && !asString(frontmatter.current_state)) {
|
|
86
87
|
doc.warnings.push({ path: doc.path, level: 'warning', message: 'Missing `current_state`; index output is using a fallback or placeholder.' });
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
if (
|
|
90
|
+
if (isPlanWork && doc.status !== 'blocked' && !asString(frontmatter.next_step)) {
|
|
90
91
|
doc.warnings.push({ path: doc.path, level: 'warning', message: 'Missing `next_step`; command output will omit a clear immediate action.' });
|
|
91
92
|
}
|
|
92
93
|
|