rebilder 0.2.1 → 0.4.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/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ # rebilder changelog
2
+
3
+ Notable changes to the `rebilder` command-line tool. Exit codes are a stable contract and are never renumbered. Dates are the day each version reached npm.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.4.0 (2026-10-06)
8
+
9
+ - **Scores against ARS 0.3.** Weights and check ids are unchanged. When a page does not send a Markdown copy but links one on the same site, `check` fetches that one copy. A copy that loads earns 6 of the Markdown check's 9 points. More action words count as a page's main action, such as "shop", "free trial", "get a demo" and "talk to sales". Evidence lines and fixes are written in plain language.
10
+ - When a page's linked Markdown copy works, **Your next steps** says so and shows how to earn the rest: send the copy from the page address too. `diff` says when its parity check compared the linked copy rather than the two requests.
11
+ - `rebilder init` gives the Markdown check its real weight, 9 points. It said 10.
12
+ - The probe budget allows seven requests per URL instead of six, so a multi-URL run has room for linked copies.
13
+ - The source code is public at https://github.com/rebilder/rebilder/tree/main/packages/cli. `repository` and `bugs` point there, and issues and pull requests are welcome.
14
+
15
+ ## 0.3.0 (2026-09-28)
16
+
17
+ - **Requires Node.js 22 or later.** `engines.node` moves from `>=20.11.0` to `>=22`; Node.js 20 reached end of life in April 2026.
18
+ - `rebilder init` detects SvelteKit, Nuxt, Astro, React Router, Remix, Hono, Bun, Deno, Netlify and Vercel as well as Next.js, Express, Fastify, Cloudflare Workers and Shopify. It checks the framework before the runtime it deploys to, and with no marker it scaffolds the framework-neutral fetch middleware instead of Express. Each scaffold links its guide on rebilder.com.
19
+ - The Next.js scaffold passes the fallthrough to `createGatewayProxy`, so your HTML responses carry `Vary: Accept`.
20
+ - The library entry ships as ESM only. The CommonJS files were unreachable through `exports`; Node.js 22.12 and later can `require()` the ESM entry. Unpacked size drops from about 750 KB to 510 KB.
21
+ - README: absolute links and no internal references. Better package description and keywords. This changelog now ships in the package.
22
+ - README: names the standard in full, the Rebilder Agent Readability Spec (ARS).
23
+
24
+ ## 0.2.1 (2026-09-08)
25
+
26
+ - Terminal and Markdown reports open with **Your next steps**, written for a business owner, before the technical detail.
27
+ - `--help` and the README start from checking one important page and end with rechecking it.
28
+
29
+ ## 0.2.0 (2026-08-26)
30
+
31
+ - Scores against ARS 0.2 through `@rebilder/agent-readability` 0.2.0. Scores are not comparable with ARS 0.1.
32
+ - Removes the conflict-of-interest notice from reports.
33
+
34
+ ## 0.1.1 (2026-08-11)
35
+
36
+ - Package metadata points at rebilder.com for help instead of a private repository.
37
+
38
+ ## 0.1.0 (2026-08-10)
39
+
40
+ First release: `rebilder check` (pretty, JSON, Markdown and JUnit output, `--fail-on` thresholds), `rebilder diff`, `rebilder init` and `rebilder badge`, with zero telemetry.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Help AI assistants understand the business information on your website.
4
4
 
5
5
  `rebilder check <url>` fetches a page the way an agent would, fetches it again
6
6
  the way a browser would, and scores the result against
7
- [the Agent Readability Spec (ARS 0.2)](https://rebilder.com/spec/ars). It tells
7
+ [the Rebilder Agent Readability Spec (ARS 0.3)](https://rebilder.com/spec/ars). It tells
8
8
  you what a machine caller actually receives from your site, what that costs in
9
9
  bytes, and which of the 22 checks you are losing points on.
10
10
 
@@ -16,7 +16,7 @@ npx rebilder check https://example.com/products/thing
16
16
  ```
17
17
 
18
18
  **Zero telemetry.** This CLI never uploads a scan, a URL, a hostname, or a
19
- result — see [the contract below](#zero-telemetry).
19
+ result. See [the contract below](#zero-telemetry).
20
20
 
21
21
  ---
22
22
 
@@ -28,7 +28,7 @@ result — see [the contract below](#zero-telemetry).
28
28
  4. If you need a website connection, run `npx rebilder init` in your project. It prepares a configuration scaffold; your developer still needs to connect real data, review the integration and deploy it.
29
29
  5. After the website changes, rerun the check and use `npx rebilder diff <url>` to compare customer and assistant responses.
30
30
 
31
- A scan measures readability of a captured page. It does not measure customer demand, guarantee an AI recommendation or verify sales. Business details such as prices, service areas and policies come from you. The tool never publishes those details or changes your website for you.
31
+ The report helps you improve the captured page. Connect current business records when adding prices, service areas and policies, then verify the updated response.
32
32
 
33
33
  JSON and JUnit remain suitable for automation; the owner-oriented next steps appear in terminal and Markdown reports.
34
34
 
@@ -53,19 +53,19 @@ rebilder badge <domain> # embed snippet
53
53
  | 0 | Completed; threshold met, or no threshold set |
54
54
  | 1 | Completed; threshold **not** met |
55
55
  | 2 | Usage error |
56
- | 3 | Probe failed / target unreachable — **infrastructure, not a score failure** |
56
+ | 3 | Probe failed / target unreachable: **infrastructure, not a score failure** |
57
57
  | 4 | Blocked by policy (SSRF guard, robots opt-out, probe budget spent) |
58
58
 
59
59
  **The 1-vs-3 split is load-bearing.** `1` is a fact about your site. `3` is DNS,
60
60
  a timeout, a 502, or a captive portal in your CI runner. If a flaky network
61
- exited `1`, the first red build nobody could explain would get the check deleted
62
- — and a deleted check protects nothing. So an outcome that never produced a
61
+ exited `1`, the first red build nobody could explain would get the check deleted,
62
+ and a deleted check protects nothing. So an outcome that never produced a
63
63
  score can never produce `1`, and there is a test that sweeps every unscored
64
64
  reason and every probe rejection to prove it.
65
65
 
66
66
  `4` is the other thing that is not a score failure: we chose not to fetch, or
67
67
  were told not to. It is separate from `3` because `4` is deterministic and `3` is
68
- not — re-running fixes a `3` and never fixes a `4`.
68
+ not: re-running fixes a `3` and never fixes a `4`.
69
69
 
70
70
  **`--fail-on` defaults to nothing.** Plain `rebilder check <url>` reports and
71
71
  exits `0`. A tool that fails a build by default is a tool that gets `|| true`
@@ -101,15 +101,17 @@ esac
101
101
 
102
102
  ## `rebilder check`
103
103
 
104
- Per URL it makes **two requests** — an agent probe and a browser control that
105
- differ in the `Accept` header **and in nothing else** — plus `/robots.txt`,
106
- `/llms.txt` and `/.well-known/ucp` per origin. Nothing else is requested; there
107
- is no guessing at `/sitemap.xml` or `/mcp`. `robots.txt` is fetched first and
108
- obeyed.
104
+ Per URL it makes **two requests**, an agent probe and a browser control that
105
+ differ in the `Accept` header **and in nothing else**, plus `/robots.txt`,
106
+ `/llms.txt` and `/.well-known/ucp` per origin. When the page does not send a
107
+ Markdown copy but links one on the same site, it fetches that one copy too. A
108
+ copy that loads earns part of the Markdown check. Nothing else is requested;
109
+ there is no guessing at `/sitemap.xml` or `/mcp`. `robots.txt` is fetched first
110
+ and obeyed.
109
111
 
110
112
  Same User-Agent on both probes, because that is what makes the parity check
111
- meaningful and what stops a correctly installed gateway — which negotiates on
112
- `Accept`, not on User-Agent — from being scored as a cloaker.
113
+ meaningful and what stops a correctly installed gateway (which negotiates on
114
+ `Accept`, not on User-Agent) from being scored as a cloaker.
113
115
 
114
116
  ### Before: the page as raw HTML
115
117
 
@@ -186,7 +188,7 @@ Fixes, most points first
186
188
  A caller that reads the first few kilobytes should already have the fac…
187
189
 
188
190
  Policy: robots.txt ok · assistant allow · training allow (neutral) · sitemap declared
189
- ARS 0.2.0 · ruleset 18f8b6ce4a0d · corpus 15ec5c9c0966 · evidence b774a1e59433 · vantage public
191
+ ARS 0.3.0 · ruleset 1d07a1223b34 · corpus e88662472394 · evidence b774a1e59433 · vantage public
190
192
 
191
193
  ARS measures format and retrievability. It does not measure whether the
192
194
  facts are true, or whether any assistant cites this page.
@@ -258,13 +260,13 @@ Fixes, most points first
258
260
  Price, sizes, weights, hours, fees, lead times, dates — written out whe…
259
261
 
260
262
  Policy: robots.txt ok · assistant allow · training allow (neutral) · sitemap declared
261
- ARS 0.2.0 · ruleset 18f8b6ce4a0d · corpus 15ec5c9c0966 · evidence 1fe68289a133 · vantage public
263
+ ARS 0.3.0 · ruleset 1d07a1223b34 · corpus e88662472394 · evidence 1fe68289a133 · vantage public
262
264
 
263
265
  ARS measures format and retrievability. It does not measure whether the
264
266
  facts are true, or whether any assistant cites this page.
265
267
  ```
266
268
 
267
- Same product, same facts. 54 → 90, D → A, and the agent reads 1,490 bytes
269
+ In the captured example, the same product moves from 59 → 93, D → A, and the agent reads 1,490 bytes
268
270
  instead of 91,226.
269
271
 
270
272
  ### Options
@@ -279,7 +281,7 @@ instead of 91,226.
279
281
  | `--allow-private` | permit private, loopback and link-local targets; implies `--allow-http` |
280
282
 
281
283
  `--concurrency` is capped at 8 because the probe's politeness limiter allows at
282
- most 1 in-flight request per host and 2 globally regardless — a larger number
284
+ most 1 in-flight request per host and 2 globally regardless. A larger number
283
285
  would be a promise we do not keep.
284
286
 
285
287
  ---
@@ -306,19 +308,17 @@ Error — —
306
308
 
307
309
  Substance parity [heuristic] 3/3
308
310
  Compared on price, currency, availability and title only — never description or free text (§3.8).
309
- • Compared facts: price, currency, availability, title [heuristic]
310
- • Values: agree [heuristic]
311
+ • Facts compared: price, currency, availability, name or title [heuristic]
312
+ • Values: match [heuristic]
311
313
 
312
314
  Score: 93/100 A
313
- ARS 0.2.0 · ruleset 18f8b6ce4a0d · corpus 15ec5c9c0966 · evidence 1fe68289a133 · vantage public
315
+ ARS 0.3.0 · ruleset 1d07a1223b34 · corpus e88662472394 · evidence 1fe68289a133 · vantage public
314
316
 
315
317
  ARS measures format and retrievability. It does not measure whether the
316
318
  facts are true, or whether any assistant cites this page.
317
319
  ```
318
320
 
319
- It shows **structure and numbers, never an excerpt of the page**. Dumping a
320
- third party's content into a terminal, a CI log or an `--out` file is a
321
- copyright problem the numbers do not have.
321
+ The current diff report shows response structure and measured values.
322
322
 
323
323
  `--fail-on` is refused here rather than ignored: `diff` reports, it does not
324
324
  grade, and silently dropping a flag someone put in a CI file is how a check that
@@ -342,10 +342,10 @@ page we never scored is an `<error>`.
342
342
  <property name="notice" value="ARS measures format and retrievability. It does not measure whether the facts are true, or whether any assistant cites this page."/>
343
343
  <property name="url" value="https://basecamp-supply.example/products/alpine-trail-pack-28l"/>
344
344
  <property name="generatedAt" value="2026-08-05T00:00:00.000Z"/>
345
- <property name="tool" value="rebilder 0.2.1"/>
346
- <property name="specVersion" value="0.2.0"/>
347
- <property name="rulesetHash" value="18f8b6ce4a0df9a44e86bdb77f1098af4e6a9a8d9fd10e0df894649bb3eddf86"/>
348
- <property name="corpusHash" value="15ec5c9c09665bc24174e86dbf037f8ea0433cf48c97eb5b2a720b8cfbc8684b"/>
345
+ <property name="tool" value="rebilder 0.4.0"/>
346
+ <property name="specVersion" value="0.3.0"/>
347
+ <property name="rulesetHash" value="1d07a1223b3460c3b4d37669c0970d67e9f7e60f121d861201e73dafc9b544b0"/>
348
+ <property name="corpusHash" value="e88662472394316deb404ff02cde136b26a08a54439c52dcd299d80bc8fd9f9e"/>
349
349
  <property name="evidenceHash" value="e1cc1ad1476117e7335e4b608e80b4a6e1e0072ce532dd6c9b5f4cce0b2f8b19"/>
350
350
  <property name="measuredWeight" value="63"/>
351
351
  <property name="heuristicWeight" value="37"/>
@@ -369,10 +369,15 @@ Without it that case is **absent**, not passing.
369
369
 
370
370
  ## `rebilder init`
371
371
 
372
- Writes a `@rebilder/gateway` config scaffold for the framework it detects
373
- (`next`, `node`, `edge`, `shopify`), and prints how it decided. `--framework`
374
- overrides detection. Makes no network request and reads nothing outside the
375
- working directory.
372
+ Writes a `@rebilder/gateway` config scaffold for the framework it detects, and
373
+ prints how it decided. It recognizes Next.js, Express and Fastify (`node`),
374
+ Cloudflare Workers (`edge`), Shopify, SvelteKit, Nuxt, Astro, React Router,
375
+ Remix, Hono, Bun, Deno, Netlify and Vercel, and otherwise scaffolds the
376
+ framework-neutral `fetch` middleware. `--framework <name>` overrides detection.
377
+ It makes no network request and reads nothing outside the working directory.
378
+
379
+ Each scaffold links its full guide on
380
+ [rebilder.com/docs/adapters](https://rebilder.com/docs/adapters/frameworks).
376
381
 
377
382
  The scaffold is a skeleton with `TODO`s, not a working config: the resolvers
378
383
  return **your** source of truth, and every substantive value on a rendered page
@@ -401,8 +406,8 @@ HTML
401
406
  This command makes no network request. It builds the snippet locally, so we never learn which domain you asked about.
402
407
  ```
403
408
 
404
- Built locally — no network request, so we never learn which domain you asked
405
- about.
409
+ Built locally, with no network request, so we never learn which domain you
410
+ asked about.
406
411
 
407
412
  ---
408
413
 
@@ -413,8 +418,7 @@ nothing to opt out of.**
413
418
 
414
419
  The CLI **never uploads a scan, a URL, a hostname, or a result.** It has no
415
420
  analytics, no error reporting, no version check, no "anonymous usage
416
- statistics". `rebilder.scans.source` has no `'cli'` value, because there is no
417
- path by which a CLI run could produce a row.
421
+ statistics". There is no path by which a CLI run could reach our database.
418
422
 
419
423
  The only outbound requests this binary makes are to the target URL you named, in
420
424
  the request set described above. `badge` and `init` make none at all.
@@ -427,7 +431,7 @@ rebilder check --allow-private http://staging.internal.corp/checkout
427
431
 
428
432
  inside their own CI must not thereby ship internal hostnames and paths to a
429
433
  third party. `--allow-private` and the no-telemetry guarantee are only safe as a
430
- pair, and neither is negotiable.
434
+ pair, and that published privacy contract remains in force.
431
435
 
432
436
  It is enforced three ways: the package declares exactly one runtime dependency
433
437
  (`@rebilder/agent-readability`, which is the probe and the scorer); ESLint denies
@@ -448,17 +452,17 @@ variable, and never inherited.
448
452
 
449
453
  ---
450
454
 
451
- ## Zero runtime dependencies
455
+ ## Runtime dependencies
452
456
 
453
457
  Hand-rolled ANSI (off when stdout is not a TTY, off whenever `NO_COLOR` is set,
454
458
  on with `FORCE_COLOR`), Unicode box drawing with an ASCII fallback chosen by the
455
- locale, and `node:util`'s `parseArgs`. Node ≥ 20.11.
459
+ locale, and `node:util`'s `parseArgs`. Node ≥ 22.
456
460
 
457
461
  Colour and Unicode are decided separately because they fail in different places:
458
462
  a pipe into a file is perfectly capable of holding `│`, and a `LANG=C` container
459
463
  is not.
460
464
 
461
- The one runtime dependency is `@rebilder/agent-readability` — the scorer and the
465
+ The one runtime dependency is `@rebilder/agent-readability`: the scorer and the
462
466
  probe. There is no bundled second implementation of the standard.
463
467
 
464
468
  ---
@@ -477,9 +481,9 @@ Bands headline; the integer is secondary; there are no decimals.
477
481
 
478
482
  Three outcomes carry **no letter grade at all**:
479
483
 
480
- - **OPT-OUT** — a deliberate, well-formed robots disallow for the assistant
484
+ - **OPT-OUT**: a deliberate, well-formed robots disallow for the assistant
481
485
  audience. A choice, not a failure. Never ranked, never listed. Exit `4`.
482
- - **UNSCORED — blocked** — a 403 or a challenge at the edge. The block is itself
486
+ - **UNSCORED — blocked**: a 403 or a challenge at the edge. The block is itself
483
487
  the finding. Exit `3`.
484
488
  - **UNSCORED — unreachable / non-2xx / robots-unavailable /
485
489
  robots-disallow-scanner / truncated-evidence.** Exit `3`, except
@@ -488,8 +492,8 @@ Three outcomes carry **no letter grade at all**:
488
492
  Blocking model-training crawlers while allowing assistants **scores identically
489
493
  to a fully open site**. Two conformance fixtures exist solely to prove it.
490
494
 
491
- **64 of the 100 points are measured; 36 are heuristic.** Every check reports
492
- which it is, in every format, always — a heuristic value never renders without
495
+ **63 of the 100 points are measured; 37 are heuristic.** Every check reports
496
+ which it is, in every format, always. A heuristic value never renders without
493
497
  its label. Token counts are `chars/4` and always carry `≈` and `est.`.
494
498
 
495
499
  ---
@@ -550,46 +554,29 @@ limit of the method, stated next to the method.
550
554
 
551
555
  ## The examples above are real
552
556
 
553
- Every `console` block in this file is generated from a real fixture in
554
- `packages/agent-readability/conformance/` and labelled with its fixture id, and
555
- `tests/readme.test.ts` regenerates and compares each one on every run. A
556
- hand-edited block fails the build.
557
-
558
- This rule exists because an earlier draft of this document shipped a mocked
559
- `47/100` alongside "+20 pts, D → B" — arithmetically impossible against its own
560
- bands (47 + 20 = 67 = C) — and nobody caught it, because nothing could.
561
-
562
- Regenerate with:
563
-
564
- ```
565
- REBILDER_README_UPDATE=1 pnpm --filter rebilder test
566
- ```
567
-
568
- It rewrites the blocks and then fails the run, so an update can never be
569
- mistaken for a pass.
557
+ Every `console` block in this file is generated by running the CLI against a
558
+ real conformance fixture, labelled with its fixture id, and regenerated and
559
+ compared on every build. A hand-edited block fails the build.
570
560
 
571
561
  ---
572
562
 
573
563
  ## Published
574
564
 
575
565
  [`rebilder`](https://www.npmjs.com/package/rebilder), Apache-2.0. Every
576
- `npx rebilder` line in this README runs as written — the published tarball ships
566
+ `npx rebilder` line in this README runs as written: the published tarball ships
577
567
  a bundled `dist/` and the `rebilder` bin, so there is no checkout and no build
578
- step on your side.
568
+ step on your side. It needs Node.js 22 or later.
579
569
 
580
570
  The name is unscoped on purpose. `npx rebilder check <url>` is the thing people
581
571
  are told to run, and `npx @rebilder/cli` would put a scope in the middle of the
582
572
  one command that has to be memorable.
583
573
 
584
- Note for contributors: workspace dependencies are **rewritten, not bundled**, at
585
- pack time (`docs/publishing.md`). A `workspace:*` range that pnpm does not
586
- rewrite ships as an uninstallable manifest, which is why releases go out through
587
- the tagged workflow rather than a bare `npm publish`.
588
-
589
574
  ## See also
590
575
 
591
- - [`@rebilder/agent-readability`](../agent-readability) — the scorer (`.`, pure)
592
- and the probe (`./probe`, server-only)
593
- - [`@rebilder/gateway`](../gateway) — the middleware `rebilder init` scaffolds
594
- - [The Agent Readability Spec](https://rebilder.com/spec/ars)
576
+ - [`@rebilder/agent-readability`](https://www.npmjs.com/package/@rebilder/agent-readability):
577
+ the scorer (`.`, pure) and the probe (`./probe`, server-only)
578
+ - [`@rebilder/gateway`](https://www.npmjs.com/package/@rebilder/gateway): the
579
+ middleware `rebilder init` scaffolds
580
+ - [The Rebilder Agent Readability Spec (ARS)](https://rebilder.com/spec/ars)
595
581
  - [Our crawler policy and opt-out](https://rebilder.com/bots)
582
+ - [Source, issues and pull requests](https://github.com/rebilder/rebilder/tree/main/packages/cli) on GitHub