@weftlet/toolkit 0.1.2 → 0.2.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 (55) hide show
  1. package/README.md +39 -3
  2. package/THIRD_PARTY_NOTICES.md +33 -0
  3. package/dist/application/hydrator.js +21 -6
  4. package/dist/application/overlay.js +46 -9
  5. package/dist/application/saved-evidence.d.ts +1 -0
  6. package/dist/configuration/config.d.ts +4 -0
  7. package/dist/configuration/config.js +12 -0
  8. package/dist/configuration/scip-project.d.ts +9 -0
  9. package/dist/configuration/scip-project.js +40 -0
  10. package/dist/extraction/codex-auth.js +9 -2
  11. package/dist/extraction/codex-command.d.ts +8 -0
  12. package/dist/extraction/codex-command.js +81 -0
  13. package/dist/extraction/document-references.d.ts +18 -0
  14. package/dist/extraction/document-references.js +94 -0
  15. package/dist/extraction/document.d.ts +9 -2
  16. package/dist/extraction/document.js +40 -47
  17. package/dist/extraction/module-request.d.ts +3 -0
  18. package/dist/extraction/module-request.js +25 -0
  19. package/dist/extraction/repository-nodes.d.ts +7 -0
  20. package/dist/extraction/repository-nodes.js +20 -0
  21. package/dist/extraction/routing.d.ts +14 -0
  22. package/dist/extraction/routing.js +151 -0
  23. package/dist/extraction/scip-project.d.ts +3 -0
  24. package/dist/extraction/scip-project.js +33 -0
  25. package/dist/extraction/semantic-process.js +17 -5
  26. package/dist/extraction/semantic.js +32 -5
  27. package/dist/extraction/static.d.ts +7 -3
  28. package/dist/extraction/static.js +15 -9
  29. package/dist/graph/query.js +21 -34
  30. package/dist/graph/ranking.d.ts +10 -0
  31. package/dist/graph/ranking.js +85 -0
  32. package/dist/interfaces/doctor.js +12 -3
  33. package/docs/ADR-002-saved-evidence.md +7 -1
  34. package/docs/ADR-003-draft-overlays.md +6 -0
  35. package/docs/ADR-004-rdf-query-path.md +6 -0
  36. package/docs/ADR-006-provider-boundaries.md +5 -0
  37. package/docs/ADR-010-committed-source-indexing.md +77 -0
  38. package/docs/ADR-011-explicit-document-links.md +48 -0
  39. package/docs/ADR-012-impact-ranking.md +50 -0
  40. package/docs/ADR-013-relative-module-requests.md +58 -0
  41. package/docs/ADR-014-routing-declarations.md +108 -0
  42. package/docs/ADR-015-repository-document-identity.md +57 -0
  43. package/docs/CONSUMER-TRIAL.md +166 -0
  44. package/docs/ENVIRONMENT-VALIDATION.md +9 -0
  45. package/docs/IMPACT-EVALUATION.md +363 -0
  46. package/docs/PROVIDERS.md +30 -2
  47. package/docs/RELEASE-1.0-PLAN.md +221 -0
  48. package/docs/RELEASING.md +16 -6
  49. package/docs/ROADMAP.md +53 -5
  50. package/docs/SOURCE-INVENTORY.md +10 -0
  51. package/docs/VALIDATION.md +438 -0
  52. package/docs/VIEWER.md +5 -0
  53. package/docs/WEFTLET-2.0-PLAN.md +282 -0
  54. package/docs/extraction-manifest.json +94 -17
  55. package/package.json +5 -2
@@ -0,0 +1,282 @@
1
+ # Weftlet 2.0 product plan
2
+
3
+ Status: proposed direction captured at the maintainer's request on 2026-10-26.
4
+ Baseline: published `@weftlet/core` and `@weftlet/toolkit` **0.2.0**, with release evidence in
5
+ [VALIDATION.md](VALIDATION.md). **“2.0” names this product plan; it does not announce npm
6
+ version 2.0.0, a delivery date, or a single large release.** Changes should ship through small,
7
+ reviewed milestones using the existing Changesets workflow.
8
+
9
+ The maintainer supports developing this direction. Detailed schemas, hosting, commercial
10
+ terms and policy choices below remain proposals to resolve before their dependent work.
11
+ This planning increment implements no features, changes no license and provisions no services.
12
+
13
+ ## Product outcome
14
+
15
+ Help teams establish and maintain an agreed set of product rules, connect those rules to
16
+ implementation and evidence, and make the relevant rules available to development agents.
17
+
18
+ A team should be able to adopt Weftlet in a poorly documented project, generate a bounded set
19
+ of cited proposals, approve or correct them, publish documentation through its chosen source
20
+ adapter, and see subsequent disagreements between intent, code and other documents.
21
+ An owner can confirm that the current implementation expresses the intended business rules
22
+ and establish an initial documentation baseline through explicit review.
23
+
24
+ The first complete demonstration is: a repository with sparse documentation produces useful
25
+ candidate rules; a reviewer resolves a real disagreement; a documentation PR is merged; an
26
+ agent retrieves the approved, scoped decision through MCP and identifies any remaining code gap.
27
+
28
+ ## Current capabilities and gaps
29
+
30
+ | Area | Available in 0.2.0 | Work proposed here |
31
+ | --- | --- | --- |
32
+ | 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 |
33
+ | Partial documentation | Selected committed Markdown/text extraction, document links, scoped coverage/gap reports | Cross-source reconciliation, amendment proposals and approval workflow |
34
+ | 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 |
35
+ | Agent decisions | Task/checklist text helps querying and source selection | Capture explicit accepted decisions as durable evidence before polished docs exist |
36
+ | 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 |
37
+ | 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 |
38
+ | Setup and UI | CLI init/config/doctor; bounded HTML/DOT/SVG viewer | Assisted setup and optional hosted review/management application |
39
+ | Source adapters | Repository evidence plus extractor/invariant extension points | Explicit proposal/publication capabilities; GitHub Markdown first, other sources later |
40
+
41
+ Current approval uses document paths/globs. Generated text written under an approved path could
42
+ appear to come from a declared source, even though model-extracted assertions remain unreviewed.
43
+ That is a prerequisite to address before automatic documentation backfill. Current citations
44
+ also do not preserve a complete code → generated document → re-extracted assertion lineage.
45
+ Existing gap reports do not establish completeness of a project's business requirements.
46
+
47
+ ## Immediate priority: consumer integration findings
48
+
49
+ The maintainer supplied a consumer integration report on 2026-10-26. The
50
+ [consumer hardening and 1.0 task list](RELEASE-1.0-PLAN.md) records its seven items and acceptance
51
+ criteria. First ship the blocking repository-document identity/kind fix as an isolated patch;
52
+ then work through the other improvements toward an official 1.0. Ordinary reliability fixes
53
+ ship independently of the companion platform described here.
54
+
55
+ | Intake item | Status | Next action |
56
+ | --- | --- | --- |
57
+ | Consumer integration report | Received; task list recorded | Preserve private evidence with the consumer and use public-safe upstream reproductions |
58
+ | Reproduction and severity | Identity/kind defect is the reported adoption blocker | Reproduce two-document conflict upstream; keep validation latency a separate investigation |
59
+ | Fix/release mapping | Blocker patch in progress; remaining tasks planned | Release T01 first, then T02–T07 and genuine consumer acceptance before official 1.0 |
60
+
61
+ For each finding, retain toolkit/version, repository SHA, relevant configuration and scope,
62
+ exact command or MCP request, expected/actual behavior, logs/exit status, snapshot identity,
63
+ dirty-worktree state and provider details where relevant. Distinguish infrastructure failure,
64
+ configuration error, extraction gap, incorrect relationship, policy violation and usability issue.
65
+ Use the [consumer trial](CONSUMER-TRIAL.md) for evidence collection. Private application code,
66
+ logs and product documents stay with the consumer; publish only reviewed reproductions and summaries.
67
+ Consumer findings do not authorize modifying the original source application from this repository.
68
+
69
+ ## Proposed product boundaries
70
+
71
+ - **Local toolkit:** indexing, immutable evidence, generation orchestration, local review data,
72
+ queries and MCP continue to work in a repository. Saved queries remain available when a
73
+ model, website or network is unavailable, with explicit version/freshness limitations.
74
+ - **Optional companion service:** project connections, review queues, decisions, publication
75
+ jobs, history, synchronization status and organization management. Customers choose which
76
+ proposals and source excerpts leave their machine; whole-repository upload is not a prerequisite.
77
+ - **Source adapters:** read versioned evidence, prepare a target-specific proposal, and apply it
78
+ through explicitly supported operations. Read access does not imply write capability.
79
+ - **Model providers:** perform bounded extraction/generation under the same structured-output,
80
+ citation, timeout, cancellation and cache contracts. Provider output cannot grant approval.
81
+
82
+ Initially, published documentation on the selected GitHub branch is the authoritative document
83
+ destination. The companion tracks proposals and decisions without silently becoming a competing
84
+ source of truth. Review decisions and their provenance must be exportable in a versioned format
85
+ usable by the toolkit; access to existing evidence cannot depend on continued subscription.
86
+
87
+ ## Evidence and decision semantics
88
+
89
+ Define these records before the website depends on them; exact field names remain an ADR task:
90
+
91
+ | Record | Required meaning |
92
+ | --- | --- |
93
+ | Evidence | Source identity, revision/commit, digest, citation span, extraction method and scope |
94
+ | Proposed claim | Stable identity and revision; kind (implementation description or proposed requirement); statement, conditions, domain and exceptions; supporting/contradicting evidence; inference and uncertainty |
95
+ | Derivation | Links from source evidence through model output, generated documents and subsequent extraction; provider/model/prompt identities |
96
+ | Decision | Authorized actor, exact claim/content revision, scope, explicit meaning (accuracy review or adoption as intent), action, timestamp/reason and any superseded decision |
97
+ | Publication | Destination identity/base revision, proposed diff, idempotency identity, PR/write result and published revision |
98
+ | Reconciliation | Applicable rule versions, compared source revisions, potential conflict or implementation gap, and resolution status |
99
+
100
+ Preserve these distinctions throughout extraction, RDF, queries, visualization and write-back:
101
+
102
+ 1. Code supports statements about implementation. Tests support what was checked; a test-file
103
+ link does not prove execution. Runtime traces describe observations for their recorded scope.
104
+ Owners can explicitly adopt a proposed rule as intent; model confidence cannot do that.
105
+ 2. Source approval and approval of an extracted assertion are separate. Approval is scoped to
106
+ content/claim revisions and authorized actors, not inherited merely from a file location.
107
+ 3. Re-ingesting generated text preserves its derivation and does not create independent
108
+ corroboration or automatically increase confidence or authority.
109
+ 4. Code changes can stale supporting evidence or implementation summaries. They do not revoke
110
+ or rewrite approved business intent. Superseding intent requires a recorded decision.
111
+ 5. Decision status, publication status, graph freshness and implementation compliance are
112
+ separate. Approval, opening a PR, merging it and refreshing a graph are distinct events.
113
+ 6. Scope includes domain, conditions, applicable population/version and exceptions. Fourteen-day
114
+ and thirty-day rules may legitimately coexist in different scopes. A newer document does
115
+ not automatically override another domain or a shared contract's owner.
116
+ 7. Model-identified conflicts remain potential conflicts until reviewed or deterministically
117
+ established. Only explicit approved deterministic rules become hard CI gates. Missing required
118
+ evidence remains unknown/incomplete, not a pass.
119
+ 8. Source text is evidence input. It cannot authorize writes, impersonate an approver or instruct
120
+ the extraction process to alter its permissions. Approval records need a verifiable trust basis.
121
+
122
+ ## Delivery sequence
123
+
124
+ M0 consumer hardening is in progress; M1–M7 remain proposed work. Each should be split into
125
+ independently testable PRs and retain saved-snapshot compatibility; schema changes need an
126
+ explicit migration ADR.
127
+
128
+ | Milestone | Depends on | Deliverable and completion evidence |
129
+ | --- | --- | --- |
130
+ | **M0 — Consumer hardening** | Received report; [1.0 task list](RELEASE-1.0-PLAN.md) | Ship the identity/kind blocker patch first, then bounded setup/reuse/diagnostics/coverage improvements and genuine consumer acceptance. Release independently of the companion platform. |
131
+ | **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. |
132
+ | **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. |
133
+ | **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. |
134
+ | **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. |
135
+ | **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. |
136
+ | **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. |
137
+ | **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. |
138
+
139
+ ### M2: bootstrap without manufacturing intent
140
+
141
+ Begin from the existing implementation graph and selected code/tests. Produce cited implementation
142
+ summaries, candidate rules, conditions/exceptions and questions requiring an owner. Render drafts
143
+ from the same structured claims used by the graph, avoiding a mandatory prose-generation then
144
+ prose-re-extraction round trip. Generated descriptions remain useful and queryable before approval,
145
+ with their status visible. Commit-only generation remains the initial reproducible baseline;
146
+ support for working changes must be explicit and retain draft identities.
147
+
148
+ Test dead or conditional code, ambiguous names, unsupported interpretations and behavior that could
149
+ be a bug. Selecting a module does not establish exhaustive coverage of its business rules.
150
+ Changed inputs invalidate affected generated claims; unchanged artifacts can be reused. Keep the
151
+ last valid snapshot/proposals when generation fails. No automatic generation during ordinary queries.
152
+
153
+ ### M3: intent created during development
154
+
155
+ Capture concise, explicitly accepted decisions with their source instruction and acceptance event.
156
+ The actual owner instruction can be recorded before a formal document exists; an agent's proposed
157
+ interpretation retains proposal status. Do not treat every prompt, task argument, plan or completed
158
+ code change as approved intent. Review any generated paraphrase independently of the original source.
159
+
160
+ Compare code → documents, documents → code, and documents → documents. Group evidence by domain
161
+ and shared contract, retain contradictions and require explicit resolution of competing claims.
162
+ If a reviewer approves a thirty-day refund policy while code enforces fourteen days, publish the
163
+ decision/documentation and keep the implementation gap open. Confidence or recency alone cannot
164
+ select the authoritative rule. Capture new discoveries separately from frozen evaluation expectations.
165
+
166
+ ### M4: review, publication and agent access
167
+
168
+ Review coherent batches by capability/workflow, emphasizing consequential changes and unresolved
169
+ questions. Show the proposed statement, citations/source revisions, existing rules, related code/tests
170
+ and exact destination diff. Offer approve, edit, reject and request-clarification actions. If bulk
171
+ approval is supported, bind it to an explicit immutable set of claims and revisions.
172
+ Make approval meaning explicit: confirming an implementation description's accuracy records that
173
+ review; adopting a requirement as product intent is a separate decision.
174
+
175
+ Use GitHub Markdown and PR creation as the first source-write workflow. Preserve human edits;
176
+ generated sections can refresh under an explicitly configured policy. Check destination revisions
177
+ before applying updates, use idempotent operations, and show conflicts/failures rather than overwrite.
178
+ Opening a PR does not mark documentation published. For the initial integration, publication on the
179
+ configured branch establishes the effective documentation revision; any earlier effective-decision
180
+ policy must be explicitly designed and displayed.
181
+
182
+ MCP should return relevant approved rules and exceptions, their revisions and provenance, unresolved
183
+ conflicts, implementation gaps and synchronization/freshness status. Cloud and local views must agree
184
+ on the underlying facts. Historical or draft evidence remains usable with labels and cannot silently
185
+ satisfy current-diff validation. MCP access improves consistency but does not prove model compliance.
186
+
187
+ Before a shared hosted pilot, validate project/tenant isolation, authenticated review permissions,
188
+ export/deletion/retention behavior, browser interaction and accessibility, and failure recovery.
189
+ Choose the hosting stack and operating budget in a separate design decision.
190
+
191
+ ### M5–M6: execution choices and setup experience
192
+
193
+ | Execution choice | Intended behavior |
194
+ | --- | --- |
195
+ | Local Codex | Preserve the existing developer login and configured local CLI. No mandatory API billing or hosted generation. |
196
+ | Customer provider | Add supported direct API adapters with credentials on the chosen execution side. Decide explicitly whether any hosted BYOK mode stores customer secrets. |
197
+ | 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. |
198
+
199
+ Separate project/service authorization from upstream model credentials and business-rule approval.
200
+ Individual ChatGPT/Codex login sessions stay on the developer's machine. Managed inference must use
201
+ provider accounts and terms suitable for the offered service. Never silently fall back from local or
202
+ customer-paid execution to Weftlet-billed inference, or change models during recovery without policy.
203
+
204
+ Show selected source scope, model, estimated usage, budget cap and actual usage. Establish spend
205
+ reservations/limits, cancellation, timeouts, provider failure reporting, retry/idempotency behavior,
206
+ cache accounting and reconciliation of uncertain charges. Distinguish actual provider consumption
207
+ from an estimate; bytes/documents alone do not establish a price. Credentials stay out of configs,
208
+ source control and logs. Live tests require explicit bounded budgets; use deterministic fixtures in CI.
209
+
210
+ Guided setup should inspect the repository first, then suggest roots, documentation scope, TypeScript
211
+ projects/aliases and configuration. AI may help with ambiguous choices. Show concrete proposed
212
+ changes and data that would leave the machine before the first cloud operation. Make the first run
213
+ small, explain missing prerequisites, and preserve an existing setup. Do not advertise unsupported
214
+ languages, frameworks, providers or adapter write operations. The cloud dashboard can then show
215
+ project readiness, coverage, progress, review batches and usage.
216
+
217
+ ## Evaluation and release criteria
218
+
219
+ Use public-safe fixtures covering no docs, partial docs, stale tickets, conflicting documentation,
220
+ same wording in different domains, changed requirements and asynchronous consumers. Freeze expected
221
+ findings before measurement, and supplement deterministic checks with separately reported, budgeted
222
+ live-model evaluations and a private real-project pilot.
223
+
224
+ Required cases include invalid/misattributed citations, generated-doc feedback loops, approval under
225
+ an approved directory without content review, stale/forged/unauthorized approvals, changes after
226
+ approval, rename/delete, supersession, conflicting effective scopes, concurrent reviewers, human edits,
227
+ duplicate/retried writes, partial publication failure, offline saved queries and stale MCP clients.
228
+ Hosted work adds tenant isolation, credential handling, cancellation and usage/billing recovery tests.
229
+
230
+ Record source/config/model revisions, expected relationships, retrieval within declared budgets,
231
+ missed consumers, incorrect claims, useful discoveries, review time, edits/rejections, query/generation
232
+ latency, cache reuse and cost. Approval rate alone is not accuracy. Set quality/performance targets
233
+ after obtaining the first baseline; do not invent pass thresholds or imply complete business coverage.
234
+
235
+ Keep deterministic tests, provider-dependent integration tests, browser tests and real-project
236
+ evaluation distinct. Existing browser/live-authentication, larger-graph and genuine fresh-cloud
237
+ restoration gaps remain tracked in [ROADMAP.md](ROADMAP.md) and
238
+ [ENVIRONMENT-VALIDATION.md](ENVIRONMENT-VALIDATION.md); this plan does not close them.
239
+ Only advertise capabilities after their relevant validation. Preserve the current core/toolkit
240
+ boundary, snapshot provenance, licenses and supported local installation through each increment.
241
+
242
+ ## Commercial direction and decisions still open
243
+
244
+ The proposed commercial value is ongoing rule review, reconciliation and source synchronization.
245
+ Managed AI reduces setup friction and can be offered separately from the collaboration service.
246
+
247
+ | Offering | Proposed scope |
248
+ | --- | --- |
249
+ | Open-source toolkit | Local extraction/graphs/queries/MCP, portable decision records and file workflows |
250
+ | Hosted companion | Shared review queues, permissions/history, source synchronization, managed PRs and organization administration |
251
+ | Managed inference | Included usage or transparent metered credits with explicit budgets; customers can also choose local tools or supported BYOK |
252
+ | Enterprise options | Evaluate self-hosting, organizational controls, deployment needs and support from customer evidence |
253
+
254
+ No prices, margins, provider commitments or subscription terms are set. Keep workspace/team pricing
255
+ and AI consumption understandable and separable. Validate review burden, recurring usefulness and
256
+ actual model/hosting cost before choosing a pricing model.
257
+
258
+ The recommendation is to retain Apache-2.0 for the toolkit and evaluate the companion's commercial
259
+ license separately. The maintainer is open to future licensing changes, but no change is selected.
260
+ Existing Apache releases retain their granted permissions; future changes require the rights to
261
+ the affected code and preservation of applicable third-party licenses, notices and attribution.
262
+
263
+ Resolve these decisions in small ADRs as their milestones approach:
264
+
265
+ - Claim identity, derivation format, approval authenticity, revocation/supersession and legacy migration.
266
+ - Domain/shared-contract ownership, scope/exception resolution and when approved decisions take effect.
267
+ - Canonical source selection, review-record storage/export and local/cloud synchronization protocol.
268
+ - Companion repository/layout, hosting stack, identity/tenancy, retention and operating budget.
269
+ - First managed provider, direct versus hosted BYOK, supported models and provider commercial terms.
270
+ - Usage units, cache/retry/failed-job charges, budget enforcement, pricing and billing policy.
271
+ - Adapter-specific write capabilities, revision checks and failure recovery.
272
+ - License/product boundaries and any enterprise/self-hosting commitments.
273
+
274
+ ## Next handoff
275
+
276
+ 1. Resolve and publish the identity/kind blocker patch under M0, then obtain a genuine consumer re-run.
277
+ 2. Complete the remaining [1.0 tasks](RELEASE-1.0-PLAN.md) and review acceptance without waiting for the website or managed AI.
278
+ 3. Design M1's minimal records and compatibility rules, then implement M2 on bounded public fixtures.
279
+ 4. Review real extraction/review results before committing to hosted scope, paid operation or more adapters.
280
+
281
+ Maintain this plan as milestones become concrete, linking implementation PRs, ADRs and validation
282
+ evidence. Keep [ROADMAP.md](ROADMAP.md) as the concise index of delivered capability and remaining work.
@@ -24,7 +24,7 @@
24
24
  "destinationPath": "THIRD_PARTY_NOTICES.md",
25
25
  "sourceSha256": "c98c42f3c3c74f4c4f38f45b785ea15de439ad6471d82040d13100b36616b01e",
26
26
  "modified": true,
27
- "destinationSha256": "1c8bb26c7385fef7d391db9c89797b6f45bf6c5b102d7e832295783eb6c28d1a"
27
+ "destinationSha256": "cd1b40a873371c1fb20599ae8dc5d1131ea4ba650c1f4151415e2cb038339d8d"
28
28
  },
29
29
  {
30
30
  "sourcePath": "tools/context-graph/action/action.yml",
@@ -108,7 +108,7 @@
108
108
  "destinationPath": "package.json",
109
109
  "sourceSha256": "a575dbb2fed8c554b95e8e9b3e03a0c21cab1be7249860bbebc18e046b2ff78d",
110
110
  "modified": true,
111
- "destinationSha256": "017fe298662e434efa27d4f21a0adb0d857fa373a6199ed2d623a6c630c5b451"
111
+ "destinationSha256": "897f14e438ff7e639f8a906c21fa8e436285180ef05dc6f3c5f73bb94c586ed6"
112
112
  },
113
113
  {
114
114
  "sourcePath": "tools/context-graph/packages/core/LICENSE",
@@ -143,14 +143,14 @@
143
143
  "destinationPath": "packages/core/package.json",
144
144
  "sourceSha256": "2a29066eb8452f22fafcb06bb035a84dda93c5705dba32aba600a1b7e5aaf19c",
145
145
  "modified": true,
146
- "destinationSha256": "9dbd393a312bb6a992b53d2624279b62991e64609beb506744186614f9b194cf"
146
+ "destinationSha256": "96b88f6a7de48d24b24697fb8824bf46f340eec8723aed19b06684d21784c1fb"
147
147
  },
148
148
  {
149
149
  "sourcePath": "tools/context-graph/packages/core/src/core.ts",
150
150
  "destinationPath": "packages/core/src/core.ts",
151
151
  "sourceSha256": "cb3f4eb7bfe9f458494607406664445a276aad37235930a043d400ea9211ed16",
152
152
  "modified": true,
153
- "destinationSha256": "64a30913c01ff2f3e112a6bcafbc142cb91fc5482f01b2aa90fae9382252dbfa"
153
+ "destinationSha256": "0287d0640f2ff078da19be1439d02fcab22998262562d4af7b5f26ddca0839f4"
154
154
  },
155
155
  {
156
156
  "sourcePath": "tools/context-graph/packages/core/src/index.ts",
@@ -192,21 +192,21 @@
192
192
  "destinationPath": "scripts/check-publication.mjs",
193
193
  "sourceSha256": "88692c21d34cef2d2e5b20c92ab3ec26cbe6336889dbb7b534c681ded7f466b2",
194
194
  "modified": true,
195
- "destinationSha256": "6aa819a74fea8b161396b3a8c52e8e86ea2db856bc10ffbfdebaf22fa0af2cfe"
195
+ "destinationSha256": "7db15ce23e217d8bc14772ff1287dfff0f81e9f402b3d8a5053d386736e8c078"
196
196
  },
197
197
  {
198
198
  "sourcePath": "tools/context-graph/scripts/generate-third-party-notices.mjs",
199
199
  "destinationPath": "scripts/generate-third-party-notices.mjs",
200
200
  "sourceSha256": "42cd4996ecab49b008634958e47b0a9eadf9ea775678b8daaeeafea59eaabadf",
201
201
  "modified": true,
202
- "destinationSha256": "5caf7a08a42e6c482a5c46d87e71413a6776a5af34685dbe98a16ba7035f5c0c"
202
+ "destinationSha256": "6e9ddb9a0985e2c39d8386168871efeb2589f6bc1bf8c24684cf6c546eced1b2"
203
203
  },
204
204
  {
205
205
  "sourcePath": "tools/context-graph/src/agent-context.test.ts",
206
206
  "destinationPath": "src/application/agent-context.test.ts",
207
207
  "sourceSha256": "cb87b9b7e18ae5d8ba39d4ebf1d45556479d6efb3ffa75276bc6164ee2bf30f1",
208
208
  "modified": true,
209
- "destinationSha256": "f1ed006615ae0d07fb924c60fccad90a3f8cd4e5f12898d4a07db0a5fa65e7d5"
209
+ "destinationSha256": "c72ba1d20d1ad85ee295a7041e85a99cf973b6114eff21524d808997929e3184"
210
210
  },
211
211
  {
212
212
  "sourcePath": "tools/context-graph/src/agent-context.ts",
@@ -248,14 +248,14 @@
248
248
  "destinationPath": "src/configuration/config.test.ts",
249
249
  "sourceSha256": "70bcda6d6b48ff6fa03223c9420fe3e0e3e32c688e0a14f11034515e0707dee4",
250
250
  "modified": true,
251
- "destinationSha256": "ae67cb42f86dbd72d09eac20a0755080bf9394e849dc4fdfdfe0a43b0296c6b2"
251
+ "destinationSha256": "ff4d15018ec35d21a95c589cf2c74bce2e340f9042b2d3ecaabca5889609e3aa"
252
252
  },
253
253
  {
254
254
  "sourcePath": "tools/context-graph/src/config.ts",
255
255
  "destinationPath": "src/configuration/config.ts",
256
256
  "sourceSha256": "e9ee8cf2134d274aa6f6a21545959fbec97e958181d9032c073293f28e04d6ca",
257
257
  "modified": true,
258
- "destinationSha256": "ce6550967829b74147909121735c4dccf70982c3f9ee9ddc860b4f63535d5de0"
258
+ "destinationSha256": "5e34e4dfa38219570bd6f13239609b432830e76162f44a768a929895f66dc02a"
259
259
  },
260
260
  {
261
261
  "sourcePath": "tools/context-graph/src/core.ts",
@@ -283,7 +283,7 @@
283
283
  "destinationPath": "src/extraction/document.ts",
284
284
  "sourceSha256": "62a2da37d8cc0637b192b7e70ae7a0dce72244d335da9df0e0ad9b0eb7c4e1f1",
285
285
  "modified": true,
286
- "destinationSha256": "819372a1ba01ed2204e2ed620d4afefb03ab8b7431e77e02f2b61bc605807124"
286
+ "destinationSha256": "0235abe0e2a7a0cb06495027c5dc240cf5b0658faabbdc01d0006fa3b456432c"
287
287
  },
288
288
  {
289
289
  "sourcePath": "tools/context-graph/src/git.test.ts",
@@ -311,14 +311,14 @@
311
311
  "destinationPath": "src/application/hydrator.test.ts",
312
312
  "sourceSha256": "95f20a526fe69ce3a506ef01da1c20827e09d631a34126e781a07979cc43de07",
313
313
  "modified": true,
314
- "destinationSha256": "83ca72d394d9eac8eef5dbc9438c7914442dbad3bbaa07c33f1e756e6d11fd39"
314
+ "destinationSha256": "9baaacb29c863abdb48c96b054a7f430ce18784badfe585ec5ee88a17f21c0bd"
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": "c95592ccb8626e8d3629f35d24e51d9d99be698c8ae270c794df47e4b3a46d14"
321
+ "destinationSha256": "356dcec76c68e76492a56fd17017e1809f8cc30f237bfe540c827ade8337ad88"
322
322
  },
323
323
  {
324
324
  "sourcePath": "tools/context-graph/src/index.ts",
@@ -388,14 +388,14 @@
388
388
  "destinationPath": "src/graph/query.test.ts",
389
389
  "sourceSha256": "ba07c52566da979fcbb451b0c0c99b466521993cb49415ff8b35df2b01d4ecaf",
390
390
  "modified": true,
391
- "destinationSha256": "e0030981026a6643d8032174f37a0a41b17724ee6a86dae55e6b12c51f5de77f"
391
+ "destinationSha256": "68d7405765dec5975370f79caaf8708db42dd3dd464a7ec9c3919c796ee81b79"
392
392
  },
393
393
  {
394
394
  "sourcePath": "tools/context-graph/src/query.ts",
395
395
  "destinationPath": "src/graph/query.ts",
396
396
  "sourceSha256": "4d67f87ca660cefe9686fb5b775f86a997a25d539819ea81d321c8bd1e0aaa39",
397
397
  "modified": true,
398
- "destinationSha256": "93e813d2e70d09522418e07f9ffeb36d71795c026099a8b57559b0c10b150a76"
398
+ "destinationSha256": "ead61dfde748cd1a02c8b1a14dc729173a6b85ec3b8213af2bd5169c60b70253"
399
399
  },
400
400
  {
401
401
  "sourcePath": "tools/context-graph/src/request.test.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": "64b4e55294ab37bc84a1c2ad0a8a563003d8ad2329e224ef0c6822965b14d257"
454
+ "destinationSha256": "eb31d432f0cbb7bd6799562a7e514aa04bbbd2df221f4ef916989eeeea3997f0"
455
455
  },
456
456
  {
457
457
  "sourcePath": "tools/context-graph/src/snapshot-checks.test.ts",
@@ -479,7 +479,7 @@
479
479
  "destinationPath": "src/extraction/static.ts",
480
480
  "sourceSha256": "f8dcff3e10361314c06911dc7cec1e2cb0f8d9af68a6c61a30b2a741c5c3a385",
481
481
  "modified": true,
482
- "destinationSha256": "39ada50a57e2130d27c22eb18531c3feb7160004b198eb5904950227e57012df"
482
+ "destinationSha256": "94190f11651b21372b2c3a834e30cde5d333893bfad0b66755e5f698608d2fdb"
483
483
  },
484
484
  {
485
485
  "sourcePath": "tools/context-graph/src/storage.ts",
@@ -602,15 +602,25 @@
602
602
  "docs/ADR-007-toolkit-modules.md",
603
603
  "docs/ADR-008-weftlet-packages.md",
604
604
  "docs/ADR-009-release-automation.md",
605
+ "docs/ADR-010-committed-source-indexing.md",
606
+ "docs/ADR-011-explicit-document-links.md",
607
+ "docs/ADR-012-impact-ranking.md",
608
+ "docs/ADR-013-relative-module-requests.md",
609
+ "docs/ADR-014-routing-declarations.md",
610
+ "docs/ADR-015-repository-document-identity.md",
605
611
  "docs/CLOUD-ENVIRONMENT.md",
612
+ "docs/CONSUMER-TRIAL.md",
606
613
  "docs/ENVIRONMENT-VALIDATION.md",
614
+ "docs/IMPACT-EVALUATION.md",
607
615
  "docs/MIGRATING-TO-WEFTLET.md",
608
616
  "docs/PROVIDERS.md",
617
+ "docs/RELEASE-1.0-PLAN.md",
609
618
  "docs/RELEASING.md",
610
619
  "docs/ROADMAP.md",
611
620
  "docs/SOURCE-INVENTORY.md",
612
621
  "docs/VALIDATION.md",
613
622
  "docs/VIEWER.md",
623
+ "docs/WEFTLET-2.0-PLAN.md",
614
624
  "docs/architecture-baseline.json",
615
625
  "docs/architecture-policy.md",
616
626
  "docs/extraction-manifest.json",
@@ -618,6 +628,47 @@
618
628
  "docs/licenses/lru-cache-11.5.3-BlueOak.md",
619
629
  "docs/licenses/negotiate-1.0.1-BSD.txt",
620
630
  "docs/licenses/spark-md5-3.0.2-MIT.txt",
631
+ "evaluations/dispatch/README.md",
632
+ "evaluations/dispatch/baseline.json",
633
+ "evaluations/dispatch/cases.json",
634
+ "evaluations/dispatch/context-graph.config.json",
635
+ "evaluations/dispatch/project/README.md",
636
+ "evaluations/dispatch/project/docs/delivery-flow.md",
637
+ "evaluations/dispatch/project/docs/dispatch-contract.md",
638
+ "evaluations/dispatch/project/docs/dispatch-policy.md",
639
+ "evaluations/dispatch/project/package.json",
640
+ "evaluations/dispatch/project/routing/dispatch.json",
641
+ "evaluations/dispatch/project/src/api/dispatch.ts",
642
+ "evaluations/dispatch/project/src/archive/consumer.ts",
643
+ "evaluations/dispatch/project/src/audit/consumer.ts",
644
+ "evaluations/dispatch/project/src/contracts/dispatch-plan.ts",
645
+ "evaluations/dispatch/project/src/contracts/dispatch-receipt.ts",
646
+ "evaluations/dispatch/project/src/contracts/dispatch-request.ts",
647
+ "evaluations/dispatch/project/src/dispatch/executor.ts",
648
+ "evaluations/dispatch/project/src/dispatch/outcomes.ts",
649
+ "evaluations/dispatch/project/src/dispatch/planner.ts",
650
+ "evaluations/dispatch/project/src/dispatch/policy.ts",
651
+ "evaluations/dispatch/project/src/dispatch/retry.ts",
652
+ "evaluations/dispatch/project/src/refund/planner.ts",
653
+ "evaluations/dispatch/project/src/refund/policy.ts",
654
+ "evaluations/dispatch/project/src/transport/queue.ts",
655
+ "evaluations/dispatch/project/test/archive.test.ts",
656
+ "evaluations/dispatch/project/test/dispatch.test.ts",
657
+ "evaluations/dispatch/project/test/policy.test.ts",
658
+ "evaluations/dispatch/project/test/refund.test.ts",
659
+ "evaluations/dispatch/project/tsconfig.json",
660
+ "evaluations/dispatch/relative-imports-baseline.json",
661
+ "evaluations/dispatch/routing-baseline.json",
662
+ "evaluations/dispatch/routing-protocol.md",
663
+ "evaluations/dispatch/routing.config.json",
664
+ "evaluations/weftlet/baseline.json",
665
+ "evaluations/weftlet/cases.json",
666
+ "evaluations/weftlet/context-graph.config.json",
667
+ "evaluations/weftlet/document-links-baseline.json",
668
+ "evaluations/weftlet/document-only.mjs",
669
+ "evaluations/weftlet/ranking-baseline.json",
670
+ "evaluations/weftlet/source-project-baseline.json",
671
+ "evaluations/weftlet/source-project.config.json",
621
672
  "examples/generic-typescript/context-graph.oml.config.json",
622
673
  "examples/pipeline/context-graph.config.json",
623
674
  "examples/pipeline/docs/admission.md",
@@ -653,6 +704,14 @@
653
704
  "scripts/check-restoration.mjs",
654
705
  "scripts/clean-build.mjs",
655
706
  "scripts/cloud-install.sh",
707
+ "scripts/evaluation/protocol.test.ts",
708
+ "scripts/evaluation/protocol.ts",
709
+ "scripts/evaluation/run.test.ts",
710
+ "scripts/evaluation/run.ts",
711
+ "scripts/evaluation/score.test.ts",
712
+ "scripts/evaluation/score.ts",
713
+ "scripts/git-content.mjs",
714
+ "scripts/inventory.test.ts",
656
715
  "scripts/npm-auth.mjs",
657
716
  "scripts/npm-auth.test.ts",
658
717
  "scripts/npm-command.mjs",
@@ -676,14 +735,30 @@
676
735
  "src/application/overlay.ts",
677
736
  "src/application/saved-evidence.ts",
678
737
  "src/cli.ts",
738
+ "src/configuration/scip-project.ts",
679
739
  "src/extraction/codex-auth.test.ts",
680
740
  "src/extraction/codex-auth.ts",
741
+ "src/extraction/codex-command.test.ts",
742
+ "src/extraction/codex-command.ts",
743
+ "src/extraction/document-references.ts",
744
+ "src/extraction/document.test.ts",
745
+ "src/extraction/module-request.test.ts",
746
+ "src/extraction/module-request.ts",
681
747
  "src/extraction/providers.test.ts",
682
748
  "src/extraction/providers.ts",
749
+ "src/extraction/repository-nodes.test.ts",
750
+ "src/extraction/repository-nodes.ts",
751
+ "src/extraction/routing.test.ts",
752
+ "src/extraction/routing.ts",
753
+ "src/extraction/scip-project.test.ts",
754
+ "src/extraction/scip-project.ts",
755
+ "src/extraction/semantic-process.test.ts",
683
756
  "src/extraction/semantic-process.ts",
684
757
  "src/governance/governance.test.ts",
685
758
  "src/governance/governance.ts",
686
759
  "src/graph/authority.ts",
760
+ "src/graph/ranking.test.ts",
761
+ "src/graph/ranking.ts",
687
762
  "src/graph/rdf.ts",
688
763
  "src/infrastructure/module-resolution.ts",
689
764
  "src/interfaces/doctor.ts",
@@ -701,7 +776,9 @@
701
776
  "tests/module-boundaries.test.ts",
702
777
  "tests/rdf-ontology.test.ts",
703
778
  "tests/rdf.test.ts",
779
+ "tests/routing.test.ts",
704
780
  "tests/runtime.test.ts",
781
+ "tests/semantic-identity.test.ts",
705
782
  "tests/snapshot-lifecycle.test.ts"
706
783
  ],
707
784
  "publicationAuthorization": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weftlet/toolkit",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
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",
@@ -59,13 +59,15 @@
59
59
  "@opentelemetry/sdk-trace-base": "2.2.0",
60
60
  "@sourcegraph/scip-typescript": "0.4.0",
61
61
  "import-meta-resolve": "4.2.0",
62
+ "mdast-util-from-markdown": "2.1.0",
62
63
  "n3": "2.7.2",
63
64
  "rdf-validate-shacl": "0.6.5",
64
65
  "sparqljs": "3.7.4",
65
- "@weftlet/core": "^0.1.2"
66
+ "@weftlet/core": "^0.2.1"
66
67
  },
67
68
  "devDependencies": {
68
69
  "@changesets/cli": "3.0.3",
70
+ "@types/mdast": "4.0.4",
69
71
  "@types/n3": "1.26.1",
70
72
  "@types/node": "20.19.11",
71
73
  "@typescript-eslint/parser": "8.72.0",
@@ -115,6 +117,7 @@
115
117
  "release:prepare": "pnpm context-graph:publication-check && node scripts/release.mjs --prepare",
116
118
  "release:publish": "node scripts/release.mjs --publish",
117
119
  "govern": "tsx src/cli.ts govern --policy architecture.policy.json --output .context-graph/architecture-report.json",
120
+ "evaluate:impact": "tsx scripts/evaluation/run.ts",
118
121
  "weftlet": "tsx src/cli.ts",
119
122
  "changeset": "changeset",
120
123
  "release:version": "node scripts/version-packages.mjs"