freshcontext-mcp 0.3.17 → 0.3.19

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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +17 -0
  3. package/README.md +459 -296
  4. package/SECURITY.md +34 -0
  5. package/TRADEMARKS.md +9 -0
  6. package/dist/adapters/arxiv.js +92 -48
  7. package/dist/adapters/hackernews.js +16 -16
  8. package/dist/adapters/registry.js +232 -0
  9. package/dist/core/decay.js +61 -0
  10. package/dist/core/decision.js +176 -0
  11. package/dist/core/envelope.js +59 -0
  12. package/dist/core/explain.js +28 -0
  13. package/dist/core/guards.js +17 -0
  14. package/dist/core/index.js +11 -0
  15. package/dist/core/pipeline.js +101 -0
  16. package/dist/core/provenance.js +73 -0
  17. package/dist/core/rank.js +84 -0
  18. package/dist/core/signal.js +101 -0
  19. package/dist/core/sourceProfiles.js +126 -0
  20. package/dist/core/types.js +1 -0
  21. package/dist/core/utility.js +90 -0
  22. package/dist/rest/handler.js +126 -0
  23. package/dist/server.js +40 -2
  24. package/dist/tools/evaluateContext.js +127 -0
  25. package/dist/tools/freshnessStamp.js +1 -137
  26. package/dist/types.js +0 -1
  27. package/docs/API_DESIGN.md +434 -0
  28. package/docs/CODEX_MCP_USAGE.md +116 -0
  29. package/docs/CORE_API.md +226 -0
  30. package/docs/CORE_MCP_BOUNDARY.md +106 -0
  31. package/docs/DEPENDENCY_DILIGENCE.md +63 -0
  32. package/docs/FUTURE_LANES.md +173 -0
  33. package/docs/HA_PRI_V2_DESIGN.md +279 -0
  34. package/docs/RELEASE_INTEGRITY.md +55 -0
  35. package/docs/RELEASE_NOTES.md +55 -0
  36. package/docs/SIGNAL_CONTRACT.md +89 -0
  37. package/docs/SOURCE_PROFILES.md +427 -0
  38. package/freshcontext.schema.json +103 -103
  39. package/package-script-guard.mjs +141 -0
  40. package/package.json +94 -59
  41. package/server.json +27 -28
  42. package/dist/apify.js +0 -133
@@ -0,0 +1,226 @@
1
+ # FreshContext Core API
2
+
3
+ FreshContext Core is the reusable engine layer in the current integrated Core/MCP package. It owns signal normalization, envelope creation, freshness scoring, failure honesty, Source Profiles, decision output, rank/explain primitives, the context-utility primitive, and pure provenance helpers.
4
+
5
+ MCP, Worker HTTP, future REST, and future CLI/SDK surfaces should use Core as the contract center instead of redefining freshness or envelope behavior per host.
6
+
7
+ For the package-level boundary between Core, MCP, adapters, and deployment surfaces, see [Core / MCP Boundary](./CORE_MCP_BOUNDARY.md).
8
+
9
+ ## Stable Public Core API
10
+
11
+ Import stable Core functions from:
12
+
13
+ ```ts
14
+ import {
15
+ calculateFreshnessScore,
16
+ formatForLLM,
17
+ looksLikeFailedAdapterContent,
18
+ scoreLabel,
19
+ stampFreshness,
20
+ toStructuredJSON,
21
+ } from "./src/core/index.js";
22
+ ```
23
+
24
+ ### Envelope
25
+
26
+ - `stampFreshness(result, options, adapter)` creates a `FreshContext` object from adapter output.
27
+ - `formatForLLM(ctx, options?)` renders the text envelope and trailing structured JSON block.
28
+ - `toStructuredJSON(ctx)` returns the machine-readable FreshContext JSON shape.
29
+
30
+ ### Scoring
31
+
32
+ - `calculateFreshnessScore(content_date, retrieved_at, adapter)` returns a freshness score from `0..100`, or `null` when the content date cannot be trusted.
33
+ - `scoreLabel(score)` maps a numeric freshness score to a human-readable label.
34
+
35
+ ### Guards
36
+
37
+ - `looksLikeFailedAdapterContent(raw)` detects empty, security, timeout, and error-like adapter output so failed content is not stamped as fresh high-confidence context.
38
+
39
+ ## Core Evaluation Pipeline
40
+
41
+ The Core evaluation pipeline is the pure orchestration layer over the existing primitives.
42
+
43
+ Public exports:
44
+
45
+ - `evaluateSignal(input, options?)`
46
+ - `evaluateSignals(inputs, options?)`
47
+ - `CoreSignalEvaluationOptions`
48
+ - `CoreSignalEvaluationResult`
49
+ - `CoreSignalEnvelopeResult`
50
+ - `CoreSignalProvenanceOptions`
51
+
52
+ `evaluateSignal` normalizes a signal, applies timestamp/failure guards, computes `freshness_score`, computes context-conditioned utility, ranks/explains the signal, optionally creates a FreshContext envelope, and optionally prepares Ha-Pri v2 provenance material.
53
+
54
+ It does not fetch, cache, write D1, inspect Worker bindings, know MCP tool schemas, deploy, or publish. Hosts decide whether to store, cache, transmit, or expose the returned result.
55
+
56
+ `evaluateSignals` evaluates each input and returns evaluations sorted by existing `rankSignal` final score, preserving input order when scores tie. Context utility is returned as a sidecar and does not replace `final_score`.
57
+
58
+ Context utility is returned as sidecar output in the current pipeline; it does not replace or modify the default `rankSignal` / `evaluateSignals` ordering. A future pass may add an explicit utility-weighted ranking mode.
59
+
60
+ Local demo:
61
+
62
+ ```bash
63
+ npm run demo:evaluate:file -- examples/sources.academic.example.json
64
+ npm run demo:evaluate:file -- examples/sources.jobs.example.json
65
+ ```
66
+
67
+ The demo reads caller-provided JSON with `profile`, `intent`, and `signals`, then returns decision-first output. It does not fetch URLs, crawl, read folders, deploy REST, or implement Operator mode.
68
+
69
+ ### Stable Types
70
+
71
+ - `FreshContext`
72
+ - `AdapterResult`
73
+ - `ExtractOptions`
74
+ - `EnvelopeFormatOptions`
75
+ - `SignalConfidence`
76
+
77
+ These types describe the stable envelope and adapter result contract.
78
+
79
+ ## Signal Contract v1
80
+
81
+ Signal Contract v1 is the additive Core shape for a retrieved signal before it is ranked, wrapped, stored, or passed to an agent workflow.
82
+
83
+ Public exports:
84
+
85
+ - `SIGNAL_CONTRACT_VERSION`
86
+ - `normalizeSignal(input, options?)`
87
+ - `FreshContextSignalInput`
88
+ - `FreshContextSignal`
89
+ - `SignalDateConfidence`
90
+ - `SignalContractVersion`
91
+ - `SignalNormalizeOptions`
92
+
93
+ `published_at` is the canonical signal timestamp. `content_date` is accepted as an adapter/envelope compatibility alias. Normalization clears invalid or meaningfully future-dated timestamps, marks failed/error-looking content as `status: "failed"`, clamps `semantic_score` into `0..1`, and records normalization reasons.
94
+
95
+ See [Signal Contract v1](./SIGNAL_CONTRACT.md).
96
+
97
+ ## Source Profiles
98
+
99
+ Source Profiles are early public Core metadata for describing how classes of information age, fail, rank, and explain.
100
+
101
+ Public exports:
102
+
103
+ - `BUILT_IN_SOURCE_PROFILES`
104
+ - `getSourceProfile(profileId)`
105
+ - `listSourceProfiles()`
106
+ - `SourceProfile`
107
+ - `SourceProfileId`
108
+ - `SourceAuthorityHint`
109
+ - `SourceDatePolicy`
110
+ - `SourceFailurePolicy`
111
+ - `SourceSurface`
112
+
113
+ They reframe the 21 named adapter tools as reference adapters and source-profile examples instead of the product identity. The MCP server also exposes `evaluate_context` as the generic caller-provided context evaluation path. Source Profiles do not implement `retrieve(...)`, Operator mode, adapter selection, crawling, local file search, or any host/runtime behavior.
114
+
115
+ ## Decision Helper
116
+
117
+ The decision helper translates a Core evaluation result into user-facing action meaning.
118
+
119
+ Public exports:
120
+
121
+ - `interpretEvaluation(evaluation, options?)`
122
+ - `interpretEvaluations(evaluations, options?)`
123
+ - `ContextDecision`
124
+ - `IntentProfileId`
125
+ - `ContextDecisionOptions`
126
+ - `ContextDecisionResult`
127
+
128
+ Supported decisions:
129
+
130
+ - `use_first`
131
+ - `cite_as_primary`
132
+ - `cite_as_supporting`
133
+ - `use_as_background`
134
+ - `needs_verification`
135
+ - `needs_refresh`
136
+ - `watch_only`
137
+ - `exclude`
138
+
139
+ Supported intent profiles:
140
+
141
+ - `citation_check`
142
+ - `student_research`
143
+ - `developer_adoption`
144
+ - `job_search`
145
+ - `market_watch`
146
+ - `business_due_diligence`
147
+ - `medical_literature_triage`
148
+
149
+ The helper consumes existing `CoreSignalEvaluationResult` fields plus optional Source Profile metadata. It does not change `evaluateSignal`, `evaluateSignals`, `rankSignal`, ranking order, freshness math, utility math, envelopes, provenance, or host behavior.
150
+
151
+ FreshContext decisions judge citation readiness, context usefulness, freshness, traceability, and uncertainty. They do not certify truth or provide legal, medical, tax, employment, academic, or investment advice.
152
+
153
+ Demo output will be updated separately so presentation stays separate from Core decision logic.
154
+
155
+ ## Public Ranking Primitives
156
+
157
+ The ranking primitives are public, but consumers should treat their score scales carefully:
158
+
159
+ - `rankSignal(signal, options?)`
160
+ - `rankSignals(signals, options?)`
161
+ - `explainSignal(rankedSignalLike)`
162
+ - `FreshSignal`
163
+ - `RankedSignal`
164
+ - `RankOptions`
165
+
166
+ Score scales:
167
+
168
+ - `semantic_score`: normalized `0..1`
169
+ - `final_score`: normalized `0..1`
170
+ - `freshness_score`: FreshContext freshness score `0..100`, or `null`
171
+
172
+ Ranking combines semantic relevance and freshness into a deterministic order. It does not own retrieval, embedding, vector search, storage, or host-specific scoring policy.
173
+
174
+ ## Experimental Utility Primitive
175
+
176
+ The context-conditioned utility primitive is pure and tested, but it is not production-wired into MCP ranking, Worker feeds, Store scoring, or runtime behavior.
177
+
178
+ Experimental exports:
179
+
180
+ - `calculateContextUtility`
181
+ - `ContextUtilityStatus`
182
+ - `ContextUtilityInput`
183
+ - `ContextUtilityResult`
184
+
185
+ These are pure Core math. They are now connected inside `evaluateSignal` as sidecar utility output, but they are not production-wired into MCP ranking, Worker feeds, Store scoring, or runtime behavior.
186
+
187
+ ## Provenance Helpers
188
+
189
+ Ha-Pri v2 is available as pure Core helper functionality:
190
+
191
+ - `canonicalizeHaPriContent`
192
+ - `sha256Hex`
193
+ - `calculateHaPriV2`
194
+ - `verifyHaPriV2`
195
+ - `HaPriV2Input`
196
+ - `HaPriV2Result`
197
+ - `HaPriV2VerificationResult`
198
+
199
+ `evaluateSignal` can optionally prepare Ha-Pri v2 material when `includeProvenance` is set and required input material is present. Core does not persist provenance, add D1 columns, verify rows on read, reject rows, or replace Worker Ha-Pri v1 behavior.
200
+
201
+ ## Internal, Policy, and Compatibility Exports
202
+
203
+ - `clampScore` is an internal ranking helper. It is currently exported for tests and utility use, but it should not be presented as a primary buyer-facing API.
204
+ - `LAMBDA` is the current policy constant table used by freshness scoring. It documents the reference decay policy, but it is not a buyer-facing tuning API.
205
+
206
+ Compatibility lanes should remain:
207
+
208
+ - `src/types.ts` re-exports legacy adapter types from Core.
209
+ - `src/tools/freshnessStamp.ts` re-exports envelope helpers for older MCP/npm import paths.
210
+
211
+ These lanes protect existing imports while Core becomes the center. Do not remove them until downstream imports have been migrated intentionally.
212
+
213
+ ## What Core Does Not Own
214
+
215
+ Core does not own:
216
+
217
+ - MCP transport
218
+ - Cloudflare runtime behavior
219
+ - KV cache policy
220
+ - Cache metadata injection
221
+ - D1, feed, or cron behavior
222
+ - Store/feed scoring and provenance persistence
223
+ - Hosted dashboard, API, deployment, or runtime concerns
224
+
225
+ Hosts may wrap Core outputs with their own transport, cache, session, rate-limit, or persistence metadata, but they should not fork the Core envelope and freshness contract without an explicit compatibility reason.
226
+
@@ -0,0 +1,106 @@
1
+ # FreshContext Core / MCP Boundary
2
+
3
+ FreshContext is the context judgment layer between retrieval and reasoning.
4
+
5
+ The current npm package is intentionally named `freshcontext-mcp` because MCP is the first live interface. That does not make MCP the whole product. MCP is a host layer over the FreshContext Core engine.
6
+
7
+ ## Product Shape
8
+
9
+ ```text
10
+ Candidate context
11
+ -> FreshContext Core
12
+ -> decision-ready context
13
+ -> MCP / Worker / future REST / future SDK / future CLI
14
+ ```
15
+
16
+ FreshContext Core owns the judgment contract:
17
+
18
+ - signal normalization
19
+ - freshness scoring
20
+ - source profiles
21
+ - context utility sidecar scoring
22
+ - rank and explanation primitives
23
+ - decision helper output
24
+ - envelope and provenance helpers
25
+
26
+ MCP owns the live reference interface:
27
+
28
+ - tool registration
29
+ - MCP input schemas
30
+ - stdio transport
31
+ - client-facing tool descriptions
32
+ - formatting Core/adapter output for MCP clients
33
+
34
+ Adapters own source intake:
35
+
36
+ - source-specific fetching
37
+ - source-specific parsing
38
+ - timestamp extraction
39
+ - source-specific normalization
40
+ - failure normalization before Core evaluation
41
+
42
+ Worker/site surfaces own deployment concerns:
43
+
44
+ - Cloudflare runtime behavior
45
+ - KV/D1/cache/feed concerns
46
+ - hosted demo/site presentation
47
+ - runtime guards and deployment configuration
48
+
49
+ ## Current Live Boundary
50
+
51
+ Live today:
52
+
53
+ - npm package: `freshcontext-mcp@0.3.19`
54
+ - MCP stdio server and published binary: `freshcontext-mcp`
55
+ - `evaluate_context` MCP tool for caller-provided candidate context
56
+ - 21 named read-only reference adapters
57
+ - Core signal evaluation
58
+ - Source Profiles
59
+ - Decision Helper
60
+ - adapter registry metadata
61
+ - arXiv signal-to-decision proof
62
+ - bring-your-own-context local demos
63
+ - Trust Scanner release gate
64
+
65
+ Not live today:
66
+
67
+ - standalone Core npm package
68
+ - package rename to `freshcontext`
69
+ - Operator / `retrieve(...)`
70
+ - automatic browser crawling
71
+ - automatic local folder/PDF scanning
72
+ - hosted enterprise dashboard or billing
73
+ - hard Ha-Pri v2 production enforcement
74
+ - full adapter ingestion into pure signal paths
75
+
76
+ ## Future Package Split
77
+
78
+ The safe split path is staged:
79
+
80
+ 1. Keep `freshcontext-mcp` stable for current users.
81
+ 2. Maintain Core as a pure internal export surface.
82
+ 3. Audit Core dependencies, Node/browser compatibility, and API stability.
83
+ 4. Publish a standalone Core package only after compatibility tests exist.
84
+ 5. Make `freshcontext-mcp` depend on the standalone Core package.
85
+ 6. Consider a repo rename to `freshcontext` only after package/client links are stable.
86
+
87
+ The expected future shape is:
88
+
89
+ ```text
90
+ freshcontext
91
+ packages/core reusable judgment engine
92
+ packages/adapters reference source intake assets
93
+ packages/mcp MCP host layer
94
+ packages/cli future local evaluator
95
+ docs
96
+ ```
97
+
98
+ ## Compatibility Rule
99
+
100
+ Do not remove the current compatibility lanes until a dedicated migration pass exists:
101
+
102
+ - `src/types.ts` re-exports legacy adapter types from Core.
103
+ - `src/tools/freshnessStamp.ts` re-exports envelope helpers for older MCP/npm import paths.
104
+ - `dist/server.js` remains the package `main` and MCP binary target.
105
+
106
+ The architecture direction is clear, but the public runtime should stay boring and stable.
@@ -0,0 +1,63 @@
1
+ # FreshContext Dependency Diligence Notes
2
+
3
+ This document records dependency and license diligence notes from the Trust L4/L5 cleanup. It is not legal advice and does not replace professional review for external review, distribution, or formal diligence.
4
+
5
+ ## Current Audit Status
6
+
7
+ As of Pass 8-AB:
8
+
9
+ - `npm audit --omit=dev`: clean.
10
+ - `npm audit`: clean.
11
+ - The published MCP npm package excludes the Apify Actor entrypoint and does not install Apify/Crawlee in normal consumer installs.
12
+ - The previous moderate `qs` and `ws` advisories were resolved with narrow transitive overrides in the source checkout.
13
+ - No package version change was made.
14
+
15
+ ## Resolved Advisories
16
+
17
+ `qs`
18
+
19
+ - Previous severity: moderate.
20
+ - Path: `@modelcontextprotocol/sdk -> express/body-parser -> qs`.
21
+ - Resolution: pinned through npm `overrides` to `qs@6.15.2`.
22
+
23
+ `ws`
24
+
25
+ - Previous severity: moderate.
26
+ - Historical source-checkout path: `apify -> ws`.
27
+ - Resolution: pinned through npm `overrides` to `ws@8.20.1` for source-checkout Apify Actor workflows.
28
+
29
+ `file-type`
30
+
31
+ - Previous severity: moderate in fresh consumer installs.
32
+ - Historical consumer path: `apify -> @crawlee/utils -> file-type`.
33
+ - Resolution: Apify/Crawlee were removed from the normal published MCP package dependency surface. Apify remains a source-checkout / separate-actor concern.
34
+
35
+ ## License Inventory Notes
36
+
37
+ The Trust L4 license inventory was broadly permissive, including MIT, Apache-2.0, BSD variants, ISC, 0BSD, BlueOak-1.0.0, and similar permissive variants.
38
+
39
+ No GPL, AGPL, LGPL, MPL, EPL, CDDL, or similar copyleft licenses were reported in the Trust L4 scan.
40
+
41
+ `map-stream@0.1.0`
42
+
43
+ - Scanner result: `UNKNOWN`.
44
+ - Path observed during L4: transitive through source-checkout `apify` / Crawlee-related dependencies.
45
+ - Diligence note: package metadata appears incomplete, but the installed package includes an MIT-style license file.
46
+ - Action: keep as a source-checkout / actor-packaging diligence note and recheck before external diligence or Apify Actor distribution.
47
+
48
+ `caniuse-lite`
49
+
50
+ - Scanner result: `CC-BY-4.0`.
51
+ - Diligence note: preserve and review attribution requirements before external diligence, bundled distribution, or a formal review package.
52
+
53
+ ## Before External Diligence or Distribution
54
+
55
+ - Rerun `npm audit --omit=dev`.
56
+ - Rerun `npm audit`.
57
+ - Rerun dependency license inventory.
58
+ - Review scanner-unknown packages.
59
+ - Review `caniuse-lite` attribution requirements.
60
+ - Generate an SBOM if requested by an evaluator, reviewer, or downstream distributor.
61
+ - Review dependency and license posture with qualified counsel when external distribution or formal diligence requires it.
62
+
63
+ Do not treat this document as a legal conclusion.
@@ -0,0 +1,173 @@
1
+ # FreshContext Future Lanes
2
+
3
+ This document keeps future FreshContext work organized without turning roadmap ideas into public claims.
4
+
5
+ FreshContext is live today as an integrated MCP/Core package. Future work should stay in lanes, start with audits, and avoid feature sprawl.
6
+
7
+ The current package boundary is documented in [Core / MCP Boundary](./CORE_MCP_BOUNDARY.md). Treat MCP as the first live host over FreshContext Core, not as the whole product identity.
8
+
9
+ ## Current Live Boundary
10
+
11
+ Live today:
12
+
13
+ - npm package: `freshcontext-mcp@0.3.19`
14
+ - MCP stdio server
15
+ - `evaluate_context` MCP tool for caller-provided candidate context
16
+ - 21 read-only reference adapters
17
+ - Core signal evaluation
18
+ - Source Profiles
19
+ - Decision Helper
20
+ - adapter registry metadata
21
+ - arXiv signal-to-decision proof
22
+ - bring-your-own-context local demos
23
+ - Trust Scanner release gate
24
+
25
+ Not live today:
26
+
27
+ - Operator / `retrieve(...)`
28
+ - browser crawling
29
+ - automatic local file, folder, or PDF scanning
30
+ - hosted dashboard or billing
31
+ - hard Ha-Pri v2 production enforcement
32
+ - standalone Core SDK package
33
+ - full adapter ingestion
34
+
35
+ ## Lane 1: Client Setup Reliability
36
+
37
+ Goal:
38
+
39
+ ```text
40
+ Make Claude, Codex, and MCP-compatible clients connect reliably to the published package.
41
+ ```
42
+
43
+ Start with setup guide audits, Claude Desktop local/global package paths, Codex local MCP config paths, stale global package fixes, and smoke command expectations.
44
+
45
+ Do not claim ChatGPT/OpenAI connector compatibility until a separate compatibility audit is done.
46
+
47
+ ## Lane 2: Generic Context Evaluation
48
+
49
+ Goal:
50
+
51
+ ```text
52
+ Let any caller provide candidate context and get decision-ready output.
53
+ ```
54
+
55
+ Current live MCP path:
56
+
57
+ ```text
58
+ evaluate_context
59
+ ```
60
+
61
+ Hard boundary:
62
+
63
+ ```text
64
+ No fetching, crawling, browsing, folder reading, or retrieval orchestration.
65
+ Only evaluate caller-provided candidate context.
66
+ ```
67
+
68
+ Next work in this lane should focus on CLI, SDK, and REST ergonomics over the same caller-provided signal shape.
69
+
70
+ ## Lane 3: Multi-Agent Context Handoff Proof
71
+
72
+ Goal:
73
+
74
+ ```text
75
+ Show FreshContext as an independent context judgment layer between agents.
76
+ ```
77
+
78
+ Proof shape:
79
+
80
+ ```text
81
+ agent A produces candidate context
82
+ -> FreshContext evaluates it
83
+ -> agent B receives decision-ready context
84
+ ```
85
+
86
+ Do not build a full multi-agent framework. Prove the handoff boundary.
87
+
88
+ ## Lane 4: Core SDK Extraction Audit
89
+
90
+ Goal:
91
+
92
+ ```text
93
+ Decide whether Core should become a standalone package.
94
+ ```
95
+
96
+ Audit current Core exports, dependency boundaries, package shape, browser/node compatibility, public API stability, and what remains MCP-only.
97
+
98
+ No extraction without a compatibility plan. Keep `freshcontext-mcp` stable until a standalone Core package has compatibility tests and a migration path.
99
+
100
+ ## Lane 5: Local/User Data Intake Audit
101
+
102
+ Goal:
103
+
104
+ ```text
105
+ Explore student, research, and local-PC workflows safely.
106
+ ```
107
+
108
+ Candidate sources include notes, PDFs, local JSON/CSV, citation exports, and database rows.
109
+
110
+ Hard boundary:
111
+
112
+ ```text
113
+ Consent-first design. No automatic folder scanning or background file reading.
114
+ ```
115
+
116
+ ## Lane 6: Decision Layer Upgrade
117
+
118
+ Goal:
119
+
120
+ ```text
121
+ Make decisions more useful without silently changing ranking.
122
+ ```
123
+
124
+ Possible inputs include context utility, control signal, future context signal, confidence tiers, and source-profile-specific thresholds.
125
+
126
+ Do not make `utility.score` affect ranking by default without a dedicated ranking policy pass.
127
+
128
+ ## Lane 7: Ha-Pri v2 Production Path
129
+
130
+ Goal:
131
+
132
+ ```text
133
+ Turn Ha-Pri v2 from pure Core helper/design into production enforcement where appropriate.
134
+ ```
135
+
136
+ Audit canonical content material, storage path, verification timing, failure mode, D1/Worker compatibility, and migration plan.
137
+
138
+ Do not claim hard tamper enforcement until the read/write path exists.
139
+
140
+ ## Lane 8: GDELT GKG / Richer Source Intelligence
141
+
142
+ Goal:
143
+
144
+ ```text
145
+ Upgrade GDELT intelligence with richer global knowledge graph signals.
146
+ ```
147
+
148
+ Possible fields include tone, Goldstein scale, event codes, actor geography, theme density, and source timeline.
149
+
150
+ Do not mix this with generic context evaluation or local intake.
151
+
152
+ ## Lane 9: Operator / Retrieve Orchestration
153
+
154
+ Goal:
155
+
156
+ ```text
157
+ Coordinate retrieval only after the decision layer and adapter boundaries are mature.
158
+ ```
159
+
160
+ Operator may later select adapters, call retrievers, refresh stale sources, and package best context.
161
+
162
+ Not now. Operator is a later workflow layer over Core and adapters.
163
+
164
+ ## Operating Rule
165
+
166
+ Every lane starts with:
167
+
168
+ ```text
169
+ audit -> small patch -> validation -> stop
170
+ ```
171
+
172
+ Do not combine lanes because the architecture is tempting.
173
+