mdkg 0.1.0 → 0.1.2

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 (68) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +108 -15
  3. package/dist/cli.js +566 -15
  4. package/dist/commands/archive.js +474 -0
  5. package/dist/commands/bundle.js +743 -0
  6. package/dist/commands/bundle_import.js +243 -0
  7. package/dist/commands/capability.js +162 -0
  8. package/dist/commands/doctor.js +233 -2
  9. package/dist/commands/format.js +38 -9
  10. package/dist/commands/index.js +11 -0
  11. package/dist/commands/init.js +188 -63
  12. package/dist/commands/init_manifest.js +19 -6
  13. package/dist/commands/list.js +5 -2
  14. package/dist/commands/new.js +6 -0
  15. package/dist/commands/next.js +7 -0
  16. package/dist/commands/node_card.js +4 -1
  17. package/dist/commands/pack.js +62 -2
  18. package/dist/commands/query_output.js +1 -0
  19. package/dist/commands/search.js +5 -2
  20. package/dist/commands/show.js +7 -14
  21. package/dist/commands/skill_mirror.js +22 -0
  22. package/dist/commands/task.js +3 -0
  23. package/dist/commands/upgrade.js +151 -13
  24. package/dist/commands/validate.js +19 -2
  25. package/dist/commands/work.js +365 -0
  26. package/dist/commands/workspace.js +12 -2
  27. package/dist/core/config.js +100 -1
  28. package/dist/graph/agent_file_types.js +78 -5
  29. package/dist/graph/archive_file.js +125 -0
  30. package/dist/graph/archive_integrity.js +66 -0
  31. package/dist/graph/bundle_imports.js +418 -0
  32. package/dist/graph/capabilities_index_cache.js +103 -0
  33. package/dist/graph/capabilities_indexer.js +231 -0
  34. package/dist/graph/frontmatter.js +19 -0
  35. package/dist/graph/index_cache.js +21 -4
  36. package/dist/graph/indexer.js +4 -1
  37. package/dist/graph/node.js +23 -4
  38. package/dist/graph/node_body.js +37 -0
  39. package/dist/graph/skills_indexer.js +8 -3
  40. package/dist/graph/template_schema.js +33 -5
  41. package/dist/graph/validate_graph.js +83 -7
  42. package/dist/graph/visibility.js +214 -0
  43. package/dist/graph/workspace_files.js +22 -0
  44. package/dist/init/AGENT_START.md +21 -0
  45. package/dist/init/CLI_COMMAND_MATRIX.md +58 -3
  46. package/dist/init/README.md +60 -3
  47. package/dist/init/config.json +13 -1
  48. package/dist/init/core/guide.md +6 -2
  49. package/dist/init/core/rule-3-cli-contract.md +71 -4
  50. package/dist/init/core/rule-4-repo-safety-and-ignores.md +20 -0
  51. package/dist/init/core/rule-6-templates-and-schemas.md +10 -1
  52. package/dist/init/init-manifest.json +19 -14
  53. package/dist/init/skills/default/build-pack-and-execute-task/SKILL.md +2 -1
  54. package/dist/init/skills/default/verify-close-and-checkpoint/SKILL.md +26 -0
  55. package/dist/init/templates/default/archive.md +33 -0
  56. package/dist/init/templates/default/receipt.md +15 -1
  57. package/dist/init/templates/default/work.md +6 -1
  58. package/dist/init/templates/default/work_order.md +15 -1
  59. package/dist/pack/export_md.js +3 -0
  60. package/dist/pack/export_xml.js +3 -0
  61. package/dist/pack/order.js +1 -0
  62. package/dist/pack/pack.js +3 -13
  63. package/dist/templates/builtin.js +38 -0
  64. package/dist/templates/loader.js +9 -16
  65. package/dist/util/argparse.js +30 -0
  66. package/dist/util/refs.js +40 -0
  67. package/dist/util/zip.js +153 -0
  68. package/package.json +8 -2
package/CHANGELOG.md CHANGED
@@ -4,6 +4,99 @@ All notable changes to mdkg are documented here.
4
4
 
5
5
  This project follows a pragmatic changelog style inspired by Keep a Changelog. Versions use npm package versions.
6
6
 
7
+ ## 0.1.2 - 2026-05-19
8
+
9
+ ### Added
10
+
11
+ - Added `.mdkg/index/capabilities.json` as a derived JSON cache for skills, `SPEC.md`, `WORK.md`, core docs, and design docs.
12
+ - Added read-only `mdkg capability list/search/show` commands with JSON output, kind filters, and advisory visibility filters.
13
+ - Added workspace `visibility` metadata for capability cache filtering, defaulting to `private`.
14
+ - Added capability cache health reporting to `mdkg doctor`.
15
+ - Added capability-cache smoke coverage for root plus child workspace aggregation and cache auto-rebuild.
16
+ - Added packed-package init smoke coverage for fresh base init, fresh `mdkg init --agent`, removed flag failures, repeated init idempotency, doctor/validate, upgrade dry-run parity, task creation, and pack generation.
17
+ - Added init preflight checks for seed config parseability and unmanaged skill mirror collisions.
18
+ - Added first-class archive sidecars under `.mdkg/archive` with `mdkg archive add/list/show/verify/compress`.
19
+ - Added deterministic single-file ZIP cache generation for archived source and artifact files.
20
+ - Added `type: archive` graph nodes and `archive://<archive.id>` reference validation.
21
+ - Added `mdkg work contract/order/receipt/artifact` lifecycle helpers for semantic mirror work contracts, work orders, receipts, and artifact registration.
22
+ - Added archive/work packed-package smoke coverage for fresh temp repositories.
23
+ - Added `mdkg bundle create/list/show/verify` for deterministic full `.mdkg` graph snapshot bundles.
24
+ - Added private and public bundle profiles with fail-closed public filtering for private graph and archive refs.
25
+ - Added bundle-local generated indexes (`global.json`, `skills.json`, `capabilities.json`) inside snapshot ZIPs.
26
+ - Added bundle unit and CLI coverage plus packed-package bundle smoke coverage.
27
+ - Added `mdkg bundle import add/list/rm/enable/disable/verify` for read-only child graph snapshot imports.
28
+ - Added `bundle_imports` config with explicit alias, bundle path, visibility, expected profile, source metadata, and optional staleness policy.
29
+ - Added `.mdkg/index/imports.json` as a derived import projection and health cache.
30
+ - Added packed-package bundle import smoke coverage.
31
+ - Added shared visibility policy enforcement for workspace nodes, archive sidecars, and imported bundle nodes.
32
+ - Added `mdkg pack --visibility public|internal|private` for explicit public-safe and internal-safe packs.
33
+ - Added `mdkg archive add --visibility private|internal|public` and `mdkg archive list --visibility ...`.
34
+ - Added packed-package visibility smoke coverage.
35
+ - Added `receipt_status: superseded` support for committed receipt mirrors.
36
+ - Added `mdkg work receipt new|update --receipt-status superseded` CLI parity with graph validation.
37
+ - Added runtime-style work/order/receipt fixture coverage with input refs, requested outputs, proof refs, artifacts, and hashes.
38
+ - Added local qid support for `mdkg work order update`, `mdkg work receipt update`, and `mdkg work artifact add`.
39
+ - Added `archive.large_cache_warning_bytes` config and `mdkg doctor` warnings for large committed archive ZIP caches.
40
+
41
+ ### Changed
42
+
43
+ - `mdkg index` now writes the node index, skill index, and capability cache together.
44
+ - Generated bootstrap config now includes the default capability cache path and root workspace visibility.
45
+ - Docs and command matrix now teach capability discovery as separate from normal graph node search.
46
+ - Made `mdkg init --agent` the single canonical AI-agent bootstrap path.
47
+ - `mdkg init --agent` now creates `AGENTS.md` and `CLAUDE.md` alongside `AGENT_START.md`, `llms.txt`, `CLI_COMMAND_MATRIX.md`, default skills, event log, registry, and skill mirrors.
48
+ - Init manifests are now mode-aware: base init only claims base assets, while agent init claims the full agent bootstrap.
49
+ - Updated generated `.mdkg/README.md` onboarding to guide already-initialized repos toward `upgrade`, `new`, `search`, `pack`, and `validate`.
50
+ - Added first-ingestion guidance to `AGENT_START.md` for imported docs bundles.
51
+ - Hardened `WORK_ORDER.md` and `RECEIPT.md` templates with input refs, requested outputs, constraint refs, proof refs, attestation refs, and input/output hashes.
52
+ - Init ignore updates now ignore raw archive source copies under `.mdkg/archive/**/source/` while leaving sidecar `.md` files and ZIP caches commit-eligible.
53
+ - `mdkg doctor` now reports archive storage hygiene warnings for stray uncompressed archive files.
54
+ - Added default bundle config under `.mdkg/bundles` without making `mdkg index` rewrite bundles.
55
+ - Updated docs, command matrix, and release skills with bundle creation and verification guidance.
56
+ - Updated seeded init/upgrade skills so managed workspaces receive pre-commit archive compression and private bundle refresh guidance.
57
+ - `list`, `search`, `show`, `pack`, and `capability` now include enabled read-only bundle imports by default.
58
+ - Imported nodes use import-alias qids such as `child_repo:task-1` and expose original bundle/source metadata in JSON output.
59
+ - Stale imports warn during planning reads while `mdkg bundle import verify` exits nonzero.
60
+ - Public bundle creation now fails when public local nodes reference private or internal imported graphs.
61
+ - Public/internal bundle imports now require public bundle profiles.
62
+ - `mdkg validate` and `mdkg doctor` now report public/internal references to less-visible mdkg records.
63
+ - Archive JSON receipts now include sidecar visibility.
64
+ - Archive sidecars created from outside-repo files now redact `source_path` to `external:<basename>` instead of storing absolute local paths.
65
+ - `mdkg validate` and `mdkg archive verify` now share strict ZIP cache integrity checks for ZIP hash, readability, payload SHA-256, and payload byte size.
66
+ - Work mirror docs and templates now state the canonical-system boundary for production order, receipt, feedback, dispute, payment, ledger, marketplace, fulfillment, and execution state.
67
+ - Work lifecycle packed-package smoke now proves local qid mutation, order status updates, final superseded receipts, archive verification, indexing, show, and pack.
68
+
69
+ ### Fixed
70
+
71
+ - Fixed fresh `mdkg init --agent` leaving missing managed wrapper docs that immediately required `mdkg upgrade --apply`.
72
+ - Fixed misleading init summaries by reporting manifest, ignore, registry, event log, core pin, and skill mirror actions.
73
+ - Fixed late init failure UX by printing a partial-init receipt with recovery guidance.
74
+ - Kept bundle output deterministic across repeated creates when only `.mdkg/bundles/` changes.
75
+ - Hardened publish readiness and init smoke checks to assert seeded release skills include archive compression and bundle refresh guidance.
76
+ - Mutating task and work update flows now reject imported qids with explicit read-only import errors.
77
+ - Work lifecycle mutation commands now reject imported order/receipt qids with explicit read-only bundle import guidance.
78
+ - Local graph indexing now allows edges to configured import aliases without treating them as missing local workspace nodes.
79
+ - Public bundle checks now reuse the same fail-closed policy as public/internal pack checks.
80
+ - `mdkg archive verify --json` now emits a verification receipt for corrupt archive ZIP caches instead of being blocked by strict index validation.
81
+
82
+ ### Removed
83
+
84
+ - Removed `mdkg init --llm`, `mdkg init --agents`, `mdkg init --claude`, and `mdkg init --omni`; each now fails before mutation with guidance to use `mdkg init --agent`.
85
+
86
+ ## 0.1.1 - 2026-05-12
87
+
88
+ ### Added
89
+
90
+ - Added bundled template schema fallback so older workspaces can keep using graph inspection while missing newly introduced built-in templates.
91
+ - Added `safe_to_apply`, `will_write_paths`, `preserved_customizations`, `blocking_conflicts`, and `apply_side_effects` fields to `mdkg upgrade --json`.
92
+
93
+ ### Changed
94
+
95
+ - `mdkg new <built-in-type>` can use the installed package template when the workspace has not yet vendored that local template.
96
+ - `mdkg doctor` and `mdkg validate` warn, rather than fail, when packaged fallback schemas cover missing local built-in templates.
97
+ - `mdkg upgrade` human output now states whether the receipt is safe to apply and what paths would be written.
98
+ - `mdkg upgrade` skips ignored event logs and points users to `mdkg event enable` instead of creating ignored `.mdkg/work/events/events.jsonl` files.
99
+
7
100
  ## 0.1.0 - 2026-05-12
8
101
 
9
102
  ### Added
package/README.md CHANGED
@@ -11,9 +11,9 @@ mdkg stays deliberately boring:
11
11
  - repo-native under `.mdkg/`
12
12
  - TypeScript + Node.js 18+
13
13
  - zero runtime dependencies
14
- - no sqlite, daemon, hosted index, or vector DB
14
+ - no required sqlite, daemon, hosted index, or vector DB
15
15
 
16
- Current package version in source: `0.1.0`
16
+ Current package version in source: `0.1.2`
17
17
 
18
18
  ## The product shape
19
19
 
@@ -43,19 +43,13 @@ bun add -g mdkg
43
43
 
44
44
  Initialize mdkg in a repo:
45
45
 
46
- ```bash
47
- mdkg init --llm
48
- ```
49
-
50
- This is the generic OSS bootstrap path. It creates `.mdkg/` and updates `.gitignore` / `.npmignore` by default. Use `--no-update-ignores` to opt out of those ignore-file updates.
51
-
52
- Optional agent-ready scaffold:
53
-
54
46
  ```bash
55
47
  mdkg init --agent
56
48
  ```
57
49
 
58
- This adds strict-node `SOUL.md` / `HUMAN.md`, seeds the three default mdkg usage skills, creates `events.jsonl`, updates the skill registry, adds core pin updates, and creates mirrored skill folders under `.agents/skills/` and `.claude/skills/`.
50
+ 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` / `HUMAN.md`, the three default mdkg usage skills, `events.jsonl`, the skill registry, core pin updates, and mirrored skill folders under `.agents/skills/` and `.claude/skills/`. It also updates `.gitignore` / `.npmignore` by default. Use `--no-update-ignores` to opt out of those ignore-file updates.
51
+
52
+ For a non-agent markdown graph only, run `mdkg init`.
59
53
 
60
54
  Preview safe scaffold upgrades in an existing mdkg workspace:
61
55
 
@@ -70,7 +64,9 @@ Apply only after reviewing the receipt:
70
64
  mdkg upgrade --apply
71
65
  ```
72
66
 
73
- Upgrade is intentionally conservative. It creates missing managed startup docs and updates unchanged mdkg seed assets, but preserves customized docs, templates, skills, and core files as reported conflicts. Agent-enabled workspaces also get safe default skill upgrades and skill mirror refreshes; non-agent workspaces do not gain skills, events, or mirrors implicitly.
67
+ Upgrade is intentionally conservative. It creates missing managed startup docs and templates, updates unchanged mdkg seed assets, and preserves customized docs, templates, skills, and core files as reported preserved customizations. Review `safe_to_apply`, `will_write_paths`, and `apply_side_effects` in the JSON receipt before applying. Agent-enabled workspaces can receive safe default skill upgrades and skill mirror refreshes; ignored event logs are skipped with guidance to run `mdkg event enable` if provenance should be restored.
68
+
69
+ Older workspaces can continue to inspect and validate current graph nodes before applying an upgrade. When local templates are missing for newly introduced built-in mdkg types, mdkg uses the installed package's bundled templates as a read-only schema fallback and warns that `mdkg upgrade --apply` can vendor the missing templates.
74
70
 
75
71
  Create a task:
76
72
 
@@ -98,14 +94,69 @@ Build deterministic context:
98
94
  ```bash
99
95
  mdkg pack task-1
100
96
  mdkg pack task-1 --profile concise --dry-run --stats
97
+ mdkg pack task-1 --visibility public --dry-run
98
+ ```
99
+
100
+ Create a full `.mdkg` graph snapshot bundle for root or child orchestration:
101
+
102
+ ```bash
103
+ mdkg archive compress --all
104
+ mdkg archive verify --json
105
+ mdkg bundle create --profile private
106
+ mdkg bundle verify .mdkg/bundles/private/all.mdkg.zip
107
+ mdkg bundle list --json
101
108
  ```
102
109
 
110
+ Bundles are explicit graph transport artifacts, separate from task context packs. Before a commit in repos that track archives or bundles, refresh compressed archive caches first, then create the private bundle so the committed graph state is self-consistent. Private bundles are the default and may be committed in private repos when configured. Public bundles require at least one selected workspace with `visibility: public` and include only public workspace content and public archive sidecars; bundle creation fails if public content points at private graph, archive, or imported bundle records.
111
+
112
+ Import a child repo bundle as a read-only planning view:
113
+
114
+ ```bash
115
+ mdkg bundle import add child_repo child-repo/.mdkg/bundles/private/all.mdkg.zip --source-path child-repo
116
+ mdkg bundle import list --json
117
+ mdkg search "child capability"
118
+ mdkg show child_repo:work.example
119
+ mdkg pack child_repo:work.example --dry-run --stats
120
+ mdkg bundle import verify child_repo --json
121
+ ```
122
+
123
+ Imported bundle nodes are projected under the import alias, for example `child_repo:task-1`. They are available to `list`, `search`, `show`, `pack`, and capability discovery, but remain read-only; mutate the child repo and refresh its bundle to change imported content. Stale imports warn during planning reads and fail `mdkg bundle import verify`. Public or internal imports must be backed by public bundle profiles; private imports stay private planning context.
124
+
103
125
  Validate before handoff or commit:
104
126
 
105
127
  ```bash
106
128
  mdkg validate
107
129
  ```
108
130
 
131
+ Discover cached capability surfaces:
132
+
133
+ ```bash
134
+ mdkg index
135
+ mdkg capability list --kind skill --json
136
+ mdkg capability search "image worker" --kind work --json
137
+ mdkg capability show <id-or-qid-or-slug> --json
138
+ ```
139
+
140
+ Register source and artifact files as committed archive sidecars:
141
+
142
+ ```bash
143
+ mdkg archive add ./inputs/key_input_doc.pdf --id archive.key-input-doc --kind source --visibility private
144
+ mdkg archive verify archive://archive.key-input-doc
145
+ mdkg archive list --json
146
+ ```
147
+
148
+ Create semantic mirror work contracts, orders, receipts, and artifacts:
149
+
150
+ ```bash
151
+ mdkg work contract new "generate image" --id work.generate-image --agent-id agent.image-worker --kind image_generation --inputs prompt:text:required --outputs image_url:url:required
152
+ mdkg work order new "generate image request" --id order.generate-image-1 --work-id work.generate-image --requester user://example --input-refs archive://archive.key-input-doc
153
+ mdkg work receipt new "generate image receipt" --id receipt.generate-image-1 --work-order-id order.generate-image-1 --outcome success --receipt-status recorded
154
+ mdkg work artifact add receipt.generate-image-1 ./outputs/image.png --id archive.generated-image --kind artifact
155
+ ```
156
+
157
+ Receipt statuses are `recorded`, `verified`, `rejected`, and `superseded`.
158
+ Update and artifact commands accept local ids or local qids; imported bundle qids are read-only and must be changed in their source workspace.
159
+
109
160
  Update structured task state and evidence while keeping body and narrative edits in markdown:
110
161
 
111
162
  ```bash
@@ -149,6 +200,9 @@ mdkg lives under a hidden root directory:
149
200
  - `.mdkg/work/` tasks, bugs, tests, epics, checkpoints
150
201
  - `.mdkg/templates/` templates used by `mdkg new`
151
202
  - `.mdkg/skills/` Agent Skills packages
203
+ - `.mdkg/archive/` sidecar metadata plus deterministic compressed source/artifact caches
204
+ - `.mdkg/bundles/` optional committed full graph snapshot bundles
205
+ - `.mdkg/index/imports.json` generated read-only bundle import cache
152
206
  - `.agents/skills/` Codex/OpenAI-facing mirrored skills
153
207
  - `.claude/skills/` Claude-facing mirrored skills
154
208
  - `.mdkg/index/` generated cache files
@@ -164,6 +218,9 @@ These are the commands new users and agents should learn first:
164
218
  - `mdkg next`
165
219
  - `mdkg pack`
166
220
  - `mdkg skill`
221
+ - `mdkg capability`
222
+ - `mdkg archive`
223
+ - `mdkg work`
167
224
  - `mdkg task`
168
225
  - `mdkg validate`
169
226
 
@@ -222,6 +279,19 @@ This repo now dogfoods three internal skills:
222
279
 
223
280
  Optional skill metadata with prefixes such as `ochatr_*` is treated as vendor extension data. Structured skill output exposes it under `extensions.ochatr` while keeping the top-level `ochatr` field as a compatibility alias introduced in 0.0.9. ochatr.ai is a pioneering adopter of this extension pattern, not the name of the base mdkg standard.
224
281
 
282
+ ## Capability cache
283
+
284
+ mdkg maintains `.mdkg/index/capabilities.json` as a derived access cache for deterministic capability surfaces:
285
+ - skills from `.mdkg/skills/**/SKILL.md`
286
+ - `SPEC.md`
287
+ - `WORK.md`
288
+ - core docs
289
+ - design docs
290
+
291
+ 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.
292
+
293
+ 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`. 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.
294
+
225
295
  ## Agent workflow files
226
296
 
227
297
  mdkg recognizes a small set of canonical agent workflow documents:
@@ -235,13 +305,28 @@ Use `mdkg new spec|work|work_order|receipt|feedback|dispute|proposal "<title>"`
235
305
 
236
306
  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.
237
307
 
308
+ 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. 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.
309
+
310
+ ## Archive sidecars
311
+
312
+ Archive entries live under `.mdkg/archive/<archive.id>/` and are normal graph nodes with `type: archive`. `mdkg archive add` copies the source into a managed local `source/` directory, writes a frontmatter sidecar `<file>.md`, and writes a deterministic single-file ZIP cache `<file>.zip`. The original source path is left untouched.
313
+
314
+ Archive sidecars support `archive://archive.example` refs from orders, receipts, artifacts, proof refs, and other workflow metadata. `artifact://...` refs remain external or runtime-managed artifact identities; `archive://...` refs name committed mdkg archive sidecars. `mdkg validate` and `mdkg archive verify` both require the sidecar contract, ZIP cache hash, readable ZIP payload, payload SHA-256, and payload byte size to match. A missing raw local source copy is non-fatal when the committed sidecar and ZIP cache are valid.
315
+
316
+ When the source passed to `mdkg archive add` is inside the repo, `source_path` is repo-relative. Outside-repo sources are redacted to `external:<basename>` so sidecars do not leak absolute local paths.
317
+
318
+ Archive sidecar visibility defaults to `private`. Use `mdkg archive add --visibility public` only when the sidecar metadata and ZIP cache are safe for public packs or public bundles.
319
+
320
+ By default, init/upgrade ignore generated raw archive source copies with `.mdkg/archive/**/source/`; sidecar `.md` files and compressed `.zip` caches remain commit-eligible. `mdkg doctor` warns when a committed archive ZIP cache exceeds `archive.large_cache_warning_bytes` in `.mdkg/config.json` (default `26214400`; set `0` to disable). Large-cache warnings do not block archive add or validation.
321
+
238
322
  ## Current direction
239
323
 
240
324
  This release includes:
241
325
  - `init --agent`
242
- - default ignore updates with `--no-update-ignores` for `.mdkg/index/` and `.mdkg/pack/`
326
+ - default ignore updates with `--no-update-ignores` for `.mdkg/index/`, `.mdkg/pack/`, and raw archive source copies
243
327
  - root-only published init seed config
244
328
  - skills indexing and search/show/list support
329
+ - JSON capability cache for skills, `SPEC.md`, `WORK.md`, core docs, and design docs
245
330
  - optional `skills: [...]` on work items
246
331
  - pack-time skill inclusion
247
332
  - latest-checkpoint resolver + index hint
@@ -250,16 +335,22 @@ This release includes:
250
335
  - agent workflow file types and semantic `mdkg new --id` support
251
336
  - product-specific skill mirrors for Codex/OpenAI and Claude
252
337
  - shared `AGENT_START.md` startup guidance
338
+ - conservative `mdkg upgrade` with mode-aware init manifests
339
+ - archive sidecars with deterministic ZIP caches
340
+ - semantic mirror helpers under `mdkg work ...`
341
+ - explicit public/internal/private visibility enforcement for packs, bundles, archives, imports, validation, and doctor diagnostics
342
+ - strict archive ZIP payload integrity checks during validation
253
343
 
254
344
  Current direction:
255
- - keep the OSS story generic around `init --llm`
256
- - use `init --agent` for deeper AI-agent bootstrap
345
+ - keep the OSS story generic around `mdkg init --agent`
346
+ - use base `mdkg init` only for repos that do not want agent bootstrap assets
257
347
  - keep `pack <id>` at the center of the human/agent loop
258
348
  - use `mdkg task ...` for structured state changes and markdown edits for narrative/body content
259
349
  - make event logging guided instead of purely manual
260
350
  - dogfood real skills inside the repo
261
351
  - make skill authoring first-class through `mdkg skill`
262
352
  - make `CLI_COMMAND_MATRIX.md` the single source of truth for the live CLI surface
353
+ - keep production execution databases canonical while mdkg stores committed semantic mirrors
263
354
  - run manual behavior audits before enforcing stronger coverage thresholds
264
355
 
265
356
  Design and decision records live in the internal graph under `.mdkg/design/`.
@@ -271,6 +362,8 @@ mdkg is not a secret store.
271
362
  Use these defaults:
272
363
  - keep `.mdkg/index/` gitignored
273
364
  - keep `.mdkg/pack/` gitignored
365
+ - keep `.mdkg/archive/**/source/` gitignored unless a repo intentionally commits raw local copies
366
+ - commit archive sidecar `.md` metadata and deterministic `.zip` caches when they are needed for reviewable evidence
274
367
  - event logs are committed by default; ignore or delete them manually if a repo wants local-only provenance
275
368
  - do not ship `.mdkg/` into production builds or published packages
276
369
  - if an external orchestrator is writing mdkg state, keep one durable writer per run and batch commits at end-of-run or checkpoint boundaries