@agent-wiki/mcp 0.22.4 → 0.22.6

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 (94) hide show
  1. package/README.md +31 -0
  2. package/dist/cli.js +177 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/evidence-migration.js +1 -1
  5. package/dist/evidence-migration.js.map +1 -1
  6. package/dist/evidence-report.d.ts +17 -0
  7. package/dist/evidence-report.d.ts.map +1 -1
  8. package/dist/evidence-report.js +46 -2
  9. package/dist/evidence-report.js.map +1 -1
  10. package/dist/evidence-search.d.ts +71 -0
  11. package/dist/evidence-search.d.ts.map +1 -1
  12. package/dist/evidence-search.js +104 -1
  13. package/dist/evidence-search.js.map +1 -1
  14. package/dist/evidence-search.test.js +58 -1
  15. package/dist/evidence-search.test.js.map +1 -1
  16. package/dist/index.d.ts +10 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +5 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/okf-compat.d.ts +152 -0
  21. package/dist/okf-compat.d.ts.map +1 -0
  22. package/dist/okf-compat.js +604 -0
  23. package/dist/okf-compat.js.map +1 -0
  24. package/dist/okf-compat.test.d.ts +2 -0
  25. package/dist/okf-compat.test.d.ts.map +1 -0
  26. package/dist/okf-compat.test.js +234 -0
  27. package/dist/okf-compat.test.js.map +1 -0
  28. package/dist/okf-export.d.ts +63 -0
  29. package/dist/okf-export.d.ts.map +1 -0
  30. package/dist/okf-export.js +655 -0
  31. package/dist/okf-export.js.map +1 -0
  32. package/dist/okf-export.test.d.ts +2 -0
  33. package/dist/okf-export.test.d.ts.map +1 -0
  34. package/dist/okf-export.test.js +469 -0
  35. package/dist/okf-export.test.js.map +1 -0
  36. package/dist/okf-import.d.ts +136 -0
  37. package/dist/okf-import.d.ts.map +1 -0
  38. package/dist/okf-import.js +471 -0
  39. package/dist/okf-import.js.map +1 -0
  40. package/dist/okf-import.test.d.ts +2 -0
  41. package/dist/okf-import.test.d.ts.map +1 -0
  42. package/dist/okf-import.test.js +339 -0
  43. package/dist/okf-import.test.js.map +1 -0
  44. package/dist/okf-trust.test.d.ts +2 -0
  45. package/dist/okf-trust.test.d.ts.map +1 -0
  46. package/dist/okf-trust.test.js +223 -0
  47. package/dist/okf-trust.test.js.map +1 -0
  48. package/dist/okf.d.ts +128 -0
  49. package/dist/okf.d.ts.map +1 -0
  50. package/dist/okf.js +659 -0
  51. package/dist/okf.js.map +1 -0
  52. package/dist/search-currency.d.ts +44 -0
  53. package/dist/search-currency.d.ts.map +1 -0
  54. package/dist/search-currency.js +111 -0
  55. package/dist/search-currency.js.map +1 -0
  56. package/dist/search.d.ts +19 -0
  57. package/dist/search.d.ts.map +1 -1
  58. package/dist/search.js.map +1 -1
  59. package/dist/server.d.ts +0 -1
  60. package/dist/server.d.ts.map +1 -1
  61. package/dist/server.js +617 -21
  62. package/dist/server.js.map +1 -1
  63. package/dist/server.test.js +772 -0
  64. package/dist/server.test.js.map +1 -1
  65. package/dist/wiki-graph.d.ts +126 -0
  66. package/dist/wiki-graph.d.ts.map +1 -0
  67. package/dist/wiki-graph.js +479 -0
  68. package/dist/wiki-graph.js.map +1 -0
  69. package/dist/wiki-graph.test.d.ts +2 -0
  70. package/dist/wiki-graph.test.d.ts.map +1 -0
  71. package/dist/wiki-graph.test.js +216 -0
  72. package/dist/wiki-graph.test.js.map +1 -0
  73. package/dist/wiki.d.ts +140 -1
  74. package/dist/wiki.d.ts.map +1 -1
  75. package/dist/wiki.js +509 -23
  76. package/dist/wiki.js.map +1 -1
  77. package/dist/worklist.d.ts +43 -0
  78. package/dist/worklist.d.ts.map +1 -0
  79. package/dist/worklist.js +147 -0
  80. package/dist/worklist.js.map +1 -0
  81. package/dist/worklist.test.d.ts +2 -0
  82. package/dist/worklist.test.d.ts.map +1 -0
  83. package/dist/worklist.test.js +233 -0
  84. package/dist/worklist.test.js.map +1 -0
  85. package/docs/evidence-envelope.md +5 -0
  86. package/docs/okf-adoption-plan.md +566 -0
  87. package/docs/okf-compat-plan.md +418 -0
  88. package/docs/okf-extensions.md +245 -0
  89. package/docs/open-knowledge-format.md +280 -0
  90. package/docs/tools.md +264 -2
  91. package/package.json +1 -1
  92. package/schemas/agent-wiki-okf.schema.json +130 -0
  93. package/skills/agent-wiki/SKILL.md +7 -0
  94. package/skills/agent-wiki/references/tools-reference.md +80 -3
@@ -0,0 +1,566 @@
1
+ # OKF Adoption Plan
2
+
3
+ > **Note (December 2026):** "OKF" in this document means agent-wiki's own package
4
+ > format, not the Open Knowledge Format specification published by Google Cloud.
5
+ > Phases 3 to 5 below are replaced by
6
+ > [`okf-compat-plan.md`](okf-compat-plan.md), which targets the upstream format.
7
+
8
+ This document evaluates whether `agent-wiki` can adopt the Open Knowledge
9
+ Format (OKF) direction described in
10
+ [`open-knowledge-format.md`](open-knowledge-format.md), based on the current
11
+ codebase and documentation.
12
+
13
+ ## Executive Conclusion
14
+
15
+ Adopting OKF is feasible and strategically coherent.
16
+
17
+ `agent-wiki` already has most of the hard primitives an OKF package needs:
18
+
19
+ - immutable raw sources with SHA-256 sidecars
20
+ - mutable Markdown wiki pages with parseable frontmatter
21
+ - source coverage reporting
22
+ - evidence envelopes on retrieval and code-query paths
23
+ - unsupported-write telemetry and evidence reports
24
+ - deterministic rebuild and lint operations
25
+ - Git-native files rather than a required hosted service
26
+
27
+ The missing work is mostly format hardening: a portable manifest, a JSON Schema,
28
+ conformance checks, export/import tests, and a clear compatibility promise.
29
+
30
+ The recommended direction is:
31
+
32
+ > make `agent-wiki` the reference implementation of a Git-native OKF package
33
+ > format for agent-maintained knowledge
34
+
35
+ That means OKF should become a public contract around the existing architecture,
36
+ not a rewrite of the product.
37
+
38
+ ## External Reference Findings
39
+
40
+ ### Open Definition / Open Knowledge Foundation
41
+
42
+ The Open Definition frames open knowledge around access, use, modification,
43
+ sharing, provenance, machine readability, and open formats.
44
+
45
+ Useful requirements for `agent-wiki`:
46
+
47
+ - OKF packages must be readable as ordinary files.
48
+ - The package must declare license and provenance policy.
49
+ - Format rules must be machine-checkable, not only prose.
50
+ - Knowledge should remain modifiable and reviewable.
51
+ - No hosted service should be required to inspect or move a package.
52
+
53
+ Boundary:
54
+
55
+ - `agent-wiki` should not claim that OKF is an official Open Knowledge
56
+ Foundation standard.
57
+ - Private enterprise knowledge can still use the format; the format should make
58
+ license and access policy explicit rather than require all content to be open.
59
+
60
+ ### Google Data Commons
61
+
62
+ Data Commons shows the value of common schemas and interoperable knowledge graph
63
+ instances. Its center of gravity is public data: standard schemas, APIs, and a
64
+ graph that can join data across sources.
65
+
66
+ Useful requirements for `agent-wiki`:
67
+
68
+ - Package schemas should be explicit and reusable.
69
+ - Derived graph/index artifacts should be rebuildable and queryable.
70
+ - Interoperability should not depend on one central host.
71
+
72
+ Boundary:
73
+
74
+ - `agent-wiki` is not a Data Commons replacement.
75
+ - OKF should not require RDF, SPARQL, or a cloud API.
76
+ - OKF is a repository package format for operational knowledge, not a public
77
+ statistics graph.
78
+
79
+ ### LLM-Wiki Research
80
+
81
+ LLM-Wiki argues that agent retrieval should behave less like one-shot lookup and
82
+ more like reasoning: search, read, traverse links, judge evidence sufficiency,
83
+ and repair structural errors over time.
84
+
85
+ Useful requirements for `agent-wiki`:
86
+
87
+ - Search and read should be first-class agent operations.
88
+ - Links and page structure are part of retrieval quality, not decoration.
89
+ - Agents need explicit abstain / weak-evidence signals.
90
+ - Self-improvement should be mediated by persistent logs and reviewable edits.
91
+
92
+ Boundary:
93
+
94
+ - OKF should define portable package structure and governance; it should not
95
+ require one specific retrieval algorithm.
96
+ - Vector indexes should be optional generated artifacts, not the source of truth.
97
+
98
+ ## Current Codebase Inventory
99
+
100
+ ### Raw Layer
101
+
102
+ Current state:
103
+
104
+ - `raw_ingest` supports content, local files/directories, URL fetch, Confluence,
105
+ and Jira.
106
+ - Raw files are immutable by convention and carry `.meta.yaml` sidecars.
107
+ - Metadata includes SHA-256, source URL, description, tags, and timestamps.
108
+ - `raw_read`, `raw_list`, `raw_versions`, and `raw_coverage` expose the layer.
109
+ - `wiki_admin action: "lint"` verifies raw integrity.
110
+
111
+ OKF fit:
112
+
113
+ - Strong. This maps directly to OKF `raw/`.
114
+ - The sidecar metadata is already close to an OKF source manifest.
115
+
116
+ Gaps:
117
+
118
+ - The format does not yet define a canonical package-level inventory of raw
119
+ files and hashes.
120
+ - Raw metadata schema is implicit in TypeScript and tests, not published as an
121
+ OKF schema.
122
+
123
+ ### Wiki Layer
124
+
125
+ Current state:
126
+
127
+ - Wiki pages are Markdown files under `wiki/`.
128
+ - Frontmatter supports `title`, `type`, `tags`, `sources`, timestamps, and
129
+ synthesis markers.
130
+ - `wiki_write` manages timestamps, classification, auto-routing, and auto-linking.
131
+ - `wiki_read`, `wiki_search`, `wiki_list`, and `wiki_delete` expose the layer.
132
+ - System pages include `index.md`, `timeline.md`, `log.md`, nested `index.md`,
133
+ and `evidence-report.md`.
134
+
135
+ OKF fit:
136
+
137
+ - Strong. This maps directly to OKF `wiki/`.
138
+ - Existing frontmatter can carry page class, source links, freshness, and
139
+ synthesis state.
140
+
141
+ Gaps:
142
+
143
+ - Page class is distributed across `type`, `sources`, `synthesis`,
144
+ `unsupported`, and `legacyUnsupported`; OKF needs a documented classifier.
145
+ - There is no OKF schema for allowed frontmatter fields.
146
+ - Staleness policy is lint-oriented, but not part of a package manifest yet.
147
+
148
+ ### Evidence Layer
149
+
150
+ Current state:
151
+
152
+ - `EvidenceEnvelope` is implemented as a language-agnostic contract.
153
+ - Retrieval and code-query paths return `confidence`, `basis`, `abstain`,
154
+ `rationale`, and provenance.
155
+ - `wiki_write` classifies writes as grounded, synthesis, unsupported, rejected,
156
+ or legacy.
157
+ - `.agent-wiki/evidence-write-log.jsonl`,
158
+ `.agent-wiki/evidence-write-counter.jsonl`, and
159
+ `.agent-wiki/evidence-search-log.jsonl` drive evidence reporting.
160
+ - `wiki_admin action: "evidence-report"` renders a corpus-level report.
161
+
162
+ OKF fit:
163
+
164
+ - Strong. This is a differentiator versus generic Markdown wiki formats.
165
+
166
+ Gaps:
167
+
168
+ - Evidence logs currently live in an operational `.agent-wiki/` namespace, not
169
+ a portable `evidence/` package namespace.
170
+ - Some logs may be private telemetry. OKF needs to distinguish portable evidence
171
+ artifacts from local operational logs.
172
+ - Claim-level provenance is not yet a stable exported index.
173
+
174
+ ### Indexes And Search
175
+
176
+ Current state:
177
+
178
+ - Local BM25 search is built into `wiki_search`.
179
+ - Optional hybrid vector reranking is enabled by `.agent-wiki.yaml`.
180
+ - Vector cache lives in `wiki/.search-vectors.json`.
181
+ - Directory indexes and timeline pages are generated by rebuild/write/delete.
182
+ - The graph viewer reads Markdown pages and wikilinks.
183
+
184
+ OKF fit:
185
+
186
+ - Good. Generated indexes can be part of a package but should be rebuildable.
187
+
188
+ Gaps:
189
+
190
+ - OKF should define which index artifacts are canonical and which are cache.
191
+ - `wiki/.search-vectors.json` is an implementation cache; it should not be a
192
+ required part of the portable format.
193
+ - There is no package-level graph snapshot contract yet.
194
+
195
+ ### Admin And Configuration
196
+
197
+ Current state:
198
+
199
+ - `.agent-wiki.yaml` is the runtime configuration file.
200
+ - It stores workspace paths, security boundaries, lint options, search config,
201
+ evidence config, Atlassian config, auto-link behavior, and COBOL settings.
202
+ - `.agent-wiki.local.yaml` supports local overrides.
203
+ - `wiki_admin` currently supports `init`, `config`, `rebuild`, `lint`, and
204
+ `evidence-report`.
205
+
206
+ OKF fit:
207
+
208
+ - Good, but this is where the biggest design decision lives.
209
+
210
+ Decision:
211
+
212
+ - Keep `.agent-wiki.yaml` as runtime/operator config.
213
+ - Add `agent-wiki.yaml` as the portable OKF package manifest.
214
+
215
+ Reason:
216
+
217
+ - Runtime config can include machine-local paths, security allowlists, tokens via
218
+ env references, and deployment-specific settings.
219
+ - Package manifests should be safe to commit, copy, publish, and validate.
220
+
221
+ ### Language Compiler Layer
222
+
223
+ Current state:
224
+
225
+ - `code_parse` and `code_query` expose deterministic code analysis.
226
+ - COBOL is shipped with AST extraction, normalized models, call graphs, DB2 flow,
227
+ CALL boundary flow, and field lineage.
228
+ - Parsed artifacts live under `raw/parsed/cobol/`.
229
+ - Generated wiki pages are written back into `wiki/`.
230
+ - Precision/recall evaluation fixtures exist for lineage.
231
+
232
+ OKF fit:
233
+
234
+ - Strong. This is a high-value OKF use case because code knowledge needs
235
+ deterministic provenance, lineage evidence, and reproducible generated pages.
236
+
237
+ Gaps:
238
+
239
+ - `raw/parsed/` is currently both a derived artifact area and a subdirectory of
240
+ raw. OKF should explicitly mark it as generated, not primary source evidence.
241
+ - Compiler artifact schemas are not yet package-level schemas.
242
+
243
+ ### Distribution And CI
244
+
245
+ Current state:
246
+
247
+ - The npm package ships `dist`, `skills`, `.claude-plugin`, `docs`,
248
+ `architecture.svg`, and graph viewer files.
249
+ - CI and release workflows exist.
250
+ - Tests cover wiki operations, evidence reports, search, raw coverage, COBOL
251
+ parsing, and graph behavior.
252
+
253
+ OKF fit:
254
+
255
+ - Good. The codebase is already test-oriented enough to add conformance tests.
256
+
257
+ Gaps:
258
+
259
+ - There is no OKF conformance test suite.
260
+ - There is no committed example OKF package fixture.
261
+ - `package.json` includes `schemas` in `files`, but the source tree does not yet
262
+ expose an OKF schema directory as a public contract.
263
+
264
+ ## Feasibility Assessment
265
+
266
+ ### High-Confidence Areas
267
+
268
+ - **Package layout**: current `raw/`, `wiki/`, and `schemas/` concepts already
269
+ match the OKF structure.
270
+ - **Machine readability**: YAML frontmatter and YAML config are already parsed.
271
+ - **Evidence model**: the evidence envelope gives OKF a real trust contract.
272
+ - **Git-native behavior**: files are diffable, reviewable, and revertable.
273
+ - **No hosted dependency**: core operations work locally without an LLM API.
274
+
275
+ ### Medium-Complexity Areas
276
+
277
+ - **Manifest design**: easy to add, but must avoid overlap with runtime config.
278
+ - **Schema publication**: straightforward, but needs stable names and versioning.
279
+ - **Format checks**: existing lint can be extended, but OKF should have explicit
280
+ pass/fail semantics.
281
+ - **Export/import**: likely feasible, but must handle caches, local logs, and
282
+ generated artifacts cleanly.
283
+
284
+ ### Risk Areas
285
+
286
+ - **Name ambiguity**: OKF can be confused with Open Knowledge Foundation. Use
287
+ "Open Knowledge Format" carefully and clarify that it is an `agent-wiki`
288
+ package format.
289
+ - **Private data licensing**: enterprise packages may not be open content. OKF
290
+ should require explicit license/access metadata, not public release.
291
+ - **Frontmatter drift**: agents can invent fields unless schema/lint catches
292
+ them.
293
+ - **Generated artifact stability**: OKF conformance should not fail just because
294
+ rebuildable cache files are absent.
295
+ - **Telemetry privacy**: raw operational logs may contain sensitive prompts,
296
+ search terms, or internal page names. OKF must support redacted summaries.
297
+ - **Version promise**: once external users depend on the format, breaking changes
298
+ need migration rules.
299
+
300
+ Overall feasibility: **high**, if the first release is scoped to OKF v0.1 and
301
+ keeps runtime behavior backward compatible.
302
+
303
+ ## Target OKF v0.1 Contract
304
+
305
+ ### Package Manifest
306
+
307
+ Add a committed `agent-wiki.yaml` manifest at the package root.
308
+
309
+ Example:
310
+
311
+ ```yaml
312
+ format: agent-wiki-okf
313
+ format_version: 0.1
314
+ name: payroll-modernization-knowledge
315
+ version: 0.1.0
316
+ license: internal-proprietary
317
+ owner: platform-modernization
318
+ created_at: 2026-06-20
319
+ generator:
320
+ name: agent-wiki
321
+ version: 0.22.4
322
+ source_policy:
323
+ raw_immutable: true
324
+ require_sha256: true
325
+ wiki_policy:
326
+ require_sources_for_grounded_pages: true
327
+ allow_synthesis_pages: true
328
+ evidence_policy:
329
+ allow_unsupported_pages: warn
330
+ require_abstain_signal: true
331
+ ```
332
+
333
+ ### Runtime Config Separation
334
+
335
+ Keep `.agent-wiki.yaml` for runtime configuration:
336
+
337
+ - workspace location
338
+ - security allowlists
339
+ - local import settings
340
+ - search weights
341
+ - evidence hard-reject switch
342
+ - site-specific COBOL settings
343
+
344
+ Do not require `.agent-wiki.yaml` for a read-only OKF package inspection.
345
+
346
+ ### Logical Package Layers
347
+
348
+ OKF v0.1 should define these logical layers:
349
+
350
+ ```text
351
+ agent-wiki-package/
352
+ agent-wiki.yaml
353
+ raw/
354
+ wiki/
355
+ schemas/
356
+ evidence/
357
+ indexes/
358
+ logs/
359
+ ```
360
+
361
+ Mapping to current implementation:
362
+
363
+ | OKF layer | Current implementation | v0.1 posture |
364
+ |-----------|------------------------|--------------|
365
+ | `agent-wiki.yaml` | not implemented | add |
366
+ | `raw/` | implemented | required |
367
+ | `wiki/` | implemented | required |
368
+ | `schemas/` | concept exists | optional until schema pack ships |
369
+ | `evidence/` | partial via envelopes, reports, `.agent-wiki/` logs | add exported summary artifacts |
370
+ | `indexes/` | generated pages, BM25/vector cache | optional generated artifacts |
371
+ | `logs/` | `.agent-wiki/*.jsonl` | local by default, export redacted summaries only |
372
+
373
+ ### Page Classes
374
+
375
+ OKF v0.1 should standardize the existing classifier:
376
+
377
+ | Class | Current signal | OKF behavior |
378
+ |-------|----------------|--------------|
379
+ | `grounded` | non-empty `sources` | reliable if sources verify |
380
+ | `synthesis` | `synthesis: true` or `type: synthesis` | allowed, must explain derivation |
381
+ | `unsupported` | `unsupported: true` | warn or reject by policy |
382
+ | `legacyUnsupported` | `legacyUnsupported: true` | grandfathered, must be resolved over time |
383
+ | `system` | system page path | excluded from support ratios |
384
+ | `stale` | lint freshness rule | warning until page is refreshed |
385
+
386
+ ## Implementation Plan
387
+
388
+ ### Phase 0 - Documentation Alignment
389
+
390
+ Status: mostly complete.
391
+
392
+ Deliverables:
393
+
394
+ - Make README describe OKF as the public format direction.
395
+ - Keep `docs/open-knowledge-format.md` as the format thesis.
396
+ - Add this adoption plan as the implementation bridge.
397
+
398
+ Acceptance criteria:
399
+
400
+ - README tells users why OKF matters in one screen.
401
+ - Documentation distinguishes OKF package manifest from runtime config.
402
+ - Documentation clearly states what is implemented now versus planned.
403
+
404
+ ### Phase 1 - Manifest And Schema
405
+
406
+ Status: implemented for OKF v0.1.
407
+
408
+ Goal: make an OKF package detectable and machine-checkable without changing
409
+ runtime behavior.
410
+
411
+ Deliverables:
412
+
413
+ - Add `schemas/agent-wiki-okf.schema.json`. Done.
414
+ - Add `agent-wiki.yaml` manifest support. Done.
415
+ - Add a manifest loader that validates:
416
+ - `format`
417
+ - `format_version`
418
+ - `name`
419
+ - `version`
420
+ - `license`
421
+ - `owner`
422
+ - source/wiki/evidence policies
423
+ - Add `wiki_admin action: "format-check"`. Done.
424
+
425
+ Acceptance criteria:
426
+
427
+ - A valid OKF fixture passes `format-check`. Covered by tests.
428
+ - Invalid manifest fields fail with actionable errors. Covered by tests.
429
+ - Existing users without `agent-wiki.yaml` continue to work. `format-check`
430
+ returns `ok: false` with issues instead of blocking normal wiki operations.
431
+ - `wiki_admin action: "lint"` remains backward compatible.
432
+
433
+ ### Phase 2 - Package Inventory And Conformance Report
434
+
435
+ Status: implemented as the first structured package report.
436
+
437
+ Goal: turn current evidence and coverage surfaces into a package-level report.
438
+
439
+ Deliverables:
440
+
441
+ - Generate a package inventory:
442
+ - raw file count and hash status. Done.
443
+ - wiki page count by class. Done.
444
+ - schema list. Done.
445
+ - generated index/cache list. Done.
446
+ - evidence report presence. Done.
447
+ - Add `okf-report.md` or structured `evidence/okf-report.json`. Done as
448
+ `evidence/okf-report.json`.
449
+ - Extend `wiki_admin action: "rebuild"` to optionally refresh OKF metadata. Done
450
+ with `okf_report: true`.
451
+
452
+ Acceptance criteria:
453
+
454
+ - Report can answer: "Is this knowledge package OKF v0.1 conformant?" Done via
455
+ `conformance.status`, `errorCount`, `warningCount`, and `infoCount`.
456
+ - Missing raw metadata, uncovered sources, unsupported pages, stale pages, and
457
+ unclassified frontmatter are surfaced as explicit findings.
458
+ - Generated caches do not become required for conformance. Done; vector index is
459
+ reported as optional cache presence.
460
+
461
+ ### Phase 3 - Evidence Export
462
+
463
+ Goal: separate portable evidence artifacts from local operational telemetry.
464
+
465
+ Deliverables:
466
+
467
+ - Add `evidence/source-coverage.json`.
468
+ - Add `evidence/page-classes.json`.
469
+ - Add `evidence/claim-provenance.json` as a best-effort first pass.
470
+ - Keep raw `.agent-wiki/*.jsonl` logs local by default.
471
+ - Add an explicit `include_logs` option for advanced exports.
472
+
473
+ Acceptance criteria:
474
+
475
+ - A package can be audited without reading private local logs.
476
+ - Evidence artifacts are deterministic across rebuilds when inputs are unchanged.
477
+ - Unsupported and stale pages are visible without parsing every Markdown file.
478
+
479
+ ### Phase 4 - Export And Import
480
+
481
+ Goal: make OKF portable across machines, agents, and MCP clients.
482
+
483
+ Deliverables:
484
+
485
+ - Add `agent-wiki export --format okf --out <dir-or-zip>`.
486
+ - Add `agent-wiki import --format okf <path>`.
487
+ - Add round-trip tests using a committed OKF fixture.
488
+ - Decide whether export preserves generated indexes or rebuilds them on import.
489
+
490
+ Acceptance criteria:
491
+
492
+ - Exported packages can be copied to another machine and inspected without a
493
+ running service.
494
+ - Import verifies raw hashes and package manifest before use.
495
+ - Optional vector indexes do not block import.
496
+
497
+ ### Phase 5 - Compatibility And Governance
498
+
499
+ Goal: make OKF stable enough for external users.
500
+
501
+ Deliverables:
502
+
503
+ - Publish OKF v0.1 compatibility rules.
504
+ - Add migration notes for future format versions.
505
+ - Add a conformance fixture suite.
506
+ - Add a public "OKF compliance level" table:
507
+ - basic: manifest + raw/wiki
508
+ - evidence-first: basic + evidence report + page classes
509
+ - compiler-grade: evidence-first + deterministic compiler artifacts
510
+
511
+ Acceptance criteria:
512
+
513
+ - Users can tell whether their package is valid.
514
+ - Future breaking changes require a documented migration.
515
+ - Third-party tools can validate OKF without running the full MCP server.
516
+
517
+ ## README Upgrade Direction
518
+
519
+ README should not become a long specification. It should carry the strategic
520
+ story:
521
+
522
+ 1. `agent-wiki` is not only an MCP wiki server.
523
+ 2. It is becoming the reference implementation for OKF.
524
+ 3. OKF means portable agent knowledge packages: raw evidence, compiled wiki,
525
+ schemas, indexes, evidence, and logs.
526
+ 4. Existing features already implement much of this.
527
+ 5. The detailed plan lives in this document.
528
+
529
+ Suggested README positioning:
530
+
531
+ > agent-wiki is also evolving into the reference implementation of Open
532
+ > Knowledge Format (OKF): a Git-native package format for agent-maintained
533
+ > knowledge with immutable sources, mutable compiled pages, evidence metadata,
534
+ > and machine-checkable governance.
535
+
536
+ ## Recommended Next Engineering Issue
537
+
538
+ Start with Phase 3.
539
+
540
+ Issue title:
541
+
542
+ > Export portable OKF evidence artifacts
543
+
544
+ Scope:
545
+
546
+ - generate `evidence/source-coverage.json`
547
+ - generate `evidence/page-classes.json`
548
+ - add a first `evidence/claim-provenance.json` pass from page frontmatter
549
+ - keep `.agent-wiki/*.jsonl` as local operational telemetry by default
550
+ - add an explicit export option if raw telemetry logs should be included
551
+
552
+ Why this first:
553
+
554
+ - Phase 2 now creates a package-level OKF report.
555
+ - Phase 3 splits that summary into portable evidence artifacts that other agents
556
+ can consume without parsing local telemetry logs.
557
+ - These artifacts are the natural bridge to Phase 4 export/import.
558
+ - It keeps privacy boundaries clear before package distribution is added.
559
+
560
+ ## References
561
+
562
+ - Open Definition 2.1: https://opendefinition.org/od/2.1/en/
563
+ - Open Knowledge Foundation: https://okfn.org/en/
564
+ - Data Commons paper: https://arxiv.org/abs/2309.13054
565
+ - Google Data Commons overview: https://research.google/pubs/data-commons/
566
+ - LLM-Wiki paper: https://arxiv.org/abs/2605.25480