@weftlet/toolkit 0.2.0 → 0.3.0

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 (37) hide show
  1. package/README.md +69 -3
  2. package/dist/application/agent-context.d.ts +3 -1
  3. package/dist/application/agent-context.js +15 -6
  4. package/dist/application/hydration-plan.d.ts +57 -0
  5. package/dist/application/hydration-plan.js +79 -0
  6. package/dist/application/hydrator.js +12 -16
  7. package/dist/extraction/document.js +1 -6
  8. package/dist/extraction/providers.js +2 -2
  9. package/dist/extraction/repository-nodes.d.ts +7 -0
  10. package/dist/extraction/repository-nodes.js +20 -0
  11. package/dist/extraction/semantic-cache.d.ts +12 -0
  12. package/dist/extraction/semantic-cache.js +59 -0
  13. package/dist/extraction/semantic-identity.d.ts +7 -0
  14. package/dist/extraction/semantic-identity.js +29 -0
  15. package/dist/extraction/semantic-sources.d.ts +27 -0
  16. package/dist/extraction/semantic-sources.js +35 -0
  17. package/dist/extraction/semantic.js +27 -21
  18. package/dist/graph/rdf.d.ts +1 -1
  19. package/dist/graph/rdf.js +13 -28
  20. package/dist/graph/shacl-shapes.d.ts +5 -0
  21. package/dist/graph/shacl-shapes.js +27 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +1 -0
  24. package/dist/interfaces/cli.js +47 -3
  25. package/dist/repository/git.d.ts +1 -1
  26. package/dist/repository/git.js +5 -1
  27. package/docs/ADR-015-repository-document-identity.md +57 -0
  28. package/docs/ADR-016-hydration-preview.md +91 -0
  29. package/docs/ADR-017-shacl-validation-union.md +102 -0
  30. package/docs/CONSUMER-TRIAL.md +6 -5
  31. package/docs/RELEASE-1.0-PLAN.md +288 -0
  32. package/docs/RELEASING.md +27 -8
  33. package/docs/ROADMAP.md +32 -2
  34. package/docs/VALIDATION.md +202 -0
  35. package/docs/WEFTLET-2.0-PLAN.md +283 -0
  36. package/docs/extraction-manifest.json +29 -12
  37. package/package.json +3 -2
@@ -0,0 +1,283 @@
1
+ # Weftlet 2.0 product plan
2
+
3
+ Status: proposed direction captured at the maintainer's request on 2026-10-26.
4
+ Planning baseline: published `@weftlet/core` and `@weftlet/toolkit` **0.2.0**. The consumer
5
+ identity fix has since shipped in **0.2.1**, with release evidence in
6
+ [VALIDATION.md](VALIDATION.md). **“2.0” names this product plan; it does not announce npm
7
+ version 2.0.0, a delivery date, or a single large release.** Changes should ship through small,
8
+ reviewed milestones using the existing Changesets workflow.
9
+
10
+ The maintainer supports developing this direction. Detailed schemas, hosting, commercial
11
+ terms and policy choices below remain proposals to resolve before their dependent work.
12
+ This planning increment implements no features, changes no license and provisions no services.
13
+
14
+ ## Product outcome
15
+
16
+ Help teams establish and maintain an agreed set of product rules, connect those rules to
17
+ implementation and evidence, and make the relevant rules available to development agents.
18
+
19
+ A team should be able to adopt Weftlet in a poorly documented project, generate a bounded set
20
+ of cited proposals, approve or correct them, publish documentation through its chosen source
21
+ adapter, and see subsequent disagreements between intent, code and other documents.
22
+ An owner can confirm that the current implementation expresses the intended business rules
23
+ and establish an initial documentation baseline through explicit review.
24
+
25
+ The first complete demonstration is: a repository with sparse documentation produces useful
26
+ candidate rules; a reviewer resolves a real disagreement; a documentation PR is merged; an
27
+ agent retrieves the approved, scoped decision through MCP and identifies any remaining code gap.
28
+
29
+ ## Current capabilities and gaps
30
+
31
+ | Area | Available in 0.2.0 | Work proposed here |
32
+ | --- | --- | --- |
33
+ | No documentation | TypeScript/code relationships, configured contracts, tests and supplied runtime/routing evidence; semantic sources may be empty | Cited implementation summaries and candidate business rules derived from code |
34
+ | Partial documentation | Selected committed Markdown/text extraction, document links, scoped coverage/gap reports | Cross-source reconciliation, amendment proposals and approval workflow |
35
+ | Evidence authority | Implementation, tests, observations, inferred/draft facts; source approval separated from model assertion review | Durable derivation history and approvals bound to specific claims/content revisions |
36
+ | Agent decisions | Task/checklist text helps querying and source selection | Capture explicit accepted decisions as durable evidence before polished docs exist |
37
+ | Queries | Local saved snapshots, RDF/SPARQL/SHACL, impact scans, continuation, CLI/MCP and draft overlays | Domain-scoped approved rules, exceptions and unresolved conflicts available to agents |
38
+ | Providers | Codex CLI with ChatGPT or explicit API-key mode; tested module extension contract | Tested direct API adapters and an optional Weftlet-managed inference service |
39
+ | Setup and UI | CLI init/config/doctor; bounded HTML/DOT/SVG viewer | Assisted setup and optional hosted review/management application |
40
+ | Source adapters | Repository evidence plus extractor/invariant extension points | Explicit proposal/publication capabilities; GitHub Markdown first, other sources later |
41
+
42
+ Current approval uses document paths/globs. Generated text written under an approved path could
43
+ appear to come from a declared source, even though model-extracted assertions remain unreviewed.
44
+ That is a prerequisite to address before automatic documentation backfill. Current citations
45
+ also do not preserve a complete code → generated document → re-extracted assertion lineage.
46
+ Existing gap reports do not establish completeness of a project's business requirements.
47
+
48
+ ## Immediate priority: consumer integration findings
49
+
50
+ The maintainer supplied a consumer integration report on 2026-10-26. The
51
+ [consumer hardening and 1.0 task list](RELEASE-1.0-PLAN.md) records its seven items and acceptance
52
+ criteria. The repository-document identity/kind patch shipped in 0.2.1 and passes upstream
53
+ regressions; genuine consumer acceptance remains pending. Work through the other improvements
54
+ toward an official 1.0 independently of the companion platform described here.
55
+
56
+ | Intake item | Status | Next action |
57
+ | --- | --- | --- |
58
+ | Consumer integration report | Received; task list recorded | Preserve private evidence with the consumer and use public-safe upstream reproductions |
59
+ | Reproduction and severity | Reported identity/kind blocker has a passing upstream regression | Obtain the genuine consumer re-run; keep validation latency a separate investigation |
60
+ | Fix/release mapping | T01 upstream patch published in 0.2.1; T02–T07 remain open | Complete bounded follow-ups and genuine consumer acceptance before official 1.0 |
61
+
62
+ For each finding, retain toolkit/version, repository SHA, relevant configuration and scope,
63
+ exact command or MCP request, expected/actual behavior, logs/exit status, snapshot identity,
64
+ dirty-worktree state and provider details where relevant. Distinguish infrastructure failure,
65
+ configuration error, extraction gap, incorrect relationship, policy violation and usability issue.
66
+ Use the [consumer trial](CONSUMER-TRIAL.md) for evidence collection. Private application code,
67
+ logs and product documents stay with the consumer; publish only reviewed reproductions and summaries.
68
+ Consumer findings do not authorize modifying the original source application from this repository.
69
+
70
+ ## Proposed product boundaries
71
+
72
+ - **Local toolkit:** indexing, immutable evidence, generation orchestration, local review data,
73
+ queries and MCP continue to work in a repository. Saved queries remain available when a
74
+ model, website or network is unavailable, with explicit version/freshness limitations.
75
+ - **Optional companion service:** project connections, review queues, decisions, publication
76
+ jobs, history, synchronization status and organization management. Customers choose which
77
+ proposals and source excerpts leave their machine; whole-repository upload is not a prerequisite.
78
+ - **Source adapters:** read versioned evidence, prepare a target-specific proposal, and apply it
79
+ through explicitly supported operations. Read access does not imply write capability.
80
+ - **Model providers:** perform bounded extraction/generation under the same structured-output,
81
+ citation, timeout, cancellation and cache contracts. Provider output cannot grant approval.
82
+
83
+ Initially, published documentation on the selected GitHub branch is the authoritative document
84
+ destination. The companion tracks proposals and decisions without silently becoming a competing
85
+ source of truth. Review decisions and their provenance must be exportable in a versioned format
86
+ usable by the toolkit; access to existing evidence cannot depend on continued subscription.
87
+
88
+ ## Evidence and decision semantics
89
+
90
+ Define these records before the website depends on them; exact field names remain an ADR task:
91
+
92
+ | Record | Required meaning |
93
+ | --- | --- |
94
+ | Evidence | Source identity, revision/commit, digest, citation span, extraction method and scope |
95
+ | Proposed claim | Stable identity and revision; kind (implementation description or proposed requirement); statement, conditions, domain and exceptions; supporting/contradicting evidence; inference and uncertainty |
96
+ | Derivation | Links from source evidence through model output, generated documents and subsequent extraction; provider/model/prompt identities |
97
+ | Decision | Authorized actor, exact claim/content revision, scope, explicit meaning (accuracy review or adoption as intent), action, timestamp/reason and any superseded decision |
98
+ | Publication | Destination identity/base revision, proposed diff, idempotency identity, PR/write result and published revision |
99
+ | Reconciliation | Applicable rule versions, compared source revisions, potential conflict or implementation gap, and resolution status |
100
+
101
+ Preserve these distinctions throughout extraction, RDF, queries, visualization and write-back:
102
+
103
+ 1. Code supports statements about implementation. Tests support what was checked; a test-file
104
+ link does not prove execution. Runtime traces describe observations for their recorded scope.
105
+ Owners can explicitly adopt a proposed rule as intent; model confidence cannot do that.
106
+ 2. Source approval and approval of an extracted assertion are separate. Approval is scoped to
107
+ content/claim revisions and authorized actors, not inherited merely from a file location.
108
+ 3. Re-ingesting generated text preserves its derivation and does not create independent
109
+ corroboration or automatically increase confidence or authority.
110
+ 4. Code changes can stale supporting evidence or implementation summaries. They do not revoke
111
+ or rewrite approved business intent. Superseding intent requires a recorded decision.
112
+ 5. Decision status, publication status, graph freshness and implementation compliance are
113
+ separate. Approval, opening a PR, merging it and refreshing a graph are distinct events.
114
+ 6. Scope includes domain, conditions, applicable population/version and exceptions. Fourteen-day
115
+ and thirty-day rules may legitimately coexist in different scopes. A newer document does
116
+ not automatically override another domain or a shared contract's owner.
117
+ 7. Model-identified conflicts remain potential conflicts until reviewed or deterministically
118
+ established. Only explicit approved deterministic rules become hard CI gates. Missing required
119
+ evidence remains unknown/incomplete, not a pass.
120
+ 8. Source text is evidence input. It cannot authorize writes, impersonate an approver or instruct
121
+ the extraction process to alter its permissions. Approval records need a verifiable trust basis.
122
+
123
+ ## Delivery sequence
124
+
125
+ M0 consumer hardening is in progress; M1–M7 remain proposed work. Each should be split into
126
+ independently testable PRs and retain saved-snapshot compatibility; schema changes need an
127
+ explicit migration ADR.
128
+
129
+ | Milestone | Depends on | Deliverable and completion evidence |
130
+ | --- | --- | --- |
131
+ | **M0 — Consumer hardening** | Identity patch 0.2.1 shipped; [1.0 task list](RELEASE-1.0-PLAN.md) | Complete bounded setup/reuse/diagnostics/coverage improvements and genuine consumer acceptance. Release independently of the companion platform. |
132
+ | **M1 — Claims, lineage and approvals** | M0 triage | Versioned records, durable derivation, revision-scoped approvals, actor trust and explicit legacy handling. Prove generated documents cannot acquire approval through paths or repeated extraction. Verify persistence/RDF/projection/query equivalence and old-snapshot readability. |
133
+ | **M2 — Code-derived drafts** | M1 | Opt-in generation for selected TypeScript modules using existing local Codex first; structured candidate claims and Markdown rendered from those claims. Demonstrate no-doc and partial-doc fixtures with citations, unknown rationale, bounded cost, cache reuse and rename/delete invalidation. |
134
+ | **M3 — Decisions and reconciliation** | M1–M2 | Capture explicit accepted requirements/decisions, compare changes from code and documents, distinguish scope differences from conflicts, and propose focused amendments. Demonstrate a resolved documentation disagreement with a remaining implementation gap. |
135
+ | **M4 — Review website and GitHub publication** | M1–M3 | Thin optional application using local generation, review bundles, scoped approvals, GitHub Markdown PRs and publication/refresh tracking. Demonstrate the entire review → merge → MCP workflow, including stale revisions, human edits and failed/retried publication. |
136
+ | **M5 — Managed inference and usage** | Stable extraction contract; M4 project identity | One tested hosted provider behind a Weftlet project key; usage ledger, budgets, metering and billing/recovery semantics. Preserve local Codex; add direct BYOK adapters individually. Prove isolation, bounded spending, cancellation and retry accounting before a paid pilot. |
137
+ | **M6 — Guided onboarding** | M0 findings; relevant M2/M4/M5 capabilities | Repository discovery, concrete config recommendations, execution-mode choice, upload/cost preview, small initial run and actionable diagnostics. Prove setup in independent supported projects without overwriting existing integration or approving intent. Deterministic setup improvements can ship earlier. |
138
+ | **M7 — Further adapters and offerings** | Evidence from the first complete workflow | Evaluate Figma, Trello, GitHub Projects, Canva or other requested sources one at a time. Document supported reads/writes and validate one adapter before expanding. Consider enterprise/self-hosted service requirements after the hosted pilot. |
139
+
140
+ ### M2: bootstrap without manufacturing intent
141
+
142
+ Begin from the existing implementation graph and selected code/tests. Produce cited implementation
143
+ summaries, candidate rules, conditions/exceptions and questions requiring an owner. Render drafts
144
+ from the same structured claims used by the graph, avoiding a mandatory prose-generation then
145
+ prose-re-extraction round trip. Generated descriptions remain useful and queryable before approval,
146
+ with their status visible. Commit-only generation remains the initial reproducible baseline;
147
+ support for working changes must be explicit and retain draft identities.
148
+
149
+ Test dead or conditional code, ambiguous names, unsupported interpretations and behavior that could
150
+ be a bug. Selecting a module does not establish exhaustive coverage of its business rules.
151
+ Changed inputs invalidate affected generated claims; unchanged artifacts can be reused. Keep the
152
+ last valid snapshot/proposals when generation fails. No automatic generation during ordinary queries.
153
+
154
+ ### M3: intent created during development
155
+
156
+ Capture concise, explicitly accepted decisions with their source instruction and acceptance event.
157
+ The actual owner instruction can be recorded before a formal document exists; an agent's proposed
158
+ interpretation retains proposal status. Do not treat every prompt, task argument, plan or completed
159
+ code change as approved intent. Review any generated paraphrase independently of the original source.
160
+
161
+ Compare code → documents, documents → code, and documents → documents. Group evidence by domain
162
+ and shared contract, retain contradictions and require explicit resolution of competing claims.
163
+ If a reviewer approves a thirty-day refund policy while code enforces fourteen days, publish the
164
+ decision/documentation and keep the implementation gap open. Confidence or recency alone cannot
165
+ select the authoritative rule. Capture new discoveries separately from frozen evaluation expectations.
166
+
167
+ ### M4: review, publication and agent access
168
+
169
+ Review coherent batches by capability/workflow, emphasizing consequential changes and unresolved
170
+ questions. Show the proposed statement, citations/source revisions, existing rules, related code/tests
171
+ and exact destination diff. Offer approve, edit, reject and request-clarification actions. If bulk
172
+ approval is supported, bind it to an explicit immutable set of claims and revisions.
173
+ Make approval meaning explicit: confirming an implementation description's accuracy records that
174
+ review; adopting a requirement as product intent is a separate decision.
175
+
176
+ Use GitHub Markdown and PR creation as the first source-write workflow. Preserve human edits;
177
+ generated sections can refresh under an explicitly configured policy. Check destination revisions
178
+ before applying updates, use idempotent operations, and show conflicts/failures rather than overwrite.
179
+ Opening a PR does not mark documentation published. For the initial integration, publication on the
180
+ configured branch establishes the effective documentation revision; any earlier effective-decision
181
+ policy must be explicitly designed and displayed.
182
+
183
+ MCP should return relevant approved rules and exceptions, their revisions and provenance, unresolved
184
+ conflicts, implementation gaps and synchronization/freshness status. Cloud and local views must agree
185
+ on the underlying facts. Historical or draft evidence remains usable with labels and cannot silently
186
+ satisfy current-diff validation. MCP access improves consistency but does not prove model compliance.
187
+
188
+ Before a shared hosted pilot, validate project/tenant isolation, authenticated review permissions,
189
+ export/deletion/retention behavior, browser interaction and accessibility, and failure recovery.
190
+ Choose the hosting stack and operating budget in a separate design decision.
191
+
192
+ ### M5–M6: execution choices and setup experience
193
+
194
+ | Execution choice | Intended behavior |
195
+ | --- | --- |
196
+ | Local Codex | Preserve the existing developer login and configured local CLI. No mandatory API billing or hosted generation. |
197
+ | Customer provider | Add supported direct API adapters with credentials on the chosen execution side. Decide explicitly whether any hosted BYOK mode stores customer secrets. |
198
+ | Weftlet-managed AI | Local tooling sends selected extraction/generation inputs to a hosted API using a project-scoped Weftlet key; the service invokes a supported provider and returns validated, cited results. |
199
+
200
+ Separate project/service authorization from upstream model credentials and business-rule approval.
201
+ Individual ChatGPT/Codex login sessions stay on the developer's machine. Managed inference must use
202
+ provider accounts and terms suitable for the offered service. Never silently fall back from local or
203
+ customer-paid execution to Weftlet-billed inference, or change models during recovery without policy.
204
+
205
+ Show selected source scope, model, estimated usage, budget cap and actual usage. Establish spend
206
+ reservations/limits, cancellation, timeouts, provider failure reporting, retry/idempotency behavior,
207
+ cache accounting and reconciliation of uncertain charges. Distinguish actual provider consumption
208
+ from an estimate; bytes/documents alone do not establish a price. Credentials stay out of configs,
209
+ source control and logs. Live tests require explicit bounded budgets; use deterministic fixtures in CI.
210
+
211
+ Guided setup should inspect the repository first, then suggest roots, documentation scope, TypeScript
212
+ projects/aliases and configuration. AI may help with ambiguous choices. Show concrete proposed
213
+ changes and data that would leave the machine before the first cloud operation. Make the first run
214
+ small, explain missing prerequisites, and preserve an existing setup. Do not advertise unsupported
215
+ languages, frameworks, providers or adapter write operations. The cloud dashboard can then show
216
+ project readiness, coverage, progress, review batches and usage.
217
+
218
+ ## Evaluation and release criteria
219
+
220
+ Use public-safe fixtures covering no docs, partial docs, stale tickets, conflicting documentation,
221
+ same wording in different domains, changed requirements and asynchronous consumers. Freeze expected
222
+ findings before measurement, and supplement deterministic checks with separately reported, budgeted
223
+ live-model evaluations and a private real-project pilot.
224
+
225
+ Required cases include invalid/misattributed citations, generated-doc feedback loops, approval under
226
+ an approved directory without content review, stale/forged/unauthorized approvals, changes after
227
+ approval, rename/delete, supersession, conflicting effective scopes, concurrent reviewers, human edits,
228
+ duplicate/retried writes, partial publication failure, offline saved queries and stale MCP clients.
229
+ Hosted work adds tenant isolation, credential handling, cancellation and usage/billing recovery tests.
230
+
231
+ Record source/config/model revisions, expected relationships, retrieval within declared budgets,
232
+ missed consumers, incorrect claims, useful discoveries, review time, edits/rejections, query/generation
233
+ latency, cache reuse and cost. Approval rate alone is not accuracy. Set quality/performance targets
234
+ after obtaining the first baseline; do not invent pass thresholds or imply complete business coverage.
235
+
236
+ Keep deterministic tests, provider-dependent integration tests, browser tests and real-project
237
+ evaluation distinct. Existing browser/live-authentication, larger-graph and genuine fresh-cloud
238
+ restoration gaps remain tracked in [ROADMAP.md](ROADMAP.md) and
239
+ [ENVIRONMENT-VALIDATION.md](ENVIRONMENT-VALIDATION.md); this plan does not close them.
240
+ Only advertise capabilities after their relevant validation. Preserve the current core/toolkit
241
+ boundary, snapshot provenance, licenses and supported local installation through each increment.
242
+
243
+ ## Commercial direction and decisions still open
244
+
245
+ The proposed commercial value is ongoing rule review, reconciliation and source synchronization.
246
+ Managed AI reduces setup friction and can be offered separately from the collaboration service.
247
+
248
+ | Offering | Proposed scope |
249
+ | --- | --- |
250
+ | Open-source toolkit | Local extraction/graphs/queries/MCP, portable decision records and file workflows |
251
+ | Hosted companion | Shared review queues, permissions/history, source synchronization, managed PRs and organization administration |
252
+ | Managed inference | Included usage or transparent metered credits with explicit budgets; customers can also choose local tools or supported BYOK |
253
+ | Enterprise options | Evaluate self-hosting, organizational controls, deployment needs and support from customer evidence |
254
+
255
+ No prices, margins, provider commitments or subscription terms are set. Keep workspace/team pricing
256
+ and AI consumption understandable and separable. Validate review burden, recurring usefulness and
257
+ actual model/hosting cost before choosing a pricing model.
258
+
259
+ The recommendation is to retain Apache-2.0 for the toolkit and evaluate the companion's commercial
260
+ license separately. The maintainer is open to future licensing changes, but no change is selected.
261
+ Existing Apache releases retain their granted permissions; future changes require the rights to
262
+ the affected code and preservation of applicable third-party licenses, notices and attribution.
263
+
264
+ Resolve these decisions in small ADRs as their milestones approach:
265
+
266
+ - Claim identity, derivation format, approval authenticity, revocation/supersession and legacy migration.
267
+ - Domain/shared-contract ownership, scope/exception resolution and when approved decisions take effect.
268
+ - Canonical source selection, review-record storage/export and local/cloud synchronization protocol.
269
+ - Companion repository/layout, hosting stack, identity/tenancy, retention and operating budget.
270
+ - First managed provider, direct versus hosted BYOK, supported models and provider commercial terms.
271
+ - Usage units, cache/retry/failed-job charges, budget enforcement, pricing and billing policy.
272
+ - Adapter-specific write capabilities, revision checks and failure recovery.
273
+ - License/product boundaries and any enterprise/self-hosting commitments.
274
+
275
+ ## Next handoff
276
+
277
+ 1. Obtain a genuine consumer re-run of the published 0.2.1 identity/kind patch under M0.
278
+ 2. Complete the remaining [1.0 tasks](RELEASE-1.0-PLAN.md) and review acceptance without waiting for the website or managed AI.
279
+ 3. Design M1's minimal records and compatibility rules, then implement M2 on bounded public fixtures.
280
+ 4. Review real extraction/review results before committing to hosted scope, paid operation or more adapters.
281
+
282
+ Maintain this plan as milestones become concrete, linking implementation PRs, ADRs and validation
283
+ evidence. Keep [ROADMAP.md](ROADMAP.md) as the concise index of delivered capability and remaining work.
@@ -108,7 +108,7 @@
108
108
  "destinationPath": "package.json",
109
109
  "sourceSha256": "a575dbb2fed8c554b95e8e9b3e03a0c21cab1be7249860bbebc18e046b2ff78d",
110
110
  "modified": true,
111
- "destinationSha256": "c7a5cbf191d699a51a22fb961ba84e9f73521c0cc332c697f67a9267812de9ee"
111
+ "destinationSha256": "95326a545b7d77607bfd841ff009ef58231b8f9c5ae3f2605e1dac95c9995c4d"
112
112
  },
113
113
  {
114
114
  "sourcePath": "tools/context-graph/packages/core/LICENSE",
@@ -143,7 +143,7 @@
143
143
  "destinationPath": "packages/core/package.json",
144
144
  "sourceSha256": "2a29066eb8452f22fafcb06bb035a84dda93c5705dba32aba600a1b7e5aaf19c",
145
145
  "modified": true,
146
- "destinationSha256": "b7ab260df2ff6005788e6891449205b9b9c9f96aca13b680578a4f776aa21b52"
146
+ "destinationSha256": "4fe851d728bc96fc25bb31295b4705560691f384d887e7ed714e943fae4e69b3"
147
147
  },
148
148
  {
149
149
  "sourcePath": "tools/context-graph/packages/core/src/core.ts",
@@ -192,7 +192,7 @@
192
192
  "destinationPath": "scripts/check-publication.mjs",
193
193
  "sourceSha256": "88692c21d34cef2d2e5b20c92ab3ec26cbe6336889dbb7b534c681ded7f466b2",
194
194
  "modified": true,
195
- "destinationSha256": "546465bb9907051ebbae9f1c421b8b7be23414ce51c44891092d0fb793f67e8b"
195
+ "destinationSha256": "5d68e9efc168600f8daaef5e1f34911990257972acc100e91875dcb194ef7cc2"
196
196
  },
197
197
  {
198
198
  "sourcePath": "tools/context-graph/scripts/generate-third-party-notices.mjs",
@@ -213,7 +213,7 @@
213
213
  "destinationPath": "src/application/agent-context.ts",
214
214
  "sourceSha256": "0a45ce6d878f3c2c19a1707b799e8c1d6e9e99ab5cb068aa73088b32f420aa23",
215
215
  "modified": true,
216
- "destinationSha256": "97f16a8388bb7fbff228e83896bae4cd708d978ffb95135988a016e3ae6b0a5c"
216
+ "destinationSha256": "9c5778d66ed674c87a25ce132379e14805c00cd98ff76bc31f4e06151bec7430"
217
217
  },
218
218
  {
219
219
  "sourcePath": "tools/context-graph/src/application.test.ts",
@@ -241,7 +241,7 @@
241
241
  "destinationPath": "src/interfaces/cli.ts",
242
242
  "sourceSha256": "c68f5f35a5325cc03811b0d4ffb6d58c31a9b4e6115fcb2c5e4fda9560a34714",
243
243
  "modified": true,
244
- "destinationSha256": "2dbb28c9ae609e6e988578fd3eb82e9ca51735b77d16e23ab0dd910030eac008"
244
+ "destinationSha256": "fef7af32de49f73c4ade5f48a84c3a5db1e52171949cfdcd84720bf5e194b901"
245
245
  },
246
246
  {
247
247
  "sourcePath": "tools/context-graph/src/config.test.ts",
@@ -283,7 +283,7 @@
283
283
  "destinationPath": "src/extraction/document.ts",
284
284
  "sourceSha256": "62a2da37d8cc0637b192b7e70ae7a0dce72244d335da9df0e0ad9b0eb7c4e1f1",
285
285
  "modified": true,
286
- "destinationSha256": "de198e73b3b2c828c99bb35c806461dba06526df9ae94592926d26346fbefe79"
286
+ "destinationSha256": "0235abe0e2a7a0cb06495027c5dc240cf5b0658faabbdc01d0006fa3b456432c"
287
287
  },
288
288
  {
289
289
  "sourcePath": "tools/context-graph/src/git.test.ts",
@@ -297,7 +297,7 @@
297
297
  "destinationPath": "src/repository/git.ts",
298
298
  "sourceSha256": "484d3986633bb32ccc3b665f2144007a213c303df51b375c1d653729921d6d2c",
299
299
  "modified": true,
300
- "destinationSha256": "66c9230d73e972ed1696880dbd31339a8e618b8cabcb2bfebbeeccc112d65768"
300
+ "destinationSha256": "2557d47d1c54a6bbefc61d16eac4a4d16f995adadb480130ea39f558ce3522f1"
301
301
  },
302
302
  {
303
303
  "sourcePath": "tools/context-graph/src/glob.ts",
@@ -311,21 +311,21 @@
311
311
  "destinationPath": "src/application/hydrator.test.ts",
312
312
  "sourceSha256": "95f20a526fe69ce3a506ef01da1c20827e09d631a34126e781a07979cc43de07",
313
313
  "modified": true,
314
- "destinationSha256": "bbd264bf4224632f3e0fea81718910fab4dd5f8e79680faccf61059219bf9dde"
314
+ "destinationSha256": "d3c3e4e18adb571d7b9ef5232f10173344c1f6ae126ba76e50c2e32584782709"
315
315
  },
316
316
  {
317
317
  "sourcePath": "tools/context-graph/src/hydrator.ts",
318
318
  "destinationPath": "src/application/hydrator.ts",
319
319
  "sourceSha256": "bb41c5b53b26da10274d8b967b99c78ff12b485df16bfc66445252e35c94fb9d",
320
320
  "modified": true,
321
- "destinationSha256": "8c751fe04922d1117728672b78a1de2d6f42f403e9d506f387c95661e641a5c0"
321
+ "destinationSha256": "1bb8c8481706590f1d994baf6d48818dc76dec014d9e583ee3ae5b5c9aaa265f"
322
322
  },
323
323
  {
324
324
  "sourcePath": "tools/context-graph/src/index.ts",
325
325
  "destinationPath": "src/index.ts",
326
326
  "sourceSha256": "a3545649f67fc0bf0496298e3f1dca1e91aa7cb68ec112c34b99a5785fa83f3c",
327
327
  "modified": true,
328
- "destinationSha256": "6d2e5a298c96013f45f102f44a87fd7390cbe2a3174410560bb6fc8cc24012ea"
328
+ "destinationSha256": "9f986584ecba26d9b78b52aff19b07f4c572686d35f4363e06fa70b17756e704"
329
329
  },
330
330
  {
331
331
  "sourcePath": "tools/context-graph/src/mcp-facade.ts",
@@ -444,14 +444,14 @@
444
444
  "destinationPath": "src/extraction/semantic.test.ts",
445
445
  "sourceSha256": "908fe8166dd63f499c28b2c4d20db2e0110b453f66421b2154461287c2d94dac",
446
446
  "modified": true,
447
- "destinationSha256": "77958d8fb6d384d55f53c3ab200a7f812a951365e1c08e3ba35c93ef44bddcb3"
447
+ "destinationSha256": "94c79552f70a891888a6df342fde4cd0ac097344f779f9339c3cb3140a3729a6"
448
448
  },
449
449
  {
450
450
  "sourcePath": "tools/context-graph/src/semantic.ts",
451
451
  "destinationPath": "src/extraction/semantic.ts",
452
452
  "sourceSha256": "1a41fb3fc5a9508c76be59d1c50b74d70ec96411fcbb7f63b0e098c1813d8473",
453
453
  "modified": true,
454
- "destinationSha256": "9872f2b8ac3bd14f33194d76082fecf0fd34325a6e74b2397f538898aa8fe21e"
454
+ "destinationSha256": "214d0378b75af7d4960b06981b165da19a37c2ebccb34f8ffa485ca86776f94f"
455
455
  },
456
456
  {
457
457
  "sourcePath": "tools/context-graph/src/snapshot-checks.test.ts",
@@ -607,17 +607,22 @@
607
607
  "docs/ADR-012-impact-ranking.md",
608
608
  "docs/ADR-013-relative-module-requests.md",
609
609
  "docs/ADR-014-routing-declarations.md",
610
+ "docs/ADR-015-repository-document-identity.md",
611
+ "docs/ADR-016-hydration-preview.md",
612
+ "docs/ADR-017-shacl-validation-union.md",
610
613
  "docs/CLOUD-ENVIRONMENT.md",
611
614
  "docs/CONSUMER-TRIAL.md",
612
615
  "docs/ENVIRONMENT-VALIDATION.md",
613
616
  "docs/IMPACT-EVALUATION.md",
614
617
  "docs/MIGRATING-TO-WEFTLET.md",
615
618
  "docs/PROVIDERS.md",
619
+ "docs/RELEASE-1.0-PLAN.md",
616
620
  "docs/RELEASING.md",
617
621
  "docs/ROADMAP.md",
618
622
  "docs/SOURCE-INVENTORY.md",
619
623
  "docs/VALIDATION.md",
620
624
  "docs/VIEWER.md",
625
+ "docs/WEFTLET-2.0-PLAN.md",
621
626
  "docs/architecture-baseline.json",
622
627
  "docs/architecture-policy.md",
623
628
  "docs/extraction-manifest.json",
@@ -697,6 +702,7 @@
697
702
  "reviewed-licenses.json",
698
703
  "runtime-check.d.mts",
699
704
  "runtime-check.mjs",
705
+ "scripts/benchmark-shacl.mjs",
700
706
  "scripts/check-release-plan.mjs",
701
707
  "scripts/check-restoration.mjs",
702
708
  "scripts/clean-build.mjs",
@@ -728,6 +734,7 @@
728
734
  "scripts/update-inventory.mjs",
729
735
  "scripts/version-packages.mjs",
730
736
  "scripts/version-packages.test.ts",
737
+ "src/application/hydration-plan.ts",
731
738
  "src/application/overlay.test.ts",
732
739
  "src/application/overlay.ts",
733
740
  "src/application/saved-evidence.ts",
@@ -743,20 +750,27 @@
743
750
  "src/extraction/module-request.ts",
744
751
  "src/extraction/providers.test.ts",
745
752
  "src/extraction/providers.ts",
753
+ "src/extraction/repository-nodes.test.ts",
754
+ "src/extraction/repository-nodes.ts",
746
755
  "src/extraction/routing.test.ts",
747
756
  "src/extraction/routing.ts",
748
757
  "src/extraction/scip-project.test.ts",
749
758
  "src/extraction/scip-project.ts",
759
+ "src/extraction/semantic-cache.ts",
760
+ "src/extraction/semantic-identity.ts",
750
761
  "src/extraction/semantic-process.test.ts",
751
762
  "src/extraction/semantic-process.ts",
763
+ "src/extraction/semantic-sources.ts",
752
764
  "src/governance/governance.test.ts",
753
765
  "src/governance/governance.ts",
754
766
  "src/graph/authority.ts",
755
767
  "src/graph/ranking.test.ts",
756
768
  "src/graph/ranking.ts",
757
769
  "src/graph/rdf.ts",
770
+ "src/graph/shacl-shapes.ts",
758
771
  "src/infrastructure/module-resolution.ts",
759
772
  "src/interfaces/doctor.ts",
773
+ "src/interfaces/hydration-plan.test.ts",
760
774
  "src/interfaces/init.test.ts",
761
775
  "src/interfaces/init.ts",
762
776
  "src/mcp.ts",
@@ -768,11 +782,14 @@
768
782
  "src/telemetry.ts",
769
783
  "src/visualization/viewer-interaction.ts",
770
784
  "tests/architecture.test.ts",
785
+ "tests/hydration-plan.test.ts",
771
786
  "tests/module-boundaries.test.ts",
772
787
  "tests/rdf-ontology.test.ts",
773
788
  "tests/rdf.test.ts",
774
789
  "tests/routing.test.ts",
775
790
  "tests/runtime.test.ts",
791
+ "tests/semantic-identity.test.ts",
792
+ "tests/shacl-validation.test.ts",
776
793
  "tests/snapshot-lifecycle.test.ts"
777
794
  ],
778
795
  "publicationAuthorization": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weftlet/toolkit",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Evidence-backed context graphs for AI development agents: product intent, contracts, code, tests and runtime behavior",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -63,7 +63,7 @@
63
63
  "n3": "2.7.2",
64
64
  "rdf-validate-shacl": "0.6.5",
65
65
  "sparqljs": "3.7.4",
66
- "@weftlet/core": "^0.2.0"
66
+ "@weftlet/core": "^0.3.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@changesets/cli": "3.0.3",
@@ -118,6 +118,7 @@
118
118
  "release:publish": "node scripts/release.mjs --publish",
119
119
  "govern": "tsx src/cli.ts govern --policy architecture.policy.json --output .context-graph/architecture-report.json",
120
120
  "evaluate:impact": "tsx scripts/evaluation/run.ts",
121
+ "benchmark:shacl": "node scripts/benchmark-shacl.mjs",
121
122
  "weftlet": "tsx src/cli.ts",
122
123
  "changeset": "changeset",
123
124
  "release:version": "node scripts/version-packages.mjs"