mdkg 0.3.8 → 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 +26 -0
- package/CLI_COMMAND_MATRIX.md +5 -3
- package/README.md +2 -2
- package/dist/cli.js +2 -1
- package/dist/command-contract.json +2 -2
- package/dist/commands/init.js +84 -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/upgrade.js +67 -24
- package/dist/core/config.js +132 -0
- package/dist/init/AGENT_START.md +5 -4
- package/dist/init/CLI_COMMAND_MATRIX.md +1 -1
- 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 +22 -12
- 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/package.json +6 -4
|
@@ -46,6 +46,16 @@ Move one durable mdkg goal forward without losing scope, evidence, or user inten
|
|
|
46
46
|
- Edit `SKILL.md` files only when the active node is explicitly skill-maintenance work.
|
|
47
47
|
- After intentional skill edits, run `mdkg skill sync`, `mdkg skill validate`, `mdkg index`, and `mdkg validate`.
|
|
48
48
|
|
|
49
|
+
## Multi-Repo And Subgraph Goals
|
|
50
|
+
|
|
51
|
+
- Gather read-only baselines before mutating any repo: git status, mdkg status, validation, doctor, and subgraph audit where relevant.
|
|
52
|
+
- Require one explicit matrix approval before applying coordinated upgrades across multiple repos.
|
|
53
|
+
- Apply and verify upgrades one repo at a time.
|
|
54
|
+
- Commit accepted child repo mdkg-only changes locally before refreshing a root-owned subgraph bundle.
|
|
55
|
+
- Refresh root-owned bundles only from clean, accepted child commits; avoid `--allow-dirty` unless the user explicitly approves that risk.
|
|
56
|
+
- Keep root-qualified qids in cross-repo planning so overlapping child ids stay unambiguous.
|
|
57
|
+
- Do not store raw secrets, tokens, provider payloads, raw prompts, or unrelated runtime payloads in graph state, checkpoints, or handoffs.
|
|
58
|
+
|
|
49
59
|
## Outputs
|
|
50
60
|
|
|
51
61
|
- One active scoped work item at a time.
|
|
@@ -42,6 +42,14 @@ Choose the correct work item and load the smallest deterministic context needed
|
|
|
42
42
|
- Clear understanding of the active task, related docs, and current state
|
|
43
43
|
- No durable mdkg writes or commits from this stage
|
|
44
44
|
|
|
45
|
+
## Multi-Repo Grounding
|
|
46
|
+
|
|
47
|
+
- For root/subgraph work, inspect the root graph and each child graph read-only before choosing a mutation target.
|
|
48
|
+
- Collect a small matrix with repo path, git status, mdkg version, status, validation result, doctor result, and selected goal state.
|
|
49
|
+
- Treat dirty child repos as ownership boundaries; ask before mutating them or before refreshing root bundles from them.
|
|
50
|
+
- Prefer root-qualified qids in packs, handoffs, and cross-repo blockers so same-number child ids cannot be confused.
|
|
51
|
+
- Use compact diagnostics when available: `mdkg validate --summary --json --limit 20`, `mdkg validate --changed-only --json`, and `mdkg format --headings --dry-run --summary --json --limit 20`.
|
|
52
|
+
|
|
45
53
|
## Safety
|
|
46
54
|
|
|
47
55
|
- Do not start coding from chat memory alone.
|
|
@@ -45,15 +45,67 @@ Finish work with evidence, validation, and minimal memory drift.
|
|
|
45
45
|
|
|
46
46
|
Use this local repo-only checklist before publishing mdkg:
|
|
47
47
|
|
|
48
|
-
1. Confirm package intent and version in `package.json`, `package-lock.json`,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
1. Confirm package intent and version in `package.json`, `package-lock.json`,
|
|
49
|
+
`README.md`, `CLI_COMMAND_MATRIX.md`, generated docs, and `CHANGELOG.md`.
|
|
50
|
+
2. Map every publish-bound change in `origin/main..HEAD` to release notes. Treat
|
|
51
|
+
missing changelog coverage, stale public version strings, and generated-doc
|
|
52
|
+
drift as publish blockers, not cosmetic notes.
|
|
53
|
+
3. Confirm release-line intent before bumping: when a change crosses a
|
|
54
|
+
capability-track boundary, prefer the next minor release line over patch-style
|
|
55
|
+
continuation.
|
|
56
|
+
4. Use a clean npm cache path such as `/private/tmp/mdkg-npm-cache`.
|
|
57
|
+
5. Run `npm ci`, `npm run build`, `node scripts/assert-publish-ready.js`,
|
|
58
|
+
`npm run test`, `npm run cli:check`, `npm run cli:contract`,
|
|
59
|
+
`npm run docs:check`, `node dist/cli.js validate --json`,
|
|
60
|
+
`node dist/cli.js validate --changed-only --json`, `npm run smoke:consumer`,
|
|
61
|
+
`npm run smoke:matrix`, `npm run smoke:upgrade`, `npm run smoke:init`,
|
|
62
|
+
`npm run smoke:capabilities`, `npm run smoke:archive-work`,
|
|
63
|
+
`npm run smoke:bundle`, `npm run smoke:bundle-import`,
|
|
64
|
+
`npm run smoke:subgraph`, and `npm run smoke:visibility`.
|
|
65
|
+
6. Run `NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm pack --dry-run --json`
|
|
66
|
+
and confirm the tarball includes `dist/cli.js`, compiled folders,
|
|
67
|
+
`dist/init/`, release docs, and `scripts/postinstall.js`.
|
|
68
|
+
7. Run the publish dry-run before recommending publish readiness:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm publish --dry-run --registry=https://registry.npmjs.org/
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
8. Confirm registry state with these checks; readiness requires latest below the
|
|
75
|
+
target and the target version not already published:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm view mdkg version --registry=https://registry.npmjs.org/
|
|
79
|
+
npm view mdkg@<version> version --registry=https://registry.npmjs.org/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
9. Stop with either a publish-readiness recommendation or an exact gaps list.
|
|
83
|
+
Do not run real `npm publish`, create a tag, or push release commits without
|
|
84
|
+
explicit user approval after the dry-run gates.
|
|
85
|
+
10. When publishing with an exported `NPM_TOKEN`, create a temporary npm
|
|
86
|
+
userconfig that references the environment variable literally, then verify
|
|
87
|
+
auth before publish:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
printf '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\nregistry=https://registry.npmjs.org/\n' > /private/tmp/mdkg-npm-publish.npmrc
|
|
91
|
+
NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm whoami --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Do not print the token, do not write the expanded token into committed files,
|
|
95
|
+
and do not add unsupported `always-auth` config.
|
|
96
|
+
11. Publish only after explicit user approval, the registry still shows the
|
|
97
|
+
previous version, and npm auth is known to have write access. Use the
|
|
98
|
+
verified userconfig when relying on `NPM_TOKEN`:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
NPM_CONFIG_CACHE=/private/tmp/mdkg-npm-cache npm publish --registry=https://registry.npmjs.org/ --userconfig=/private/tmp/mdkg-npm-publish.npmrc
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
12. If publishing fails with 2FA, token policy, or permission errors, do not
|
|
105
|
+
commit; fix npm auth or package policy, then rerun publish.
|
|
106
|
+
13. After successful publish, verify `npm view mdkg version`, `npm view mdkg dist-tags`,
|
|
107
|
+
and a temp-dir global install of the latest package before closing
|
|
108
|
+
post-publish validation.
|
|
57
109
|
|
|
58
110
|
## Bundle-Aware Commit Gate
|
|
59
111
|
|
|
@@ -68,6 +120,18 @@ mdkg bundle verify .mdkg/bundles/private/all.mdkg.zip
|
|
|
68
120
|
|
|
69
121
|
Skip `mdkg archive compress --all` only when the repo has no `.mdkg/archive` sidecars. Skip bundle refresh only when the repo intentionally does not track `.mdkg/bundles/`. Use `--profile public` or `mdkg pack --visibility public` only for explicit export-safe output after public workspace, archive, and import visibility has been reviewed.
|
|
70
122
|
|
|
123
|
+
## Multi-Repo Closeout Gate
|
|
124
|
+
|
|
125
|
+
Use this order for root orchestration, child repo upgrades, and subgraph refresh work:
|
|
126
|
+
|
|
127
|
+
1. Gather read-only baselines for every involved repo before mutation.
|
|
128
|
+
2. Get one explicit approval matrix for which repos may be updated.
|
|
129
|
+
3. Apply and validate one repo at a time.
|
|
130
|
+
4. Commit accepted child repo mdkg-only changes locally before root subgraph sync.
|
|
131
|
+
5. Sync root-owned bundles only from clean child commits and record the child commit id in the root evidence.
|
|
132
|
+
6. Run root subgraph audit or verify after bundle refresh.
|
|
133
|
+
7. Keep handoffs refs-only and sanitized; never copy raw secrets, tokens, prompts, provider payloads, or unrelated raw runtime payloads into checkpoints or packs.
|
|
134
|
+
|
|
71
135
|
## Outputs
|
|
72
136
|
|
|
73
137
|
- Verified mdkg graph state
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdkg",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Git-native project memory for AI coding agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -37,8 +37,10 @@
|
|
|
37
37
|
"smoke:handoff": "npm run build && node scripts/smoke-handoff.js",
|
|
38
38
|
"smoke:warning-ux": "npm run build && node scripts/smoke-warning-ux.js",
|
|
39
39
|
"smoke:integration-ux": "npm run build && node scripts/smoke-integration-ux.js",
|
|
40
|
-
"docs:generate": "npm run build && node scripts/generate-docs-reference.js --write",
|
|
41
|
-
"docs:
|
|
40
|
+
"docs:generate": "npm run build && node scripts/generate-docs-reference.js --write && node scripts/generate-release-notes-data.js --write",
|
|
41
|
+
"docs:release-notes": "node scripts/generate-release-notes-data.js --write",
|
|
42
|
+
"docs:release-notes:check": "node scripts/generate-release-notes-data.js --check",
|
|
43
|
+
"docs:check": "npm run build && node scripts/generate-docs-reference.js --check && node scripts/generate-release-notes-data.js --check && node scripts/check-doc-command-examples.js",
|
|
42
44
|
"docs:check-commands": "npm run build && node scripts/check-doc-command-examples.js",
|
|
43
45
|
"smoke:mdkg-dev": "npm run build && node scripts/smoke-mdkg-dev.js",
|
|
44
46
|
"smoke:mdkg-dev-docs": "npm run build && node scripts/smoke-mdkg-dev-docs.js",
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
"cli:check": "npm run build && node scripts/cli_help_snapshot.js --check",
|
|
63
65
|
"cli:contract": "npm run build && node scripts/generate-command-contract.js --check",
|
|
64
66
|
"prepack": "npm run build && node scripts/assert-publish-ready.js",
|
|
65
|
-
"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:semantic-refs && npm run smoke:checkpoint-templates && npm run smoke:handoff && npm run smoke:warning-ux && npm run smoke:integration-ux && npm run smoke:mdkg-dev && npm run smoke:mdkg-dev-docs && npm run smoke:mdkg-dev-seo && npm run smoke:mdkg-dev-polish-pass2 && npm run smoke:mdkg-dev-polish-pass3 && npm run smoke:mdkg-dev-polish-pass4 && npm run smoke:mdkg-dev-polish-pass5 && npm run smoke:mdkg-dev-a11y && npm run smoke:mdkg-dev-perf && npm run smoke:demo-graph && npm run smoke:bundle && npm run smoke:graph-clone && npm run smoke:mcp && 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",
|
|
67
|
+
"prepublishOnly": "npm run test && npm run cli:check && npm run cli:contract && npm run docs:check && 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:semantic-refs && npm run smoke:checkpoint-templates && npm run smoke:handoff && npm run smoke:warning-ux && npm run smoke:integration-ux && npm run smoke:mdkg-dev && npm run smoke:mdkg-dev-docs && npm run smoke:mdkg-dev-seo && npm run smoke:mdkg-dev-polish-pass2 && npm run smoke:mdkg-dev-polish-pass3 && npm run smoke:mdkg-dev-polish-pass4 && npm run smoke:mdkg-dev-polish-pass5 && npm run smoke:mdkg-dev-a11y && npm run smoke:mdkg-dev-perf && npm run smoke:demo-graph && npm run smoke:bundle && npm run smoke:graph-clone && npm run smoke:mcp && 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",
|
|
66
68
|
"postinstall": "node scripts/postinstall.js",
|
|
67
69
|
"smoke:subgraph": "npm run build && node scripts/smoke-subgraph.js"
|
|
68
70
|
},
|