mdkg 0.3.7 → 0.3.9
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/CHANGELOG.md +50 -0
- package/CLI_COMMAND_MATRIX.md +85 -24
- package/README.md +51 -26
- package/dist/cli.js +72 -35
- package/dist/command-contract.json +354 -9
- package/dist/commands/capability.js +1 -0
- package/dist/commands/doctor.js +7 -7
- package/dist/commands/format.js +40 -1
- package/dist/commands/handoff.js +6 -0
- package/dist/commands/init.js +84 -3
- package/dist/commands/new.js +12 -3
- package/dist/commands/skill.js +1 -1
- package/dist/commands/skill_mirror.js +22 -17
- package/dist/commands/skill_support.js +1 -1
- package/dist/commands/spec.js +76 -17
- package/dist/commands/subgraph.js +7 -4
- package/dist/commands/upgrade.js +137 -30
- package/dist/commands/validate.js +106 -3
- package/dist/commands/work.js +12 -5
- package/dist/core/config.js +132 -0
- package/dist/graph/agent_file_types.js +59 -20
- package/dist/graph/capabilities_indexer.js +45 -3
- package/dist/graph/indexer.js +5 -0
- package/dist/graph/template_schema.js +37 -17
- package/dist/graph/validate_graph.js +11 -5
- package/dist/init/AGENT_START.md +10 -9
- package/dist/init/CLI_COMMAND_MATRIX.md +30 -17
- package/dist/init/README.md +11 -9
- package/dist/init/config.json +15 -0
- package/dist/init/core/COLLABORATION.md +45 -0
- package/dist/init/core/HUMAN.md +7 -1
- package/dist/init/core/core.md +1 -0
- package/dist/init/core/rule-1-mdkg-conventions.md +3 -0
- package/dist/init/core/rule-3-cli-contract.md +5 -5
- package/dist/init/init-manifest.json +78 -13
- package/dist/init/llms.txt +2 -1
- package/dist/init/skills/default/author-mdkg-skill/SKILL.md +211 -0
- package/dist/init/skills/default/pursue-mdkg-goal/SKILL.md +10 -0
- package/dist/init/skills/default/select-work-and-ground-context/SKILL.md +8 -0
- package/dist/init/skills/default/verify-close-and-checkpoint/SKILL.md +73 -9
- package/dist/init/templates/default/manifest.md +45 -0
- package/dist/init/templates/specs/agent.MANIFEST.md +80 -0
- package/dist/init/templates/specs/api.MANIFEST.md +33 -0
- package/dist/init/templates/specs/base.MANIFEST.md +120 -0
- package/dist/init/templates/specs/capability.MANIFEST.md +45 -0
- package/dist/init/templates/specs/integration.MANIFEST.md +25 -0
- package/dist/init/templates/specs/model.MANIFEST.md +21 -0
- package/dist/init/templates/specs/project.MANIFEST.md +39 -0
- package/dist/init/templates/specs/runtime-agent.MANIFEST.md +49 -0
- package/dist/init/templates/specs/runtime-image.MANIFEST.md +21 -0
- package/dist/init/templates/specs/tool.MANIFEST.md +25 -0
- package/dist/util/argparse.js +3 -0
- package/package.json +19 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,56 @@ mdkg is pre-v1 public alpha software. Command, graph, cache, bundle, and DAL con
|
|
|
8
8
|
|
|
9
9
|
## Unreleased
|
|
10
10
|
|
|
11
|
+
## 0.3.9 - 2026-06-27
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added `.mdkg/config.json` customization overlays for organization standards,
|
|
16
|
+
custom core docs, and configured skill mirror target paths while keeping the
|
|
17
|
+
mdkg CLI kernel upgradable through `mdkg upgrade --apply`.
|
|
18
|
+
- Added configurable skill mirror support so repos can mirror canonical
|
|
19
|
+
`.mdkg/skills` into arbitrary contained agent-local skill roots, with
|
|
20
|
+
`.agents/skills` and `.claude/skills` preserved as defaults.
|
|
21
|
+
- Added `COLLABORATION.md` as the canonical collaboration/operator profile core
|
|
22
|
+
doc while keeping `HUMAN.md` as a one-release legacy alias.
|
|
23
|
+
- Added deterministic release-notes data generation from `CHANGELOG.md` for
|
|
24
|
+
public docs and future per-release cards.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Updated `mdkg init --agent` and `mdkg upgrade --apply` to seed and preserve
|
|
29
|
+
customization overlays, configurable mirrors, `COLLABORATION.md`, legacy
|
|
30
|
+
`HUMAN.md`, and accurate managed init-manifest hashes.
|
|
31
|
+
- Refreshed first-party mdkg skills and default init seed skills for current CLI
|
|
32
|
+
coverage, MANIFEST authoring, configured mirror targets, pre-publish gates,
|
|
33
|
+
and explicit no-publish/no-tag/no-push approval boundaries.
|
|
34
|
+
- Expanded `npm run docs:check` and `prepublishOnly` to verify generated CLI
|
|
35
|
+
docs, generated release-note data, and public command examples before publish.
|
|
36
|
+
|
|
37
|
+
## 0.3.8 - 2026-06-25
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Planned and began a warning-scale UX hardening lane for large multi-repo
|
|
42
|
+
mdkg orchestration runs.
|
|
43
|
+
- Added bounded validation warning summaries, summary-mode output, and a clean
|
|
44
|
+
JSON receipt artifact path for warning-heavy validation workflows.
|
|
45
|
+
- Added heading formatter summary-mode output for large recommended-heading
|
|
46
|
+
migration previews.
|
|
47
|
+
- Added a packed warning UX smoke to prepublish automation so high-volume
|
|
48
|
+
warning output regressions are caught before release.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Renamed the reusable capability surface to canonical `MANIFEST.md`
|
|
53
|
+
terminology across scaffolds, help, command references, init assets, and
|
|
54
|
+
skills. `SPEC.md` and `mdkg spec ...` remain explicit legacy aliases for one
|
|
55
|
+
compatibility release, with manifest-first warnings and migration guidance.
|
|
56
|
+
- Improved strict doctor, subgraph, and handoff remediation guidance for
|
|
57
|
+
multi-repo operators.
|
|
58
|
+
- Updated repo-local skill guidance for child-first commit and root subgraph
|
|
59
|
+
refresh sequencing.
|
|
60
|
+
|
|
11
61
|
## 0.3.7 - 2026-06-20
|
|
12
62
|
|
|
13
63
|
### Added
|
package/CLI_COMMAND_MATRIX.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CLI Command Matrix
|
|
2
2
|
|
|
3
|
-
as_of: 2026-06-
|
|
4
|
-
package_version_in_source: 0.3.
|
|
3
|
+
as_of: 2026-06-21
|
|
4
|
+
package_version_in_source: 0.3.9
|
|
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
|
-
|
|
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 ...`.
|
|
@@ -105,7 +118,7 @@ Notes:
|
|
|
105
118
|
- `--agent` is the canonical complete AI-agent bootstrap path
|
|
106
119
|
- removed flags `--llm`, `--agents`, `--claude`, and `--omni` fail before mutation with guidance to use `mdkg init --agent`
|
|
107
120
|
- published bootstrap config is root-only by default
|
|
108
|
-
- `--agent` creates `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node core docs, default mdkg usage skills, `events.jsonl`, registry, and skill mirrors
|
|
121
|
+
- `--agent` creates `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node `SOUL.md` / `COLLABORATION.md` core docs, legacy `HUMAN.md`, default mdkg usage skills, `events.jsonl`, registry, and configured skill mirrors
|
|
109
122
|
- run `mdkg index` after fresh init before treating `mdkg doctor --strict --json` as a clean health gate; init writes source scaffold files and index writes generated caches
|
|
110
123
|
|
|
111
124
|
### `mdkg upgrade`
|
|
@@ -156,22 +169,26 @@ Types:
|
|
|
156
169
|
- `test`
|
|
157
170
|
|
|
158
171
|
Agent workflow file types:
|
|
159
|
-
- `
|
|
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
|
|
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]`
|
|
@@ -426,7 +443,9 @@ JSON receipt:
|
|
|
426
443
|
- `{ action: "synced", sync: { synced, pruned, targets } }`
|
|
427
444
|
|
|
428
445
|
Notes:
|
|
429
|
-
- syncs canonical `.mdkg/skills/` into
|
|
446
|
+
- syncs canonical `.mdkg/skills/` into configured
|
|
447
|
+
`customization.skill_mirrors.targets` paths from `.mdkg/config.json`
|
|
448
|
+
- defaults are `.agents/skills` and `.claude/skills`
|
|
430
449
|
- preserves unrelated existing folders
|
|
431
450
|
- same-slug collisions fail unless forced
|
|
432
451
|
|
|
@@ -514,7 +533,7 @@ Notes:
|
|
|
514
533
|
|
|
515
534
|
When to use:
|
|
516
535
|
- 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
|
|
536
|
+
- query skills, canonical `MANIFEST.md`, legacy `SPEC.md`, `WORK.md`, core docs, and design docs without loading the whole graph body set
|
|
518
537
|
|
|
519
538
|
Usage:
|
|
520
539
|
- `mdkg capability list [--kind <kind>] [--visibility <level>] [--json]`
|
|
@@ -539,17 +558,48 @@ Notes:
|
|
|
539
558
|
- `capability resolve` ranks local and subgraph capabilities deterministically for orchestration planning
|
|
540
559
|
- stale subgraphs remain visible with degraded ranking unless `--fresh-only` is supplied
|
|
541
560
|
- 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
|
|
561
|
+
- 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
562
|
- `.mdkg/index/capabilities.json` is rebuilt by `mdkg index` and by capability commands when stale
|
|
544
563
|
- normal task, epic, feat, bug, test, spike, and checkpoint nodes are intentionally excluded
|
|
545
564
|
- 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
565
|
|
|
566
|
+
### `mdkg manifest`
|
|
567
|
+
|
|
568
|
+
When to use:
|
|
569
|
+
- list reusable capability surfaces from canonical `MANIFEST.md` or legacy
|
|
570
|
+
`SPEC.md`
|
|
571
|
+
- show one manifest capability record by id, qid, path, or alias
|
|
572
|
+
- validate the graph while ensuring a named manifest capability exists
|
|
573
|
+
|
|
574
|
+
Usage:
|
|
575
|
+
- `mdkg manifest list [--json]`
|
|
576
|
+
- `mdkg manifest show <id-or-qid-or-alias> [--json]`
|
|
577
|
+
- `mdkg manifest validate [<id-or-qid-or-alias>] [--json]`
|
|
578
|
+
|
|
579
|
+
Flags:
|
|
580
|
+
- `--json`
|
|
581
|
+
|
|
582
|
+
Notes:
|
|
583
|
+
- `MANIFEST.md` is canonical and `SPEC.md` remains a legacy alias; repos with no
|
|
584
|
+
manifest/spec files remain valid
|
|
585
|
+
- manifest records are reusable-capability oriented, not documentation-only
|
|
586
|
+
planning notes
|
|
587
|
+
- `mdkg manifest validate` with no ref validates the graph and all
|
|
588
|
+
manifest/spec records
|
|
589
|
+
- `mdkg manifest validate <ref>` also checks that the target manifest reference
|
|
590
|
+
exists
|
|
591
|
+
- JSON records keep capability `kind: spec` for compatibility and include
|
|
592
|
+
manifest metadata describing canonical, legacy, or transitional source mode
|
|
593
|
+
- use `mdkg capability ...` for broader skill, MANIFEST/SPEC, WORK, core-doc,
|
|
594
|
+
and design-doc capability discovery
|
|
595
|
+
|
|
547
596
|
### `mdkg spec`
|
|
548
597
|
|
|
549
598
|
When to use:
|
|
550
|
-
-
|
|
551
|
-
|
|
552
|
-
-
|
|
599
|
+
- temporarily support existing scripts during the one-compatibility-release
|
|
600
|
+
bridge to `mdkg manifest ...`
|
|
601
|
+
- list, show, or validate the same MANIFEST/SPEC capability records with legacy
|
|
602
|
+
command labeling
|
|
553
603
|
|
|
554
604
|
Usage:
|
|
555
605
|
- `mdkg spec list [--json]`
|
|
@@ -560,11 +610,14 @@ Flags:
|
|
|
560
610
|
- `--json`
|
|
561
611
|
|
|
562
612
|
Notes:
|
|
563
|
-
- `
|
|
564
|
-
|
|
565
|
-
- `mdkg spec validate` with no ref validates the graph and all
|
|
566
|
-
|
|
567
|
-
-
|
|
613
|
+
- `mdkg spec` is a legacy alias for `mdkg manifest` during the compatibility
|
|
614
|
+
bridge
|
|
615
|
+
- `mdkg spec validate` with no ref validates the graph and all manifest/spec
|
|
616
|
+
records
|
|
617
|
+
- `mdkg spec validate <ref>` also checks that the target manifest reference
|
|
618
|
+
exists
|
|
619
|
+
- JSON receipts keep `kind: spec` and add `canonical_kind: manifest`,
|
|
620
|
+
`legacy_alias: true`, and deprecation metadata
|
|
568
621
|
|
|
569
622
|
### `mdkg archive`
|
|
570
623
|
|
|
@@ -776,21 +829,21 @@ Usage:
|
|
|
776
829
|
- `mdkg work receipt update <id-or-qid> [--receipt-status <status>] [--add-artifacts <...>] [--add-proof-refs <...>] [--add-attestation-refs <...>] [--add-evidence-hashes <sha256:...>] [--json]`
|
|
777
830
|
- `mdkg work artifact add <order-or-receipt-id-or-qid> <file> [--id <archive.id>] [--kind source|artifact] [--json]`
|
|
778
831
|
- `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]`
|
|
832
|
+
- `mdkg work validate [<id-or-qid>] [--type manifest|spec|work|work_order|receipt|feedback|dispute|proposal] [--json]`
|
|
780
833
|
|
|
781
834
|
Notes:
|
|
782
835
|
- work commands mutate semantic mirror files only
|
|
783
836
|
- production order, receipt, feedback, dispute, payment, ledger, marketplace inventory, fulfillment, and execution state remains canonical outside mdkg
|
|
784
837
|
- do not store raw secrets, credentials, live payment state, ledger mutations, or canonical marketplace state in work mirrors
|
|
785
838
|
- `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
|
|
839
|
+
- `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
840
|
- example: `mdkg work trigger work.example --id order.example-1 --requester user://example --json`
|
|
788
841
|
- `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
842
|
- `work order new` accepts URI-style requester/request/trigger refs, archive input refs, optional queue refs, and stable payload hashes
|
|
790
843
|
- `work order status` is read-only and reports deterministic order state plus linked receipts
|
|
791
844
|
- `work receipt new` accepts URI-style cost/proof/attestation refs, explicit redaction policy, and SHA-256 evidence/input/output hash refs
|
|
792
845
|
- `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
|
|
846
|
+
- `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
847
|
- `work artifact add` calls `mdkg archive add`, then attaches the resulting `archive://...` ref to the target order or receipt
|
|
795
848
|
- `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
849
|
|
|
@@ -937,18 +990,25 @@ When to use:
|
|
|
937
990
|
- run the repo trust gate before calling work done
|
|
938
991
|
|
|
939
992
|
Usage:
|
|
940
|
-
- `mdkg validate [--out <path>] [--quiet] [--changed-only] [--json]`
|
|
993
|
+
- `mdkg validate [--out <path>] [--json-out <path>] [--quiet] [--changed-only] [--summary] [--limit <n>] [--json]`
|
|
941
994
|
- `--changed-only` filters warning presentation to changed `.mdkg` files while full graph errors still run
|
|
942
|
-
-
|
|
995
|
+
- `--summary` emits bounded warning samples for agent/CI logs; `--limit <n>` controls the sample size
|
|
996
|
+
- `--out <path>` writes the compatibility text report; `--json-out <path>` writes a clean full JSON receipt
|
|
997
|
+
- JSON receipts include `warning_summary` and `warning_diagnostics` with warning ids, categories, severity, paths, refs, and remediation text
|
|
943
998
|
|
|
944
999
|
Flags:
|
|
945
1000
|
- `--out <path>`
|
|
1001
|
+
- `--json-out <path>`
|
|
946
1002
|
- `--quiet`
|
|
1003
|
+
- `--changed-only`
|
|
1004
|
+
- `--summary`
|
|
1005
|
+
- `--limit <n>`
|
|
947
1006
|
- `--json`
|
|
948
1007
|
|
|
949
1008
|
JSON receipt:
|
|
950
|
-
- `{ action: "validated", ok, warning_count, error_count, warnings, errors, report_path }`
|
|
1009
|
+
- `{ action: "validated", ok, warning_count, error_count, warnings, warning_diagnostics, warning_summary, errors, report_path?, json_receipt_path? }`
|
|
951
1010
|
- `report_path` is included only when `--out` is used.
|
|
1011
|
+
- `json_receipt_path` is included only when `--json-out` is used.
|
|
952
1012
|
|
|
953
1013
|
Notes:
|
|
954
1014
|
- validates nodes, graph integrity, skills, and event log contracts
|
|
@@ -1107,11 +1167,12 @@ Usage:
|
|
|
1107
1167
|
|
|
1108
1168
|
Usage:
|
|
1109
1169
|
- `mdkg format`
|
|
1110
|
-
- `mdkg format --headings [--dry-run|--apply] [--json]`
|
|
1170
|
+
- `mdkg format --headings [--dry-run|--apply] [--summary] [--limit <n>] [--json]`
|
|
1111
1171
|
|
|
1112
1172
|
Notes:
|
|
1113
1173
|
- default `mdkg format` normalizes frontmatter in place
|
|
1114
1174
|
- `mdkg format --headings` defaults to dry-run and returns planned missing-heading additions
|
|
1175
|
+
- `--summary` emits bounded heading-change samples for agent/CI logs; `--limit <n>` controls the sample size
|
|
1115
1176
|
- `mdkg format --headings --apply` appends missing recommended body headings and returns a migration receipt
|
|
1116
1177
|
|
|
1117
1178
|
### `mdkg status`
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mdkg
|
|
2
2
|
|
|
3
|
-
mdkg is
|
|
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.
|
|
17
|
+
Current package version in source: `0.3.9`
|
|
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
|
|
51
|
-
|
|
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:
|
|
@@ -63,7 +82,7 @@ mdkg init --agent
|
|
|
63
82
|
mdkg index
|
|
64
83
|
```
|
|
65
84
|
|
|
66
|
-
This is the canonical AI-agent bootstrap path. It creates `.mdkg/`, `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node `SOUL.md` / `
|
|
85
|
+
This is the canonical AI-agent bootstrap path. It creates `.mdkg/`, `AGENT_START.md`, `AGENTS.md`, `CLAUDE.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, strict-node `SOUL.md` / `COLLABORATION.md`, legacy `HUMAN.md` for one release, the default mdkg usage skills, `events.jsonl`, the skill registry, core pin updates, and configured skill mirrors under `.agents/skills/` and `.claude/skills/` by default. It also updates `.gitignore` / `.npmignore` by default. Use `--no-update-ignores` to opt out of those ignore-file updates.
|
|
67
86
|
|
|
68
87
|
Run `mdkg index` after a fresh init before using `mdkg status --json` or
|
|
69
88
|
`mdkg doctor --strict --json` as health gates. Init writes source scaffold
|
|
@@ -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
|
|
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
|
|
255
|
-
mdkg
|
|
273
|
+
mdkg manifest list --json
|
|
274
|
+
mdkg manifest show <id-or-qid-or-alias> --json
|
|
256
275
|
```
|
|
257
276
|
|
|
258
|
-
`
|
|
259
|
-
|
|
260
|
-
notes. `
|
|
261
|
-
`mdkg
|
|
262
|
-
|
|
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
|
|
384
|
-
|
|
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
|
-
- `
|
|
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
|
|
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. `
|
|
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
|
|
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
|
|
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`
|