@weftlet/toolkit 0.0.0-stage → 0.1.1

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 (157) hide show
  1. package/LICENSE +176 -0
  2. package/NOTICE +6 -0
  3. package/README.md +162 -2
  4. package/THIRD_PARTY_NOTICES.md +610 -0
  5. package/dist/application/agent-context.d.ts +23 -0
  6. package/dist/application/agent-context.js +94 -0
  7. package/dist/application/application.d.ts +23 -0
  8. package/dist/application/application.js +91 -0
  9. package/dist/application/hydrator.d.ts +49 -0
  10. package/dist/application/hydrator.js +275 -0
  11. package/dist/application/overlay.d.ts +6 -0
  12. package/dist/application/overlay.js +110 -0
  13. package/dist/application/saved-evidence.d.ts +38 -0
  14. package/dist/application/saved-evidence.js +59 -0
  15. package/dist/application/snapshot-checks.d.ts +16 -0
  16. package/dist/application/snapshot-checks.js +51 -0
  17. package/dist/cli.d.ts +3 -0
  18. package/dist/cli.js +4 -0
  19. package/dist/configuration/cache.d.ts +2 -0
  20. package/dist/configuration/cache.js +10 -0
  21. package/dist/configuration/config.d.ts +79 -0
  22. package/dist/configuration/config.js +165 -0
  23. package/dist/core.d.ts +1 -0
  24. package/dist/core.js +2 -0
  25. package/dist/extraction/codex-auth.d.ts +12 -0
  26. package/dist/extraction/codex-auth.js +74 -0
  27. package/dist/extraction/document.d.ts +5 -0
  28. package/dist/extraction/document.js +54 -0
  29. package/dist/extraction/ontology.d.ts +32 -0
  30. package/dist/extraction/ontology.js +164 -0
  31. package/dist/extraction/providers.d.ts +8 -0
  32. package/dist/extraction/providers.js +58 -0
  33. package/dist/extraction/runtime-evidence.d.ts +2 -0
  34. package/dist/extraction/runtime-evidence.js +84 -0
  35. package/dist/extraction/semantic-citations.d.ts +7 -0
  36. package/dist/extraction/semantic-citations.js +27 -0
  37. package/dist/extraction/semantic-process.d.ts +11 -0
  38. package/dist/extraction/semantic-process.js +68 -0
  39. package/dist/extraction/semantic.d.ts +73 -0
  40. package/dist/extraction/semantic.js +414 -0
  41. package/dist/extraction/static.d.ts +52 -0
  42. package/dist/extraction/static.js +322 -0
  43. package/dist/extraction/telemetry.d.ts +19 -0
  44. package/dist/extraction/telemetry.js +259 -0
  45. package/dist/governance/governance.d.ts +60 -0
  46. package/dist/governance/governance.js +209 -0
  47. package/dist/graph/authority.d.ts +2 -0
  48. package/dist/graph/authority.js +13 -0
  49. package/dist/graph/diagnostics.d.ts +5 -0
  50. package/dist/graph/diagnostics.js +61 -0
  51. package/dist/graph/query.d.ts +16 -0
  52. package/dist/graph/query.js +373 -0
  53. package/dist/graph/rdf.d.ts +26 -0
  54. package/dist/graph/rdf.js +144 -0
  55. package/dist/index.d.ts +11 -0
  56. package/dist/index.js +12 -0
  57. package/dist/infrastructure/module-resolution.d.ts +2 -0
  58. package/dist/infrastructure/module-resolution.js +10 -0
  59. package/dist/infrastructure/process.d.ts +5 -0
  60. package/dist/infrastructure/process.js +27 -0
  61. package/dist/infrastructure/util.d.ts +1 -0
  62. package/dist/infrastructure/util.js +2 -0
  63. package/dist/interfaces/cli.d.ts +4 -0
  64. package/dist/interfaces/cli.js +197 -0
  65. package/dist/interfaces/doctor.d.ts +25 -0
  66. package/dist/interfaces/doctor.js +49 -0
  67. package/dist/interfaces/init.d.ts +24 -0
  68. package/dist/interfaces/init.js +154 -0
  69. package/dist/interfaces/mcp-facade.d.ts +3 -0
  70. package/dist/interfaces/mcp-facade.js +4 -0
  71. package/dist/interfaces/mcp.d.ts +2 -0
  72. package/dist/interfaces/mcp.js +81 -0
  73. package/dist/interfaces/request.d.ts +2 -0
  74. package/dist/interfaces/request.js +59 -0
  75. package/dist/mcp.d.ts +3 -0
  76. package/dist/mcp.js +4 -0
  77. package/dist/repository/committed-tree.d.ts +2 -0
  78. package/dist/repository/committed-tree.js +35 -0
  79. package/dist/repository/git.d.ts +26 -0
  80. package/dist/repository/git.js +163 -0
  81. package/dist/repository/glob.d.ts +2 -0
  82. package/dist/repository/glob.js +46 -0
  83. package/dist/repository/working-content.d.ts +3 -0
  84. package/dist/repository/working-content.js +34 -0
  85. package/dist/storage/atomic-rename.d.ts +2 -0
  86. package/dist/storage/atomic-rename.js +22 -0
  87. package/dist/storage/storage.d.ts +15 -0
  88. package/dist/storage/storage.js +115 -0
  89. package/dist/telemetry.d.ts +1 -0
  90. package/dist/telemetry.js +2 -0
  91. package/dist/visualization/viewer-interaction.d.ts +12 -0
  92. package/dist/visualization/viewer-interaction.js +123 -0
  93. package/dist/visualization/visualization.d.ts +26 -0
  94. package/dist/visualization/visualization.js +491 -0
  95. package/docs/ADR-001-standalone-baseline.md +16 -0
  96. package/docs/ADR-002-saved-evidence.md +21 -0
  97. package/docs/ADR-003-draft-overlays.md +23 -0
  98. package/docs/ADR-004-rdf-query-path.md +37 -0
  99. package/docs/ADR-005-governance-and-optional-oml.md +37 -0
  100. package/docs/ADR-006-provider-boundaries.md +15 -0
  101. package/docs/ADR-007-toolkit-modules.md +53 -0
  102. package/docs/ADR-008-weftlet-packages.md +32 -0
  103. package/docs/CLOUD-ENVIRONMENT.md +56 -0
  104. package/docs/ENVIRONMENT-VALIDATION.md +83 -0
  105. package/docs/MIGRATING-TO-WEFTLET.md +54 -0
  106. package/docs/PROVIDERS.md +121 -0
  107. package/docs/RELEASING.md +146 -0
  108. package/docs/ROADMAP.md +55 -0
  109. package/docs/SOURCE-INVENTORY.md +48 -0
  110. package/docs/VALIDATION.md +530 -0
  111. package/docs/VIEWER.md +36 -0
  112. package/docs/architecture-baseline.json +57 -0
  113. package/docs/architecture-policy.md +41 -0
  114. package/docs/extraction-manifest.json +721 -0
  115. package/docs/licenses/REVIEW.md +16 -0
  116. package/docs/licenses/lru-cache-11.5.3-BlueOak.md +55 -0
  117. package/docs/licenses/negotiate-1.0.1-BSD.txt +22 -0
  118. package/docs/licenses/spark-md5-3.0.2-MIT.txt +7 -0
  119. package/examples/generic-typescript/context-graph.config.json +47 -0
  120. package/examples/generic-typescript/context-graph.oml.config.json +49 -0
  121. package/examples/generic-typescript/docs/search-capability.md +14 -0
  122. package/examples/generic-typescript/ontology/build.gradle +38 -0
  123. package/examples/generic-typescript/ontology/catalog.xml +5 -0
  124. package/examples/generic-typescript/ontology/settings.gradle +1 -0
  125. package/examples/generic-typescript/ontology/src/oml/context-graph.dev/core.oml +99 -0
  126. package/examples/generic-typescript/package.json +6 -0
  127. package/examples/generic-typescript/src/search.ts +11 -0
  128. package/examples/generic-typescript/test/search.test.ts +8 -0
  129. package/examples/generic-typescript/tsconfig.json +10 -0
  130. package/examples/pipeline/context-graph.config.json +49 -0
  131. package/examples/pipeline/docs/admission.md +6 -0
  132. package/examples/pipeline/docs/analysis.md +6 -0
  133. package/examples/pipeline/docs/discovery.md +6 -0
  134. package/examples/pipeline/docs/execution.md +6 -0
  135. package/examples/pipeline/docs/outcomes.md +6 -0
  136. package/examples/pipeline/docs/planning.md +6 -0
  137. package/examples/pipeline/package.json +6 -0
  138. package/examples/pipeline/src/admission.ts +9 -0
  139. package/examples/pipeline/src/analysis.ts +9 -0
  140. package/examples/pipeline/src/contracts/admission.ts +1 -0
  141. package/examples/pipeline/src/contracts/analysis.ts +1 -0
  142. package/examples/pipeline/src/contracts/discovery.ts +1 -0
  143. package/examples/pipeline/src/contracts/execution.ts +1 -0
  144. package/examples/pipeline/src/contracts/outcomes.ts +1 -0
  145. package/examples/pipeline/src/contracts/planning.ts +1 -0
  146. package/examples/pipeline/src/discovery.ts +9 -0
  147. package/examples/pipeline/src/execution.ts +9 -0
  148. package/examples/pipeline/src/outcomes.ts +9 -0
  149. package/examples/pipeline/src/planning.ts +9 -0
  150. package/examples/pipeline/src/queue.ts +12 -0
  151. package/examples/pipeline/test/pipeline.test.ts +17 -0
  152. package/examples/pipeline/tsconfig.json +12 -0
  153. package/package.json +116 -3
  154. package/runtime-check.d.mts +2 -0
  155. package/runtime-check.mjs +12 -0
  156. package/templates/context-graph-development/SKILL.md +37 -0
  157. package/third-party-tools.json +34 -0
@@ -0,0 +1,57 @@
1
+ {
2
+ "sourceCommit": "479f3f5831229634c306c046a6b55c67d190f50f",
3
+ "kind": "advisory-inventory",
4
+ "approval": "Initial existing-debt inventory requested by extraction task; no hard-gate waivers",
5
+ "tools": {
6
+ "dependencyCruiser": "18.7.0",
7
+ "eslint": "10.13.0",
8
+ "jscpd": "5.4.1"
9
+ },
10
+ "findings": [
11
+ {
12
+ "category": "advisory",
13
+ "ruleId": "eslint:complexity",
14
+ "from": "src/cli.ts",
15
+ "to": "43",
16
+ "message": "Async function 'main' has a complexity of 23. Maximum allowed is 20. Size/complexity is a review signal, not proof of modularity.",
17
+ "fingerprint": "44fd67050497f68d00400c8d11246ed898daaa68fe6d13a5612cd208d7a42520",
18
+ "disposition": "new"
19
+ },
20
+ {
21
+ "category": "advisory",
22
+ "ruleId": "eslint:complexity",
23
+ "from": "src/config.ts",
24
+ "to": "87",
25
+ "message": "Function 'validateConfig' has a complexity of 36. Maximum allowed is 20. Size/complexity is a review signal, not proof of modularity.",
26
+ "fingerprint": "5936354742c2edc5b0318cd7bcb79fc9ce00d4d9a1179f904704dfb40ead9311",
27
+ "disposition": "new"
28
+ },
29
+ {
30
+ "category": "advisory",
31
+ "ruleId": "eslint:max-lines",
32
+ "from": "src/query.test.ts",
33
+ "to": "518",
34
+ "message": "File has too many lines (551). Maximum allowed is 500. Size/complexity is a review signal, not proof of modularity.",
35
+ "fingerprint": "cce159e6ca24eb0a5664fdae95979705904f8e1c69aae310dfb0a60beca6d13d",
36
+ "disposition": "new"
37
+ },
38
+ {
39
+ "category": "advisory",
40
+ "ruleId": "eslint:complexity",
41
+ "from": "src/telemetry.ts",
42
+ "to": "84",
43
+ "message": "Async method 'collect' has a complexity of 42. Maximum allowed is 20. Size/complexity is a review signal, not proof of modularity.",
44
+ "fingerprint": "f896c17c33d1a99ac4287c805f067a26f9fb8cf3cf9af10e8239b17abdb556ba",
45
+ "disposition": "new"
46
+ },
47
+ {
48
+ "category": "advisory",
49
+ "ruleId": "eslint:max-lines",
50
+ "from": "src/visualization.ts",
51
+ "to": "529",
52
+ "message": "File has too many lines (635). Maximum allowed is 500. Size/complexity is a review signal, not proof of modularity.",
53
+ "fingerprint": "8db629c5ab9aa7681f447b1acad521abccc3a2db5f79634c298b1741a9866cc4",
54
+ "disposition": "new"
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,41 @@
1
+ # Canonical architecture policy
2
+
3
+ `architecture.policy.json` is the canonical executable definition. The graph, dependency rules
4
+ and reports derive from it; skills do not define additional conflicting architecture policy.
5
+
6
+ ## Neutral core
7
+
8
+ Approval source: the extraction request explicitly requires preserving the neutral core/toolkit
9
+ boundary and keeping repository-specific behavior behind adapters. The core owns the shared graph
10
+ contracts and must not import toolkit implementation. These are deterministic hard gates.
11
+
12
+ Cycle, file-size, complexity and duplication findings are advisory until an owner approves a
13
+ specific policy. Size does not prove modularity; textual clones do not prove equivalent logic.
14
+ The tools provide candidates for semantic review.
15
+
16
+ Toolkit responsibilities and public entry points are described in
17
+ [ADR 007](ADR-007-toolkit-modules.md). The policy maps the internal directories separately;
18
+ the proposed internal import restrictions are executable advisory checks, not newly approved
19
+ CI gates. They check production import directions while allowing tests to assemble modules.
20
+ Directory moves change finding fingerprints; the historical baseline is retained unchanged
21
+ and no new finding is automatically waived.
22
+
23
+ Baseline entries must name an exact finding fingerprint, a reason and an approval reference.
24
+ Scoped exceptions additionally require rule/from/to and an expiry. The analyzer never writes or
25
+ advances baselines. New rule violations remain new even when other debt is baselined.
26
+ Missing source mappings, unresolved required imports and tool failures are separate report
27
+ categories and prevent a clean result.
28
+
29
+ Run `pnpm build` then `pnpm exec tsx src/cli.ts govern --policy architecture.policy.json`.
30
+ Analysis tools are development dependencies; installed consumers must install the documented
31
+ pinned tools to use governance. Missing tools produce infrastructure failures, not passing reports.
32
+
33
+ The initial extraction commit's advisory debt is recorded in `architecture-baseline.json`,
34
+ obtained by analyzing its isolated committed tree with the current tools. It is an informational
35
+ inventory, not permission to waive later findings. The policy starts with no hard-rule waivers.
36
+ Compare exact fingerprints; changed or new findings need review rather than an automatic baseline.
37
+
38
+ Governance snapshots can be queried and rendered using `--config architecture.context-graph.config.json`
39
+ and the `--snapshot` ID returned by `govern`. They contain the same dependency and policy facts used
40
+ by the checks. Install development tools at the pinned versions in `package.json` for governance;
41
+ Node 24 is the tested development runtime. Querying existing snapshots requires none of these tools.