@agent-wiki/mcp 0.17.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.
Files changed (217) hide show
  1. package/.claude-plugin/plugin.json +7 -0
  2. package/README.md +171 -0
  3. package/architecture.svg +58 -0
  4. package/dist/atlassian.d.ts +63 -0
  5. package/dist/atlassian.d.ts.map +1 -0
  6. package/dist/atlassian.js +596 -0
  7. package/dist/atlassian.js.map +1 -0
  8. package/dist/cli.d.ts +11 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +391 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/cobol/__tests__/call-boundary-lineage.test.d.ts +2 -0
  13. package/dist/cobol/__tests__/call-boundary-lineage.test.d.ts.map +1 -0
  14. package/dist/cobol/__tests__/call-boundary-lineage.test.js +505 -0
  15. package/dist/cobol/__tests__/call-boundary-lineage.test.js.map +1 -0
  16. package/dist/cobol/__tests__/code-analysis.test.d.ts +2 -0
  17. package/dist/cobol/__tests__/code-analysis.test.d.ts.map +1 -0
  18. package/dist/cobol/__tests__/code-analysis.test.js +465 -0
  19. package/dist/cobol/__tests__/code-analysis.test.js.map +1 -0
  20. package/dist/cobol/__tests__/db2-table-lineage.test.d.ts +2 -0
  21. package/dist/cobol/__tests__/db2-table-lineage.test.d.ts.map +1 -0
  22. package/dist/cobol/__tests__/db2-table-lineage.test.js +182 -0
  23. package/dist/cobol/__tests__/db2-table-lineage.test.js.map +1 -0
  24. package/dist/cobol/__tests__/evidence-mapping.test.d.ts +2 -0
  25. package/dist/cobol/__tests__/evidence-mapping.test.d.ts.map +1 -0
  26. package/dist/cobol/__tests__/evidence-mapping.test.js +49 -0
  27. package/dist/cobol/__tests__/evidence-mapping.test.js.map +1 -0
  28. package/dist/cobol/__tests__/extractors.test.d.ts +2 -0
  29. package/dist/cobol/__tests__/extractors.test.d.ts.map +1 -0
  30. package/dist/cobol/__tests__/extractors.test.js +189 -0
  31. package/dist/cobol/__tests__/extractors.test.js.map +1 -0
  32. package/dist/cobol/__tests__/field-lineage.test.d.ts +2 -0
  33. package/dist/cobol/__tests__/field-lineage.test.d.ts.map +1 -0
  34. package/dist/cobol/__tests__/field-lineage.test.js +329 -0
  35. package/dist/cobol/__tests__/field-lineage.test.js.map +1 -0
  36. package/dist/cobol/__tests__/graph.test.d.ts +2 -0
  37. package/dist/cobol/__tests__/graph.test.d.ts.map +1 -0
  38. package/dist/cobol/__tests__/graph.test.js +456 -0
  39. package/dist/cobol/__tests__/graph.test.js.map +1 -0
  40. package/dist/cobol/__tests__/integration.test.d.ts +2 -0
  41. package/dist/cobol/__tests__/integration.test.d.ts.map +1 -0
  42. package/dist/cobol/__tests__/integration.test.js +971 -0
  43. package/dist/cobol/__tests__/integration.test.js.map +1 -0
  44. package/dist/cobol/__tests__/lexer.test.d.ts +2 -0
  45. package/dist/cobol/__tests__/lexer.test.d.ts.map +1 -0
  46. package/dist/cobol/__tests__/lexer.test.js +111 -0
  47. package/dist/cobol/__tests__/lexer.test.js.map +1 -0
  48. package/dist/cobol/__tests__/parser.test.d.ts +2 -0
  49. package/dist/cobol/__tests__/parser.test.d.ts.map +1 -0
  50. package/dist/cobol/__tests__/parser.test.js +180 -0
  51. package/dist/cobol/__tests__/parser.test.js.map +1 -0
  52. package/dist/cobol/__tests__/variable-tracer.test.d.ts +2 -0
  53. package/dist/cobol/__tests__/variable-tracer.test.d.ts.map +1 -0
  54. package/dist/cobol/__tests__/variable-tracer.test.js +256 -0
  55. package/dist/cobol/__tests__/variable-tracer.test.js.map +1 -0
  56. package/dist/cobol/__tests__/wiki-gen.test.d.ts +2 -0
  57. package/dist/cobol/__tests__/wiki-gen.test.d.ts.map +1 -0
  58. package/dist/cobol/__tests__/wiki-gen.test.js +76 -0
  59. package/dist/cobol/__tests__/wiki-gen.test.js.map +1 -0
  60. package/dist/cobol/call-boundary-lineage.d.ts +49 -0
  61. package/dist/cobol/call-boundary-lineage.d.ts.map +1 -0
  62. package/dist/cobol/call-boundary-lineage.js +159 -0
  63. package/dist/cobol/call-boundary-lineage.js.map +1 -0
  64. package/dist/cobol/db2-table-lineage.d.ts +45 -0
  65. package/dist/cobol/db2-table-lineage.d.ts.map +1 -0
  66. package/dist/cobol/db2-table-lineage.js +127 -0
  67. package/dist/cobol/db2-table-lineage.js.map +1 -0
  68. package/dist/cobol/evidence-mapping.d.ts +31 -0
  69. package/dist/cobol/evidence-mapping.d.ts.map +1 -0
  70. package/dist/cobol/evidence-mapping.js +27 -0
  71. package/dist/cobol/evidence-mapping.js.map +1 -0
  72. package/dist/cobol/extractors.d.ts +88 -0
  73. package/dist/cobol/extractors.d.ts.map +1 -0
  74. package/dist/cobol/extractors.js +297 -0
  75. package/dist/cobol/extractors.js.map +1 -0
  76. package/dist/cobol/field-lineage.d.ts +101 -0
  77. package/dist/cobol/field-lineage.d.ts.map +1 -0
  78. package/dist/cobol/field-lineage.js +603 -0
  79. package/dist/cobol/field-lineage.js.map +1 -0
  80. package/dist/cobol/graph.d.ts +182 -0
  81. package/dist/cobol/graph.d.ts.map +1 -0
  82. package/dist/cobol/graph.js +453 -0
  83. package/dist/cobol/graph.js.map +1 -0
  84. package/dist/cobol/lexer.d.ts +15 -0
  85. package/dist/cobol/lexer.d.ts.map +1 -0
  86. package/dist/cobol/lexer.js +251 -0
  87. package/dist/cobol/lexer.js.map +1 -0
  88. package/dist/cobol/parser.d.ts +13 -0
  89. package/dist/cobol/parser.d.ts.map +1 -0
  90. package/dist/cobol/parser.js +584 -0
  91. package/dist/cobol/parser.js.map +1 -0
  92. package/dist/cobol/plugin.d.ts +23 -0
  93. package/dist/cobol/plugin.d.ts.map +1 -0
  94. package/dist/cobol/plugin.js +507 -0
  95. package/dist/cobol/plugin.js.map +1 -0
  96. package/dist/cobol/types.d.ts +73 -0
  97. package/dist/cobol/types.d.ts.map +1 -0
  98. package/dist/cobol/types.js +9 -0
  99. package/dist/cobol/types.js.map +1 -0
  100. package/dist/cobol/variable-tracer.d.ts +31 -0
  101. package/dist/cobol/variable-tracer.d.ts.map +1 -0
  102. package/dist/cobol/variable-tracer.js +361 -0
  103. package/dist/cobol/variable-tracer.js.map +1 -0
  104. package/dist/cobol/wiki-gen.d.ts +18 -0
  105. package/dist/cobol/wiki-gen.d.ts.map +1 -0
  106. package/dist/cobol/wiki-gen.js +222 -0
  107. package/dist/cobol/wiki-gen.js.map +1 -0
  108. package/dist/code-analysis.d.ts +160 -0
  109. package/dist/code-analysis.d.ts.map +1 -0
  110. package/dist/code-analysis.js +53 -0
  111. package/dist/code-analysis.js.map +1 -0
  112. package/dist/evidence-search.d.ts +43 -0
  113. package/dist/evidence-search.d.ts.map +1 -0
  114. package/dist/evidence-search.js +112 -0
  115. package/dist/evidence-search.js.map +1 -0
  116. package/dist/evidence-search.test.d.ts +2 -0
  117. package/dist/evidence-search.test.d.ts.map +1 -0
  118. package/dist/evidence-search.test.js +98 -0
  119. package/dist/evidence-search.test.js.map +1 -0
  120. package/dist/evidence.d.ts +32 -0
  121. package/dist/evidence.d.ts.map +1 -0
  122. package/dist/evidence.js +16 -0
  123. package/dist/evidence.js.map +1 -0
  124. package/dist/evidence.test.d.ts +2 -0
  125. package/dist/evidence.test.d.ts.map +1 -0
  126. package/dist/evidence.test.js +51 -0
  127. package/dist/evidence.test.js.map +1 -0
  128. package/dist/extraction.d.ts +40 -0
  129. package/dist/extraction.d.ts.map +1 -0
  130. package/dist/extraction.js +283 -0
  131. package/dist/extraction.js.map +1 -0
  132. package/dist/extraction.test.d.ts +5 -0
  133. package/dist/extraction.test.d.ts.map +1 -0
  134. package/dist/extraction.test.js +137 -0
  135. package/dist/extraction.test.js.map +1 -0
  136. package/dist/index.d.ts +38 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.js +35 -0
  139. package/dist/index.js.map +1 -0
  140. package/dist/queue.d.ts +52 -0
  141. package/dist/queue.d.ts.map +1 -0
  142. package/dist/queue.js +139 -0
  143. package/dist/queue.js.map +1 -0
  144. package/dist/queue.test.d.ts +2 -0
  145. package/dist/queue.test.d.ts.map +1 -0
  146. package/dist/queue.test.js +161 -0
  147. package/dist/queue.test.js.map +1 -0
  148. package/dist/search.d.ts +163 -0
  149. package/dist/search.d.ts.map +1 -0
  150. package/dist/search.js +653 -0
  151. package/dist/search.js.map +1 -0
  152. package/dist/search.test.d.ts +6 -0
  153. package/dist/search.test.d.ts.map +1 -0
  154. package/dist/search.test.js +551 -0
  155. package/dist/search.test.js.map +1 -0
  156. package/dist/server.d.ts +33 -0
  157. package/dist/server.d.ts.map +1 -0
  158. package/dist/server.js +2530 -0
  159. package/dist/server.js.map +1 -0
  160. package/dist/server.test.d.ts +8 -0
  161. package/dist/server.test.d.ts.map +1 -0
  162. package/dist/server.test.js +2397 -0
  163. package/dist/server.test.js.map +1 -0
  164. package/dist/version.d.ts +2 -0
  165. package/dist/version.d.ts.map +1 -0
  166. package/dist/version.js +5 -0
  167. package/dist/version.js.map +1 -0
  168. package/dist/wiki.d.ts +496 -0
  169. package/dist/wiki.d.ts.map +1 -0
  170. package/dist/wiki.js +2677 -0
  171. package/dist/wiki.js.map +1 -0
  172. package/dist/wiki.test.d.ts +8 -0
  173. package/dist/wiki.test.d.ts.map +1 -0
  174. package/dist/wiki.test.js +1881 -0
  175. package/dist/wiki.test.js.map +1 -0
  176. package/docs/code-analysis-plugins.md +169 -0
  177. package/docs/configuration.md +135 -0
  178. package/docs/diagrams/cobol-analysis-flow.png +0 -0
  179. package/docs/diagrams/cobol-analysis-flow.svg +156 -0
  180. package/docs/evidence-envelope.md +176 -0
  181. package/docs/graph-1.gif +0 -0
  182. package/docs/legacy-code-knowledge-compiler-prd.md +511 -0
  183. package/docs/product-direction.md +120 -0
  184. package/docs/request-optimization.md +201 -0
  185. package/docs/search.md +266 -0
  186. package/docs/tools.md +269 -0
  187. package/graph-viewer/dist/cli.d.ts +3 -0
  188. package/graph-viewer/dist/cli.d.ts.map +1 -0
  189. package/graph-viewer/dist/cli.js +97 -0
  190. package/graph-viewer/dist/cli.js.map +1 -0
  191. package/graph-viewer/dist/graph.d.ts +14 -0
  192. package/graph-viewer/dist/graph.d.ts.map +1 -0
  193. package/graph-viewer/dist/graph.js +96 -0
  194. package/graph-viewer/dist/graph.js.map +1 -0
  195. package/graph-viewer/dist/index.d.ts +6 -0
  196. package/graph-viewer/dist/index.d.ts.map +1 -0
  197. package/graph-viewer/dist/index.js +4 -0
  198. package/graph-viewer/dist/index.js.map +1 -0
  199. package/graph-viewer/dist/parse.d.ts +10 -0
  200. package/graph-viewer/dist/parse.d.ts.map +1 -0
  201. package/graph-viewer/dist/parse.js +62 -0
  202. package/graph-viewer/dist/parse.js.map +1 -0
  203. package/graph-viewer/dist/server.d.ts +15 -0
  204. package/graph-viewer/dist/server.d.ts.map +1 -0
  205. package/graph-viewer/dist/server.js +168 -0
  206. package/graph-viewer/dist/server.js.map +1 -0
  207. package/graph-viewer/dist/types.d.ts +48 -0
  208. package/graph-viewer/dist/types.d.ts.map +1 -0
  209. package/graph-viewer/dist/types.js +2 -0
  210. package/graph-viewer/dist/types.js.map +1 -0
  211. package/graph-viewer/public/app.js +525 -0
  212. package/graph-viewer/public/index.html +68 -0
  213. package/graph-viewer/public/style.css +68 -0
  214. package/package.json +73 -0
  215. package/skills/aceclaw/SKILL.md +173 -0
  216. package/skills/agent-wiki/SKILL.md +184 -0
  217. package/skills/agent-wiki/references/tools-reference.md +368 -0
@@ -0,0 +1,156 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif">
2
+ <defs>
3
+ <marker id="arr-blue" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#2563eb"/></marker>
4
+ <marker id="arr-cyan" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#0891b2"/></marker>
5
+ <marker id="arr-green" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#059669"/></marker>
6
+ <marker id="arr-purple" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#7c3aed"/></marker>
7
+ <marker id="arr-orange" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#ea580c"/></marker>
8
+ <marker id="arr-gray" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#6b7280"/></marker>
9
+ <marker id="arr-data" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#b45309"/></marker>
10
+ <filter id="shadow" x="-10%" y="-10%" width="120%" height="130%"><feDropShadow dx="0" dy="1" stdDeviation="1.2" flood-color="#000" flood-opacity="0.10"/></filter>
11
+ </defs>
12
+ <rect width="1600" height="1100" fill="#ffffff"/>
13
+ <text x="800" y="36" text-anchor="middle" font-size="22" font-weight="700" fill="#111827">How agent-wiki analyzes COBOL files</text>
14
+ <text x="800" y="60" text-anchor="middle" font-size="13" fill="#6b7280">code_parse pipeline · per-file artifacts · cross-file aggregation</text>
15
+ <rect x="40" y="80" width="1520" height="340" rx="12" fill="#fafafa" stroke="#d1d5db" stroke-width="1" stroke-dasharray="6,3"/>
16
+ <text x="60" y="104" font-size="14" font-weight="700" fill="#111827">1 · Single-file processing — cobolPlugin (src/cobol/plugin.ts)</text>
17
+ <rect x="80" y="130" width="200" height="70" rx="14" fill="#dbeafe" stroke="#2563eb" stroke-width="1.5" filter="url(#shadow)"/>
18
+ <text x="180.0" y="159.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">MCP: code_parse</text>
19
+ <text x="180.0" y="178.0" text-anchor="middle" font-size="11" fill="#374151">args.path</text>
20
+ <rect x="305" y="130" width="190" height="70" rx="4" fill="#dbeafe" stroke="#2563eb" stroke-width="1.5" filter="url(#shadow)"/>
21
+ <text x="400.0" y="159.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">getPluginForFile</text>
22
+ <text x="400.0" y="178.0" text-anchor="middle" font-size="11" fill="#374151">→ cobolPlugin</text>
23
+ <rect x="520" y="130" width="180" height="70" rx="4" fill="#dbeafe" stroke="#2563eb" stroke-width="1.5" filter="url(#shadow)"/>
24
+ <text x="610.0" y="159.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki.rawRead(path)</text>
25
+ <text x="610.0" y="178.0" text-anchor="middle" font-size="11" fill="#374151">raw/&lt;file&gt;</text>
26
+ <rect x="725" y="130" width="170" height="70" rx="4" fill="#cffafe" stroke="#0891b2" stroke-width="1.5" filter="url(#shadow)"/>
27
+ <text x="810.0" y="159.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">lexer.ts</text>
28
+ <text x="810.0" y="178.0" text-anchor="middle" font-size="11" fill="#374151">tokenize</text>
29
+ <rect x="920" y="130" width="170" height="70" rx="4" fill="#cffafe" stroke="#0891b2" stroke-width="1.5" filter="url(#shadow)"/>
30
+ <text x="1005.0" y="159.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">parser.ts</text>
31
+ <text x="1005.0" y="178.0" text-anchor="middle" font-size="11" fill="#374151">parse</text>
32
+ <polygon points="1125,130 1315,130 1305,200 1115,200" fill="#fef3c7" stroke="#b45309" stroke-width="1.5" filter="url(#shadow)"/>
33
+ <text x="1215.0" y="161.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">CobolAST</text>
34
+ <text x="1215.0" y="179.0" text-anchor="middle" font-size="11" fill="#374151">AST nodes</text>
35
+ <line x1="282" y1="165.0" x2="301" y2="165.0" stroke="#2563eb" stroke-width="2" marker-end="url(#arr-blue)"/>
36
+ <line x1="497" y1="165.0" x2="516" y2="165.0" stroke="#2563eb" stroke-width="2" marker-end="url(#arr-blue)"/>
37
+ <line x1="702" y1="165.0" x2="721" y2="165.0" stroke="#0891b2" stroke-width="2" marker-end="url(#arr-cyan)"/>
38
+ <line x1="897" y1="165.0" x2="916" y2="165.0" stroke="#0891b2" stroke-width="2" marker-end="url(#arr-cyan)"/>
39
+ <line x1="1092" y1="165.0" x2="1111" y2="165.0" stroke="#b45309" stroke-width="2" marker-end="url(#arr-data)"/>
40
+ <rect x="80" y="280" width="210" height="80" rx="4" fill="#cffafe" stroke="#0891b2" stroke-width="1.5" filter="url(#shadow)"/>
41
+ <text x="185.0" y="314.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">extractors.ts</text>
42
+ <text x="185.0" y="333.0" text-anchor="middle" font-size="11" fill="#374151">extractModel(ast)</text>
43
+ <polygon points="327,280 595,280 583,360 315,360" fill="#fef3c7" stroke="#b45309" stroke-width="1.5" filter="url(#shadow)"/>
44
+ <text x="455.0" y="302" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">CobolCodeModel</text>
45
+ <text x="455.0" y="322" text-anchor="middle" font-size="10" fill="#374151">sections · paragraphs · data items</text>
46
+ <text x="455.0" y="337" text-anchor="middle" font-size="10" fill="#374151">CALL · PERFORM · COPY · EXEC SQL/CICS · file-access</text>
47
+ <text x="455.0" y="352" text-anchor="middle" font-size="10" fill="#374151">db2-table refs · cics refs</text>
48
+ <rect x="620" y="280" width="330" height="80" rx="4" fill="#cffafe" stroke="#0891b2" stroke-width="1.5" filter="url(#shadow)"/>
49
+ <text x="785.0" y="325.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">cobolToNormalized</text>
50
+ <text x="785.0" y="302" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">cobolToNormalized</text>
51
+ <text x="785.0" y="322" text-anchor="middle" font-size="10" fill="#374151">+ extractDataflowEdges</text>
52
+ <text x="785.0" y="337" text-anchor="middle" font-size="10" fill="#374151">+ extractCallEdges</text>
53
+ <text x="785.0" y="352" text-anchor="middle" font-size="10" fill="#374151">(variable-tracer.ts)</text>
54
+ <polygon points="985,280 1215,280 1205,360 975,360" fill="#fef3c7" stroke="#b45309" stroke-width="1.5" filter="url(#shadow)"/>
55
+ <text x="1095.0" y="316.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">NormalizedCodeModel</text>
56
+ <text x="1095.0" y="334.0" text-anchor="middle" font-size="11" fill="#374151">units · procedures · symbols · relations</text>
57
+ <rect x="1240" y="280" width="280" height="80" rx="4" fill="#d1fae5" stroke="#059669" stroke-width="1.5" filter="url(#shadow)"/>
58
+ <text x="1380.0" y="325.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki-gen.ts</text>
59
+ <text x="1380.0" y="304" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki-gen.ts</text>
60
+ <text x="1380.0" y="324" text-anchor="middle" font-size="11" fill="#374151">generateProgramPage</text>
61
+ <text x="1380.0" y="340" text-anchor="middle" font-size="11" fill="#374151">generateCopybookPage</text>
62
+ <line x1="292" y1="320.0" x2="311" y2="320.0" stroke="#b45309" stroke-width="2" marker-end="url(#arr-data)"/>
63
+ <line x1="597" y1="320.0" x2="616" y2="320.0" stroke="#0891b2" stroke-width="2" marker-end="url(#arr-cyan)"/>
64
+ <line x1="952" y1="320.0" x2="971" y2="320.0" stroke="#b45309" stroke-width="2" marker-end="url(#arr-data)"/>
65
+ <line x1="1217" y1="320.0" x2="1236" y2="320.0" stroke="#059669" stroke-width="2" marker-end="url(#arr-green)"/>
66
+ <path d="M 1315,165.0 L 1530,165.0 L 1530,250 L 185,250 L 185,276" fill="none" stroke="#0891b2" stroke-width="2" marker-end="url(#arr-cyan)"/>
67
+ <text x="900" y="240" text-anchor="middle" font-size="11" font-weight="400" fill="#6b7280">feed AST into extractor</text>
68
+ <rect x="40" y="440" width="1520" height="200" rx="12" fill="#fafafa" stroke="#d1d5db" stroke-width="1" stroke-dasharray="6,3"/>
69
+ <text x="60" y="464" font-size="14" font-weight="700" fill="#111827">2 · Persistence — raw/parsed/cobol/&lt;stem&gt;.* + wiki page</text>
70
+ <path d="M 115,498 V 572 A 100.0,8 0 0 0 315,572 V 498 A 100.0,8 0 0 0 115,498 Z" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.5" filter="url(#shadow)"/>
71
+ <ellipse cx="215.0" cy="498" rx="100.0" ry="8" fill="#ffffff" stroke="#6b7280" stroke-width="1.5"/>
72
+ <text x="215.0" y="536.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">.ast.json</text>
73
+ <text x="215.0" y="552.0" text-anchor="middle" font-size="11" fill="#374151">raw COBOL AST</text>
74
+ <path d="M 340,498 V 572 A 110.0,8 0 0 0 560,572 V 498 A 110.0,8 0 0 0 340,498 Z" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.5" filter="url(#shadow)"/>
75
+ <ellipse cx="450.0" cy="498" rx="110.0" ry="8" fill="#ffffff" stroke="#6b7280" stroke-width="1.5"/>
76
+ <text x="450.0" y="536.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">.normalized.json</text>
77
+ <text x="450.0" y="552.0" text-anchor="middle" font-size="11" fill="#374151">language-agnostic</text>
78
+ <path d="M 585,498 V 572 A 100.0,8 0 0 0 785,572 V 498 A 100.0,8 0 0 0 585,498 Z" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.5" filter="url(#shadow)"/>
79
+ <ellipse cx="685.0" cy="498" rx="100.0" ry="8" fill="#ffffff" stroke="#6b7280" stroke-width="1.5"/>
80
+ <text x="685.0" y="536.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">.summary.json</text>
81
+ <text x="685.0" y="552.0" text-anchor="middle" font-size="11" fill="#374151">counts per relation type</text>
82
+ <path d="M 810,498 V 572 A 110.0,8 0 0 0 1030,572 V 498 A 110.0,8 0 0 0 810,498 Z" fill="#fde68a" stroke="#b45309" stroke-width="1.5" filter="url(#shadow)"/>
83
+ <ellipse cx="920.0" cy="498" rx="110.0" ry="8" fill="#ffffff" stroke="#b45309" stroke-width="1.5"/>
84
+ <text x="920.0" y="536.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">.model.json</text>
85
+ <text x="920.0" y="552.0" text-anchor="middle" font-size="11" fill="#374151">COBOL-specific (drives §3)</text>
86
+ <path d="M 1080,490 H 1446 L 1460,504 V 580 H 1080 Z" fill="#d1fae5" stroke="#059669" stroke-width="1.5" filter="url(#shadow)"/>
87
+ <path d="M 1446,490 V 504 H 1460" fill="none" stroke="#059669" stroke-width="1.5"/>
88
+ <text x="1270.0" y="533.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki: cobol/&lt;stem&gt;.md</text>
89
+ <text x="1270.0" y="549.0" text-anchor="middle" font-size="11" fill="#374151">program page or copybook page</text>
90
+ <rect x="830" y="416" width="140" height="18" rx="4" fill="#fafafa" opacity="0.95"/>
91
+ <text x="900" y="429" text-anchor="middle" font-size="11" font-weight="600" fill="#6b7280">writes (rawAddParsedArtifact)</text>
92
+ <circle cx="900" cy="425" r="4" fill="#6b7280"/>
93
+ <path d="M 900,425 C 900,465 215.0,455 215.0,486" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#arr-gray)"/>
94
+ <path d="M 900,425 C 900,465 450.0,455 450.0,486" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#arr-gray)"/>
95
+ <path d="M 900,425 C 900,465 685.0,455 685.0,486" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#arr-gray)"/>
96
+ <path d="M 900,425 C 900,465 920.0,455 920.0,486" fill="none" stroke="#6b7280" stroke-width="1.5" marker-end="url(#arr-gray)"/>
97
+ <path d="M 900,425 C 900,465 1270.0,455 1270.0,486" fill="none" stroke="#059669" stroke-width="1.5" marker-end="url(#arr-green)"/>
98
+ <rect x="40" y="660" width="1520" height="390" rx="12" fill="#fafafa" stroke="#d1d5db" stroke-width="1" stroke-dasharray="6,3"/>
99
+ <text x="60" y="684" font-size="14" font-weight="700" fill="#111827">3 · Cross-file aggregation — scans raw/parsed/cobol/*.model.json after every code_parse</text>
100
+ <path d="M 920.0,582 V 694" fill="none" stroke="#7c3aed" stroke-width="2" marker-end="url(#arr-purple)"/>
101
+ <rect x="890.0" y="594" width="60" height="16" rx="3" fill="#fafafa" opacity="0.95"/>
102
+ <text x="920.0" y="606" text-anchor="middle" font-size="10" font-weight="600" fill="#7c3aed">trigger</text>
103
+ <rect x="120" y="700" width="1360" height="38" rx="6" fill="#f5f3ff" stroke="#a78bfa" stroke-width="1.5"/>
104
+ <text x="800" y="724" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">loadCobolModels(parsedDir) — read every *.model.json (sorted)</text>
105
+ <rect x="80" y="748" width="420" height="70" rx="6" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.5" filter="url(#shadow)"/>
106
+ <text x="290.0" y="777.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">rebuildAggregatePages</text>
107
+ <text x="290.0" y="796.0" text-anchor="middle" font-size="11" fill="#374151">wiki-gen.ts: generateCallGraphPage</text>
108
+ <line x1="290.0" y1="820" x2="290.0" y2="898" stroke="#7c3aed" stroke-width="1.7" marker-end="url(#arr-purple)"/>
109
+ <path d="M 120,898 H 446 L 460,912 V 988 H 120 Z" fill="#d1fae5" stroke="#059669" stroke-width="1.5" filter="url(#shadow)"/>
110
+ <path d="M 446,898 V 912 H 460" fill="none" stroke="#059669" stroke-width="1.5"/>
111
+ <text x="290.0" y="941.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki: cobol/call-graph.md</text>
112
+ <text x="290.0" y="957.0" text-anchor="middle" font-size="11" fill="#374151">global PERFORM/CALL graph</text>
113
+ <rect x="540" y="748" width="510" height="70" rx="6" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.5" filter="url(#shadow)"/>
114
+ <text x="795.0" y="777.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">buildKnowledgeGraph</text>
115
+ <text x="795.0" y="796.0" text-anchor="middle" font-size="11" fill="#374151">graph.ts: KnowledgeGraphBuilder + populateGraphFromCobol → serializeGraph</text>
116
+ <path d="M 565,906 V 980 A 100.0,8 0 0 0 765,980 V 906 A 100.0,8 0 0 0 565,906 Z" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.5" filter="url(#shadow)"/>
117
+ <ellipse cx="665.0" cy="906" rx="100.0" ry="8" fill="#ffffff" stroke="#6b7280" stroke-width="1.5"/>
118
+ <text x="665.0" y="944.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">knowledge-graph.json</text>
119
+ <text x="665.0" y="960.0" text-anchor="middle" font-size="11" fill="#374151">nodes · edges · diagnostics</text>
120
+ <path d="M 800,898 H 1026 L 1040,912 V 988 H 800 Z" fill="#d1fae5" stroke="#059669" stroke-width="1.5" filter="url(#shadow)"/>
121
+ <path d="M 1026,898 V 912 H 1040" fill="none" stroke="#059669" stroke-width="1.5"/>
122
+ <text x="920.0" y="941.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki: cobol/system-map.md</text>
123
+ <text x="920.0" y="957.0" text-anchor="middle" font-size="11" fill="#374151">Programs/Copybooks/Datasets</text>
124
+ <path d="M 795.0,820 V 853 H 665.0 V 894" fill="none" stroke="#7c3aed" stroke-width="1.7" marker-end="url(#arr-purple)"/>
125
+ <path d="M 795.0,853 H 920.0 V 894" fill="none" stroke="#7c3aed" stroke-width="1.7" marker-end="url(#arr-purple)"/>
126
+ <rect x="1090" y="748" width="450" height="70" rx="6" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.5" filter="url(#shadow)"/>
127
+ <text x="1315.0" y="777.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">buildDerivedArtifacts</text>
128
+ <text x="1315.0" y="796.0" text-anchor="middle" font-size="11" fill="#374151">field-lineage.ts: buildFieldLineage</text>
129
+ <path d="M 1100,906 V 980 A 100.0,8 0 0 0 1300,980 V 906 A 100.0,8 0 0 0 1100,906 Z" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.5" filter="url(#shadow)"/>
130
+ <ellipse cx="1200.0" cy="906" rx="100.0" ry="8" fill="#ffffff" stroke="#6b7280" stroke-width="1.5"/>
131
+ <text x="1200.0" y="944.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">field-lineage.json</text>
132
+ <text x="1200.0" y="960.0" text-anchor="middle" font-size="11" fill="#374151">shared / inferred lineage</text>
133
+ <path d="M 1325,898 H 1526 L 1540,912 V 988 H 1325 Z" fill="#d1fae5" stroke="#059669" stroke-width="1.5" filter="url(#shadow)"/>
134
+ <path d="M 1526,898 V 912 H 1540" fill="none" stroke="#059669" stroke-width="1.5"/>
135
+ <text x="1432.5" y="941.0" text-anchor="middle" font-size="13" font-weight="700" fill="#111827">wiki: cobol/field-lineage.md</text>
136
+ <text x="1432.5" y="957.0" text-anchor="middle" font-size="11" fill="#374151">field-level cross-file index</text>
137
+ <path d="M 1315.0,820 V 853 H 1200.0 V 894" fill="none" stroke="#7c3aed" stroke-width="1.7" marker-end="url(#arr-purple)"/>
138
+ <path d="M 1315.0,853 H 1432.5 V 894" fill="none" stroke="#7c3aed" stroke-width="1.7" marker-end="url(#arr-purple)"/>
139
+ <rect x="880" y="1060" width="680" height="32" rx="6" fill="#ffedd5" stroke="#ea580c" stroke-width="1.4" stroke-dasharray="6,3"/>
140
+ <text x="894" y="1081" font-size="12" font-weight="600" fill="#111827">Optional · MCP code_trace_variable(path, variable) → cobolPlugin.traceVariable → variable-tracer.ts</text>
141
+ <rect x="60" y="1060" width="800" height="32" rx="6" fill="#ffffff" stroke="#e5e7eb" stroke-width="1"/>
142
+ <rect x="74" y="1071" width="14" height="11" rx="2" fill="#dbeafe" stroke="#2563eb" stroke-width="1.2"/>
143
+ <text x="93" y="1081" font-size="11" fill="#111827">entry</text>
144
+ <rect x="140.5" y="1071" width="14" height="11" rx="2" fill="#cffafe" stroke="#0891b2" stroke-width="1.2"/>
145
+ <text x="159.5" y="1081" font-size="11" fill="#111827">parse / normalize</text>
146
+ <rect x="287.4" y="1071" width="14" height="11" rx="2" fill="#fef3c7" stroke="#b45309" stroke-width="1.2"/>
147
+ <text x="306.4" y="1081" font-size="11" fill="#111827">intermediate model</text>
148
+ <rect x="441.0" y="1071" width="14" height="11" rx="2" fill="#d1fae5" stroke="#059669" stroke-width="1.2"/>
149
+ <text x="460.0" y="1081" font-size="11" fill="#111827">wiki page</text>
150
+ <rect x="534.3" y="1071" width="14" height="11" rx="2" fill="#f3f4f6" stroke="#6b7280" stroke-width="1.2"/>
151
+ <text x="553.3" y="1081" font-size="11" fill="#111827">JSON artifact</text>
152
+ <rect x="654.4" y="1071" width="14" height="11" rx="2" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.2"/>
153
+ <text x="673.4" y="1081" font-size="11" fill="#111827">aggregation</text>
154
+ <rect x="761.1" y="1071" width="14" height="11" rx="2" fill="#ffedd5" stroke="#ea580c" stroke-width="1.2"/>
155
+ <text x="780.1" y="1081" font-size="11" fill="#111827">optional</text>
156
+ </svg>
@@ -0,0 +1,176 @@
1
+ # Evidence Envelope
2
+
3
+ **Status: Phase 0 design — interface and spec only, no consumers yet.**
4
+
5
+ agent-wiki has accumulated many evidence-like features (raw provenance, frontmatter `sources`, COBOL lineage confidence tiers, graph edge evidence, lint, `raw_coverage`), but each tool exposes them differently. Agents using one tool's output have no reliable way to ask "is this match strong enough to act on?" The envelope is a unified contract every retrieval / query tool will adopt across the evidence-first program (#78).
6
+
7
+ This document fixes the contract and the migration plan **before** any tool starts emitting envelopes. Phase 1+ implements; Phase 0 only specifies.
8
+
9
+ ## The shape
10
+
11
+ ```ts
12
+ export interface EvidenceEnvelope {
13
+ /**
14
+ * Pointers back to the underlying source(s). Empty array means the
15
+ * basis is "synthesized" or "unsupported" — there is no source to cite.
16
+ */
17
+ provenance: Array<{
18
+ raw?: string; // path under raw/ (e.g., "raw/PAYROLL.cbl")
19
+ wikiPage?: string; // path under wiki/ (e.g., "wiki/cobol/PAYROLL.md")
20
+ line?: number; // 1-based line number when applicable
21
+ }>;
22
+
23
+ /**
24
+ * Coarse confidence the consumer can branch on without parsing details.
25
+ * - "strong": back this with action
26
+ * - "weak": surface but verify before action
27
+ * - "absent": do not rely on this without seeking other evidence
28
+ */
29
+ confidence: "strong" | "weak" | "absent";
30
+
31
+ /**
32
+ * What kind of evidence backs this result.
33
+ * - "deterministic": parsed from raw source; round-trippable
34
+ * - "inferred": pattern / structural inference, not a direct quote
35
+ * - "synthesized": compiled / aggregated from multiple sources
36
+ * - "unsupported": no evidence beyond agent assertion
37
+ */
38
+ basis: "deterministic" | "inferred" | "synthesized" | "unsupported";
39
+
40
+ /**
41
+ * Recommendation: caller should not rely on this without further
42
+ * verification. Consumers should treat `abstain: true` like a
43
+ * "no answer above threshold" signal and not paper over it.
44
+ */
45
+ abstain: boolean;
46
+
47
+ /**
48
+ * Human-readable explanation of the values above. Surfaced in wiki
49
+ * renders and tool responses. Keep short (one sentence ideal).
50
+ */
51
+ rationale: string;
52
+ }
53
+ ```
54
+
55
+ The shape is **purely additive**. Tools that don't yet emit envelopes are unchanged. Tools that adopt it return `evidence: EvidenceEnvelope` alongside their existing fields.
56
+
57
+ ## Confidence derivation by access path (Caveat 5)
58
+
59
+ The envelope's `confidence` field has **the same semantics** across tools, but the inputs that drive it differ. Phase 1+ implementations follow this table.
60
+
61
+ | Path | Confidence source |
62
+ |------------------------------------|------------------------------------------------------------------------------------|
63
+ | `wiki_search` match list | BM25 score relative to corpus distribution + absolute floor (Caveat 2) |
64
+ | `wiki_search_read` (search-and-read) | inherits the search match's confidence, downgraded if the page itself has weak metadata (no sources, stale) |
65
+ | `wiki_read("explicit/path.md")` | only the page's own metadata (sources count, `synthesis` flag, last edit time) |
66
+ | `code_query field_lineage` | maps from the lineage entry's tier (Caveat 3) |
67
+ | `code_query impact` | per-edge: `deterministic` from graph evidence; lower-confidence-path → weak |
68
+ | `code_query trace_variable` | strong when the variable resolves; weak when only loose name match |
69
+
70
+ ## Lineage-tier ↔ envelope mapping (Caveat 3)
71
+
72
+ The envelope is **strictly language-agnostic**. `src/evidence.ts` only declares the envelope shape and primitive types. **Each plugin owns its own domain-tier-to-envelope mapping** under `src/<plugin>/`. The core module never imports plugin types.
73
+
74
+ When a future plugin (Java, Python, etc.) joins, it adds:
75
+
76
+ 1. Its own tier type union under `src/<plugin>/`
77
+ 2. Its own mapping function (e.g., `javaTierToEvidence`)
78
+ 3. Its own test file pinning the mapping
79
+ 4. A short addendum to this section of the doc
80
+
81
+ The COBOL mapping below is the **reference example** other plugins follow.
82
+
83
+ ### COBOL reference mapping
84
+
85
+ COBOL lineage builders emit five domain-level tiers. The envelope's coarser `confidence`/`basis` fields are **derived** from the tier — the tier is the authoritative semantic label and stays in the JSON artifact alongside the envelope.
86
+
87
+ Implementation: `src/cobol/evidence-mapping.ts` (`cobolTierToEvidence`).
88
+
89
+ | Lineage tier (existing) | Envelope `confidence` | Envelope `basis` |
90
+ |----------------------------|-----------------------|------------------|
91
+ | `deterministic` | `strong` | `deterministic` |
92
+ | `high` | `weak` | `inferred` |
93
+ | `ambiguous` | `absent` | `inferred` |
94
+ | `inferredHighConfidence` | `weak` | `inferred` |
95
+ | `inferredAmbiguous` | `absent` | `inferred` |
96
+
97
+ This is one-way: the envelope is computed from the tier; the tier is not reconstructed from the envelope. Future COBOL lineage families (e.g., dataset-mediated, column-level DB2) extend the tier table; the envelope mapping is mechanical.
98
+
99
+ ## Abstain rule (Caveat 2)
100
+
101
+ For `wiki_search`, the abstain decision uses an absolute floor on the top1 BM25 score. If `top1 < 2.0`, the envelope sets `abstain: true`, `confidence: "absent"`, and clears `provenance` so callers do not treat the weak hits as supporting evidence.
102
+
103
+ The original design also called for a relative cutoff — BM25 score below the corpus 30th percentile — recomputed during `wiki_admin rebuild`. That part was dropped during Phase 1 implementation: any cold-start sampling we could plausibly do (page titles as queries) measures best-case retrieval, not typical-query strength, and over-flags real queries as abstain. A real percentile cutoff requires actual user query logs; until those exist, the absolute floor is the only honest signal.
104
+
105
+ Phase 1 confidence derivations:
106
+
107
+ - top1 score `≥ 2 ×` top2 score → `confidence: "strong"` (clear winner)
108
+ - top1 within `2 ×` top2 score → `confidence: "weak"` (multiple plausible matches; consumer should read several)
109
+ - top1 below absolute floor (`< 2.0`) → `confidence: "absent"`, `abstain: true`
110
+ - 0 results → existing `knowledge_gap` response, plus envelope with `abstain: true`, `basis: "unsupported"`
111
+
112
+ The 2.0 floor was calibrated by inspection on the bundled fixtures; revisit when corpus characteristics change. If `wiki_admin` ever starts logging real queries (Phase 4 dashboard candidate), a percentile cutoff can be reintroduced — informed by typical-query data rather than self-search noise.
113
+
114
+ ## Unsupported-write telemetry (Caveat 1)
115
+
116
+ Phase 2a surfaces "this page has no sources" without rejecting the write. To make Phase 2b's hard-rejection threshold data-driven rather than guessed, 2a must record:
117
+
118
+ ```ts
119
+ interface UnsupportedWriteEvent {
120
+ page: string; // e.g., "concept-foo.md"
121
+ timestamp: string; // ISO 8601
122
+ agentHint?: string; // tool caller identity if available
123
+ hadSynthesisFlag: boolean; // did the writer set synthesis: true?
124
+ rawSourcesCount: number; // sources[] length
125
+ }
126
+ ```
127
+
128
+ **Storage**: append-only JSONL at `.agent-wiki/evidence-write-log.jsonl` (already-ignored `.agent-wiki/` namespace). Rotation policy: cap at 10 MB / 30 days, whichever first; `wiki_admin lint` truncates.
129
+
130
+ **Aggregation**: Phase 4 dashboard reads this log. Until 4 ships, `wiki_admin rebuild` emits a one-line summary into `wiki/log.md` ("last week: 12 unsupported writes, 3 synthesis-flagged, 0 grounded").
131
+
132
+ Without this hook in Phase 2a, Phase 2b is guesswork. Including it now means the data is collected from day one.
133
+
134
+ ## Synthesis-page grandfather migration (Caveat 4)
135
+
136
+ Day-1 of Phase 2a, every existing compiler-generated wiki page (`wiki/cobol/system-map.md`, `field-lineage.md`, `call-graph.md`, etc.) would register as "unsupported" — flooding the signal with false positives. Migration is run **once** during the first `wiki_admin rebuild` after Phase 2a deploys.
137
+
138
+ Classification rules, in order:
139
+
140
+ 1. **Frontmatter `type: synthesis`** present → already legitimate, no change.
141
+ 2. **Path matches `wiki/<plugin-id>/...`** AND filename matches a known compiler artifact (`system-map.md`, `call-graph.md`, `field-lineage.md`, plus per-program `<stem>.md` and per-copybook `<stem>.md`) → add `synthesis: true` automatically; do not flag.
142
+ 3. **Page has non-empty `sources: [...]`** → grounded, no change.
143
+ 4. **Pre-existing user-authored page with empty sources, no synthesis flag** → grandfather: add `legacyUnsupported: true` to frontmatter and lint warning, but do not block. New writes after migration day must use the explicit `synthesis: true` route.
144
+ 5. **Anything created after migration day with empty sources and no synthesis flag** → Phase 2a soft-warn, Phase 2b reject.
145
+
146
+ This keeps the "unsupported" signal meaningful while not penalizing existing legitimate synthesis or punishing pre-Phase 2a authoring.
147
+
148
+ ## Adoption sequence
149
+
150
+ This document defines the contract for the entire program. Implementation phases adopt it incrementally:
151
+
152
+ | Phase | Implementer | Adopts envelope on |
153
+ |-------|-------------|---------------------------|
154
+ | 1 | search | `wiki_search`, `wiki_search_read` |
155
+ | 2a | write | wiki_write side-channel telemetry |
156
+ | 3 | lineage | `field_lineage`, `impact`, `trace_variable` responses; lineage builder diagnostic surfaces |
157
+ | 2b | write | wiki_write hard rejection (informed by 2a telemetry) |
158
+ | 4 | dashboard | `wiki_admin` evidence report aggregating all of the above |
159
+
160
+ Phase 0 itself ships only:
161
+ - This document
162
+ - `EvidenceEnvelope` TypeScript interface
163
+ - No tool changes, no consumers
164
+
165
+ ## Open questions deferred to later phases
166
+
167
+ - **Hybrid search vector ranking**: when BM25 + vector blend produce a result, the envelope's confidence should probably reflect the blended score, not BM25 alone. Phase 1 decides.
168
+ - **Multi-source pages**: a wiki page citing 5 raw sources isn't 5× more credible than one citing 1. Confidence should saturate, not multiply. Phase 2a chooses the curve.
169
+ - **Cross-language consistency**: when future plugins (Java, Python) join, their lineage tiers may not map cleanly to the COBOL table. Each plugin documents and implements its own mapping under `src/<plugin>/`, sharing only the envelope shape from `src/evidence.ts`. The COBOL plugin's `evidence-mapping.ts` is the reference template.
170
+ - **User-facing explanations**: `rationale` is the only freeform field. Phase 4 may add structured `evidenceFactors` for richer dashboards. Out of Phase 0.
171
+
172
+ ## See also
173
+
174
+ - [`product-direction.md`](product-direction.md) — priority #1 ("retrieval trust signals") this program addresses
175
+ - [`legacy-code-knowledge-compiler-prd.md`](legacy-code-knowledge-compiler-prd.md) — Functional Requirements Phase 3 / 4 establish the lineage tiering this envelope wraps
176
+ - [`code-analysis-plugins.md`](code-analysis-plugins.md) — `buildDerivedArtifacts` produces the lineage entries Phase 3 will wrap in envelopes
Binary file