@weftlet/toolkit 0.6.1 → 0.7.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.
- package/README.md +168 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/application/application.d.ts +10 -0
- package/dist/application/application.js +20 -0
- package/dist/application/document-code-bindings.d.ts +11 -0
- package/dist/application/document-code-bindings.js +25 -0
- package/dist/application/document-obligations.d.ts +8 -0
- package/dist/application/document-obligations.js +11 -0
- package/dist/application/draft-facts.d.ts +3 -0
- package/dist/application/draft-facts.js +37 -0
- package/dist/application/extraction-identity.d.ts +2 -2
- package/dist/application/extraction-identity.js +7 -1
- package/dist/application/extractor-results.d.ts +6 -0
- package/dist/application/extractor-results.js +6 -0
- package/dist/application/hydrator.js +20 -3
- package/dist/application/mapping-proposals.d.ts +108 -0
- package/dist/application/mapping-proposals.js +142 -0
- package/dist/application/mapping-service.d.ts +2 -0
- package/dist/application/mapping-service.js +5 -0
- package/dist/application/overlay.js +36 -22
- package/dist/application/saved-code-coverage.d.ts +40 -0
- package/dist/application/saved-code-coverage.js +20 -0
- package/dist/application/saved-compatibility.d.ts +38 -0
- package/dist/application/saved-compatibility.js +20 -0
- package/dist/application/saved-evidence.d.ts +17 -11
- package/dist/application/saved-evidence.js +44 -40
- package/dist/application/saved-exploration.d.ts +57 -0
- package/dist/application/saved-exploration.js +21 -0
- package/dist/application/saved-paths.d.ts +58 -0
- package/dist/application/saved-paths.js +20 -0
- package/dist/extraction/call-syntax.d.ts +18 -0
- package/dist/extraction/call-syntax.js +61 -0
- package/dist/extraction/canonical-document-links.d.ts +5 -1
- package/dist/extraction/canonical-document-links.js +4 -4
- package/dist/extraction/code-inventory.d.ts +6 -0
- package/dist/extraction/code-inventory.js +26 -0
- package/dist/extraction/document-code-bindings.d.ts +14 -0
- package/dist/extraction/document-code-bindings.js +121 -0
- package/dist/extraction/document-obligations.d.ts +12 -0
- package/dist/extraction/document-obligations.js +112 -0
- package/dist/extraction/mapping-candidates.d.ts +13 -0
- package/dist/extraction/mapping-candidates.js +46 -0
- package/dist/extraction/mapping-output.d.ts +75 -0
- package/dist/extraction/mapping-output.js +53 -0
- package/dist/extraction/mapping-plan.d.ts +7 -0
- package/dist/extraction/mapping-plan.js +117 -0
- package/dist/extraction/mapping-prompt.d.ts +2 -0
- package/dist/extraction/mapping-prompt.js +17 -0
- package/dist/extraction/mapping-provider.d.ts +15 -0
- package/dist/extraction/mapping-provider.js +60 -0
- package/dist/extraction/mapping-request.d.ts +3 -0
- package/dist/extraction/mapping-request.js +32 -0
- package/dist/extraction/routing.js +5 -20
- package/dist/extraction/scip-occurrences.d.ts +3 -0
- package/dist/extraction/scip-occurrences.js +102 -0
- package/dist/extraction/scip-ranges.d.ts +6 -0
- package/dist/extraction/scip-ranges.js +31 -0
- package/dist/extraction/scip-runtime.d.ts +39 -0
- package/dist/extraction/scip-runtime.js +8 -0
- package/dist/extraction/scip-symbols.d.ts +21 -0
- package/dist/extraction/scip-symbols.js +91 -0
- package/dist/extraction/semantic.d.ts +1 -1
- package/dist/extraction/semantic.js +5 -17
- package/dist/extraction/static-calls.d.ts +10 -0
- package/dist/extraction/static-calls.js +133 -0
- package/dist/extraction/static.d.ts +3 -20
- package/dist/extraction/static.js +8 -84
- package/dist/extraction/symbol-resolution.d.ts +12 -0
- package/dist/extraction/symbol-resolution.js +51 -0
- package/dist/extraction/symbol-selectors.d.ts +11 -0
- package/dist/extraction/symbol-selectors.js +51 -0
- package/dist/graph/binding-rdf.d.ts +7 -0
- package/dist/graph/binding-rdf.js +109 -0
- package/dist/graph/call-rdf.d.ts +4 -0
- package/dist/graph/call-rdf.js +94 -0
- package/dist/graph/call-shapes.d.ts +2 -0
- package/dist/graph/call-shapes.js +28 -0
- package/dist/graph/code-coverage-projection.d.ts +9 -0
- package/dist/graph/code-coverage-projection.js +117 -0
- package/dist/graph/code-coverage-renderer.d.ts +2 -0
- package/dist/graph/code-coverage-renderer.js +15 -0
- package/dist/graph/code-coverage-request.d.ts +6 -0
- package/dist/graph/code-coverage-request.js +19 -0
- package/dist/graph/code-coverage.d.ts +6 -0
- package/dist/graph/code-coverage.js +54 -0
- package/dist/graph/code-description.d.ts +4 -0
- package/dist/graph/code-description.js +24 -0
- package/dist/graph/code-rdf.d.ts +5 -0
- package/dist/graph/code-rdf.js +72 -0
- package/dist/graph/compatibility-context.d.ts +2 -0
- package/dist/graph/compatibility-context.js +18 -0
- package/dist/graph/compatibility-renderer.d.ts +2 -0
- package/dist/graph/compatibility-renderer.js +45 -0
- package/dist/graph/compatibility-request.d.ts +3 -0
- package/dist/graph/compatibility-request.js +18 -0
- package/dist/graph/compatibility.d.ts +7 -0
- package/dist/graph/compatibility.js +67 -0
- package/dist/graph/constraint-comparison.d.ts +7 -0
- package/dist/graph/constraint-comparison.js +49 -0
- package/dist/graph/coverage.d.ts +2 -2
- package/dist/graph/coverage.js +8 -3
- package/dist/graph/diagnostics.d.ts +1 -1
- package/dist/graph/diagnostics.js +10 -6
- package/dist/graph/evidence-description.d.ts +3 -0
- package/dist/graph/evidence-description.js +13 -0
- package/dist/graph/identity-preflight.js +1 -1
- package/dist/graph/neighborhood-renderer.d.ts +2 -0
- package/dist/graph/neighborhood-renderer.js +38 -0
- package/dist/graph/neighborhood-request.d.ts +9 -0
- package/dist/graph/neighborhood-request.js +37 -0
- package/dist/graph/neighborhood.d.ts +8 -0
- package/dist/graph/neighborhood.js +100 -0
- package/dist/graph/obligation-rdf.d.ts +5 -0
- package/dist/graph/obligation-rdf.js +67 -0
- package/dist/graph/obligation-shapes.d.ts +2 -0
- package/dist/graph/obligation-shapes.js +32 -0
- package/dist/graph/path-request.d.ts +11 -0
- package/dist/graph/path-request.js +24 -0
- package/dist/graph/path-search.d.ts +45 -0
- package/dist/graph/path-search.js +101 -0
- package/dist/graph/paths-renderer.d.ts +2 -0
- package/dist/graph/paths-renderer.js +36 -0
- package/dist/graph/paths.d.ts +7 -0
- package/dist/graph/paths.js +74 -0
- package/dist/graph/query.js +23 -6
- package/dist/graph/rdf.js +26 -0
- package/dist/graph/shacl-shapes.js +70 -0
- package/dist/graph/snapshot-context.d.ts +3 -0
- package/dist/graph/snapshot-context.js +8 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +22 -0
- package/dist/infrastructure/json-digest.d.ts +2 -0
- package/dist/infrastructure/json-digest.js +3 -0
- package/dist/infrastructure/unique-json.d.ts +2 -0
- package/dist/infrastructure/unique-json.js +20 -0
- package/dist/interfaces/cli.js +33 -1
- package/dist/interfaces/code-coverage.d.ts +46 -0
- package/dist/interfaces/code-coverage.js +18 -0
- package/dist/interfaces/graph-compatibility.d.ts +35 -0
- package/dist/interfaces/graph-compatibility.js +21 -0
- package/dist/interfaces/graph-exploration.d.ts +59 -0
- package/dist/interfaces/graph-exploration.js +27 -0
- package/dist/interfaces/graph-paths.d.ts +77 -0
- package/dist/interfaces/graph-paths.js +31 -0
- package/dist/interfaces/graph-query-args.d.ts +2 -0
- package/dist/interfaces/graph-query-args.js +25 -0
- package/dist/interfaces/mapping-proposals.d.ts +204 -0
- package/dist/interfaces/mapping-proposals.js +74 -0
- package/dist/interfaces/mcp.js +31 -3
- package/dist/storage/mapping-proposals.d.ts +9 -0
- package/dist/storage/mapping-proposals.js +42 -0
- package/dist/visualization/evidence-sources.d.ts +6 -0
- package/dist/visualization/evidence-sources.js +19 -0
- package/dist/visualization/viewer-interaction.d.ts +5 -8
- package/dist/visualization/viewer-interaction.js +46 -44
- package/dist/visualization/visualization.js +14 -5
- package/docs/1.0-WORK-QUEUE.md +38 -0
- package/docs/ADR-029-exact-graph-neighborhoods.md +70 -0
- package/docs/ADR-030-bounded-evidence-paths.md +97 -0
- package/docs/ADR-031-code-extractor-selection.md +91 -0
- package/docs/ADR-032-scip-code-evidence.md +73 -0
- package/docs/ADR-033-document-symbol-bindings.md +83 -0
- package/docs/ADR-034-mapping-gaps.md +80 -0
- package/docs/ADR-035-static-call-evidence.md +78 -0
- package/docs/ADR-036-contract-obligation-declarations.md +124 -0
- package/docs/ADR-037-selected-contract-compatibility.md +93 -0
- package/docs/ADR-038-monorepo-code-coverage.md +105 -0
- package/docs/ADR-039-mapping-proposals.md +119 -0
- package/docs/GRAPHIFY-EVALUATION.md +21 -4
- package/docs/PRE-1.0-BASELINE.md +49 -2
- package/docs/RELEASE-1.0-PLAN.md +14 -2
- package/docs/RELEASING.md +3 -3
- package/docs/ROADMAP.md +27 -6
- package/docs/VALIDATION.md +437 -14
- package/docs/extraction-manifest.json +248 -21
- package/package.json +8 -4
- package/templates/context-graph-development/SKILL.md +30 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# ADR 036: Cited producer and consumer obligations
|
|
2
|
+
|
|
3
|
+
Status: B4a implemented; validation recorded separately. B4b follows in [ADR 037](ADR-037-selected-contract-compatibility.md).
|
|
4
|
+
|
|
5
|
+
## Scope and choice
|
|
6
|
+
|
|
7
|
+
Free-text `governedBy` assertions and explicit routing declarations already preserve business
|
|
8
|
+
rules and asynchronous handoffs. They do not provide structured fields for comparing the two
|
|
9
|
+
sides. B4a adds an optional deterministic declaration in selected Markdown, using existing
|
|
10
|
+
`emits` and `consumes` relations to a shared Contract node. This is an exact opt-in path;
|
|
11
|
+
ordinary prose remains available through existing semantic extraction. No new model prompt,
|
|
12
|
+
provider schema or semantic artifact identity is introduced. Automatic conversion of prose
|
|
13
|
+
into these declarations is not implemented or claimed.
|
|
14
|
+
|
|
15
|
+
Use one JSON object in a `weftlet-obligation` fenced block:
|
|
16
|
+
|
|
17
|
+
```weftlet-obligation
|
|
18
|
+
{
|
|
19
|
+
"schemaVersion": 1,
|
|
20
|
+
"id": "execution-age",
|
|
21
|
+
"role": "requirement",
|
|
22
|
+
"endpoint": "services/execution/src/execute.ts",
|
|
23
|
+
"contract": {
|
|
24
|
+
"scope": "readings",
|
|
25
|
+
"id": "stored-reading",
|
|
26
|
+
"kind": "stored-data",
|
|
27
|
+
"version": "1"
|
|
28
|
+
},
|
|
29
|
+
"statement": "Execution revalidates reading age immediately before use.",
|
|
30
|
+
"domain": "sensors",
|
|
31
|
+
"stage": "execution",
|
|
32
|
+
"constraint": {
|
|
33
|
+
"metric": "reading-age",
|
|
34
|
+
"operator": "at-most",
|
|
35
|
+
"value": 60,
|
|
36
|
+
"unit": "seconds"
|
|
37
|
+
},
|
|
38
|
+
"revalidation": "required"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Required fields are schemaVersion, id, role, endpoint, contract and statement. Role is
|
|
43
|
+
`guarantee` (producer) or `requirement` (consumer); transport kind is `queue` or `stored-data`.
|
|
44
|
+
Domain, stage, contract version, constraint and consumer revalidation are optional. A constraint
|
|
45
|
+
requires a metric, finite numeric value and operator (`at-most`, `at-least`, `equal`); its unit
|
|
46
|
+
may be unknown. Revalidation accepts `required` or `not-required` on consumers only. Omitted
|
|
47
|
+
values stay absent in JSON/RDF and display as unknown. No default time unit, normalization,
|
|
48
|
+
semantic equivalence, unit conversion or compatibility interpretation is performed.
|
|
49
|
+
|
|
50
|
+
The endpoint is an exact repository-relative regular committed UTF-8 file. Its canonical physical
|
|
51
|
+
kind is retained, including Evidence for test/spec files. Existing indexed facts let agents
|
|
52
|
+
continue into code, but the declaration establishes neither a particular function mapping nor
|
|
53
|
+
implementation correctness. Function-level mappings remain the explicit selectors in ADR 033.
|
|
54
|
+
|
|
55
|
+
## Identity and authority
|
|
56
|
+
|
|
57
|
+
Contract identity hashes repository ID, exact scope, contract ID, transport kind and version.
|
|
58
|
+
Labels, endpoint paths and statement wording do not determine this identity. Missing version is
|
|
59
|
+
unknown and does not join a named version. The namespace is explicit; equal names across scopes,
|
|
60
|
+
repositories, transports or versions never imply a shared contract. Domain is a cited descriptive
|
|
61
|
+
field, not an implicit identity override: contradictory descriptions are retained for review.
|
|
62
|
+
|
|
63
|
+
`GraphFact.contractObligation` retains the complete typed declaration and endpoint source
|
|
64
|
+
path/digest/SHA. Main provenance cites the exact Markdown fence in the original committed bytes.
|
|
65
|
+
The assertion has inferred authority and deterministic extraction review. Configured source
|
|
66
|
+
approval, role and traversal ownership metadata remain independent. Deterministic parsing is not
|
|
67
|
+
an approval process. Plans and unclassified documents cannot silently become approved intent.
|
|
68
|
+
Validation documents are excluded from obligation assertions with a cited diagnostic, including
|
|
69
|
+
directly selected evidence-root documents without traversal.
|
|
70
|
+
|
|
71
|
+
Both sides connect through the contract, independently of imports, calls or a particular queue
|
|
72
|
+
library. This is documented dependency evidence, not observed message delivery, shared storage
|
|
73
|
+
access or proof of fulfillment. Existing runtime evidence remains separately authoritative for
|
|
74
|
+
what was observed. Different limits at different stages are not automatically contradictions.
|
|
75
|
+
|
|
76
|
+
## Integrity, bounds and lifecycle
|
|
77
|
+
|
|
78
|
+
Unknown fields, duplicate JSON keys, invalid paths, nonfinite values and unsupported enums
|
|
79
|
+
produce cited extraction gaps with no partial declaration. Missing, symlink or submodule
|
|
80
|
+
endpoints cannot create joins. Duplicate declaration IDs within a source retain every valid
|
|
81
|
+
assertion and report ambiguity; no assertion silently wins. Document and endpoint text must
|
|
82
|
+
reproduce the committed Git blob ID, rejecting lossy non-UTF-8 decoding before citing its digest.
|
|
83
|
+
Contracts with only one role in
|
|
84
|
+
the selected structured declarations report the missing counterpart without claiming repository-
|
|
85
|
+
wide absence. No text matching or implied route fills those gaps.
|
|
86
|
+
|
|
87
|
+
Extraction uses already selected committed sources, including traversal-read validation docs
|
|
88
|
+
solely to report exclusions. It performs no provider call. Each block is limited to 64 KiB;
|
|
89
|
+
overlong blocks report a gap. More than 500 blocks abort extraction before provider/indexer work
|
|
90
|
+
instead of publishing a silently truncated set. Existing document-selection budgets still apply.
|
|
91
|
+
|
|
92
|
+
RDF exposes each field on its cited assertion record. SHACL checks obligation-specific cardinality,
|
|
93
|
+
types, roles, metadata and authority without adding a broad per-fact disjunction. Deterministic
|
|
94
|
+
integrity checks require canonical contract/endpoint identities, role/predicate agreement, matching
|
|
95
|
+
endpoint/document revision and separate implementation evidence. Shared SPARQL, neighborhoods,
|
|
96
|
+
paths, impact queries, Markdown and viewer details read these same facts. SHACL checks structure;
|
|
97
|
+
it does not establish business compatibility.
|
|
98
|
+
|
|
99
|
+
Assembly advances from 10 to 11 and records `document-obligation-extractor@1.0.0`. Historical
|
|
100
|
+
snapshots remain readable but are not compatible with current validation until refreshed.
|
|
101
|
+
Unchanged semantic artifacts remain reusable. Clean hydration reproduces declarations. Full
|
|
102
|
+
RDF/SHACL validation is retained; this is not incremental validation or a new graph backend.
|
|
103
|
+
|
|
104
|
+
Overlays re-read declarations from captured draft bytes and replace prior obligation facts.
|
|
105
|
+
Document/endpoint edits, deletes and renames regenerate or invalidate joins. All draft assertions
|
|
106
|
+
and endpoint citations use the base SHA plus draft content digests, not disposable checkout SHAs.
|
|
107
|
+
Known endpoint paths are included in capture; newly declared endpoints outside captured scope
|
|
108
|
+
require configured scope before rebuilding. Saved committed evidence remains unchanged.
|
|
109
|
+
|
|
110
|
+
## Acceptance and remaining work
|
|
111
|
+
|
|
112
|
+
The independent public fixture covers stored-data and queue producers/consumers with actual
|
|
113
|
+
TypeScript indexing, both freshness limits, missing fields, missing endpoints, unrelated same-name
|
|
114
|
+
domains, unknown versions and test-file classification. It exercises bounded agent queries,
|
|
115
|
+
SPARQL/projection parity, strict named/union SHACL, corruption negatives, unchanged semantic reuse,
|
|
116
|
+
clean comparison, dirty queries and renamed/deleted draft declarations. An empty offline provider
|
|
117
|
+
is deliberate: these structured assertions must come from the real declaration extractor.
|
|
118
|
+
Fresh packed-consumer smoke uses the exported API and installed runtime assets.
|
|
119
|
+
|
|
120
|
+
B4b's bounded compatibility acceptance is implemented in [ADR 037](ADR-037-selected-contract-compatibility.md),
|
|
121
|
+
including consumer revalidation, an explicit documented incompatibility and missing evidence. Any hard failure must come from an
|
|
122
|
+
explicit approved deterministic policy; model findings remain tentative. No such policy or gate
|
|
123
|
+
is introduced here. Live model quality, private consumer usefulness and browser interaction remain
|
|
124
|
+
separate evidence. Release PR stays open until candidate qualification.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# ADR 037: Advisory comparison of selected contract constraints
|
|
2
|
+
|
|
3
|
+
Status: implemented for the next candidate, 2026-10-30. Qualification and live usefulness remain B6.
|
|
4
|
+
|
|
5
|
+
## Problem and decision
|
|
6
|
+
|
|
7
|
+
[Explicit obligations](ADR-036-contract-obligation-declarations.md) retain both sides of a queue
|
|
8
|
+
or stored-data boundary. A graph connection alone cannot establish that their rules agree.
|
|
9
|
+
Add `graph.compatibility`, a read-only comparison of two exact saved assertion IDs, shared by
|
|
10
|
+
the public API, CLI and MCP. Discover the IDs through `impact.scan` or `graph.neighbors`.
|
|
11
|
+
This is a bounded numeric assessment of declarations, separate from code fulfillment, source
|
|
12
|
+
approval, runtime delivery and deterministic architecture policy. It never returns a CI pass/fail.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
weftlet graph compatibility --snapshot <id> --producer-fact <fact-id> --consumer-fact <fact-id> --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
MCP fields are `snapshotId`, `producerFactId`, `consumerFactId`. The public
|
|
19
|
+
`SnapshotContractCompatibilityService` accepts a snapshot reader and exposes `assess(request)`.
|
|
20
|
+
The application wrapper adds current checkout/configuration/overlay evidence state. The raw
|
|
21
|
+
service has no checkout knowledge; its `evidenceState` is absent. Neither reads a mutable head,
|
|
22
|
+
hydrates, invokes a model/indexer, changes a snapshot, or promotes historical evidence into a
|
|
23
|
+
current-diff result. Missing storage/invalid snapshot identity is an error; missing assertions
|
|
24
|
+
within a readable snapshot produce `unknown` with any surviving evidence retained.
|
|
25
|
+
|
|
26
|
+
## Numeric meaning
|
|
27
|
+
|
|
28
|
+
The two assertions must be a producer `guarantee` and consumer `requirement` on the same exact
|
|
29
|
+
repository/scoped/transport/versioned contract. Known matching domain, metric and unit are
|
|
30
|
+
required. Missing units or versions are unknown, including two absent versions. No conversion,
|
|
31
|
+
name-based equivalence, implicit ownership, elapsed-time model or data transformation is inferred.
|
|
32
|
+
Limits are JSON/JavaScript numbers, finite and no larger in magnitude than `MAX_SAFE_INTEGER`;
|
|
33
|
+
comparisons use their represented values, without claiming arbitrary decimal precision.
|
|
34
|
+
|
|
35
|
+
At a shared explicit measurement stage, `at-most`, `at-least` and `equal` define inclusive
|
|
36
|
+
half-lines or singleton sets. These are statements about allowed values, not observed values.
|
|
37
|
+
|
|
38
|
+
| Result | Meaning |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `compatible-constraints` | Producer's allowed set is a subset of the consumer's set at the same stage. |
|
|
41
|
+
| `insufficient-guarantee` | Sets overlap, but the producer permits some values the consumer rejects. This is not a contradiction. |
|
|
42
|
+
| `disjoint-constraints` | No untransformed value at that same stage satisfies both declarations. This is a documented range incompatibility, not proof of a product violation. |
|
|
43
|
+
| `revalidation-required` | Different stages or an overlapping insufficient guarantee, with explicit required consumer revalidation. Inspect the check and rejection behavior; its implementation is not inferred. |
|
|
44
|
+
| `unknown` | Missing assertions/context, unrelated contracts, unmatched domains/metrics/units, unsupported numbers, competing declarations or relevant extraction gaps prevent this assessment. |
|
|
45
|
+
|
|
46
|
+
For example, collection allows readings up to 600 seconds old; execution requires at most 60
|
|
47
|
+
seconds and explicitly revalidates. Different measurement stages prevent a direct contradiction
|
|
48
|
+
claim. The fixture executes a consumer freshness check separately and retrieves its indexed
|
|
49
|
+
implementation/test references; the assessment still says `fulfillment: not-evaluated`. It does
|
|
50
|
+
not prove eventual delivery, successful execution or availability when stale records are rejected.
|
|
51
|
+
A same-stage producer minimum of 120 seconds versus a consumer maximum of 60 is disjoint,
|
|
52
|
+
even if revalidation is required: no *same untransformed accepted value* satisfies both.
|
|
53
|
+
|
|
54
|
+
## Evidence and bounds
|
|
55
|
+
|
|
56
|
+
Responses retain at most the two selected facts unchanged, including source/endpoint citations,
|
|
57
|
+
commit, digests, statement, approval and review metadata. Assessment authority is inferred,
|
|
58
|
+
or draft when a selected fact is draft; `gateEligible` is always false. Shared returned-page
|
|
59
|
+
coverage describes only those assertions. The contract and endpoint IDs support further
|
|
60
|
+
neighborhood exploration to implementations, tests and other business declarations.
|
|
61
|
+
|
|
62
|
+
The service uses the lossless RDF fact projection shared by other queries. It scans saved facts
|
|
63
|
+
for competing declarations of the same endpoint/role/domain/stage/metric, conservatively choosing
|
|
64
|
+
no winner even if duplicate limits agree. At most 20 competing IDs are returned, with total and
|
|
65
|
+
omitted counts; exact contract neighborhoods provide cited continuation. There is no all-pairs
|
|
66
|
+
Cartesian scan. Projection/context work still scales with the saved graph; this is not an indexed
|
|
67
|
+
incremental graph database or a large private-workload performance claim.
|
|
68
|
+
|
|
69
|
+
Structural validation is restricted to the selected two records on reads, retaining strict
|
|
70
|
+
SHACL and obligation identity/provenance checks. Hydration still validates the complete graph
|
|
71
|
+
before publication. Relevant intent/ambiguity/implementation gaps block a numeric verdict;
|
|
72
|
+
runtime gaps remain visible because runtime fulfillment is never evaluated. This does not claim
|
|
73
|
+
all omitted documents are complete. Old snapshots, configuration changes and draft overlays stay
|
|
74
|
+
explicit and ineligible for current-diff validation.
|
|
75
|
+
|
|
76
|
+
This query-only increment leaves assembly 11, the obligation extractor identity, provider,
|
|
77
|
+
prompt and semantic cache unchanged. No graph migration or cache invalidation is needed.
|
|
78
|
+
|
|
79
|
+
## Acceptance and remaining scope
|
|
80
|
+
|
|
81
|
+
[The public protocol](../evaluations/contract-compatibility/README.md) declares source cases,
|
|
82
|
+
expected outcomes and query bounds before execution. Actual committed Markdown extraction,
|
|
83
|
+
real SCIP, RDF/SHACL, impact → neighborhood → pair comparison → symbol/test retrieval, strict
|
|
84
|
+
authority/provenance negatives, shared API/CLI/MCP, saved dirty queries, repeat cache reuse and
|
|
85
|
+
draft rename/delete invalidation are exercised. A finite-set oracle checks all 81 combinations
|
|
86
|
+
of the three operators and three boundary values. Fresh packed-consumer smoke checks the public
|
|
87
|
+
service, installed MCP discovery and honest unknown/missing-snapshot handling.
|
|
88
|
+
|
|
89
|
+
This covers explicit structured numeric obligations only. Free-form logical reconciliation,
|
|
90
|
+
automated inference/approval, multiple-property satisfiability, formal temporal compatibility,
|
|
91
|
+
product-wide guarantees and approval/backfill UI remain outside this increment. Hard gates
|
|
92
|
+
still require explicit approved deterministic policy; a model suggestion is not such a policy.
|
|
93
|
+
See [validation](VALIDATION.md) and the [remaining queue](1.0-WORK-QUEUE.md).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# ADR 038: Saved source selection and monorepo coverage
|
|
2
|
+
|
|
3
|
+
Status: implemented for the next candidate, 2026-10-30. Live consumer acceptance remains B6.
|
|
4
|
+
|
|
5
|
+
## Problem and decision
|
|
6
|
+
|
|
7
|
+
Returned-page relationship counts cannot tell an agent whether a service was omitted from
|
|
8
|
+
indexing. Preserve those existing counts and add a separate saved-snapshot code coverage
|
|
9
|
+
overview, plus `graph.coverage` to page package boundaries and their files through the shared
|
|
10
|
+
API, CLI and MCP. Measure actual inputs and outputs; do not equate omitted evidence, absent
|
|
11
|
+
resolution or zero observed connections with zero business impact.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
weftlet graph coverage --snapshot <id> --max-items 20 --json
|
|
15
|
+
weftlet graph coverage --snapshot <id> --project services/api --max-items 50 --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
MCP takes `snapshotId`, optional exact `projectRoot`, `maxItems` (1–200, default 50) and
|
|
19
|
+
`continuation`. Omit the project to page boundaries; select a returned root to page its files.
|
|
20
|
+
The root fallback is `.`. Continuations bind the exact snapshot manifest, retained facts,
|
|
21
|
+
diagnostics, view and page size. Responses include offset, totals, remaining count and explicit
|
|
22
|
+
continuation. An absent requested project is distinct from an unknown legacy inventory.
|
|
23
|
+
`SnapshotCodeCoverageService` and `projectCodeCoverage` are public exports; the application
|
|
24
|
+
wrapper supplies current checkout/configuration/overlay evidence state. Reads never hydrate
|
|
25
|
+
or call providers/indexers, and never establish current-diff eligibility.
|
|
26
|
+
|
|
27
|
+
## What is measured
|
|
28
|
+
|
|
29
|
+
Assembly records `codeInventory`, version `committed-code-inventory-v1`, with its own content
|
|
30
|
+
digest and the normalized SCIP artifact digest. It enumerates regular committed `.ts`, `.tsx`,
|
|
31
|
+
`.mts` and `.cts` files (including declaration/test files), exact Git blob identities and nearest
|
|
32
|
+
regular `package.json` path boundaries. It reads tree metadata, not package contents, dependency
|
|
33
|
+
installations or active checkout files. The boundary is a physical grouping, not inferred PNPM
|
|
34
|
+
workspace membership, a compiler project, an architectural domain or approved ownership.
|
|
35
|
+
Non-TypeScript projects are outside the counted source universe; a boundary with no such files
|
|
36
|
+
is visible without claiming its implementation is covered. Nonregular entries are excluded.
|
|
37
|
+
|
|
38
|
+
For each file, three independent fields are retained:
|
|
39
|
+
|
|
40
|
+
- `codeRootSelected`: selected by the existing repository file extractor's Git path selection.
|
|
41
|
+
- `requested`: included/excluded entry selection for `scip.sourceProject.include`; `unknown`
|
|
42
|
+
for other indexer commands. We do not reinterpret arbitrary tsconfigs or shell arguments.
|
|
43
|
+
- `indexed`: actual presence in the normalized SCIP document list, including empty documents,
|
|
44
|
+
if emitted. An indexer result without document observations leaves it unknown. A fact count
|
|
45
|
+
never substitutes for this observation.
|
|
46
|
+
|
|
47
|
+
The public source-project probe demonstrates that an imported file can be resolvable by the
|
|
48
|
+
TypeScript compiler but absent from SCIP documents when it was not an entry. Selecting a
|
|
49
|
+
directory in `codeRoots` does not automatically add it to SCIP's `include`. The report exposes
|
|
50
|
+
the omitted file and references without an indexed definition. Configure the intended source
|
|
51
|
+
entries/aliases explicitly, then refresh. `indexedOutsideRequest` also handles observed extra
|
|
52
|
+
documents from other invocations; it is not a promise of automatic transitive inclusion.
|
|
53
|
+
`otherIndexedFiles` reports observations outside this TypeScript inventory without pretending
|
|
54
|
+
those languages have the same coverage contract.
|
|
55
|
+
|
|
56
|
+
## Connections and uncertainty
|
|
57
|
+
|
|
58
|
+
Coverage derives code connections from retained occurrence facts: a reference's exact symbol
|
|
59
|
+
ID is joined to its indexed definition file(s), then to recorded package boundaries. Repeated
|
|
60
|
+
sites remain distinct; duplicate fact IDs do not inflate reference counts. Project rows expose
|
|
61
|
+
incoming/outgoing reference counts and distinct connected boundary counts. File rows expose
|
|
62
|
+
reference counts, missing indexed definitions, declaration-only targets and cited implementation
|
|
63
|
+
gap counts. File node IDs support follow-up through `graph.neighbors` to exact symbols/citations.
|
|
64
|
+
|
|
65
|
+
These are code-reference measurements. They do not replace queue/stored-data product links,
|
|
66
|
+
prove calls ran, or establish compatibility/fulfillment. A declaration-only external target is
|
|
67
|
+
not an implementation body. Unresolved external calls retain the existing extraction diagnostics;
|
|
68
|
+
not every missing dynamic/type/module relationship can be observed. Zero gaps or connections
|
|
69
|
+
cannot certify completeness, isolation or no impact.
|
|
70
|
+
|
|
71
|
+
The full stored inventory and the same retained facts supply the public query, ordinary impact/
|
|
72
|
+
neighborhood/path/compatibility overview, and viewer text. RDF projection equivalence is tested;
|
|
73
|
+
no separate graph topology or guessed cross-service edge is introduced. `coverage.code.scope`
|
|
74
|
+
is `saved-snapshot`; existing lane counts remain `returned-page`. Overview has no file list,
|
|
75
|
+
keeping ordinary agent responses bounded. Detailed package/file lists are paginated separately.
|
|
76
|
+
Projection work still scans the saved inventory and facts, not an incremental graph database.
|
|
77
|
+
|
|
78
|
+
## Snapshot lifecycle
|
|
79
|
+
|
|
80
|
+
Assembly advances from 11 to 12. Inventory participates in committed and overlay content digests.
|
|
81
|
+
Draft inventory is rebuilt from the isolated captured tree; Git blob identities are content-based,
|
|
82
|
+
and the overlay manifest supplies base SHA/capture identity. Overlays record their actual SCIP
|
|
83
|
+
digest rather than inheriting the committed artifact's digest. Edits outside captured scope stay
|
|
84
|
+
excluded through the existing evidence-state contract. Historical snapshots remain readable;
|
|
85
|
+
absent inventory is `unavailable`, not zero. Unsupported version/digest mismatches are
|
|
86
|
+
`invalid-inventory`, without fabricated counts. Inventory digests detect mismatches, not signed
|
|
87
|
+
attestation or complete validation of arbitrary hand-edited snapshot JSON.
|
|
88
|
+
|
|
89
|
+
Provider/prompt/cache identity remains unchanged, so unchanged semantic artifacts can be reused.
|
|
90
|
+
The query adds no model calls, hard gates, dependencies, workspace builds or application changes.
|
|
91
|
+
|
|
92
|
+
## Acceptance and remaining scope
|
|
93
|
+
|
|
94
|
+
[The public fixture](../evaluations/monorepo-coverage/README.md) covers actual committed multi-package
|
|
95
|
+
TypeScript/TSX, aliases/barrels, an independent service, an omitted service, declaration-only and
|
|
96
|
+
unresolved external targets, selected-but-unindexed files and empty sources. Tests compare raw
|
|
97
|
+
SCIP documents, RDF facts and coverage; follow exact paginated boundaries/files; preserve unknown
|
|
98
|
+
legacy state; and verify unchanged reuse/clean comparison, dirty unavailable-provider queries,
|
|
99
|
+
CLI/MCP equivalence, rename/delete overlays, changed selection and immutable historical results.
|
|
100
|
+
Packed installation exercises the exported API and installed CLI/MCP. Supported platform results
|
|
101
|
+
are recorded in [validation](VALIDATION.md) and the change PR.
|
|
102
|
+
|
|
103
|
+
This closes the bounded B5 implementation, not live product acceptance. Arbitrary compiler-project
|
|
104
|
+
discovery, other language indexing, cross-repository federation, B3b's inference decision and B6's
|
|
105
|
+
candidate/usefulness evaluation retain their separate scope.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ADR 039: Opt-in, unreviewed rule-to-function proposals
|
|
2
|
+
|
|
3
|
+
Status: implementation and public protocol prepared, November 2, 2026. The maintainer authorized
|
|
4
|
+
the 0.7.0 acceptance release with live proposal validation tentative and deferred. Live model
|
|
5
|
+
accuracy and independent usefulness assessment remain unproven.
|
|
6
|
+
|
|
7
|
+
## Decision and scope
|
|
8
|
+
|
|
9
|
+
The maintainer accepted the bounded inference recommendation after ADR 034's deterministic
|
|
10
|
+
assessment. Add an explicit proposal operation alongside saved graph evidence. It addresses
|
|
11
|
+
documented rules with file associations or document links but no exact symbol binding. It does
|
|
12
|
+
not generate missing intent, approve mappings, prove compliance, backfill documents, alter
|
|
13
|
+
semantic hydration or insert proposed relationships into the canonical graph.
|
|
14
|
+
|
|
15
|
+
One request chooses an exact saved snapshot, business rule ID, approved source document and
|
|
16
|
+
one to four already-linked files. Eligible business nodes are Invariant, Capability, Workflow
|
|
17
|
+
and Contract. A source must be declared, with intent role or legacy unspecified role; recorded
|
|
18
|
+
ownership must be resolved or not-required. Existing extracted subject assertions retain their
|
|
19
|
+
review state. Source approval never approves their interpretation or a proposed mapping.
|
|
20
|
+
|
|
21
|
+
The no-model plan checks existing explicit bindings, source intent/mapping diagnostics, recorded
|
|
22
|
+
code coverage, regular committed files, exact source digests/revisions and indexed callable name
|
|
23
|
+
occurrences. It rejects unknown/omitted indexing and ambiguous named callable identities. Syntax
|
|
24
|
+
must have an actual implementation body. Canonical test/spec file identities are validation
|
|
25
|
+
evidence and cannot be proposed as product implementations by this operation. Ambient declarations
|
|
26
|
+
and anonymous callables are counted as excluded; this increment does not invent identities for
|
|
27
|
+
them. Code is joined by exact indexed
|
|
28
|
+
positions, never label similarity. Co-location supplies candidate scope, not an implementation claim.
|
|
29
|
+
|
|
30
|
+
The selected source document and callable excerpts are read at the saved commit, independently
|
|
31
|
+
of the active checkout. An old snapshot can be used deliberately and remains labeled stale with
|
|
32
|
+
excluded working changes; it cannot pass current-diff validation. Draft-overlay proposal creation
|
|
33
|
+
is deferred because captured source bytes need a distinct durable input contract. Existing
|
|
34
|
+
overlay graphs remain queryable.
|
|
35
|
+
|
|
36
|
+
## Bounds and authority
|
|
37
|
+
|
|
38
|
+
Defaults: at most eight candidates, 32 KiB of prompt/schema input, and one provider request.
|
|
39
|
+
Explicit request ceilings are 20 candidates and 128 KiB input. There are at most five source reads,
|
|
40
|
+
each at most 1 MiB according to immutable Git tree metadata. A candidate/input overflow blocks
|
|
41
|
+
execution rather than selecting an unreported subset. The configured semantic timeout (up to
|
|
42
|
+
600000 ms) applies to the provider phase; mapping does not inherit semantic automatic retries.
|
|
43
|
+
Oversized previews bound retained candidate metadata and report observed/returned counts with
|
|
44
|
+
`candidateEnumeration.complete: false`; incomplete enumeration never runs a provider. Candidate
|
|
45
|
+
`excerptBytes` exposes a body that exceeds the input limit without retaining its oversized text.
|
|
46
|
+
For blocked plans, `inputBytes` counts only prepared input, not omitted candidate material.
|
|
47
|
+
These are request/byte/time bounds, not a token billing or dollar cap.
|
|
48
|
+
|
|
49
|
+
Provider output must select exact candidates and cite both the documented rule's supporting
|
|
50
|
+
source span and the candidate's implementation extent. Unknown/duplicate IDs, unsupported line
|
|
51
|
+
ranges, extra fields, invalid confidence and inconsistent proposal/abstention states fail before
|
|
52
|
+
storage. Model-reported confidence is uncalibrated. Structural citation validation cannot prove
|
|
53
|
+
the proposed interpretation is correct. Rationale and source text remain untrusted content.
|
|
54
|
+
|
|
55
|
+
The result is either a proposed set or an explicit abstention. Every saved result is permanently
|
|
56
|
+
`authority: inferred`, `extractionReview: unreviewed`, `establishesCompliance: false`. Original
|
|
57
|
+
subject/association facts and code-definition proofs are retained, including their independent
|
|
58
|
+
authority and provenance. No rule violation, test success, compatibility or approval is inferred.
|
|
59
|
+
|
|
60
|
+
## Provider, cache and failure contract
|
|
61
|
+
|
|
62
|
+
Use the existing Codex CLI authentication configuration: ChatGPT by default; API-key mode only
|
|
63
|
+
when explicitly configured. The runner is isolated, read-only, ephemeral, ignores user rules and
|
|
64
|
+
configuration, disables shell tools, and requires structured output. Authentication never falls
|
|
65
|
+
back to another billing mode. Fake-transport tests cover the invocation; live operation is a
|
|
66
|
+
separate validation. Module providers must explicitly export `createMappingProposalProvider`
|
|
67
|
+
with a matching configured identity and a `propose(input, { signal, timeoutMs })` method. The
|
|
68
|
+
semantic-provider interface alone does not qualify. Local modules are trusted code and must honor
|
|
69
|
+
abort signals, bound their own work, and keep input/credentials out of logs.
|
|
70
|
+
|
|
71
|
+
The outer deadline/cancellation race rejects uncooperative providers and prevents late results
|
|
72
|
+
from publication. Progress contains only phase, opaque operation ID and elapsed time. Unknown
|
|
73
|
+
provider errors never expose stderr/prompts. Publication after validation is a single atomic
|
|
74
|
+
commit point; cancelling after a completed publication does not erase a valid artifact.
|
|
75
|
+
|
|
76
|
+
Proposals use their own versioned identity and `artifacts/mapping-proposals` namespace. Keys bind
|
|
77
|
+
the exact saved snapshot/facts, requested scope/budgets, source input digest, provider/model and
|
|
78
|
+
reasoning configuration. Operational timeout/retry changes do not invalidate artifacts. Module
|
|
79
|
+
authors must version their identity when implementation or output-affecting configuration changes;
|
|
80
|
+
deadline/retry fields are operational under this contract. Identity
|
|
81
|
+
hashes use persisted JSON semantics so optional undefined fields survive a write/read round trip.
|
|
82
|
+
Input/plan/output checks run again on reuse; model/prompt/code/source changes require a new key.
|
|
83
|
+
This initial cache is conservative and snapshot-bound: it does not reuse across a new snapshot,
|
|
84
|
+
even when an unrelated file changed. No force overwrite or automatic baseline acceptance exists.
|
|
85
|
+
|
|
86
|
+
Bounded hash filenames and atomic hard-link publication preserve a concurrent winner. Concurrent
|
|
87
|
+
cache misses can each spend their independently authorized request; there is no cross-process
|
|
88
|
+
provider single-flight lock. Conflicting
|
|
89
|
+
outputs fail without overwriting it. Existing graph heads, snapshots and semantic artifacts are
|
|
90
|
+
unchanged. Saved proposal reads require neither provider initialization nor source re-extraction;
|
|
91
|
+
they bind the exact snapshot and report current evidence state. Integrity hashes detect mismatches,
|
|
92
|
+
not malicious rewriting of a local artifact and all its hashes.
|
|
93
|
+
|
|
94
|
+
## Interfaces and acceptance
|
|
95
|
+
|
|
96
|
+
`mappings plan --request request.json` previews scope, candidate proofs, exclusions, bytes,
|
|
97
|
+
cache identity, readiness and expected request count. `mappings propose --request request.json
|
|
98
|
+
--allow-model` explicitly permits one new request; a cache hit needs no model permission.
|
|
99
|
+
`mappings read --snapshot ID --key KEY` reads a saved result. CLI JSON is the shared API result.
|
|
100
|
+
MCP exposes only `mapping.plan` and `mapping.proposals`, both read-only and unable to spend model
|
|
101
|
+
requests. Follow returned exact symbol IDs through `graph.neighbors`/`graph.paths`. Normal graph
|
|
102
|
+
queries and the viewer do not silently acquire proposed edges.
|
|
103
|
+
|
|
104
|
+
Deterministic public tests cover real prose extraction/SCIP, misleading-name candidates,
|
|
105
|
+
cross-domain file rejection, declared versus unreviewed authority, citations, missing/omitted/
|
|
106
|
+
declaration-only code, budgets, model consent, reuse with unavailable provider and dirty checkout,
|
|
107
|
+
rename/delete invalidation, historical reads, timeout/cancellation and immutable concurrent writes.
|
|
108
|
+
Fresh packed installation exercises actual CLI/MCP and exported APIs with a visibly canned module.
|
|
109
|
+
No canned result is semantic-quality evidence.
|
|
110
|
+
|
|
111
|
+
[The predeclared live protocol](../evaluations/mapping-proposals/README.md) permits three bounded
|
|
112
|
+
public requests only after usage approval. It separates target accuracy, abstention, output
|
|
113
|
+
validity, infrastructure failure and independent rationale/usefulness review. On November 2,
|
|
114
|
+
the maintainer requested publication before live integration testing. This scoped deferral permits
|
|
115
|
+
the optional feature in the 0.7.0 acceptance candidate; it does not record a live proposal pass or
|
|
116
|
+
official 1.0 approval. Existing consumer Codex hydration validates the established extraction flow,
|
|
117
|
+
not this new proposal operation or its semantic accuracy. B6 still owns candidate hydration/repeat,
|
|
118
|
+
real agent usefulness and the final 1.0 decision. The public three-request protocol remains
|
|
119
|
+
available for later separately authorized evaluation; this release performs no model requests.
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
# Graphify evaluation for the pre-1.0 baseline
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Status: B2b measured on 2026-10-29. [ADR 031](ADR-031-code-extractor-selection.md) selects
|
|
4
|
+
**keeping SCIP and improving its declaration/reference projection**. Production implementation
|
|
5
|
+
is B3a; no Graphify runtime or dependency is added to Weftlet.
|
|
6
|
+
|
|
7
|
+
The [durable public measurement record](../evaluations/code-graph-results/2026-10-29/README.md)
|
|
8
|
+
contains tool receipts, native outputs, per-case scores, costs, failed attempts and disclosed
|
|
9
|
+
harness corrections. On the 51 frozen cases, raw SCIP resolves 15/15 declaration families and
|
|
10
|
+
16/16 references; Graphify resolves 14/15 families, 8/16 references and 7/10 native calls.
|
|
11
|
+
Current Weftlet discards useful raw SCIP detail. Calls remain unsupported by the SCIP projections.
|
|
12
|
+
No named false-join negative was asserted, but these are labeled-case metrics, not whole-graph
|
|
13
|
+
precision. Graphify is faster on these tiny inputs; the small Linux-only study does not establish
|
|
14
|
+
production performance or universal language support.
|
|
15
|
+
|
|
16
|
+
All arms preserve fixed, cited business controls and strict RDF/SHACL parity. They do not infer
|
|
17
|
+
missing queue wiring or prove undocumented rule-to-function mappings. Those remain B3–B5 work.
|
|
18
|
+
No paid/model calls or private consumer material were used. The pinned Graphify source API was
|
|
19
|
+
installed only in an isolated experiment, using its unchanged lock and 30 runtime distributions.
|
|
20
|
+
Its 0.9.97 manifest/0.9.96 lock-project discrepancy is recorded; no project distribution was installed.
|
|
21
|
+
|
|
22
|
+
The remainder records the preliminary source review and the predeclared comparison protocol.
|
|
23
|
+
The frozen corpus, labels and budgets at `f1844f31717341f5ff95314a68def80eae509734` remain unchanged.
|
|
7
24
|
|
|
8
25
|
## Reviewed candidate
|
|
9
26
|
|
package/docs/PRE-1.0-BASELINE.md
CHANGED
|
@@ -6,6 +6,18 @@ automatic rule-to-function discovery or complete agent exploration. The candidat
|
|
|
6
6
|
available for TradePilot acceptance while the work below is assessed. No new release is
|
|
7
7
|
announced by this plan.
|
|
8
8
|
|
|
9
|
+
Consumer update: the physical artifact filename blocker shipped in **0.6.1**, with native
|
|
10
|
+
Windows traversal → unchanged repeat → clean comparison passing. Use 0.6.1 for the private
|
|
11
|
+
rerun; [validation](VALIDATION.md) records the public release evidence. This storage fix does
|
|
12
|
+
not close any of B1–B6 below. Resume B1 and the bounded B2 evaluation after the blocker release.
|
|
13
|
+
|
|
14
|
+
The maintainer now considers this the main reported consumer blocker and requests the next live
|
|
15
|
+
TradePilot test after a new candidate. [The implementation queue](1.0-WORK-QUEUE.md) breaks B1–B6
|
|
16
|
+
into bounded increments; B1a exact-node neighborhoods and B1b bounded paths are implemented for the next candidate.
|
|
17
|
+
B2a's public comparison protocol is frozen; B2b's measured decision retains SCIP and improves its
|
|
18
|
+
projection ([ADR 031](ADR-031-code-extractor-selection.md)). This schedules acceptance;
|
|
19
|
+
it does not claim an additional private run or a full product-usefulness pass.
|
|
20
|
+
|
|
9
21
|
The product goal is to let an agent starting with a task or code change retrieve the relevant
|
|
10
22
|
product obligations, understand their connections across domains and asynchronous service
|
|
11
23
|
boundaries, and inspect the implementations, contracts and evidence behind those connections.
|
|
@@ -61,10 +73,10 @@ blockers take priority when its report arrives. Do not modify or audit its appli
|
|
|
61
73
|
| --- | --- | --- |
|
|
62
74
|
| **B1** | **Exact graph exploration.** Specify and add bounded node lookup/neighbor expansion and dependency-path exploration through MCP and the shared query layer. | An agent can start from a returned stable node ID, select relation/direction and inspect another business area. Return citations, authority, snapshot identity, incomplete scope, pagination and remaining frontier. Test branches, cycles, ambiguous labels, deleted nodes and stale/mismatched continuations. Keep CLI/MCP/viewer on the same facts; preserve existing `impact.scan`. |
|
|
63
75
|
| **B2** | **Evaluate Graphify and current SCIP representation.** Run the fixed public comparison in [the research note](GRAPHIFY-EVALUATION.md) before choosing a code extraction backend or symbol schema. | Compare the current projection, richer use of raw SCIP and pinned Graphify on identical committed inputs. Measure correct/missing/false links, provenance, identity stability, costs and packaging. Produce a keep/improve/replace decision with evidence. Parallel use during evaluation does not mandate shipping two indexers. |
|
|
64
|
-
| **B3** | **Resolve business-to-implementation links at symbol/function level.** After B2, define canonical scoped code identities and resolve explicit document paths/symbol references to exact code entities.
|
|
76
|
+
| **B3** | **Resolve business-to-implementation links at symbol/function level.** After B2, define canonical scoped code identities, retain same-file occurrences and resolve explicit document paths/symbol references to exact code entities. Add bounded static call analysis as a separate increment; evaluate a separate bounded inference pass only where explicit mapping evidence is insufficient. | Named functions, methods, aliases, overloads, same-name symbols and renamed/deleted targets resolve correctly or remain unresolved. Meet the same-file acceptance boundary below. Separate a cited declared mapping, a proposed inferred mapping and evidence of actual behavior. Record both document and code revisions/spans for derived links. A reviewer can follow a rule to its implementation and back. Code inference never supplies approval; full automatic documentation generation remains 2.0. |
|
|
65
77
|
| **B4** | **Cross-boundary obligations.** Represent and retrieve producer guarantees and consumer requirements through explicit data/event contracts, including applicable stage, domain, units, freshness and version where sources provide them. | Public cases cover a queue handoff, a write/read handoff, compatible differing limits with revalidation, a real documented incompatibility, missing links and same-name unrelated domains. Retrieve both sides and the implementation evidence. Potential model findings remain uncertain; hard failures require explicit approved deterministic rules. A graph link or SHACL pass is not a compatibility verdict. General reconciliation/approval UI remains 2.0. |
|
|
66
78
|
| **B5** | **Monorepo selection and coverage.** Assess diagnostics for selected services, client, shared packages, source aliases and excluded/unresolved code; improve the gaps found. | A configured multi-package TypeScript/TSX fixture and the consumer report identify which projects were selected, indexed and actually connected. Test barrel exports, independent service code, external unresolved dependencies and omitted projects. Missing resolution cannot be reported as zero impact or complete coverage. Cross-repository federation is a separate scope decision. |
|
|
67
|
-
| **B6** | **End-to-end product acceptance and release decision.** Combine the public evidence, B1–B5 decisions and TradePilot's
|
|
79
|
+
| **B6** | **End-to-end product acceptance and release decision.** Combine the public evidence, B1–B5 decisions and TradePilot's next candidate report; ship bounded candidate changes as needed. | Predeclare tasks, correct downstream business obligations/implementations, known unrelated matches and query budgets before measuring. Retain actual requests, follow-up decisions and citations. Assess helpfulness and misses separately from hydration success. Complete full hydration/repeat and supported release checks; review any remaining limitations before a versioned 1.0 publication. |
|
|
68
80
|
|
|
69
81
|
Order: retain this A1–A3 baseline; triage incoming consumer blockers; specify B1 and run the
|
|
70
82
|
bounded B2 comparison; use that decision for B3; implement B4/B5 in independently testable
|
|
@@ -72,6 +84,41 @@ increments; close B6. Each implementation can ship in a minor candidate before 1
|
|
|
72
84
|
retrieval semantics, extraction/cache identity or snapshot compatibility need explicit decisions
|
|
73
85
|
and regression evidence; no silent migration or history rewrite.
|
|
74
86
|
|
|
87
|
+
## Same-file exploration acceptance
|
|
88
|
+
|
|
89
|
+
The maintainer explicitly identified large files with many internal calls as a 1.0 concern after
|
|
90
|
+
the B2 comparison. Retain SCIP and address this gap without waiting for an application rewrite.
|
|
91
|
+
The following requirements extend B3; they do not change the frozen B2 cases or scores and are
|
|
92
|
+
not implementation or private consumer validation results.
|
|
93
|
+
|
|
94
|
+
1. Preserve local/private functions, methods, same-file references and multiple occurrences of
|
|
95
|
+
the same reference. Return exact source spans and enclosing callable where established;
|
|
96
|
+
file membership alone must not imply a call or make every function relevant.
|
|
97
|
+
2. In a separately testable call-analysis increment, distinguish a statically resolved direct
|
|
98
|
+
call from a type use, passing a function as a value, or registering a callback. Retain caller,
|
|
99
|
+
callee, callsite, resolution basis and uncertainty. A static edge does not prove runtime
|
|
100
|
+
execution; unresolved dispatch/callback targets remain explicit.
|
|
101
|
+
3. Starting with one exact function, let an agent retrieve incoming references/callers and
|
|
102
|
+
outgoing references/callees, follow a helper chain and inspect applicable documented rules
|
|
103
|
+
through the shared bounded API/MCP queries. Preserve direction, citations, authority, scope
|
|
104
|
+
and continuation. Avoid requiring the entire containing file as the initial context response.
|
|
105
|
+
4. Use an independently authored public fixture of roughly 3,000 lines with meaningful internal
|
|
106
|
+
helper chains, unrelated methods, private/local functions, recursion, shadowed names and
|
|
107
|
+
repeated callsites. Include a cross-file caller and a similar-looking implementation with a
|
|
108
|
+
distinct identity. Predeclare expected retrievals and query budgets before measuring; verify
|
|
109
|
+
extraction and actual agent-facing query results rather than hand-assembled edges. Record
|
|
110
|
+
bounded response size and misses. File length is a workload characteristic, not an
|
|
111
|
+
architectural violation or proof of modularity.
|
|
112
|
+
5. Check edits, line shifts, rename/delete, dirty overlays, historical evidence, strict RDF/SHACL
|
|
113
|
+
and shared-query parity. Preserve explicit rule-binding authority. Similar code or names do
|
|
114
|
+
not establish equivalent business behavior or justify merging identities; existing duplication
|
|
115
|
+
signals still require semantic review. Duplicate-behavior detection is not added by this task.
|
|
116
|
+
|
|
117
|
+
Implement richer entities/occurrences first, then explicit document bindings and the separate
|
|
118
|
+
call-analysis increment. Select the call producer using focused evidence; this does not select
|
|
119
|
+
Graphify as a dependency or promise complete call/data-flow analysis. Agent usefulness still
|
|
120
|
+
needs B6's live consumer evaluation after the candidate is published.
|
|
121
|
+
|
|
75
122
|
## Consumer report to reconcile when available
|
|
76
123
|
|
|
77
124
|
Retain the private configuration, documents, snapshots and transcripts with TradePilot. Share
|
package/docs/RELEASE-1.0-PLAN.md
CHANGED
|
@@ -4,8 +4,14 @@ Status: original T01–T10 engineering work complete; 0.6.0 candidate publicatio
|
|
|
4
4
|
The maintainer has requested additional [business-context baseline work](PRE-1.0-BASELINE.md)
|
|
5
5
|
before official 1.0: precise exploration, symbol-level implementation links, cross-boundary
|
|
6
6
|
obligations, monorepo coverage and a measured Graphify/SCIP decision. Its A1–A3 public checks
|
|
7
|
-
pass within recorded limits; B1
|
|
8
|
-
|
|
7
|
+
pass within recorded limits; B1 query mechanisms are implemented for the next candidate, while
|
|
8
|
+
B2's measured decision retains SCIP. B3a explicit bindings and B3b's deterministic gap assessment
|
|
9
|
+
are complete; B3c static calls, B4a explicit obligations and B4b selected numeric comparison are
|
|
10
|
+
implemented, along with B5's saved TypeScript/package coverage. Inference decisions and B6
|
|
11
|
+
remain open. Both npm packages remain available for
|
|
12
|
+
TradePilot acceptance while this additional scope is assessed. The maintainer requested the
|
|
13
|
+
next live test after a new candidate; [the implementation queue](1.0-WORK-QUEUE.md) tracks
|
|
14
|
+
the intervening B1–B6 work.
|
|
9
15
|
**T08's upstream deterministic physical-file fix has shipped; the maintainer reports the consumer
|
|
10
16
|
updated and working on 2026-10-27. Detailed full hydration/repeat evidence remains pending.** T04 was completed before
|
|
11
17
|
the T08 fix as requested.
|
|
@@ -32,6 +38,12 @@ This is the near-term release task list. The [Weftlet 2.0 product plan](WEFTLET-
|
|
|
32
38
|
remains a separate future direction for generation, approvals, a companion website and hosted
|
|
33
39
|
AI. None of those platform features is a dependency of the fixes here.
|
|
34
40
|
|
|
41
|
+
The subsequent consumer filename blocker shipped in **0.6.1** on 2026-10-28: bounded physical
|
|
42
|
+
artifact/temp names, unchanged full logical identities/provenance, legacy reads and the requested
|
|
43
|
+
Windows traversal → repeat → clean regression. Registry archives, provenance, tags and a fresh
|
|
44
|
+
packaged CLI sequence are verified in [validation](VALIDATION.md). Use this patch for the next
|
|
45
|
+
consumer rerun; B1–B6 and actual product acceptance remain open.
|
|
46
|
+
|
|
35
47
|
## Reported evidence and boundaries
|
|
36
48
|
|
|
37
49
|
The consumer reported a cold extraction in which two source documents referred to the same
|
package/docs/RELEASING.md
CHANGED
|
@@ -202,14 +202,14 @@ Verify the matching public version in a fresh disposable project after publicati
|
|
|
202
202
|
|
|
203
203
|
```sh
|
|
204
204
|
npm init -y
|
|
205
|
-
npx --yes @weftlet/toolkit@0.
|
|
206
|
-
npx --yes @weftlet/toolkit@0.
|
|
205
|
+
npx --yes @weftlet/toolkit@0.7.0 init --yes
|
|
206
|
+
npx --yes @weftlet/toolkit@0.7.0 config validate
|
|
207
207
|
```
|
|
208
208
|
|
|
209
209
|
For local installation, use both prepared archives from the same reviewed release:
|
|
210
210
|
|
|
211
211
|
```sh
|
|
212
|
-
npm install --save-dev "/path/to/weftlet/.release/weftlet-core-0.
|
|
212
|
+
npm install --save-dev "/path/to/weftlet/.release/weftlet-core-0.7.0.tgz" "/path/to/weftlet/.release/weftlet-toolkit-0.7.0.tgz"
|
|
213
213
|
```
|
|
214
214
|
<!-- weftlet:release:end -->
|
|
215
215
|
|