mdkg 0.3.4 → 0.3.5
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 +41 -0
- package/CLI_COMMAND_MATRIX.md +42 -2
- package/README.md +22 -1
- package/dist/cli.js +89 -0
- package/dist/command-contract.json +353 -2
- package/dist/commands/graph.js +582 -0
- package/dist/commands/validate.js +16 -11
- package/dist/init/CLI_COMMAND_MATRIX.md +17 -0
- package/dist/init/README.md +18 -1
- package/dist/init/init-manifest.json +3 -3
- package/dist/util/argparse.js +3 -0
- package/package.json +3 -2
package/dist/init/README.md
CHANGED
|
@@ -29,13 +29,14 @@ mdkg capability search "..."
|
|
|
29
29
|
mdkg spec list --json
|
|
30
30
|
mdkg archive list
|
|
31
31
|
mdkg bundle create --profile private
|
|
32
|
+
mdkg graph clone .mdkg/bundles/private/all.mdkg.zip --target demos/demo-1 --json
|
|
32
33
|
mdkg subgraph list --json
|
|
33
34
|
mdkg status --json
|
|
34
35
|
mdkg fix plan --json
|
|
35
36
|
mdkg validate
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg index` to create or refresh generated graph/skill/capability/subgraph and SQLite caches after init, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal activate/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/spec/work/core/design capabilities, `mdkg spec ...` for focused optional SPEC records, `mdkg capability resolve ...` to rank local and subgraph capabilities, `mdkg archive ...` to register source/artifact sidecars, `mdkg work ...` to create work contract/order/receipt semantic mirrors and deterministic trigger/verification records, `mdkg bundle ...` to create full graph snapshot bundles, `mdkg subgraph ...` to register read-only child graph planning views, `mdkg pack <id>` to build deterministic context, and `mdkg validate` before closeout.
|
|
39
|
+
This repo is already initialized. Use `mdkg upgrade` to preview safe scaffold updates, `mdkg index` to create or refresh generated graph/skill/capability/subgraph and SQLite caches after init, `mdkg new` to create work, `mdkg new goal "..."` plus `mdkg goal activate/current/next/claim/evaluate` for recursive long-running objectives, `mdkg search`/`mdkg show` to inspect graph state, `mdkg capability ...` to inspect cached skill/spec/work/core/design capabilities, `mdkg spec ...` for focused optional SPEC records, `mdkg capability resolve ...` to rank local and subgraph capabilities, `mdkg archive ...` to register source/artifact sidecars, `mdkg work ...` to create work contract/order/receipt semantic mirrors and deterministic trigger/verification records, `mdkg bundle ...` to create full graph snapshot bundles, `mdkg graph ...` to clone/fork/import authored graph templates, `mdkg subgraph ...` to register read-only child graph planning views, `mdkg pack <id>` to build deterministic context, and `mdkg validate` before closeout.
|
|
39
40
|
|
|
40
41
|
Use `mdkg status --json` for a read-only operator summary of Git, graph,
|
|
41
42
|
selected-goal, project DB, and generated-cache health before mutating work. Use
|
|
@@ -158,6 +159,22 @@ mdkg bundle verify .mdkg/bundles/private/all.mdkg.zip
|
|
|
158
159
|
|
|
159
160
|
Use this as a pre-commit recommendation only when the repo tracks archive caches or `.mdkg/bundles/`. Private bundles are local graph transport artifacts and may be tracked in private repos when configured. Public bundles require selected workspaces with `visibility: public` and fail closed when public records reference private graph, archive, or subgraph records.
|
|
160
161
|
|
|
162
|
+
Clone or fork an authored graph into a separate repo/workspace while preserving IDs:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
mdkg graph clone .mdkg/bundles/private/all.mdkg.zip --target demos/demo-1 --json
|
|
166
|
+
mdkg graph fork templates/website-template-mdkg --target demos/live-build --start-goal goal-1 --json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Import a template graph into the current repo with deterministic ID and link rewrites:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
mdkg graph import-template templates/website-template-mdkg --start-goal goal-1 --select-goal --dry-run --json
|
|
173
|
+
mdkg graph import-template templates/website-template-mdkg --start-goal goal-1 --select-goal --apply --json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`graph clone` and `graph fork` preserve IDs because the target is a separate graph namespace. `graph import-template` rewrites canonical numeric IDs for same-repo imports and requires `--id-prefix` for colliding semantic IDs. Subgraphs remain read-only planning views; use `mdkg graph ...` when authored graph state should be created.
|
|
177
|
+
|
|
161
178
|
Register child bundle snapshots as read-only subgraphs with:
|
|
162
179
|
|
|
163
180
|
```bash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"tool": "mdkg",
|
|
4
|
-
"mdkg_version": "0.3.
|
|
4
|
+
"mdkg_version": "0.3.5",
|
|
5
5
|
"files": [
|
|
6
6
|
{
|
|
7
7
|
"path": ".mdkg/config.json",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{
|
|
62
62
|
"path": ".mdkg/README.md",
|
|
63
63
|
"category": "mdkg_doc",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "a3b059cb0ea5625f9888fbcee52ddf13491e033046d8c3f3846574d8667ad234"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": ".mdkg/skills/build-pack-and-execute-task/SKILL.md",
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
{
|
|
262
262
|
"path": "CLI_COMMAND_MATRIX.md",
|
|
263
263
|
"category": "startup_doc",
|
|
264
|
-
"sha256": "
|
|
264
|
+
"sha256": "220b461553310a8248d53f01fae132d4ca433659da679e401e3ce6abe2592cb7"
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
267
|
"path": "llms.txt",
|
package/dist/util/argparse.js
CHANGED
|
@@ -95,6 +95,8 @@ const VALUE_FLAGS = new Set([
|
|
|
95
95
|
"--target",
|
|
96
96
|
"--snapshot",
|
|
97
97
|
"--family",
|
|
98
|
+
"--start-goal",
|
|
99
|
+
"--id-prefix",
|
|
98
100
|
]);
|
|
99
101
|
const BOOLEAN_FLAGS = new Set([
|
|
100
102
|
"--tolerant",
|
|
@@ -132,6 +134,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
132
134
|
"--allow-dirty",
|
|
133
135
|
"--clean",
|
|
134
136
|
"--gitignore",
|
|
137
|
+
"--select-goal",
|
|
135
138
|
]);
|
|
136
139
|
const FLAG_ALIASES = {
|
|
137
140
|
"--o": "--out",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdkg",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Markdown Knowledge Graph",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"smoke:spike": "npm run build && node scripts/smoke-spike.js",
|
|
34
34
|
"smoke:goal-lifecycle": "npm run build && node scripts/smoke-goal-lifecycle.js",
|
|
35
35
|
"smoke:bundle": "npm run build && node scripts/smoke-bundle.js",
|
|
36
|
+
"smoke:graph-clone": "npm run build && node scripts/smoke-graph-clone.js",
|
|
36
37
|
"smoke:bundle-import": "npm run smoke:subgraph",
|
|
37
38
|
"smoke:visibility": "npm run build && node scripts/smoke-visibility.js",
|
|
38
39
|
"smoke:sqlite": "npm run build && node scripts/smoke-sqlite.js",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"cli:check": "npm run build && node scripts/cli_help_snapshot.js --check",
|
|
43
44
|
"cli:contract": "npm run build && node scripts/generate-command-contract.js --check",
|
|
44
45
|
"prepack": "npm run build && node scripts/assert-publish-ready.js",
|
|
45
|
-
"prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:id-repair && npm run smoke:command-docs && npm run smoke:spike && npm run smoke:goal-lifecycle && npm run smoke:bundle && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
|
|
46
|
+
"prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && node dist/cli.js validate && npm run smoke:consumer && npm run smoke:matrix && npm run smoke:upgrade && npm run smoke:init && npm run smoke:capabilities && npm run smoke:db && npm run smoke:db-queue && npm run smoke:db-queue-cli && npm run smoke:db-events && npm run smoke:db-materializer && npm run smoke:db-snapshot && npm run smoke:archive-work && npm run smoke:work-invocation && npm run smoke:cli-ux-polish && npm run smoke:operator-health && npm run smoke:fix-plan && npm run smoke:branch-conflicts && npm run smoke:id-repair && npm run smoke:command-docs && npm run smoke:spike && npm run smoke:goal-lifecycle && npm run smoke:bundle && npm run smoke:graph-clone && npm run smoke:subgraph && npm run smoke:visibility && npm run smoke:sqlite && npm run smoke:parallel && npm run smoke:goal && node scripts/assert-publish-ready.js",
|
|
46
47
|
"postinstall": "node scripts/postinstall.js",
|
|
47
48
|
"smoke:subgraph": "npm run build && node scripts/smoke-subgraph.js"
|
|
48
49
|
},
|