mdkg 0.3.7 → 0.3.8

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/CLI_COMMAND_MATRIX.md +81 -22
  3. package/README.md +50 -25
  4. package/dist/cli.js +70 -34
  5. package/dist/command-contract.json +354 -9
  6. package/dist/commands/capability.js +1 -0
  7. package/dist/commands/doctor.js +7 -7
  8. package/dist/commands/format.js +40 -1
  9. package/dist/commands/handoff.js +6 -0
  10. package/dist/commands/new.js +12 -3
  11. package/dist/commands/spec.js +76 -17
  12. package/dist/commands/subgraph.js +7 -4
  13. package/dist/commands/upgrade.js +70 -6
  14. package/dist/commands/validate.js +106 -3
  15. package/dist/commands/work.js +12 -5
  16. package/dist/graph/agent_file_types.js +59 -20
  17. package/dist/graph/capabilities_indexer.js +45 -3
  18. package/dist/graph/indexer.js +5 -0
  19. package/dist/graph/template_schema.js +37 -17
  20. package/dist/graph/validate_graph.js +11 -5
  21. package/dist/init/AGENT_START.md +5 -5
  22. package/dist/init/CLI_COMMAND_MATRIX.md +29 -16
  23. package/dist/init/README.md +11 -9
  24. package/dist/init/init-manifest.json +59 -4
  25. package/dist/init/templates/default/manifest.md +45 -0
  26. package/dist/init/templates/specs/agent.MANIFEST.md +80 -0
  27. package/dist/init/templates/specs/api.MANIFEST.md +33 -0
  28. package/dist/init/templates/specs/base.MANIFEST.md +120 -0
  29. package/dist/init/templates/specs/capability.MANIFEST.md +45 -0
  30. package/dist/init/templates/specs/integration.MANIFEST.md +25 -0
  31. package/dist/init/templates/specs/model.MANIFEST.md +21 -0
  32. package/dist/init/templates/specs/project.MANIFEST.md +39 -0
  33. package/dist/init/templates/specs/runtime-agent.MANIFEST.md +49 -0
  34. package/dist/init/templates/specs/runtime-image.MANIFEST.md +21 -0
  35. package/dist/init/templates/specs/tool.MANIFEST.md +25 -0
  36. package/dist/util/argparse.js +3 -0
  37. package/package.json +17 -3
package/CHANGELOG.md CHANGED
@@ -8,6 +8,30 @@ mdkg is pre-v1 public alpha software. Command, graph, cache, bundle, and DAL con
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 0.3.8 - 2026-06-25
12
+
13
+ ### Added
14
+
15
+ - Planned and began a warning-scale UX hardening lane for large multi-repo
16
+ mdkg orchestration runs.
17
+ - Added bounded validation warning summaries, summary-mode output, and a clean
18
+ JSON receipt artifact path for warning-heavy validation workflows.
19
+ - Added heading formatter summary-mode output for large recommended-heading
20
+ migration previews.
21
+ - Added a packed warning UX smoke to prepublish automation so high-volume
22
+ warning output regressions are caught before release.
23
+
24
+ ### Changed
25
+
26
+ - Renamed the reusable capability surface to canonical `MANIFEST.md`
27
+ terminology across scaffolds, help, command references, init assets, and
28
+ skills. `SPEC.md` and `mdkg spec ...` remain explicit legacy aliases for one
29
+ compatibility release, with manifest-first warnings and migration guidance.
30
+ - Improved strict doctor, subgraph, and handoff remediation guidance for
31
+ multi-repo operators.
32
+ - Updated repo-local skill guidance for child-first commit and root subgraph
33
+ refresh sequencing.
34
+
11
35
  ## 0.3.7 - 2026-06-20
12
36
 
13
37
  ### Added
@@ -1,7 +1,7 @@
1
1
  # CLI Command Matrix
2
2
 
3
- as_of: 2026-06-17
4
- package_version_in_source: 0.3.6
3
+ as_of: 2026-06-21
4
+ package_version_in_source: 0.3.8
5
5
  source: live help from `src/cli.ts`, runtime command handlers, and `dec-15`..`dec-18`
6
6
  status: canonical single-source command and flag reference for mdkg
7
7
 
@@ -12,6 +12,18 @@ This file is the one place humans and LLMs should check for the live mdkg comman
12
12
  Verification commands:
13
13
  - `npm run cli:snapshot`
14
14
  - `npm run cli:check`
15
+ - `npm run docs:check`
16
+ - `npm run smoke:mdkg-dev`
17
+ - `npm run smoke:mdkg-dev-docs`
18
+ - `npm run smoke:mdkg-dev-seo`
19
+ - `npm run smoke:demo-graph`
20
+
21
+ mdkg.dev launch-readiness surfaces in this repo:
22
+ - `mdkg-dev/` is the Astro static-site subproject.
23
+ - `docs/` is the Starlight docs subproject and repo-first documentation source plus generated command-reference output.
24
+ - `examples/` contains local mdkg demo/template graphs for agentic-coding and website-generation demos.
25
+ - `demo_agentic_coding:goal-1` and `template_mdkg_dev:goal-1` are private read-only subgraph qids after the root bundles are registered.
26
+ - Site/docs/demo assets are not npm runtime payload and must not imply production deploy, DNS change, analytics activation, or durable demo promotion.
15
27
 
16
28
  ## Teaching model
17
29
 
@@ -55,7 +67,8 @@ Advanced / maintenance commands:
55
67
  Skills are first-class and are accessed only through `mdkg skill ...`.
56
68
  Generic `list/show/search` do not expose skills.
57
69
  Capability cache discovery is read-only and accessed through `mdkg capability ...`.
58
- Optional reusable SPEC capability records are accessed through `mdkg spec ...`.
70
+ Reusable manifest capability records are accessed through `mdkg manifest ...`;
71
+ `mdkg spec ...` remains a one-compatibility-release legacy alias.
59
72
  Archive sidecars are accessed through `mdkg archive ...`.
60
73
  Full graph snapshot bundles are accessed through `mdkg bundle ...`.
61
74
  Whole-graph clone, fork, and same-repo template import workflows are accessed through `mdkg graph ...`.
@@ -156,22 +169,26 @@ Types:
156
169
  - `test`
157
170
 
158
171
  Agent workflow file types:
159
- - `spec`
172
+ - `manifest`
160
173
  - `work`
161
174
  - `work_order`
162
175
  - `receipt`
163
176
  - `feedback`
164
177
  - `dispute`
165
178
  - `proposal`
179
+ - `spec` is a legacy alias for `manifest` during the compatibility bridge and
180
+ emits `MANIFEST.md`.
166
181
 
167
182
  Agent workflow file type creation:
168
- - `mdkg new spec "<title>" [options] [--json]`
183
+ - `mdkg new manifest "<title>" [options] [--json]`
169
184
  - `mdkg new work "<title>" [options] [--json]`
170
185
  - `mdkg new work_order "<title>" [options] [--json]`
171
186
  - `mdkg new receipt "<title>" [options] [--json]`
172
187
  - `mdkg new feedback "<title>" [options] [--json]`
173
188
  - `mdkg new dispute "<title>" [options] [--json]`
174
189
  - `mdkg new proposal "<title>" [options] [--json]`
190
+ - `mdkg new spec "<title>" [options] [--json]` is a deprecated alias for
191
+ `mdkg new manifest` and creates `MANIFEST.md` with `type: manifest`.
175
192
 
176
193
  Goal node creation:
177
194
  - `mdkg new goal "<title>" [options] [--json]`
@@ -514,7 +531,7 @@ Notes:
514
531
 
515
532
  When to use:
516
533
  - discover deterministic capability surfaces across enabled workspaces
517
- - query skills, `SPEC.md`, `WORK.md`, core docs, and design docs without loading the whole graph body set
534
+ - query skills, canonical `MANIFEST.md`, legacy `SPEC.md`, `WORK.md`, core docs, and design docs without loading the whole graph body set
518
535
 
519
536
  Usage:
520
537
  - `mdkg capability list [--kind <kind>] [--visibility <level>] [--json]`
@@ -539,17 +556,48 @@ Notes:
539
556
  - `capability resolve` ranks local and subgraph capabilities deterministically for orchestration planning
540
557
  - stale subgraphs remain visible with degraded ranking unless `--fresh-only` is supplied
541
558
  - records include deterministic source metadata such as workspace, visibility, kind, id/qid/slug, path, headings, refs, source hash, and `indexed_at`
542
- - SPEC and WORK capability records include read-only `linkage` arrays for related SPECs, work contracts, work orders, and receipts when those graph mirrors exist
559
+ - MANIFEST/SPEC and WORK capability records include read-only `linkage` arrays for related manifests, work contracts, work orders, and receipts when those graph mirrors exist
543
560
  - `.mdkg/index/capabilities.json` is rebuilt by `mdkg index` and by capability commands when stale
544
561
  - normal task, epic, feat, bug, test, spike, and checkpoint nodes are intentionally excluded
545
562
  - visibility is mdkg export metadata used by capability filters, `pack --visibility`, public bundle checks, validation, and doctor diagnostics; it is not secret scanning or body redaction
546
563
 
564
+ ### `mdkg manifest`
565
+
566
+ When to use:
567
+ - list reusable capability surfaces from canonical `MANIFEST.md` or legacy
568
+ `SPEC.md`
569
+ - show one manifest capability record by id, qid, path, or alias
570
+ - validate the graph while ensuring a named manifest capability exists
571
+
572
+ Usage:
573
+ - `mdkg manifest list [--json]`
574
+ - `mdkg manifest show <id-or-qid-or-alias> [--json]`
575
+ - `mdkg manifest validate [<id-or-qid-or-alias>] [--json]`
576
+
577
+ Flags:
578
+ - `--json`
579
+
580
+ Notes:
581
+ - `MANIFEST.md` is canonical and `SPEC.md` remains a legacy alias; repos with no
582
+ manifest/spec files remain valid
583
+ - manifest records are reusable-capability oriented, not documentation-only
584
+ planning notes
585
+ - `mdkg manifest validate` with no ref validates the graph and all
586
+ manifest/spec records
587
+ - `mdkg manifest validate <ref>` also checks that the target manifest reference
588
+ exists
589
+ - JSON records keep capability `kind: spec` for compatibility and include
590
+ manifest metadata describing canonical, legacy, or transitional source mode
591
+ - use `mdkg capability ...` for broader skill, MANIFEST/SPEC, WORK, core-doc,
592
+ and design-doc capability discovery
593
+
547
594
  ### `mdkg spec`
548
595
 
549
596
  When to use:
550
- - list optional `SPEC.md` reusable capability surfaces
551
- - show one SPEC capability record by id, qid, path, or alias
552
- - validate the graph while ensuring a named SPEC capability exists
597
+ - temporarily support existing scripts during the one-compatibility-release
598
+ bridge to `mdkg manifest ...`
599
+ - list, show, or validate the same MANIFEST/SPEC capability records with legacy
600
+ command labeling
553
601
 
554
602
  Usage:
555
603
  - `mdkg spec list [--json]`
@@ -560,11 +608,14 @@ Flags:
560
608
  - `--json`
561
609
 
562
610
  Notes:
563
- - `SPEC.md` is optional; repos with no SPEC files remain valid
564
- - SPEC records are reusable-capability oriented, not documentation-only planning notes
565
- - `mdkg spec validate` with no ref validates the graph and all optional SPEC records
566
- - `mdkg spec validate <ref>` also checks that the target SPEC reference exists
567
- - use `mdkg capability ...` for broader skill, SPEC, WORK, core-doc, and design-doc capability discovery
611
+ - `mdkg spec` is a legacy alias for `mdkg manifest` during the compatibility
612
+ bridge
613
+ - `mdkg spec validate` with no ref validates the graph and all manifest/spec
614
+ records
615
+ - `mdkg spec validate <ref>` also checks that the target manifest reference
616
+ exists
617
+ - JSON receipts keep `kind: spec` and add `canonical_kind: manifest`,
618
+ `legacy_alias: true`, and deprecation metadata
568
619
 
569
620
  ### `mdkg archive`
570
621
 
@@ -776,21 +827,21 @@ Usage:
776
827
  - `mdkg work receipt update <id-or-qid> [--receipt-status <status>] [--add-artifacts <...>] [--add-proof-refs <...>] [--add-attestation-refs <...>] [--add-evidence-hashes <sha256:...>] [--json]`
777
828
  - `mdkg work artifact add <order-or-receipt-id-or-qid> <file> [--id <archive.id>] [--kind source|artifact] [--json]`
778
829
  - `mdkg work validate [<id-or-qid>] [--type <workflow-type>] [--json]`
779
- - `mdkg work validate [<id-or-qid>] [--type spec|work|work_order|receipt|feedback|dispute|proposal] [--json]`
830
+ - `mdkg work validate [<id-or-qid>] [--type manifest|spec|work|work_order|receipt|feedback|dispute|proposal] [--json]`
780
831
 
781
832
  Notes:
782
833
  - work commands mutate semantic mirror files only
783
834
  - production order, receipt, feedback, dispute, payment, ledger, marketplace inventory, fulfillment, and execution state remains canonical outside mdkg
784
835
  - do not store raw secrets, credentials, live payment state, ledger mutations, or canonical marketplace state in work mirrors
785
836
  - `artifact://...` refs identify external/runtime-managed artifacts; `archive://...` refs identify committed mdkg archive sidecars
786
- - `work trigger` accepts a `WORK.md` ref directly or a `SPEC.md` capability ref with exactly one resolvable work contract; it creates a submitted order mirror and never executes work
837
+ - `work trigger` accepts a `WORK.md` ref directly or a `MANIFEST.md` / legacy `SPEC.md` capability ref with exactly one resolvable work contract; it creates a submitted order mirror and never executes work
787
838
  - example: `mdkg work trigger work.example --id order.example-1 --requester user://example --json`
788
839
  - `work trigger --enqueue <queue>` requires a valid project DB plus an explicitly created active queue, creates a submitted order mirror, and enqueues a local delivery message without executing work
789
840
  - `work order new` accepts URI-style requester/request/trigger refs, archive input refs, optional queue refs, and stable payload hashes
790
841
  - `work order status` is read-only and reports deterministic order state plus linked receipts
791
842
  - `work receipt new` accepts URI-style cost/proof/attestation refs, explicit redaction policy, and SHA-256 evidence/input/output hash refs
792
843
  - `work receipt verify` is read-only and reports linkage, evidence, archive ref, hash, outcome, and redaction-policy checks; invalid receipts print JSON before exiting nonzero
793
- - `work validate` is read-only and reports typed diagnostics for SPEC.md, WORK.md, WORK_ORDER.md, RECEIPT.md, FEEDBACK.md, DISPUTE.md, and PROPOSAL.md mirrors; obvious raw secret, prompt, token, or payload markers are warnings, not hard failures
844
+ - `work validate` is read-only and reports typed diagnostics for MANIFEST.md, legacy SPEC.md, WORK.md, WORK_ORDER.md, RECEIPT.md, FEEDBACK.md, DISPUTE.md, and PROPOSAL.md mirrors; obvious raw secret, prompt, token, or payload markers are warnings, not hard failures
794
845
  - `work artifact add` calls `mdkg archive add`, then attaches the resulting `archive://...` ref to the target order or receipt
795
846
  - `work order update`, `work receipt update`, and `work artifact add` accept local ids or local qids; subgraph qids are read-only and must be changed in their source workspace
796
847
 
@@ -937,18 +988,25 @@ When to use:
937
988
  - run the repo trust gate before calling work done
938
989
 
939
990
  Usage:
940
- - `mdkg validate [--out <path>] [--quiet] [--changed-only] [--json]`
991
+ - `mdkg validate [--out <path>] [--json-out <path>] [--quiet] [--changed-only] [--summary] [--limit <n>] [--json]`
941
992
  - `--changed-only` filters warning presentation to changed `.mdkg` files while full graph errors still run
942
- - JSON receipts include `warning_diagnostics` with warning ids, categories, severity, paths, refs, and remediation text
993
+ - `--summary` emits bounded warning samples for agent/CI logs; `--limit <n>` controls the sample size
994
+ - `--out <path>` writes the compatibility text report; `--json-out <path>` writes a clean full JSON receipt
995
+ - JSON receipts include `warning_summary` and `warning_diagnostics` with warning ids, categories, severity, paths, refs, and remediation text
943
996
 
944
997
  Flags:
945
998
  - `--out <path>`
999
+ - `--json-out <path>`
946
1000
  - `--quiet`
1001
+ - `--changed-only`
1002
+ - `--summary`
1003
+ - `--limit <n>`
947
1004
  - `--json`
948
1005
 
949
1006
  JSON receipt:
950
- - `{ action: "validated", ok, warning_count, error_count, warnings, errors, report_path }`
1007
+ - `{ action: "validated", ok, warning_count, error_count, warnings, warning_diagnostics, warning_summary, errors, report_path?, json_receipt_path? }`
951
1008
  - `report_path` is included only when `--out` is used.
1009
+ - `json_receipt_path` is included only when `--json-out` is used.
952
1010
 
953
1011
  Notes:
954
1012
  - validates nodes, graph integrity, skills, and event log contracts
@@ -1107,11 +1165,12 @@ Usage:
1107
1165
 
1108
1166
  Usage:
1109
1167
  - `mdkg format`
1110
- - `mdkg format --headings [--dry-run|--apply] [--json]`
1168
+ - `mdkg format --headings [--dry-run|--apply] [--summary] [--limit <n>] [--json]`
1111
1169
 
1112
1170
  Notes:
1113
1171
  - default `mdkg format` normalizes frontmatter in place
1114
1172
  - `mdkg format --headings` defaults to dry-run and returns planned missing-heading additions
1173
+ - `--summary` emits bounded heading-change samples for agent/CI logs; `--limit <n>` controls the sample size
1115
1174
  - `mdkg format --headings --apply` appends missing recommended body headings and returns a migration receipt
1116
1175
 
1117
1176
  ### `mdkg status`
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mdkg
2
2
 
3
- mdkg is a local-first CLI for turning structured Markdown into deterministic project memory.
3
+ Markdown Knowledge Graph (`mdkg`) is Git-native project memory for AI coding agents: structured Markdown, deterministic context packs, handoffs, checkpoints, and validation.
4
4
 
5
5
  It is built for:
6
6
  - human builders who want project truth and task state in git
@@ -14,10 +14,30 @@ mdkg stays deliberately boring:
14
14
  - first-class rebuildable SQLite cache through built-in `node:sqlite`
15
15
  - no daemon, hosted index, or vector DB
16
16
 
17
- Current package version in source: `0.3.6`
17
+ Current package version in source: `0.3.8`
18
18
 
19
19
  mdkg is still pre-v1 public alpha software. The public package is usable, but graph, cache, bundle, and DAL contracts may continue to change quickly while the project converges on a stable v1 surface.
20
20
 
21
+ ## mdkg.dev launch workspace
22
+
23
+ This repo now owns the prelaunch mdkg.dev source layout:
24
+
25
+ - `mdkg-dev/` is the Astro static-site subproject for the canonical public site.
26
+ - `docs/` is the Starlight docs subproject and repo-first documentation source plus generated command-reference output.
27
+ - `examples/` contains local demo/template mdkg graphs for agentic coding and mdkg.dev website-generation demos.
28
+
29
+ These surfaces are intentionally excluded from the npm package payload. They are source and launch-readiness assets, not runtime CLI dependencies. The launch gates are local and deterministic:
30
+
31
+ ```bash
32
+ npm run docs:check
33
+ npm run smoke:mdkg-dev
34
+ npm run smoke:mdkg-dev-docs
35
+ npm run smoke:mdkg-dev-seo
36
+ npm run smoke:demo-graph
37
+ ```
38
+
39
+ The canonical site remains `mdkg.dev`. Demo graphs and preview deploys are separate from canonical SEO; durable `demo-N.mdkg.dev` promotion and any production deployment require explicit later approval.
40
+
21
41
  ## The product shape
22
42
 
23
43
  mdkg has one core job: make repo knowledge cheap to retrieve and safe to reuse.
@@ -47,13 +67,12 @@ goal `scope_refs`.
47
67
  ## Install
48
68
 
49
69
  ```bash
50
- npm i -g mdkg
51
- # or
52
- pnpm add -g mdkg
53
- # or
54
- bun add -g mdkg
70
+ npm install -g mdkg
71
+ mdkg --version
55
72
  ```
56
73
 
74
+ The npm global install path is the canonical public-alpha path covered by release validation. One-off runners and other package managers may be useful in local tooling, but verify them before documenting them for a team.
75
+
57
76
  ## Quickstart
58
77
 
59
78
  Initialize mdkg in a repo:
@@ -130,7 +149,7 @@ mdkg new task "author mdkg.dev launch planning skill" --parent spike-1 --status
130
149
  Create an agent workflow document with a semantic portable id:
131
150
 
132
151
  ```bash
133
- mdkg new spec "image worker" --id agent.image-worker
152
+ mdkg new manifest "image worker" --id agent.image-worker
134
153
  mdkg new work "generate image" --id work.generate-image
135
154
  ```
136
155
 
@@ -251,15 +270,17 @@ mdkg index
251
270
  mdkg capability list --kind skill --json
252
271
  mdkg capability search "image worker" --kind work --json
253
272
  mdkg capability show <id-or-qid-or-slug> --json
254
- mdkg spec list --json
255
- mdkg spec show <id-or-qid-or-alias> --json
273
+ mdkg manifest list --json
274
+ mdkg manifest show <id-or-qid-or-alias> --json
256
275
  ```
257
276
 
258
- `SPEC.md` is optional. Repos with no SPEC files still validate; when present,
259
- SPEC records describe reusable capability surfaces rather than general planning
260
- notes. `mdkg spec list/show/validate` is the focused SPEC command family, while
261
- `mdkg capability ...` remains the broader read-only discovery surface for
262
- skills, SPECs, WORK contracts, core docs, and design docs.
277
+ `MANIFEST.md` is optional. Repos with no manifest files still validate; when
278
+ present, manifest records describe reusable capability surfaces rather than
279
+ general planning notes. `SPEC.md` remains a legacy alias for one compatibility
280
+ release, and `mdkg spec list/show/validate` remains a deprecated alias for
281
+ `mdkg manifest list/show/validate`. `mdkg capability ...` remains the broader
282
+ read-only discovery surface for skills, manifests, WORK contracts, core docs,
283
+ and design docs.
263
284
 
264
285
  Register source and artifact files as committed archive sidecars:
265
286
 
@@ -380,8 +401,12 @@ Advanced / maintenance commands still exist, but they are not the first-run stor
380
401
 
381
402
  For large historical graphs, use `mdkg validate --changed-only --json` to keep
382
403
  warning review focused on changed `.mdkg` files while full graph errors still
383
- run. Use `mdkg format --headings --dry-run --json` to review missing recommended
384
- heading additions before applying them with `--apply`.
404
+ run. Use `mdkg validate --summary --json --limit 20` for bounded agent or CI
405
+ logs, and add `--json-out <path>` when a clean full JSON receipt should be
406
+ written as an artifact. Use
407
+ `mdkg format --headings --dry-run --summary --json --limit 20` to review missing
408
+ recommended heading additions with bounded output before applying them with
409
+ `--apply`.
385
410
 
386
411
  ## Operator health
387
412
 
@@ -461,14 +486,14 @@ Optional skill metadata with prefixes such as `ochatr_*` is treated as vendor ex
461
486
 
462
487
  mdkg maintains `.mdkg/index/capabilities.json` as a derived access cache for deterministic capability surfaces:
463
488
  - skills from `.mdkg/skills/**/SKILL.md`
464
- - `SPEC.md`
489
+ - canonical `MANIFEST.md` and legacy `SPEC.md`
465
490
  - `WORK.md`
466
491
  - core docs
467
492
  - design docs
468
493
 
469
494
  The capability cache is not the full graph and is not source of truth. Normal tasks, epics, bugs, tests, feats, and checkpoints remain in the standard graph index. Markdown remains authoritative; deleting the cache is recoverable with `mdkg index` or by running a capability command when auto-reindex is enabled.
470
495
 
471
- Capability records aggregate enabled registered workspaces and include deterministic source metadata such as `workspace`, `visibility`, `kind`, `id`, `qid`, `path`, headings, refs, source hash, and `indexed_at`. SPEC and WORK records also expose read-only `linkage` arrays when related work contracts, work orders, and receipts exist, so an orchestrator can discover a capability from reusable surface to invocation evidence without loading the full graph. Workspace `visibility` also feeds mdkg's export safety checks for public/internal packs and public bundles. This is a CLI safety layer, not secret scanning, body redaction, or a replacement for private git hosting.
496
+ Capability records aggregate enabled registered workspaces and include deterministic source metadata such as `workspace`, `visibility`, `kind`, `id`, `qid`, `path`, headings, refs, source hash, and `indexed_at`. MANIFEST/SPEC and WORK records also expose read-only `linkage` arrays when related work contracts, work orders, and receipts exist, so an orchestrator can discover a capability from reusable surface to invocation evidence without loading the full graph. Workspace `visibility` also feeds mdkg's export safety checks for public/internal packs and public bundles. This is a CLI safety layer, not secret scanning, body redaction, or a replacement for private git hosting.
472
497
 
473
498
  ## Index backends and parallel safety
474
499
 
@@ -565,17 +590,17 @@ or agents can intentionally create the next nodes with normal mdkg commands.
565
590
  ## Agent workflow files
566
591
 
567
592
  mdkg recognizes a small set of canonical agent workflow documents:
568
- - `SPEC.md` for agent, package, or runtime specifications
593
+ - `MANIFEST.md` for agent, package, or runtime capability manifests
569
594
  - `WORK.md` for reusable work contracts
570
595
  - `WORK_ORDER.md` for concrete requests against work contracts
571
596
  - `RECEIPT.md` for completed work output and artifacts
572
597
  - `FEEDBACK.md`, `DISPUTE.md`, and `PROPOSAL.md` for review loops
573
598
 
574
- Use `mdkg new spec|work|work_order|receipt|feedback|dispute|proposal "<title>"` to scaffold them. `--id <portable-id>` is available for these types when semantic ids such as `agent.image-worker` or `work.generate-image` are preferred.
599
+ Use `mdkg new manifest|work|work_order|receipt|feedback|dispute|proposal "<title>"` to scaffold them. `mdkg new spec` remains a deprecated alias that emits `MANIFEST.md` during the compatibility bridge. `--id <portable-id>` is available for these types when semantic ids such as `agent.image-worker` or `work.generate-image` are preferred.
575
600
 
576
- Relational templates contain editable placeholder refs. `spec` and `work` scaffold as validation-clean standalone docs; `work_order`, `receipt`, `feedback`, `dispute`, and `proposal` need real refs before strict `mdkg validate` passes.
601
+ Relational templates contain editable placeholder refs. `manifest` and `work` scaffold as validation-clean standalone docs; `work_order`, `receipt`, `feedback`, `dispute`, and `proposal` need real refs before strict `mdkg validate` passes.
577
602
 
578
- For executable or purchasable capability mirrors, prefer the lifecycle helpers under `mdkg work ...`. They create and update `WORK.md`, `WORK_ORDER.md`, and `RECEIPT.md` semantic mirror files only. `mdkg work trigger` creates a deterministic submitted `WORK_ORDER.md` from a WORK contract or a SPEC with exactly one resolvable work contract. `mdkg work order status` and `mdkg work receipt verify` are read-only review helpers for deterministic closeout. `mdkg work validate [<id-or-qid>] [--type spec|work|work_order|receipt|feedback|dispute|proposal] --json` is a read-only focused validator for agent workflow mirrors; it returns typed diagnostics and warns on obvious raw secret, prompt, token, or payload markers. `mdkg work trigger --enqueue <queue>` optionally writes a local project DB queue delivery message after the queue has been explicitly created and is active; it still does not execute work. Production order state, receipt state, feedback, disputes, payments, ledgers, marketplace inventory, fulfillment records, and execution state remain canonical outside mdkg, such as in Postgres or another application database. Do not store raw secrets, credentials, live payment state, ledger mutations, canonical marketplace state, or bulky raw payloads in these mirrors.
603
+ For executable or purchasable capability mirrors, prefer the lifecycle helpers under `mdkg work ...`. They create and update `WORK.md`, `WORK_ORDER.md`, and `RECEIPT.md` semantic mirror files only. `mdkg work trigger` creates a deterministic submitted `WORK_ORDER.md` from a WORK contract or a MANIFEST with exactly one resolvable work contract; legacy SPEC refs remain supported during the compatibility bridge. `mdkg work order status` and `mdkg work receipt verify` are read-only review helpers for deterministic closeout. `mdkg work validate [<id-or-qid>] [--type manifest|spec|work|work_order|receipt|feedback|dispute|proposal] --json` is a read-only focused validator for agent workflow mirrors; it returns typed diagnostics and warns on obvious raw secret, prompt, token, or payload markers. `mdkg work trigger --enqueue <queue>` optionally writes a local project DB queue delivery message after the queue has been explicitly created and is active; it still does not execute work. Production order state, receipt state, feedback, disputes, payments, ledgers, marketplace inventory, fulfillment records, and execution state remain canonical outside mdkg, such as in Postgres or another application database. Do not store raw secrets, credentials, live payment state, ledger mutations, canonical marketplace state, or bulky raw payloads in these mirrors.
579
604
 
580
605
  ## Archive sidecars
581
606
 
@@ -596,8 +621,8 @@ This release includes:
596
621
  - default ignore updates with `--no-update-ignores` for generated JSON index/temp/lock files, `.mdkg/pack/`, and raw archive source copies
597
622
  - root-only published init seed config
598
623
  - skills indexing and search/show/list support
599
- - JSON capability cache for skills, `SPEC.md`, `WORK.md`, core docs, and design docs
600
- - optional `mdkg spec list/show/validate` for reusable SPEC capability records
624
+ - JSON capability cache for skills, `MANIFEST.md` / legacy `SPEC.md`, `WORK.md`, core docs, and design docs
625
+ - optional `mdkg manifest list/show/validate` for reusable manifest capability records, with `mdkg spec ...` retained as a legacy alias for one compatibility release
601
626
  - SQLite index backend for fresh workspaces using built-in `node:sqlite`
602
627
  - mutation locking and atomic writes for parallel mdkg calls
603
628
  - first-class `goal` nodes and `mdkg goal show/next/evaluate/pause/resume/done`