agentskeptic 7.1.3 → 7.2.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 CHANGED
@@ -58,6 +58,8 @@ steps:
58
58
  <!-- adoption-canonical:start -->
59
59
  ## Default path: one truth check
60
60
 
61
+ **Start here:** **[`docs/first-truth-check.md`](docs/first-truth-check.md)** — canonical first-run steps (command, inputs, stdout/stderr, CI, Cursor, troubleshooting).
62
+
61
63
  Compare recorded tool activity to downstream state (SQL and, in contract mode, HTTP witnesses, object storage, vectors, Mongo per your registry) and get an **Outcome Certificate** (stdout) plus a **`truth_check_verdict`** line on stderr:
62
64
 
63
65
  ```bash
@@ -66,7 +68,25 @@ npx agentskeptic check --workflow-id wf_example \
66
68
  --db ./path/to/readable.sqlite
67
69
  ```
68
70
 
69
- With the conventional layout, **`--registry`** and **`--events`** default to **`./path/to/your-app/agentskeptic/tools.json`** and **`events.ndjson`**. Pass them explicitly when your paths differ. Full reference: [`docs/integrate.md`](integrate.md).
71
+ With the conventional layout, **`--registry`** and **`--events`** default to **`./path/to/your-app/agentskeptic/tools.json`** and **`events.ndjson`**. Pass them explicitly when your paths differ. Shortest path: [`docs/first-truth-check.md`](docs/first-truth-check.md). Full integrator SSOT: [`docs/integrate.md`](docs/integrate.md).
72
+
73
+ **No license required.** The default `agentskeptic check` path needs no `AGENTSKEPTIC_API_KEY` and no license server; it runs stateless contract verification locally. (Stateful **`agentskeptic enforce`** for baselines, drift, and acceptance is a later opt-in commercial path — see below.)
74
+
75
+ **Reading the result.** stdout is the **Outcome Certificate** (machine JSON). On verdict exits, stderr begins with one of:
76
+
77
+ ```text
78
+ truth_check_verdict: trusted
79
+ truth_check_verdict: not_trusted
80
+ truth_check_verdict: unknown
81
+ ```
82
+
83
+ | Verdict | Meaning |
84
+ |---------|---------|
85
+ | `trusted` | Checked outcome matched expected downstream state — only this verdict means the workflow can be relied on. |
86
+ | `not_trusted` | Determinate mismatch or required state missing. Do not claim verified; fix the mismatch. |
87
+ | `unknown` | Evidence incomplete or not established. Do not claim verified; collect missing evidence or narrow checked scope. |
88
+
89
+ Full verdict and stderr contract: [`docs/first-truth-check.md`](docs/first-truth-check.md) (details in [`docs/integrate.md`](docs/integrate.md#first-truth-check)).
70
90
 
71
91
  **Exportable activation (advanced):** `BootstrapPackInput` v1 + **`agentskeptic activate`** (writes **`proof/`** under **`--out`** on exits 0–2; **`bootstrap`** is legacy — [`docs/bootstrap-pack-normative.md`](docs/bootstrap-pack-normative.md)).
72
92
 
@@ -143,7 +163,8 @@ Read-only checks at verify time—not color.
143
163
  - **npm package:** https://www.npmjs.com/package/agentskeptic
144
164
  - **Canonical site:** https://agentskeptic.com
145
165
  - **Integrate:** https://agentskeptic.com/integrate
146
- - **OpenAPI (canonical):** https://agentskeptic.com/openapi-commercial-v1.yaml
166
+ - **Runtime truth-check (CLI / SDK):** https://github.com/jwekavanagh/agentskeptic/blob/main/docs/first-truth-check.md
167
+ - **OpenAPI (hosted commercial API):** https://agentskeptic.com/openapi-commercial-v1.yaml
147
168
  - **Verification Contract Manifest:** https://agentskeptic.com/contract/v1.json
148
169
  - **llms.txt (agents, site):** https://agentskeptic.com/llms.txt
149
170
  - **llms.txt (repo, raw):** https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/llms.txt
@@ -161,15 +182,17 @@ This is the fastest way to see **`ROW_ABSENT`** versus **verified** on the same
161
182
 
162
183
  **Prerequisite:** **Node.js ≥ 22.13** (built-in [`node:sqlite`](https://nodejs.org/api/sqlite.html)), or use [Docker](#docker-quickstart-optional) below.
163
184
 
164
- **Fast first run on your own DB (canonical local truth loop):** after `npm install` and `npm run build`, run:
185
+ **Fast first run on your own DB:** run the same `agentskeptic check` from the [Default path](#default-path-one-truth-check) above against your inputs — after `npm install` and `npm run build`:
165
186
 
166
187
  ```bash
167
- agentskeptic loop --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
188
+ agentskeptic check --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
168
189
  ```
169
190
 
170
- This single command verifies state, emits **TRUSTED / NOT TRUSTED / UNKNOWN**, shows a next action when non-trusted, persists local run history, and auto-compares against your latest compatible prior run. Normative operator contract: **[`docs/local-feedback-loop.md`](docs/local-feedback-loop.md)**.
191
+ stdout is the Outcome Certificate; stderr begins with `truth_check_verdict: trusted|not_trusted|unknown` plus the human report.
192
+
193
+ **Local feedback loop with run history (advanced):** `agentskeptic loop` wraps the same `check` contract and adds local run history, prior-run comparison, and a single TRUSTED / NOT TRUSTED / UNKNOWN line for tight inner-loop iteration — normative contract: [`docs/local-feedback-loop.md`](docs/local-feedback-loop.md).
171
194
 
172
- **Advanced compatibility paths:** `agentskeptic quick`, `agentskeptic crossing`, and `agentskeptic verify-integrator-owned` remain supported for specialized workflows and CI parity; they are no longer the default local operator path.
195
+ **Advanced compatibility paths:** `agentskeptic quick`, `agentskeptic crossing`, and `agentskeptic verify-integrator-owned` remain supported for specialized workflows and CI parity; they are not the first-run path.
173
196
 
174
197
  ```bash
175
198
  npm install
@@ -254,17 +277,17 @@ Retries, partial failures, and race conditions mean a success flag in a trace is
254
277
 
255
278
  ## Contract path (registry + events)
256
279
 
257
- **CLI:** after **`npm install`** and **`npm run build`**, use **`agentskeptic loop`** as the default local command (or `node dist/cli.js loop`). Postgres: **`--postgres-url`** instead of **`--db`** (exactly one).
280
+ **CLI:** the canonical local replay command is **`agentskeptic check`** (see [Default path](#default-path-one-truth-check) above) — the same command CI and the Cursor rule wrap. After **`npm install`** and **`npm run build`**, run it via `agentskeptic check` (or `node dist/cli.js check`). Postgres: **`--postgres-url`** instead of **`--db`** (exactly one).
258
281
 
259
282
  Typical integration:
260
283
 
261
284
  1. Emit **one NDJSON line per tool observation** (see [Event line schema](docs/agentskeptic.md#event-line-schema)).
262
285
  2. Add a **registry** entry per `toolId` (start from **`examples/templates/`**).
263
- 3. Run the local truth loop:
286
+ 3. Run the truth check:
264
287
 
265
288
  ```bash
266
289
  npm run build
267
- agentskeptic loop --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
290
+ agentskeptic check --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
268
291
  ```
269
292
 
270
293
  Replay the bundled files: **`wf_complete`** / **`examples/events.ndjson`** / **`examples/tools.json`** / **`examples/demo.db`** (same flags as above).
@@ -335,6 +358,7 @@ Everything beyond core contract verification lives in **[`docs/agentskeptic.md`]
335
358
  | [`docs/epistemic-contract.md`](docs/epistemic-contract.md) | **Normative epistemic contract** (grounded output vs funnel; ranking limits; telemetry proxies)—single authored source; other docs link or generate from here |
336
359
  | [README — Buy vs build](#buy-vs-build-why-not-only-sql-checks) | Canonical **buy vs build** narrative (failure mode, scripts limits, Quick → Contract) |
337
360
  | [`docs/agentskeptic.md`](docs/agentskeptic.md) | Authoritative CLI and behavior reference (SSOT) |
361
+ | [`docs/cursor-integration.md`](docs/cursor-integration.md) | Consumer Cursor rule template for running local `agentskeptic check` truth checks |
338
362
  | [`docs/quick-verify-normative.md`](docs/quick-verify-normative.md) | Quick Verify normative contract |
339
363
  | [`docs/verification-product.md`](docs/verification-product.md) | Product intent, trust boundary, authority matrix |
340
364
  | [`docs/reconciliation-vocabulary.md`](docs/reconciliation-vocabulary.md) | Reconciliation dimension IDs and UI mapping |
@@ -86,7 +86,7 @@
86
86
  "quickVerifyCommand": "npx agentskeptic quick \\\n --input path/to/quick-input.ndjson \\\n --export-registry path/to/tools.json \\\n --db path/to/readable.sqlite \\\n --no-human-report",
87
87
  "packLedCommand": "npx agentskeptic activate --input ./path/to/workflow-bootstrap-input.json \\\n --db ./path/to/readable.sqlite \\\n --out ./path/to/agent-pack\n\nnpx agentskeptic crossing \\\n --workflow-id YOUR_WORKFLOW_ID \\\n --events ./path/to/events.ndjson \\\n --registry ./path/to/tools.json \\\n --db ./path/to/readable.sqlite",
88
88
  "githubDeepLink": "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/integrate.md",
89
- "githubFirstRunLink": "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/integrate.md"
89
+ "githubFirstRunLink": "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/first-truth-check.md"
90
90
  },
91
91
  "briefProblem": "Claims vs read-only; ROW_ABSENT.",
92
92
  "briefSections": [],
@@ -5,6 +5,7 @@
5
5
  "links": {
6
6
  "site": "https://agentskeptic.com/",
7
7
  "integrate": "https://agentskeptic.com/integrate",
8
+ "runtimeTruthCheckGuide": "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/first-truth-check.md",
8
9
  "learnHub": "https://agentskeptic.com/guides",
9
10
  "openapiCanonical": "https://agentskeptic.com/openapi-commercial-v1.yaml",
10
11
  "openapiRaw": "https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/schemas/openapi-commercial-v1.yaml",
@@ -13,6 +14,7 @@
13
14
  "llmsRaw": "https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/llms.txt",
14
15
  "llmsBlob": "https://github.com/jwekavanagh/agentskeptic/blob/main/llms.txt",
15
16
  "integratorGuideSsotRaw": "https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/docs/integrate.md",
17
+ "cursorIntegrationDocRaw": "https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/docs/cursor-integration.md",
16
18
  "contractManifestCanonical": "https://agentskeptic.com/contract/v1.json",
17
19
  "contractManifestRaw": "https://raw.githubusercontent.com/jwekavanagh/agentskeptic/refs/heads/main/schemas/contract/v1.json"
18
20
  },
@@ -4,7 +4,7 @@
4
4
  "identityVersion": "1.0.0",
5
5
  "mergeGateFingerprintSha256": "64b5ae2ed5025c08c7c9d7b601958cc90edc32c0d80ea207fdaa373de5b9c2fc",
6
6
  "nodeEnginesDeclared": "22.x || 24.x",
7
- "npmPackageVersion": "7.1.3",
7
+ "npmPackageVersion": "7.2.0",
8
8
  "pythonPipExtrasFragment": "dev,postgres",
9
9
  "verificationContractManifest": {
10
10
  "manifestSha256": "c5f23ec43576716c4b9a13e752cd2962a78bb4b4da1f9e521f911e15dfd80268",
@@ -1,5 +1,5 @@
1
1
  export declare const PUBLIC_DISTRIBUTION_SSOT_BLOB_URL = "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/public-distribution.md";
2
2
  export declare const PUBLIC_CANONICAL_SITE_ORIGIN = "https://agentskeptic.com";
3
- export declare const AGENTSKEPTIC_CLI_SEMVER = "7.1.3";
3
+ export declare const AGENTSKEPTIC_CLI_SEMVER = "7.2.0";
4
4
  export declare function formatDistributionFooter(): string;
5
5
  //# sourceMappingURL=publicDistribution.generated.d.ts.map
@@ -1,7 +1,7 @@
1
1
  // Generated by npm run emit-primary-marketing — do not hand edit.
2
2
  export const PUBLIC_DISTRIBUTION_SSOT_BLOB_URL = "https://github.com/jwekavanagh/agentskeptic/blob/main/docs/public-distribution.md";
3
3
  export const PUBLIC_CANONICAL_SITE_ORIGIN = "https://agentskeptic.com";
4
- export const AGENTSKEPTIC_CLI_SEMVER = "7.1.3";
4
+ export const AGENTSKEPTIC_CLI_SEMVER = "7.2.0";
5
5
  export function formatDistributionFooter() {
6
6
  return "Context: https://agentskeptic.com/database-truth-vs-traces\n"
7
7
  + "https://agentskeptic.com/integrate\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentskeptic",
3
- "version": "7.1.3",
3
+ "version": "7.2.0",
4
4
  "description": "Tool activity vs downstream state at verify: SQL, HTTP, vectors, documents, S3 objects—deterministic verdict artifacts (verification-state-stores.md).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,8 +14,16 @@ info:
14
14
  manifestSha256: __CONTRACT_SHA__
15
15
  description: "__IDENTITY_ONE_LINER__\n\nMachine-readable contract for license preflight used by the published npm CLI.\nBase URL is your deployed app origin (same as NEXT_PUBLIC_APP_URL).\n\nEvery path in this document returns an `x-request-id` response header on all status codes (echo a valid client `x-request-id` when supplied; otherwise server-generated). Non-2xx JSON bodies follow RFC 7807-style Problem Details (`type`, `title`, `status`, `detail`, optional `code`, `instance`) unless noted; `POST /api/v1/usage/reserve` denials additionally include legacy `allowed`, `code`, `message`, and optional `upgrade_url` for backward compatibility.\n\n**Breaking (agentskeptic 5.x):** Hosted enforcement ingestion uses `schema_version` 3 with `outcome_certificate` (Outcome Certificate v3 inner JSON, including `failureSpine`). Legacy `schema_version` 2 payloads with `outcome_certificate_v1` are rejected. `POST /api/v1/funnel/verify-outcome` requires `schema_version` 3 and `evidence_gap_primary`. `POST /api/public/verification-reports` accepts envelope `schemaVersion` 3 only. **HTTP 4xx/5xx** responses are **not** `failure-spine-v1` and are **not** Outcome Certificate-shaped; operational CLI errors use `cli-error-envelope` on stderr only.\n"
16
16
  externalDocs:
17
- description: "First-run integration guide"
17
+ description: Runtime truth-check integration guide for agentskeptic check and AgentSkeptic.check
18
18
  url: __DISTRIBUTION_INTEGRATE_URL__
19
+ x-agentskeptic-runtime-truth-check:
20
+ status: documented-outside-commercial-api
21
+ cli: agentskeptic check
22
+ sdk: AgentSkeptic.check
23
+ note: >
24
+ This OpenAPI file describes hosted commercial, reporting, and enforcement APIs. Runtime
25
+ truth checks are integrated through the CLI or SDK. Demo /api/verify routes are examples,
26
+ not the production hosted truth-check API.
19
27
  servers:
20
28
  - url: __SERVERS_ORIGIN__
21
29
  description: Replace with your deployment origin
@@ -1,7 +1,7 @@
1
1
  openapi: "3.0.3"
2
2
  info:
3
3
  title: AgentSkeptic commercial license API
4
- version: "7.1.3"
4
+ version: "7.2.0"
5
5
  contact:
6
6
  url: https://agentskeptic.com
7
7
  x-agentskeptic-distribution:
@@ -14,8 +14,16 @@ info:
14
14
  manifestSha256: "c5f23ec43576716c4b9a13e752cd2962a78bb4b4da1f9e521f911e15dfd80268"
15
15
  description: "Read-only checks at verify time—not color.\n\nMachine-readable contract for license preflight used by the published npm CLI.\nBase URL is your deployed app origin (same as NEXT_PUBLIC_APP_URL).\n\nEvery path in this document returns an `x-request-id` response header on all status codes (echo a valid client `x-request-id` when supplied; otherwise server-generated). Non-2xx JSON bodies follow RFC 7807-style Problem Details (`type`, `title`, `status`, `detail`, optional `code`, `instance`) unless noted; `POST /api/v1/usage/reserve` denials additionally include legacy `allowed`, `code`, `message`, and optional `upgrade_url` for backward compatibility.\n\n**Breaking (agentskeptic 5.x):** Hosted enforcement ingestion uses `schema_version` 3 with `outcome_certificate` (Outcome Certificate v3 inner JSON, including `failureSpine`). Legacy `schema_version` 2 payloads with `outcome_certificate_v1` are rejected. `POST /api/v1/funnel/verify-outcome` requires `schema_version` 3 and `evidence_gap_primary`. `POST /api/public/verification-reports` accepts envelope `schemaVersion` 3 only. **HTTP 4xx/5xx** responses are **not** `failure-spine-v1` and are **not** Outcome Certificate-shaped; operational CLI errors use `cli-error-envelope` on stderr only.\n"
16
16
  externalDocs:
17
- description: "First-run integration guide"
18
- url: https://agentskeptic.com/integrate
17
+ description: Runtime truth-check integration guide for agentskeptic check and AgentSkeptic.check
18
+ url: https://github.com/jwekavanagh/agentskeptic/blob/main/docs/first-truth-check.md
19
+ x-agentskeptic-runtime-truth-check:
20
+ status: documented-outside-commercial-api
21
+ cli: agentskeptic check
22
+ sdk: AgentSkeptic.check
23
+ note: >
24
+ This OpenAPI file describes hosted commercial, reporting, and enforcement APIs. Runtime
25
+ truth checks are integrated through the CLI or SDK. Demo /api/verify routes are examples,
26
+ not the production hosted truth-check API.
19
27
  servers:
20
28
  - url: https://agentskeptic.com
21
29
  description: Replace with your deployment origin
@@ -30,6 +30,8 @@ const STDERR_TAIL_LINES = 20;
30
30
  /** Max UTF-8 bytes of stdout parsed for Outcome Certificate JSON (`failureSpine` extraction). */
31
31
  const MAX_STDOUT_PARSE_BYTES = 262144;
32
32
 
33
+ const { runtimeTruthCheckGuideBlobUrl } = require("./origin.cjs");
34
+
33
35
  const REPO_ROOT = join(__dirname, "..");
34
36
  const README_ADOPTION_START = "<!-- adoption-canonical:start -->";
35
37
  const README_ADOPTION_END = "<!-- adoption-canonical:end -->";
@@ -141,6 +143,7 @@ function buildDiscoveryPayload(root) {
141
143
  const anchors = pm;
142
144
  const canonicalOrigin = normalizeOrigin(anchors.productionCanonicalOrigin);
143
145
  const integrateUrl = `${canonicalOrigin}/integrate`;
146
+ const runtimeTruthCheckGuideUrl = runtimeTruthCheckGuideBlobUrl(String(anchors.gitRepositoryUrl));
144
147
  const learnHubUrl = `${canonicalOrigin}/guides`;
145
148
  const openapiSelfCanonical = `${canonicalOrigin}/openapi-commercial-v1.yaml`;
146
149
  const { owner, repo } = parseGithubRepoFromUrl(anchors.gitRepositoryUrl);
@@ -148,6 +151,7 @@ function buildDiscoveryPayload(root) {
148
151
  const llmsBlob = `https://github.com/${owner}/${repo}/blob/${DISCOVERY_LLM_BRANCH}/llms.txt`;
149
152
  const integratorGuideSsotRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/docs/integrate.md`;
150
153
  const openapiRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/openapi-commercial-v1.yaml`;
154
+ const cursorIntegrationDocRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/docs/cursor-integration.md`;
151
155
  const contractManifestCanonical = `${canonicalOrigin}/contract/v1.json`;
152
156
  const contractManifestRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/contract/v1.json`;
153
157
  const llms = /** @type {{ intentPhrases: string[]; notFor: string[]; relatedQueries: string[] }} */ (
@@ -161,6 +165,7 @@ function buildDiscoveryPayload(root) {
161
165
  links: {
162
166
  site: `${canonicalOrigin}/`,
163
167
  integrate: integrateUrl,
168
+ runtimeTruthCheckGuide: runtimeTruthCheckGuideUrl,
164
169
  learnHub: learnHubUrl,
165
170
  openapiCanonical: openapiSelfCanonical,
166
171
  openapiRaw,
@@ -169,6 +174,7 @@ function buildDiscoveryPayload(root) {
169
174
  llmsRaw,
170
175
  llmsBlob,
171
176
  integratorGuideSsotRaw,
177
+ cursorIntegrationDocRaw,
172
178
  contractManifestCanonical,
173
179
  contractManifestRaw,
174
180
  },
@@ -255,9 +261,11 @@ function renderLlmsTextFromPayload(payload) {
255
261
  "## Primary links",
256
262
  `- Canonical site: ${links.site}`,
257
263
  `- Integrator guide (v2 SSOT): ${links.integratorGuideSsotRaw}`,
264
+ `- Cursor integration (consumer rule): ${links.cursorIntegrationDocRaw}`,
258
265
  `- First-run integration: ${integrateUrl}`,
266
+ `- Runtime truth-check (agentskeptic check / AgentSkeptic.check): ${links.runtimeTruthCheckGuide}`,
259
267
  `- Learn: ${learnHubUrl}`,
260
- `- OpenAPI (canonical): ${openapiSelfCanonical}`,
268
+ `- OpenAPI (hosted commercial / reporting / enforcement): ${openapiSelfCanonical}`,
261
269
  `- OpenAPI (repo raw): ${links.openapiRaw}`,
262
270
  `- Source repository: ${links.repo}`,
263
271
  `- npm package: ${links.npm}`,
@@ -286,9 +294,11 @@ function renderCiSummaryMarkdownFromPayload(payload) {
286
294
  "",
287
295
  "- Canonical site: " + L.site,
288
296
  "- Integrate: " + L.integrate,
297
+ "- Runtime truth-check (CLI/SDK): " + L.runtimeTruthCheckGuide,
289
298
  "- Learn: " + L.learnHub,
290
- "- OpenAPI: " + L.openapiCanonical,
299
+ "- OpenAPI (hosted commercial): " + L.openapiCanonical,
291
300
  "- OpenAPI (repo raw): " + L.openapiRaw,
301
+ "- Cursor integration (consumer rule): " + L.cursorIntegrationDocRaw,
292
302
  "- Repository: " + L.repo,
293
303
  "- npm: " + L.npm,
294
304
  "- llms.txt (raw): " + L.llmsRaw,
@@ -2,7 +2,7 @@
2
2
 
3
3
  const { readFileSync, writeFileSync, mkdirSync } = require("node:fs");
4
4
  const { join, dirname } = require("node:path");
5
- const { normalize, assertNextPublicOriginParity, MARKETING_PATH } = require("./origin.cjs");
5
+ const { normalize, runtimeTruthCheckGuideBlobUrl, assertNextPublicOriginParity, MARKETING_PATH } = require("./origin.cjs");
6
6
 
7
7
  const ROOT = join(__dirname, "..");
8
8
 
@@ -238,7 +238,8 @@ function syncPrimaryMarketing() {
238
238
  const publicOriginNormalized = normalize(effectivePublicOrigin);
239
239
  const openapiSelfEffective = `${publicOriginNormalized}/openapi-commercial-v1.yaml`;
240
240
 
241
- const integrateUrl = `${canonicalOrigin}/integrate`;
241
+ const integrateLandingUrl = `${canonicalOrigin}/integrate`;
242
+ const integrateRuntimeTruthGuideUrl = runtimeTruthCheckGuideBlobUrl(anchors.gitRepositoryUrl);
242
243
 
243
244
  const template = readFileSync(OPENAPI_IN, "utf8");
244
245
  const pkgForVersion = JSON.parse(readFileSync(PKG_PATH, "utf8"));
@@ -252,7 +253,7 @@ function syncPrimaryMarketing() {
252
253
  mid = mid.replace(PRODUCT_VERSION_TOKEN, JSON.stringify(productSemver));
253
254
  mid = mid.replace("__IDENTITY_ONE_LINER__", escaped);
254
255
  mid = mid.replace("__DISTRIBUTION_CONTACT_URL__", canonicalOrigin);
255
- mid = mid.replace("__DISTRIBUTION_INTEGRATE_URL__", integrateUrl);
256
+ mid = mid.replace("__DISTRIBUTION_INTEGRATE_URL__", integrateRuntimeTruthGuideUrl);
256
257
  mid = mid.replace("__DISTRIBUTION_REPO_URL__", anchors.gitRepositoryUrl);
257
258
  mid = mid.replace("__DISTRIBUTION_NPM_URL__", anchors.npmPackageUrl);
258
259
  mid = mid.replace("__CONTRACT_URL__", contractPin.url);
@@ -324,8 +325,9 @@ function syncPrimaryMarketing() {
324
325
  `- **Repository:** ${anchors.gitRepositoryUrl}`,
325
326
  `- **npm package:** ${anchors.npmPackageUrl}`,
326
327
  `- **Canonical site:** ${canonicalOrigin}`,
327
- `- **Integrate:** ${integrateUrl}`,
328
- `- **OpenAPI (canonical):** ${openapiSelfCanonical}`,
328
+ `- **Integrate:** ${integrateLandingUrl}`,
329
+ `- **Runtime truth-check (CLI / SDK):** ${integrateRuntimeTruthGuideUrl}`,
330
+ `- **OpenAPI (hosted commercial API):** ${openapiSelfCanonical}`,
329
331
  `- **Verification Contract Manifest:** ${contractPin.url}`,
330
332
  `- **llms.txt (agents, site):** ${canonicalOrigin}/llms.txt`,
331
333
  `- **llms.txt (repo, raw):** ${pl.llmsRaw}`,
@@ -31,6 +31,17 @@ function readProductionCanonicalOrigin() {
31
31
  return String(pm.productionCanonicalOrigin);
32
32
  }
33
33
 
34
+ /**
35
+ * Canonical browser URL for the repo markdown SSOT `docs/first-truth-check.md` (OpenAPI externalDocs + discovery).
36
+ * @param {string} gitRepositoryUrl e.g. https://github.com/org/repo or …/repo.git
37
+ */
38
+ function runtimeTruthCheckGuideBlobUrl(gitRepositoryUrl) {
39
+ const base = String(gitRepositoryUrl)
40
+ .replace(/\.git$/i, "")
41
+ .replace(/\/$/, "");
42
+ return `${base}/blob/main/docs/first-truth-check.md`;
43
+ }
44
+
34
45
  function assertNextPublicOriginParity() {
35
46
  const canonicalFromJson = readProductionCanonicalOrigin();
36
47
  const skip = process.env.NODE_ENV !== "production" || process.env.VERCEL_ENV === "preview";
@@ -45,6 +56,7 @@ function assertNextPublicOriginParity() {
45
56
 
46
57
  module.exports = {
47
58
  normalize,
59
+ runtimeTruthCheckGuideBlobUrl,
48
60
  assertNextPublicOriginParity,
49
61
  MARKETING_PATH,
50
62
  /** @deprecated use MARKETING_PATH */