From c4961cd94d8d2999e6a7bbd0016a7a331a566330 Mon Sep 17 00:00:00 2001 From: azank Date: Mon, 19 Oct 2026 21:29:21 +0500 Subject: [PATCH 1/4] docs(site): a first page for the website and documentation: architecture, outcomes, readback, recipes, reference, roadmap --- site/index.html | 648 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 648 insertions(+) create mode 100644 site/index.html diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..df692aa --- /dev/null +++ b/site/index.html @@ -0,0 +1,648 @@ + + + + + +seamkit + + + + + + + + +
+ +
+ +
+ +
+
+
+
Deterministic production checks
+

Merged is not shipped. Read production back.

+

seamkit asks production which commit it runs, compares that with your git history, and tells you + which merged changes are actually live. It answers with an exit code that an agent, a CI step and a person all read + the same way. No model runs inside it.

+
+ $ npx seamkit audit --url https://your.app + +
+
+ read-only GETzero configurationNode 20+Apache-2.0 +
+
+ +
+
commit-city · a real run, 2026-10-19
+
$ npx seamkit@0.1.0 audit --url https://commit.city
+
+LIVE  20 of 20  (20 pass)
+  pr#16                api: /api/version names the deployed commit
+                       production at https://commit.city/api/version
+                       runs 492378ccca80, which contains this change
+  19 changes, each for the same reason:
+      production's version 492378ccca80 contains this change
+    commit:5d37aae6a218  home: show "Made to be shown off" before ...
+    commit:1f5a66920a97  builder: copy pack bytes into blocks as ...
+    ...
+
+PASS  readback  origin/main
+  proven live 20 of 20 changes
+  production at https://commit.city/api/version runs 492378ccca80 (pr#16)
+  not examined: changes before the last 20 on origin/main (outside --last)
+
+exit 0
+
+
+
+ +
+
+
+
+
mergeda green pull request
+ +
livewhat production serves
+
+
+
Merged, never deployed

An agent reports a change as shipped because the pull request merged.

readback
+
Deployed, then rolled back

A change was live yesterday and is gone today, and nobody noticed.

readback + ledger
+
A check that looked at nothing

A step passes because it had nothing to inspect. seamkit says "examined nothing" instead.

every check
+
A deploy that carries extra changes

A deploy ships merged work nobody chose to ship with it.

carry · M5
+
+
+
+
+ +
+
+ +
+

Four outcomes, one exit code each

+

Every check returns one of four outcomes. The exit code says which, so a script or an agent + chaining commands with && can never proceed on a result it misread. Every non-zero code means + "not a pass".

+
+
0pass

Something was examined, and everything held.

+
1fail

A change is not live or not proven.

+
3examined nothing

seamkit could not look, so it claims nothing.

+
4unclassified

No rule covers the case. It stops for a human.

+
2usage error

Bad arguments or configuration. No verdict was produced.

+
+

Only a pass is ever shown in green. Every count carries its denominator, as in "proven live 10 of 21 + merged changes", and every verdict lists what it did not examine, with a reason. A check over zero items is + examined nothing, never a pass.

+
+
+
+ +
+
+ +
+

A pure judge, a thin shell, read-only adapters

+

seamkit follows the functional-core, imperative-shell pattern. Adapters observe the world, the + core judges the observations, and the shell records both. Because a verdict is a pure function of recorded + inputs, any past verdict can be recomputed from the ledger with seamkit replay, and one that comes + out differently is a defect.

+ +
built in 0.1.0planned on the roadmap
+ +
+
+
Surfaceshow agents, CI and people call it
+
+ CLI seamkit + GitHub Action · M3 + MCP server · M4 + agent hooks · M8 + static console · M7 +
+
+ +
+
Shellall I/O lives here
+
+ reads history and configuration + calls adapters + passes in the time + writes events + asks humans · M7 +
+
+ +
+
Corepure functions, no I/O, no dependencies
+
+ verdict algebra + readback + card parser + replay + carry · M5 + gate · M6 + approvals · M7 + radius · M8 + parity · M8 +
+
+ +
+
Adaptersreport what they read, never a verdict
+
+ git history + version document + served bundle + fake production + GitHub · M6 + hosting platforms · M5 + databases +
+
+ +
+
Ledgerin your own repository
+
+ seamkit/state branch + one file per event, named by its SHA-256 + canonical JSON (RFC 8785) + written with git plumbing +
+
+
+ +

Packages

+
+ + + + + + + + + +
PackageHoldsRuntime dependencies
coretypes, the verdict algebra, every check as a pure function, canonical JSON, replaynone
formatsscope card and merge commit message parsingyaml 2.9.1, pinned
statethe event store on the seamkit/state branchnone (runs the git binary)
adaptersgit history, version documents, served bundles, the local fake productionnone (global fetch)
clithe seamkit commandnone beyond the above
+
+

The npm package bundles all of this into one file, with yaml's licence in its notices. HTTP reads are + bounded: 10 seconds and 5 MiB per response, 64 KiB for a version document, and 100 files or 25 MiB for a whole + crawl of a site's bundle.

+
+
+
+ +
+
+ +
+

What happens in one readback

+
    +
  1. Walk the historygit adapter

    Take the first-parent history of the default branch: one change per merged pull request or direct commit, the last 20 by default.

  2. +
  3. Ask production which commit it runsversion adapter

    Read a version document from /version.json, /api/version or /version. A dirty build, a commit the repository lacks, or a web page served in its place is unreadable, never trusted.

  4. +
  5. Search the served buildbundle adapter

    For changes whose scope card names markers, read the page and the same-origin scripts, styles and chunks it loads, and look for each marker's text. The adapter records what it read, never content.

  6. +
  7. Judgecore

    A change is contained when its commit is an ancestor of the running commit (git merge-base --is-ancestor). Markers are present, absent, contradicted or unreadable, decided from the recorded observation.

  8. +
  9. Compare with earlier runsledger

    A marker that a recorded run saw and that is missing now makes the change not live, as after a rollback, rather than merely not proven.

  10. +
  11. Answer and recordshell

    Print verdicts grouped with problems first, exit with the outcome, and record the run as an event that seamkit replay can recompute.

  12. +
+ +

Readback states

+
+ + + + + + + + + +
StateWhenOutcome
liveevery marker is presentpass
not_livea marker that an earlier recorded run saw is absent nowfail
not_provena marker is absent and was never seen, or production's version contradicts itfail
not_provennothing is absent, but some marker could not be readexamined nothing
nothing_to_provethe change's card declares that nothing deployed changesexamined nothing
+
+

A change with nothing to prove is never reported as live. That claim is the author's, and accepting it is a + human's call.

+
+
+
+ +
+
+ +
+

Six ways in, from one minute to a full ledger

+
+ +
+
Any developer · 1 minute
+

Audit a site you already run

+

From your repository, with no configuration. It takes the last 20 merged changes and gives advice for every + gap it finds, so "examined nothing" becomes a list of next steps.

+
cd your-repo
+npx seamkit audit --url https://your.app
+
+ +
+
Build engineer
+

Make production say what it runs

+

Write a version document at build time, or answer /api/version from a server function with the + commit your host provides, such as VERCEL_GIT_COMMIT_SHA.

+
# before the build; bundlers copy public/ into the output
+npx seamkit stamp --out public/version.json --require-clean
+
{ "schema": "seamkit.version/1", "commit": "<full commit id>",
+  "dirty": false, "source": "git", "ref": "main" }
+
+ +
+
CI · GitHub Actions
+

Fail the pipeline when a change is not live

+

Run readback as a step once the deploy is live. It needs the full history, because containment is decided by + commit ancestry. A packaged Action is next on the roadmap.

+
- uses: actions/checkout@v7
+  with: { fetch-depth: 0 }
+- uses: actions/setup-node@v7
+  with: { node-version: 22 }
+- run: npx --yes seamkit@0.1 readback --url https://your.app --last 20
+
+ +
+
Coding agents · Claude Code, Cursor, Codex
+

Give the agent one rule

+

The exit code is the contract, so one instruction in AGENTS.md or CLAUDE.md stops an + agent calling a change done because it merged.

+
After a deploy, run
+`npx seamkit readback --url https://your.app --pr <number> --json`.
+The change is shipped only when it exits 0. Exit 1 means it is not
+live or not proven, and exit 3 means production could not be examined.
+Report the reasons; never call a change done on any other exit code.
+
+ +
+
Pull request authors
+

Prove more than the version with a scope card

+

A fenced block in the pull request description names text the built output must contain. It reaches the + history only when the repository's merge message is "Pull request title and description".

+
```seamkit-card
+card: 1
+intent: Show a saved indicator after a note is synced.
+layers: [frontend]
+targets: [web]
+markers:
+  - kind: bundle
+    text: "data-sync-state"
+releaseNote: Notes now show when they were last saved.
+```
+

The parser is strict and reports every problem in one pass, each naming the field and the fix. A marker must be + text in the built output: a component name or a comment exists only in source and is never found.

+
+ +
+
Teams · rollbacks and audits
+

Keep a ledger in the repository

+

With a ledger, a later run can say a change was live and has left production. Events are content-addressed, + and every recorded verdict can be recomputed byte for byte.

+
npx seamkit state init      # create the seamkit/state branch
+npx seamkit readback --url https://your.app
+npx seamkit state verify    # every file matches its name
+npx seamkit replay          # recompute every recorded verdict
+npx seamkit state sync      # merge and push, never forced
+
+ +
+
+
+
+ +
+
+ +
+

Commands in 0.1.0

+
+ + + + + + + + + + +
CommandDoes
seamkit audit --url <url>Readback over the last 20 changes, with advice for every gap. Options: --last, --branch, --json.
seamkit readback --url <url>Prove whether production holds each change, or one with --pr N or --commit C. Also --version-url, --record or --no-record.
seamkit stampWrite the version document. --out F, --commit C, --require-clean.
seamkit check <name>Run one registered check on a recorded input from --input. seamkit checks lists them.
seamkit replay [<event>]Recompute recorded verdicts and fail if any comes out differently.
seamkit state init|list|verify|syncCreate, list, verify and sync the ledger branch.
+
+

The production URL can also come from SEAMKIT_URL. --json prints one document per run, so + an agent parses a single object:

+
{
+  "outcome": "pass", "exitCode": 0,
+  "verdicts": [{
+    "check": "readback", "subject": "origin/main", "outcome": "pass",
+    "reasons": ["proven live 3 of 3 changes", "production at https://commit.city/api/version runs 492378ccca80 (pr#16)"],
+    "examined": [ ... ], "notExamined": [ ... ], "evidence": [ ... ],
+    "inputs": "<digest of everything the verdict used>", "at": "<time>"
+  }],
+  "advice": [ ... ]
+}
+ +

What seamkit touches

+
+
Production, read-only

HTTP GET only, bounded in time and size, never with credentials. URLs that carry credentials or a query string are refused, because URLs are recorded.

+
Your repository, one branch

It reads your history and writes only seamkit/state, with git plumbing that never touches your working tree, index or HEAD.

+
No model, no content

No model runs inside it. The ledger holds URLs, commit ids, marker texts and digests, never what production served.

+
+
+
+
+ +
+
+ +
+

Usable by strangers first, then the rest of the checks

+
+
M1
Core

Verdict algebra, the event ledger, exit codes, replay.

done
+
M2
Readback, audit, stamp

Version ancestry, bundle markers, the demo, the commit.city dogfood at 20 of 20.

done
+ +
M4
MCP server and Claude Code plugin

The read-only checks as tools for any MCP client.

planned
+
M5
Carry

Before a deploy, the merged pull requests it will also ship, and a block on hand deploys.

planned
+
M6
Card and gate

Every open pull request evaluated the way the deploy step will, with the exact missing items.

planned
+
M7
Approvals, policy, console

Approvals an agent cannot forge, rulings asked of a human, a static console.

planned
+
M8
Radius, parity, hooks

Blast-radius classification, sandbox parity, hook packs for coding agents.

planned
+
+
+
+
+ +
+ + + + + + From b9bcd9d0bde35feac4fca4ca955745bea2c1d080 Mon Sep 17 00:00:00 2001 From: azank Date: Tue, 20 Oct 2026 01:38:29 +0500 Subject: [PATCH 2/4] docs(site): rework the page into a setup guide with diagrams of the shipping loop, one run, and the automation triggers --- site/index.html | 1241 ++++++++++++++++++++++++++++------------------- 1 file changed, 748 insertions(+), 493 deletions(-) diff --git a/site/index.html b/site/index.html index df692aa..8c854a7 100644 --- a/site/index.html +++ b/site/index.html @@ -4,17 +4,19 @@ seamkit - + @@ -245,18 +213,11 @@
- - + / setup guide
v0.1.0 npm @@ -267,271 +228,338 @@
-
+
-
Deterministic production checks
-

Merged is not shipped. Read production back.

-

seamkit asks production which commit it runs, compares that with your git history, and tells you - which merged changes are actually live. It answers with an exit code that an agent, a CI step and a person all read - the same way. No model runs inside it.

-
- $ npx seamkit audit --url https://your.app - -
-
- read-only GETzero configurationNode 20+Apache-2.0 -
+
Engineer's guide
+

Put a readback after every deploy.

+

seamkit is a command that proves each merged change is live in production. It reads your git history, + asks production which commit it runs, and exits 0 only when the change is there. This guide wires it into the + three places that ship code: your terminal, your coding agent, and your CI.

- -
-
commit-city · a real run, 2026-10-19
-
$ npx seamkit@0.1.0 audit --url https://commit.city
-
-LIVE  20 of 20  (20 pass)
-  pr#16                api: /api/version names the deployed commit
-                       production at https://commit.city/api/version
-                       runs 492378ccca80, which contains this change
-  19 changes, each for the same reason:
-      production's version 492378ccca80 contains this change
-    commit:5d37aae6a218  home: show "Made to be shown off" before ...
-    commit:1f5a66920a97  builder: copy pack bytes into blocks as ...
-    ...
-
-PASS  readback  origin/main
-  proven live 20 of 20 changes
-  production at https://commit.city/api/version runs 492378ccca80 (pr#16)
-  not examined: changes before the last 20 on origin/main (outside --last)
-
-exit 0
-
+
-
+
-
-
-
mergeda green pull request
- -
livewhat production serves
-
-
-
Merged, never deployed

An agent reports a change as shipped because the pull request merged.

readback
-
Deployed, then rolled back

A change was live yesterday and is gone today, and nobody noticed.

readback + ledger
-
A check that looked at nothing

A step passes because it had nothing to inspect. seamkit says "examined nothing" instead.

every check
-
A deploy that carries extra changes

A deploy ships merged work nobody chose to ship with it.

carry · M5
-
+ + + +
+ + +
+
Understand
+

The shipping loop, and the step it closes

+

Most pipelines stop at "deployed". seamkit adds the last step: read production back, compare it with + the history, and hand a verdict to whoever shipped the change, whether that was a person, an agent or a CI job.

+ +
+
+ + The shipping loop: a change goes from author to production, and seamkit readback reads both the history and production, then returns an exit code to the author and records the run in a ledger branch. + + + + + + + + + 1 + You or an agent + writes the change + + + 2 + Pull request + + seamkit-card + + + 3 + Merge to main + card kept in message + + + 4 + Build + seamkit stamp + + + 5 + Deploy + your host or CLI + + + 6 + Production + /version.json + + + + + + + + + + + 7 + seamkit readback + is each merged change in what production runs? + + + + + reads git history + + + + + GET version + bundle + + + + Exit code + --json + 0 live · 1 not live · 3 can't look + + + + done, retry or alert + + + + seamkit/state branch + every run, content-addressed + + + record + earlier sightings +
-
+
Steps 1 to 6 are your existing pipeline. seamkit adds two small things to it, a card in the pull + request (optional) and a stamp in the build, and then step 7: a read-only check whose exit code goes back to whoever + shipped. The ledger branch is what lets a later run tell "rolled back" from "never arrived".
+
-
-
- -
-

Four outcomes, one exit code each

-

Every check returns one of four outcomes. The exit code says which, so a script or an agent - chaining commands with && can never proceed on a result it misread. Every non-zero code means - "not a pass".

-
-
0pass

Something was examined, and everything held.

-
1fail

A change is not live or not proven.

-
3examined nothing

seamkit could not look, so it claims nothing.

-
4unclassified

No rule covers the case. It stops for a human.

-
2usage error

Bad arguments or configuration. No verdict was produced.

-
-

Only a pass is ever shown in green. Every count carries its denominator, as in "proven live 10 of 21 - merged changes", and every verdict lists what it did not examine, with a reason. A check over zero items is - examined nothing, never a pass.

+ +
+
Understand
+

Inside one run

+

Adapters read the world and report what they saw. A pure core judges those observations with no network, + no clock and no model. The shell prints the verdicts, exits with the outcome and records the run. Because the judge is + pure, seamkit replay can recompute every recorded verdict from the ledger.

+ +
+
+ + Inside one run: inputs are read by adapters into observations, the pure core turns observations into verdicts, and the shell writes the exit code, the output and an event that replay can recompute. + + + + + + INPUTS + ADAPTERS · read-only + CORE · pure + SHELL · outputs + + + Git history + first parent of main + + + Production URL + plain GET, no secrets + + + Ledger + earlier recorded runs + + + git + changes, cards, ancestry + version document + which commit is running + served bundle + same-origin files, digests + records what it read, + never a verdict + + + + + + + Judge + contained? merge-base + markers: present, absent, + contradicted, unreadable + state: live, not live, + not proven, nothing to prove + outcome by severity + no I/O · no clock · no model + + + observations → + + + Exit code + 0 · 1 · 3 · 4 (2 = bad usage) + + + Text or one --json document + reasons, examined, not examined + + + Event on seamkit/state + observations + verdicts, + file named by its SHA-256 + + + + + verdicts → + + + + seamkit replay: recompute, must match +
+
Why this shape matters for automation: the only thing that can make a run pass is an observation the + core judged, and every judgment can be re-run later. An agent cannot talk its way to exit 0, and a CI log is not the + only record of what happened.
+
+
+ + +
+
Understand
+

Exit codes are the interface

+

Every automation in this guide branches on these five codes and nothing else. Every non-zero code means + "not a pass", so && chains stop safely.

+
+
0pass

Examined, and every change is live.

+
1fail

A change is not live, or not proven. Retry while a deploy rolls out; alert after.

+
3examined nothing

seamkit could not look. Fix what it could not read; the output says what.

+
4unclassified

No rule covers it. Stop for a human. Never retry.

+
2usage

Bad arguments or configuration. No verdict. Printed to stderr.

-
-
- -
-

A pure judge, a thin shell, read-only adapters

-

seamkit follows the functional-core, imperative-shell pattern. Adapters observe the world, the - core judges the observations, and the shell records both. Because a verdict is a pure function of recorded - inputs, any past verdict can be recomputed from the ledger with seamkit replay, and one that comes - out differently is a defect.

- -
built in 0.1.0planned on the roadmap
- -
-
-
Surfaceshow agents, CI and people call it
-
- CLI seamkit - GitHub Action · M3 - MCP server · M4 - agent hooks · M8 - static console · M7 -
-
- -
-
Shellall I/O lives here
-
- reads history and configuration - calls adapters - passes in the time - writes events - asks humans · M7 -
-
- -
-
Corepure functions, no I/O, no dependencies
-
- verdict algebra - readback - card parser - replay - carry · M5 - gate · M6 - approvals · M7 - radius · M8 - parity · M8 -
-
- -
-
Adaptersreport what they read, never a verdict
-
- git history - version document - served bundle - fake production - GitHub · M6 - hosting platforms · M5 - databases -
-
- -
-
Ledgerin your own repository
-
- seamkit/state branch - one file per event, named by its SHA-256 - canonical JSON (RFC 8785) - written with git plumbing -
-
-
- -

Packages

-
- - - - - - - - - -
PackageHoldsRuntime dependencies
coretypes, the verdict algebra, every check as a pure function, canonical JSON, replaynone
formatsscope card and merge commit message parsingyaml 2.9.1, pinned
statethe event store on the seamkit/state branchnone (runs the git binary)
adaptersgit history, version documents, served bundles, the local fake productionnone (global fetch)
clithe seamkit commandnone beyond the above
-
-

The npm package bundles all of this into one file, with yaml's licence in its notices. HTTP reads are - bounded: 10 seconds and 5 MiB per response, 64 KiB for a version document, and 100 files or 25 MiB for a whole - crawl of a site's bundle.

+ +
+
1

Install and run your first audit

+
works todayterminal
+

Run it from the repository that production is built from. audit needs no configuration: it checks the + last 20 changes on your default branch, then prints advice for every gap it found.

+
+
+
Try it once
+
cd your-repo
+npx seamkit audit --url https://your.app
+
+
+
Pin it in the project
+
npm install --save-dev --save-exact seamkit@0.1.0
+npx seamkit version   # 0.1.0
+

The first audit of most sites exits 3, "examined nothing", because production does not yet say which + commit it runs. That is the expected start. Step 2 fixes it.

-
-
- -
-

What happens in one readback

-
    -
  1. Walk the historygit adapter

    Take the first-parent history of the default branch: one change per merged pull request or direct commit, the last 20 by default.

  2. -
  3. Ask production which commit it runsversion adapter

    Read a version document from /version.json, /api/version or /version. A dirty build, a commit the repository lacks, or a web page served in its place is unreadable, never trusted.

  4. -
  5. Search the served buildbundle adapter

    For changes whose scope card names markers, read the page and the same-origin scripts, styles and chunks it loads, and look for each marker's text. The adapter records what it read, never content.

  6. -
  7. Judgecore

    A change is contained when its commit is an ancestor of the running commit (git merge-base --is-ancestor). Markers are present, absent, contradicted or unreadable, decided from the recorded observation.

  8. -
  9. Compare with earlier runsledger

    A marker that a recorded run saw and that is missing now makes the change not live, as after a rollback, rather than merely not proven.

  10. -
  11. Answer and recordshell

    Print verdicts grouped with problems first, exit with the outcome, and record the run as an event that seamkit replay can recompute.

  12. -
- -

Readback states

-
- - - - - - - - - -
StateWhenOutcome
liveevery marker is presentpass
not_livea marker that an earlier recorded run saw is absent nowfail
not_provena marker is absent and was never seen, or production's version contradicts itfail
not_provennothing is absent, but some marker could not be readexamined nothing
nothing_to_provethe change's card declares that nothing deployed changesexamined nothing
-
-

A change with nothing to prove is never reported as live. That claim is the author's, and accepting it is a - human's call.

+ +
+
2

Make production name its commit

+
works todaybuild
+

Readback needs one fact from production: the full commit id it was built from. Pick the option that matches how you + build. seamkit looks for /version.json, then /api/version, then /version.

+
+
+
Static or bundled sites
+
package.json
{
+  "scripts": {
+    "prebuild": "seamkit stamp --out public/version.json",
+    "build": "vite build"
+  }
+}
+

Stamp prefers git. Where the build has no history, it uses + the commit your CI or host provides (VERCEL_GIT_COMMIT_SHA, GITHUB_SHA, + CF_PAGES_COMMIT_SHA, COMMIT_REF and others) and records which one.

+
+
+
Apps with a server route
+
app/api/version/route.tsNext.js on Vercel
export function GET() {
+  return Response.json(
+    { commit: process.env.VERCEL_GIT_COMMIT_SHA },
+    { headers: { 'cache-control': 'no-store' } },
+  );
+}
+

Any server can answer {"commit": "<40 hex>"}. + seamkit also reads fields named sha or git.commit.id that other tools serve.

+
check it
curl -s https://your.app/version.json
+{ "schema": "seamkit.version/1", "commit": "492378ccca806fd3c85ea55dfaf69bdb7ff16838", "dirty": false, "source": "git", "ref": "main" }
+npx seamkit audit --url https://your.app      # now proves changes by version
+

A build stamped from a working tree with uncommitted changes is reported as unreadable, never + trusted. Use seamkit stamp --require-clean in CI to refuse such builds outright.

-
-
- -
-

Six ways in, from one minute to a full ledger

-
- -
-
Any developer · 1 minute
-

Audit a site you already run

-

From your repository, with no configuration. It takes the last 20 merged changes and gives advice for every - gap it finds, so "examined nothing" becomes a list of next steps.

-
cd your-repo
-npx seamkit audit --url https://your.app
-
- -
-
Build engineer
-

Make production say what it runs

-

Write a version document at build time, or answer /api/version from a server function with the - commit your host provides, such as VERCEL_GIT_COMMIT_SHA.

-
# before the build; bundlers copy public/ into the output
-npx seamkit stamp --out public/version.json --require-clean
-
{ "schema": "seamkit.version/1", "commit": "<full commit id>",
-  "dirty": false, "source": "git", "ref": "main" }
-
- -
-
CI · GitHub Actions
-

Fail the pipeline when a change is not live

-

Run readback as a step once the deploy is live. It needs the full history, because containment is decided by - commit ancestry. A packaged Action is next on the roadmap.

-
- uses: actions/checkout@v7
-  with: { fetch-depth: 0 }
-- uses: actions/setup-node@v7
-  with: { node-version: 22 }
-- run: npx --yes seamkit@0.1 readback --url https://your.app --last 20
-
- -
-
Coding agents · Claude Code, Cursor, Codex
-

Give the agent one rule

-

The exit code is the contract, so one instruction in AGENTS.md or CLAUDE.md stops an - agent calling a change done because it merged.

-
After a deploy, run
-`npx seamkit readback --url https://your.app --pr <number> --json`.
-The change is shipped only when it exits 0. Exit 1 means it is not
-live or not proven, and exit 3 means production could not be examined.
-Report the reasons; never call a change done on any other exit code.
-
- -
-
Pull request authors
-

Prove more than the version with a scope card

-

A fenced block in the pull request description names text the built output must contain. It reaches the - history only when the repository's merge message is "Pull request title and description".

-
```seamkit-card
+
+
+
3

Start the ledger

+
works todayrepository
+

Without history, seamkit can only say a change is not proven. With a ledger, it can say a change was live + and has left production, which is what a rollback looks like. The ledger is a branch in your own repository, written + with git plumbing that never touches your working tree, index or HEAD.

+
npx seamkit state init       # create the seamkit/state branch
+npx seamkit audit --url https://your.app   # recorded as an event from now on
+npx seamkit state sync       # share it: merge with the remote branch and push, never forced
+npx seamkit state verify     # every event file matches its SHA-256 name
+npx seamkit replay           # recompute every recorded verdict; fails if any differs
+
+ + +
+
4

Prove more than the version with scope cards

+
works todaypull requestsoptional
+

The version proves a change's commit is deployed. A card proves the change does what it claims in the build: it + names text that production's served files must contain, or a separate version document, such as a server function's. + Agents can write cards, because a card is a fenced block in the pull request description.

+
+
pull request description
```seamkit-card
 card: 1
 intent: Show a saved indicator after a note is synced.
 layers: [frontend]
@@ -541,92 +569,306 @@ 

Prove more than the version with a scope card

text: "data-sync-state" releaseNote: Notes now show when they were last saved. ```
-

The parser is strict and reports every problem in one pass, each naming the field and the fix. A marker must be - text in the built output: a component name or a comment exists only in source and is never found.

-
- -
-
Teams · rollbacks and audits
-

Keep a ledger in the repository

-

With a ledger, a later run can say a change was live and has left production. Events are content-addressed, - and every recorded verdict can be recomputed byte for byte.

-
npx seamkit state init      # create the seamkit/state branch
-npx seamkit readback --url https://your.app
-npx seamkit state verify    # every file matches its name
-npx seamkit replay          # recompute every recorded verdict
-npx seamkit state sync      # merge and push, never forced
-
- -
+
+

One repository setting is required. Readback reads cards from merge commits, and GitHub copies the + description into the merge commit only when the default commit message is Pull request title and + description. Set it under Settings, General, Pull Requests, for merge commits and squash merges.

+

A marker must be text in the built output. A component name or a comment exists only in source + and will never be found; readback says so when the version shows the change is deployed.

-
-
- -
-

Commands in 0.1.0

-
- - - - - - - - - - -
CommandDoes
seamkit audit --url <url>Readback over the last 20 changes, with advice for every gap. Options: --last, --branch, --json.
seamkit readback --url <url>Prove whether production holds each change, or one with --pr N or --commit C. Also --version-url, --record or --no-record.
seamkit stampWrite the version document. --out F, --commit C, --require-clean.
seamkit check <name>Run one registered check on a recorded input from --input. seamkit checks lists them.
seamkit replay [<event>]Recompute recorded verdicts and fail if any comes out differently.
seamkit state init|list|verify|syncCreate, list, verify and sync the ledger branch.
-
-

The production URL can also come from SEAMKIT_URL. --json prints one document per run, so - an agent parses a single object:

-
{
-  "outcome": "pass", "exitCode": 0,
-  "verdicts": [{
-    "check": "readback", "subject": "origin/main", "outcome": "pass",
-    "reasons": ["proven live 3 of 3 changes", "production at https://commit.city/api/version runs 492378ccca80 (pr#16)"],
-    "examined": [ ... ], "notExamined": [ ... ], "evidence": [ ... ],
-    "inputs": "<digest of everything the verdict used>", "at": "<time>"
-  }],
-  "advice": [ ... ]
+
+
+
Automate
+

Where to trigger it, and what to do with the answer

+

One command, four places to call it. Each trigger runs the same readback and branches on the same exit + codes, so a verdict means the same thing in your terminal, in an agent's session and in CI.

+
+
+ + Four triggers (an agent hook, a make target, CI after a deployment, and a scheduled CI job) all run seamkit readback, whose exit code leads to one of four actions. + + + + TRIGGER + CHECK + EXIT CODE → ACTION + + + Coding agent hook + after a deploy command · step 6 + + make ship + deploy, then wait for live · step 5 + + CI after a deployment + deployment_status: success · step 8 + + CI on a schedule + catches rollbacks · step 8 + + + + + + + + seamkit readback + --url · --pr N or --last N + --json for programs + + + + + + + + 0 · live + mark shipped, close the task + + 1 · not live or not proven + retry during rollout, then alert + + 3 · examined nothing + fix what it could not read + + 4 · unclassified + stop and ask a human + +
+
Retry rule: right after a deploy, the host may still serve the old build for a minute, so retry on + 1 and 3 until a deadline. Never retry 2 or 4: neither will change by waiting.
+
+
+ + +
+
5

Your terminal: deploy, then wait for live

+
works todaybashmake
+

This script is the building block for every trigger below. It retries readback of the newest change on the default + branch until production shows it or the deadline passes, and keeps polling runs out of the ledger.

+
scripts/wait-live.sh
#!/usr/bin/env bash
+# Wait until production runs the newest change on the default branch.
+# usage: scripts/wait-live.sh https://your.app [seconds]
+url="$1"; deadline=$(( $(date +%s) + ${2:-300} ))
+git fetch --quiet origin
+while :; do
+  npx seamkit readback --url "$url" --last 1 --no-record
+  code=$?
+  case $code in
+    0) npx seamkit readback --url "$url" --last 1 >/dev/null; exit 0 ;;  # live: record it once
+    2|4) exit $code ;;                                                # waiting will not help
+  esac
+  [ "$(date +%s)" -ge "$deadline" ] && exit $code
+  sleep 15
+done
+
Makefile
DEPLOY ?= vercel deploy --prod       # or your own deploy command
+URL    ?= https://your.app
+
+ship:
+	$(DEPLOY)
+	./scripts/wait-live.sh $(URL) 300
+

Now make ship fails unless production actually runs the change, and the failure prints + which change and why.

+
+ + +
+
6

Coding agents: no "shipped" without exit 0

+
works todayClaude CodeCodexCursor
+

Agents report work as done when the pull request merges. Two layers stop that: an instruction every agent reads, and, + in Claude Code, a hook that checks every deploy command the agent runs.

+
AGENTS.md or CLAUDE.md
## Shipping
+After a deploy, run `npx seamkit readback --url https://your.app --pr <number> --json`.
+The change is shipped only when it exits 0. Exit 1 means it is not live or not proven, and
+exit 3 means production could not be examined. Report the reasons; never call a change done
+on any other exit code.
+
+
.claude/settings.json
{
+  "hooks": {
+    "PostToolUse": [{
+      "matcher": "Bash",
+      "hooks": [{
+        "type": "command",
+        "command": "\"$CLAUDE_PROJECT_DIR\"/scripts/after-deploy.sh"
+      }]
+    }]
+  }
 }
+
scripts/after-deploy.sh
#!/usr/bin/env bash
+# Runs after each shell command; acts only on deploys.
+cmd=$(jq -r '.tool_input.command // ""')
+case "$cmd" in
+  *"vercel deploy"*|*"npm run deploy"*) ;;
+  *) exit 0 ;;
+esac
+cd "$CLAUDE_PROJECT_DIR"
+if ! out=$(./scripts/wait-live.sh https://your.app 300 2>&1); then
+  echo "seamkit: the deploy is not proven live." >&2
+  echo "$out" | tail -n 20 >&2
+  exit 2   # stderr is shown to Claude
+fi
+
+

The hook uses jq to read the command Claude ran from the hook's JSON input. Match the + patterns to your own deploy commands. A packaged hook set for Claude Code, Cursor and Codex is on the roadmap.

+
-

What seamkit touches

-
-
Production, read-only

HTTP GET only, bounded in time and size, never with credentials. URLs that carry credentials or a query string are refused, because URLs are recorded.

-
Your repository, one branch

It reads your history and writes only seamkit/state, with git plumbing that never touches your working tree, index or HEAD.

-
No model, no content

No model runs inside it. The ledger holds URLs, commit ids, marker texts and digests, never what production served.

-
-
+ +
+
7

Local models and your own DevOps tools

+
works todayany language--json
+

A local model, an internal bot or a deploy script does not need an SDK. Run the command, read the exit code, and give + the model the reasons. Expose it as a tool like this, and the model can check its own deploys without being able to + fake the result.

+
seamkit_tool.py
import json, subprocess
+
+def readback(url: str, pr: int | None = None) -> dict:
+    """Is the change live in production? Give the model this tool's result as is."""
+    args = ["npx", "seamkit", "readback", "--url", url, "--json"]
+    if pr is not None:
+        args += ["--pr", str(pr)]
+    p = subprocess.run(args, capture_output=True, text=True)
+    if p.returncode == 2:                       # usage error: text on stderr, no verdict
+        return {"exit": 2, "error": p.stderr.strip()}
+    doc = json.loads(p.stdout)
+    return {
+        "exit": p.returncode,                   # 0 shipped; anything else is not
+        "outcome": doc["outcome"],
+        "reasons": [r for v in doc["verdicts"] for r in v["reasons"]],
+    }
+

The same pattern works in Go, Rust or a shell pipeline. The exit code is the decision; the JSON is the + explanation. An MCP server that offers these checks as tools to any MCP client is next after the GitHub Action.

+
+ + +
+
8

CI: verify every production deploy, and watch for rollbacks

+
works todayGitHub Actionspackaged Action · M3
+

Two workflows cover CI. The first runs when your host reports a successful production deployment to GitHub, as + Vercel does for connected repositories. The second runs on a schedule, so a rollback or a hand deploy is caught even + when nobody deployed through CI. Both carry the ledger, so "not live" means the change really left production.

+
+
.github/workflows/readback.yml
name: readback
+on: deployment_status
+permissions:
+  contents: write   # only to push seamkit/state
+jobs:
+  readback:
+    if: >-
+      github.event.deployment_status.state == 'success' &&
+      github.event.deployment.environment == 'Production'
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+        with: { fetch-depth: 0 }
+      - uses: actions/setup-node@v7
+        with: { node-version: 22 }
+      - run: npx --yes seamkit@0.1 state sync
+      - run: npx --yes seamkit@0.1 readback --url https://your.app --last 20
+      - if: always()
+        run: npx --yes seamkit@0.1 state sync
+
.github/workflows/watch.yml
name: production watch
+on:
+  schedule: [{ cron: '*/30 * * * *' }]
+  workflow_dispatch:
+permissions:
+  contents: write
+jobs:
+  watch:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v7
+        with: { fetch-depth: 0 }
+      - uses: actions/setup-node@v7
+        with: { node-version: 22 }
+      - run: npx --yes seamkit@0.1 state sync
+      - run: npx --yes seamkit@0.1 readback --url https://your.app --last 20
+      - if: always()
+        run: npx --yes seamkit@0.1 state sync
+

The first state sync pulls the ledger into the runner, so readback records the run and can see earlier + sightings. The last one pushes the new event, merging rather than forcing if another job pushed first. Ledger commits + carry their own author, so the runner needs no git identity. A failed readback fails the job, and GitHub's usual + notifications tell you.

+

Other CI systems need three things: Node 20 or later, the full history (no shallow clone), and push + access to the seamkit/state branch if you keep the ledger there. Pass --branch when the + default branch is not checked out as origin/HEAD.

-
-
- -
-

Usable by strangers first, then the rest of the checks

-
-
M1
Core

Verdict algebra, the event ledger, exit codes, replay.

done
-
M2
Readback, audit, stamp

Version ancestry, bundle markers, the demo, the commit.city dogfood at 20 of 20.

done
- -
M4
MCP server and Claude Code plugin

The read-only checks as tools for any MCP client.

planned
-
M5
Carry

Before a deploy, the merged pull requests it will also ship, and a block on hand deploys.

planned
-
M6
Card and gate

Every open pull request evaluated the way the deploy step will, with the exact missing items.

planned
-
M7
Approvals, policy, console

Approvals an agent cannot forge, rulings asked of a human, a static console.

planned
-
M8
Radius, parity, hooks

Blast-radius classification, sandbox parity, hook packs for coding agents.

planned
-
-
+ +
+
Reference
+

Troubleshooting

+

seamkit audit prints advice for each of these. This table is the same advice in one place.

+
+ + + + + + + + + + + + +
You seeCauseFix
Exit 3 for every changeProduction serves no version document, or serves a web page in its place.Step 2. Check with curl that the URL returns JSON with a full commit id.
"commit unknown to this repository"The local clone has not fetched the deployed commit, or it was deployed from a branch that never merged.git fetch origin. If it persists, someone deployed by hand.
"shallow clone"CI checked out a single commit.fetch-depth: 0, or git fetch --unshallow.
Version unreadable, dirty buildThe build was stamped from uncommitted changes.Build from a clean tree; add --require-clean.
Marker absent although the version contains the changeThe marker text is in source but not in the built output.Use text the bundle really ships, such as an attribute value or a user-facing string.
"No change carries a seamkit-card"The merge setting drops pull request descriptions.Step 4: "Pull request title and description".
Exit 2: URL refusedThe URL carries a query string or credentials, and URLs are recorded.Use a plain URL. Readback only needs public GETs.
"cannot tell not live from not proven"There is no ledger yet.Step 3: seamkit state init.
+
+
+ + +
+
Reference
+

Commands in 0.1.0

+
+ + + + + + + + + + +
CommandDoes
seamkit audit --url UReadback over the last 20 changes, with advice for every gap. --last N, --branch R, --json.
seamkit readback --url UProve each change, or one with --pr N or --commit C. --last N, --branch R, --version-url V, --record or --no-record, --json.
seamkit stampWrite the version document: --out F, --commit C, --require-clean.
seamkit state init | list | verify | syncCreate, list, verify and share the ledger branch. sync --remote R.
seamkit replay [event]Recompute recorded verdicts; fails if any comes out differently.
seamkit check NAME · seamkit checksRun one registered check on a recorded input; list the checks.
+
+

The production URL can also come from SEAMKIT_URL. seamkit sends only GETs to + production, writes only the seamkit/state branch, records URLs, commit ids and digests but never content, + and runs no model.

+
+ + +
+
Reference
+

What is built, and what comes next

+
+ + + + + + + + + + +
MilestoneScopeState
M1 · M2Verdict core, ledger, replay; readback, audit, stampdone
M3npm package (published); a GitHub Action that reads back after deploys and posts a check runin progress
M4MCP server and Claude Code pluginplanned
M5Carry: what a deploy will ship along with your change, and a block on hand deploysplanned
M6Card and gate: every open pull request judged the way the deploy step willplanned
M7 · M8Approvals an agent cannot forge, policy, a static console; blast radius, sandbox parity, hook packsplanned
+
+
+
+
- seamkit 0.1.0 · Apache-2.0 · tested on Node 20 and 22 + seamkit 0.1.0 · Apache-2.0 · Node 20 and 22 Source Architecture document Contributing @@ -635,14 +877,27 @@

Usable by strangers first, then the rest of the checks

From 00bb8b007b895e193c69fcda872de9edc0e37335 Mon Sep 17 00:00:00 2001 From: azank Date: Tue, 20 Oct 2026 01:41:53 +0500 Subject: [PATCH 3/4] docs(site): build tracker: progress, milestones with done-when and tasks, log, open decisions --- site/index.html | 214 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 194 insertions(+), 20 deletions(-) diff --git a/site/index.html b/site/index.html index 8c854a7..62a624f 100644 --- a/site/index.html +++ b/site/index.html @@ -203,6 +203,54 @@ th { font: 600 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); background: var(--sunk); } td:first-child { min-width: 190px; } +/* tracker */ +.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } +@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } } +.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; } +.stat b { font: 750 1.5rem/1.15 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; } +.stat span { font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); } +.stat.now b { color: var(--accent); } +.rail { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; margin-top: 18px; } +.seg { display: grid; gap: 6px; text-decoration: none; color: var(--ink); } +.seg i { display: block; height: 10px; border-radius: 3px; background: transparent; border: 1.5px dashed var(--ink-2); opacity: .7; } +.seg.done i { background: var(--ink); border: 1.5px solid var(--ink); opacity: 1; } +.seg.active i { background: linear-gradient(90deg, var(--accent) var(--p), var(--accent-soft) var(--p)); border: 1.5px solid var(--accent); opacity: 1; } +.seg span { font: 600 0.78rem var(--mono); font-variant-numeric: tabular-nums; } +.seg small { font-size: 0.74rem; color: var(--ink-2); line-height: 1.3; } +@media (max-width: 640px) { .seg small { display: none; } } +.ms-list { display: grid; gap: 12px; } +.ms { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 4px 16px; } +.ms.active { border: 1.5px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } +.ms .m { font: 800 1.9rem/1 var(--display); font-stretch: 78%; font-variant-numeric: tabular-nums; color: var(--ink-2); grid-row: span 2; } +.ms.done .m { color: var(--ink); } +.ms.active .m { color: var(--accent); } +.ms-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } +.ms-top h3 { margin: 0; font-size: 1.08rem; } +.ms-top .when { font: 400 0.76rem var(--mono); color: var(--ink-2); } +.ms-body { display: grid; gap: 8px; font-size: 0.92rem; } +.ms-body .lbl { font: 600 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); margin-right: 6px; } +.ms-body p { color: var(--ink-2); } +.ms-body p b { color: var(--ink); font-weight: 600; } +.tasks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; } +.tasks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 0.9rem; } +.tasks li::before { content: ""; width: 12px; height: 12px; margin-top: 5px; border-radius: 3px; border: 1.5px solid var(--ink-2); } +.tasks li.ok { color: var(--ink-2); } +.tasks li.ok::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--surface); } +.tasks li.wip::before { border-color: var(--accent); background: var(--accent-soft); } +.ev { display: flex; flex-wrap: wrap; gap: 6px; } +.ev a, .ev span { font: 500 0.74rem var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; background: var(--paper); } +.ev a:hover { color: var(--ink); border-color: var(--ink-2); } +@media (max-width: 560px) { .ms { grid-template-columns: minmax(0, 1fr); } .ms .m { grid-row: auto; } } +.log { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); display: grid; gap: 14px; } +.log li { position: relative; padding-left: 18px; font-size: 0.93rem; } +.log li::before { content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); } +.log time { display: block; font: 600 0.76rem var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; } +.state { font: 600 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 7px; border-radius: 4px; white-space: nowrap; } +.state.done { background: var(--ink); color: var(--paper); } +.state.active { background: var(--accent); color: #fff; } +.state.planned { border: 1px dashed var(--ink-2); color: var(--ink-2); } +.state.wait { background: var(--nothing-soft); color: var(--nothing); } + footer { border-top: 1px solid var(--rule); padding-block: 32px 52px; font-size: var(--s-1); color: var(--ink-2); margin-top: 24px; } footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 26px; } footer .grow { flex: 1; min-width: 220px; } @@ -217,7 +265,7 @@ seamkit - / setup guide + / build tracker and setup guide
v0.1.0 npm @@ -253,6 +301,11 @@

You need

+ +
+
Build
+

Where seamkit stands

+

Our working view of the build. Milestones, tasks and the log live in one data block at the top of this + page's script; update it as work lands, and every view below follows.

+
+ +
+ +
+
Build
+

Milestones

+

Each milestone has a "done when" written before it starts, taken from the architecture document. A + milestone is done when that sentence is true and shown, not when its code merges.

+
+
+ +
+
Build
+

Log

+
    +
    + +
    +
    Build
    +

    Open decisions

    +
    + + + +
    DecisionRecommendationOwner
    +
    +
    +
    Understand
    @@ -841,24 +928,7 @@

    Commands in 0.1.0

    and runs no model.

    - -
    -
    Reference
    -

    What is built, and what comes next

    -
    - - - - - - - - - - -
    MilestoneScopeState
    M1 · M2Verdict core, ledger, replay; readback, audit, stampdone
    M3npm package (published); a GitHub Action that reads back after deploys and posts a check runin progress
    M4MCP server and Claude Code pluginplanned
    M5Carry: what a deploy will ship along with your change, and a block on hand deploysplanned
    M6Card and gate: every open pull request judged the way the deploy step willplanned
    M7 · M8Approvals an agent cannot forge, policy, a static console; blast radius, sandbox parity, hook packsplanned
    -
    -
    +
    @@ -877,6 +947,110 @@

    What is built, and what comes next