Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ledger_problem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
label: Protocolith version
description: Output of `protocolith --version`.
placeholder: protocolith 0.6.0
placeholder: protocolith 0.7.0
validations:
required: true

Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Changelog

## Unreleased
## 0.7.0 - 2026-11-18

### Added

- **Selective disclosure.** `protocolith disclose --policy FILE` (also `core.build_disclosure`, MCP `protocolith_disclose`) writes a
publishable view of a ledger in which each entry is shown in full, as a summary, or hidden; the hash chain stays intact, so a
reader sees how many entries exist and that none was dropped. A policy chooses the level by protocol (exact or prefix), by
`seq` or by a range, first match wins, default hidden. `protocolith verify-disclosure FILE [--anchors DIR] [--reveal ENTRY]`
(`core.verify_disclosure`, `core.verify_reveal`, MCP `protocolith_verify_disclosure`) checks structure, chain, full entries,
anchors, and that a revealed entry is exactly the one committed to. `protocolith atlas --policy FILE` builds the matching atlas
(hidden records shown as `HIDDEN` rows). New codes `BAD_POLICY`, `BAD_DISCLOSURE`, `DISCLOSURE_HASH`, `DISCLOSURE_CHAIN`;
`protocolith schema policy`; conformance vectors `spec/vectors/disclosures.json`; core specification section 15; MCP now
has 15 tools. See `docs/guides/selective-disclosure.md` and `examples/selective_disclosure/`.

- **Example `examples/phantom_mean_reversion/`.** A published simulation study as a retrospective record: frozen protocol, two
anchors, a card, and `reproduce.py`, which re-runs the study (numpy only, about five seconds) and compares the output with the
committed results (IDENTICAL, or EQUAL within 1e-9 where floating-point rounding differs). The README states plainly what a retrospective record proves and what it does not.
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors:
orcid: "https://orcid.org/0009-0000-3773-5789"
license: Apache-2.0
doi: "10.5281/zenodo.24291830"
version: "0.6.0"
version: "0.7.0"
date-released: "2026-11-16"
repository-code: "https://github.com/Protocolith/protocolith"
abstract: >-
Expand Down
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
-->

<p align="center">
<img src="docs/assets/protocolith/demo.gif" alt="Terminal recording: init, freeze a protocol, record a result, verify the ledger, summary, issue a card, build the atlas, then a one-word edit of the ledger that verify-ledger detects" width="760">
<img src="docs/assets/protocolith/protocolith-story.gif" alt="Animation: why a result is hard to check, then freeze, record, verify, anchor and publish only what you choose, with the hash chain catching an edited or cut-off ledger" width="760">
</p>

## Why
Expand All @@ -72,6 +72,7 @@ It does not run experiments, fetch data or judge whether a protocol is a good on
| 2. **Record** the outcome against that protocol | `protocolith record record.json` | Status, outcome, source hashes, claim boundary |
| 3. **Verify** the hash-chained history | `protocolith verify-ledger` | Nothing; it reports rule violations (R1 to R11) |
| 4. **Issue** a card from a verified record | `protocolith issue SEQ` | A JSON and SVG card, plus an `issue` entry |
| 6. **Disclose** a view of the ledger | `protocolith disclose --policy FILE` | A public file: each entry in full, as a summary, or hidden |
| 5. **Anchor** the head outside your disk | `protocolith anchor` | An anchor statement; optional git tag, Wayback or RFC 3161 time-stamp |

Everything lives in one append-only file, `.protocolith/ledger.jsonl`, one canonical JSON line per entry.
Expand Down Expand Up @@ -166,11 +167,30 @@ from the local ledger or a directory of evidence cards: summary tiles, a status
filters, a sortable paged table and a detail drawer with permalinks. Languages other than English come only from
files you supply. See [the atlas guide](docs/guides/atlas.md).

<p align="center">
<img src="docs/assets/protocolith/atlas-tour.gif" alt="Tour of the atlas: overview with filters and charts, then a full record, a summary and a hidden record" width="760">
</p>

```bash
protocolith atlas --out atlas.html # the local ledger
protocolith atlas --cards docs/evidence_cards --out site/
```

## Publish what you choose: full, summary or hidden

A researcher may keep thousands of entries and publish a few. `protocolith disclose --policy policy.json` writes a view of the
ledger in which each entry is shown **in full**, **as a summary** or **hidden** (only its place and hash). The chain stays intact,
so a reader sees how many entries exist and that none was dropped; the owner can reveal a hidden entry later and anyone checks it.
`protocolith atlas --policy policy.json` builds the matching browsable page. See the
[guide](docs/guides/selective-disclosure.md) and the [example](examples/selective_disclosure/).

<p align="center">
<img src="docs/assets/protocolith/disclosure-levels.svg" alt="Eight ledger entries pass through a policy; the published view shows each in full, as a summary or hidden, and the chain stays linked" width="760">
</p>
<p align="center">
<img src="docs/assets/protocolith/disclosure-demo.gif" alt="Terminal recording: disclose with a policy, verify, reveal a hidden entry, then a dropped entry is caught" width="760">
</p>

## Anchor the head, and catch a cut-off ledger

A ledger is a file its owner writes, so plain verification cannot notice that the last entries were removed. An anchor puts the
Expand All @@ -195,12 +215,12 @@ README says what that does and does not prove.

## MCP client configuration

`protocolith mcp` is a stdio server with thirteen tools (`protocolith_summary`, `protocolith_log`, `protocolith_show`,
`protocolith_schema`, `protocolith_capture`, `protocolith_atlas`, `protocolith_claim_check`, `protocolith_anchor`, `protocolith_freeze`, `protocolith_record`,
`protocolith mcp` is a stdio server with fifteen tools (`protocolith_summary`, `protocolith_log`, `protocolith_show`,
`protocolith_schema`, `protocolith_capture`, `protocolith_atlas`, `protocolith_claim_check`, `protocolith_anchor`, `protocolith_disclose`, `protocolith_verify_disclosure`, `protocolith_freeze`, `protocolith_record`,
`protocolith_deviation`, `protocolith_verify`, `protocolith_issue`) read-only resources (`protocolith://summary`, `protocolith://ledger`,
`protocolith://schema/<name>`) and the prompt `research-agent-protocol`, so an agent can discover the formats and the rules
itself; `protocolith_claim_check` tells it what it may and may not say about a result. It uses the network only when
`protocolith_anchor` is given a time-stamp URL, and writes only inside the store, apart from the atlas page that `protocolith_atlas` writes inside the working directory. Add it to an MCP client:
`protocolith_anchor` is given a time-stamp URL, and writes only inside the store, apart from the atlas page and the disclosure file that `protocolith_atlas` and `protocolith_disclose` write inside the working directory. Add it to an MCP client:

```json
{
Expand All @@ -226,7 +246,7 @@ uv sync
uv run protocolith --version # or: source .venv/bin/activate
```

`pip install protocolith` is available from the 0.6.0 release (planned); it is not published with the ledger commands yet.
`pip install protocolith` installs the current release from PyPI (since 0.6.0).
The package has no required dependencies.

## Platforms
Expand Down
21 changes: 20 additions & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,24 @@ Anchor the ledger head: a local anchor file, and optionally a time-stamp, an arc
- `--sign` — Sign the git tag (needs --git-tag and a configured key).
- `--write-head FILE` — Write the anchor statement to FILE to publish or archive it.

## `protocolith disclose`

Write a publishable view of the ledger: each entry shown in full, as a summary, or hidden, as a policy says.

- `--store STORE` — Store directory (env PROTOCOLITH_STORE, default .protocolith).
- `--json` — Print the result as canonical JSON.
- `--policy FILE` — Visibility policy (`protocolith schema policy`). (required)
- `--out FILE` — Output file (default disclosure.jsonl). (default: `disclosure.jsonl`)

## `protocolith verify-disclosure`

Check the structure and hash chain of a disclosure and the hash of every full entry. --anchors DIR compares the anchor statements there with the entry hashes; --reveal FILE checks that a ledger entry you were given is exactly the one the disclosure committed to.

- `file`
- `--anchors DIR` — Directory of anchor statements (.json) to check.
- `--reveal ENTRY` — JSON file holding one revealed ledger entry.
- `--json` — Print the result as canonical JSON.

## `protocolith claim-check`

State what the ledger supports about a record (what may and may not be said).
Expand Down Expand Up @@ -303,7 +321,7 @@ Print a JSON fragment for the outcome object of a record: Python, platform, mach

Print a JSON Schema (draft 2020-12) generated from the rules.

- `name` — Which schema (default all). (one of: `freeze`, `record`, `deviation`, `issue`, `entry`, `all`)
- `name` — Which schema (default all). (one of: `freeze`, `record`, `deviation`, `issue`, `entry`, `policy`, `all`)

## `protocolith head`

Expand Down Expand Up @@ -331,6 +349,7 @@ Build a self-contained offline HTML atlas of experiments from a ledger and/or ev
- `--title TEXT` — Page title. (default: `Protocolith atlas`)
- `--i18n DIR` — Directory of <code>.json translation files; adds a language switcher.
- `--default-lang CODE` — Initial language (default en). (default: `en`)
- `--policy FILE` — Visibility policy: show each record in full, as a summary, or hidden.
- `--max-rows N` — Embed at most N records (the newest); counts stay complete.

## `protocolith mcp`
Expand Down
Binary file modified docs/assets/protocolith/anchor-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/assets/protocolith/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/atlas-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/atlas-hidden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/atlas-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/atlas-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/atlas-tour.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/protocolith/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/disclosure-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docs/assets/protocolith/disclosure-levels.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/protocolith/protocolith-story.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions docs/development/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ the shape of a release and says which parts are done by hand.

## 0.6.0

The 0.6.0 release is planned to ship the core ledger commands, the specification and the conformance vectors,
and to make `pip install protocolith` available. It is not released. The packaging, publication and documentation
steps above are still to do.
The 0.6.0 release (2026-11-16) shipped the core ledger commands, the specification and the conformance vectors, and made
`pip install protocolith` available from PyPI, with a Zenodo DOI.

## 0.7.0

The 0.7.0 release adds anchoring of the ledger head, `claim-check`, the MCP research prompt and selective disclosure. Before
tagging: bump the version in `pyproject.toml`, `CITATION.cff`, `specs/repo_version.yaml` and `core/mcp.py`; rebuild the examples
whose anchors record the version (`examples/phantom_mean_reversion/build_ledger.py`, `scripts/build_disclosure_demo.py`); then
tag and publish through the protected workflow.
1 change: 1 addition & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
| The quickstart: freeze, record, verify, issue, log, head | [`examples/quickstart/`](../../examples/quickstart/), walked through in [your first record](../getting-started/first-record.md) |
| A new protocol version, a deviation, and records that are blocked or rejected | [Statuses and versions](statuses-and-versions.md) |
| A published simulation study kept as an anchored, reproducible retrospective record | [`examples/phantom_mean_reversion/`](../../examples/phantom_mean_reversion/) |
| A private notebook of 31 entries and the view you would publish (full, summary, hidden) | [`examples/selective_disclosure/`](../../examples/selective_disclosure/) |
| Older example material (rerun reports, evidence-card examples, case studies) | [archive](../archive/README.md) |
4 changes: 2 additions & 2 deletions docs/getting-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ code and no network access. It runs headless on macOS, Linux and Windows.
| Route | State |
| --- | --- |
| From a source checkout with `uv sync` | Works today. |
| `pip install protocolith` | Available from 0.6.0. |
| conda-forge | Planned, no date. |
| `pip install protocolith` | Available (PyPI, since 0.6.0). |
| conda-forge | Submitted to conda-forge, waiting for review. |

## From source, per operating system

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/anchoring-the-head.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ otherwise it reports `HEAD_MISMATCH` and exits with 1 (for example when the tail
replaced). The value must be a decimal `SEQ`, a colon and 64 lowercase hex characters, else the command exits with 2.
A ledger that is longer than the anchor still passes: the check proves the anchored prefix is unchanged.

The option is part of the 0.6.0 development work. It cannot show that the anchor itself is trustworthy.
The option exists since 0.6.0. It cannot show that the anchor itself is trustworthy.

## When to anchor

Expand Down
8 changes: 4 additions & 4 deletions docs/guides/mcp.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# MCP integration

`protocolith mcp` runs a Model Context Protocol server on stdio, so an MCP client (an agent or an editor) can
freeze, record, verify, issue and query without a shell. It uses newline-delimited JSON-RPC 2.0, needs no third-party package, and writes only inside the store (the atlas tool
writes one page inside the working directory). It uses the network only when `protocolith_anchor` is called with a `tsa` URL.
freeze, record, verify, issue and query without a shell. It uses newline-delimited JSON-RPC 2.0, needs no third-party package, and writes only inside the store (the atlas and disclose tools
write one file each inside the working directory). It uses the network only when `protocolith_anchor` is called with a `tsa` URL.

This page is the short version. The step-by-step guide with a session transcript is
[Use Protocolith from an AI agent](ai-agent-mcp.md); the tools and resources are listed in the
Expand All @@ -27,9 +27,9 @@ is not on the client's `PATH`, give the full path to the executable in your envi

## What the server offers

Thirteen tools (`protocolith_summary`, `protocolith_log`, `protocolith_show`, `protocolith_schema`,
Fifteen tools (`protocolith_summary`, `protocolith_log`, `protocolith_show`, `protocolith_schema`,
`protocolith_capture`, `protocolith_atlas`, `protocolith_freeze`, `protocolith_record`, `protocolith_deviation`, `protocolith_verify`,
`protocolith_claim_check`, `protocolith_anchor`, `protocolith_issue`), read-only resources (`protocolith://summary`,
`protocolith_claim_check`, `protocolith_anchor`, `protocolith_disclose`, `protocolith_verify_disclosure`, `protocolith_issue`), read-only resources (`protocolith://summary`,
`protocolith://ledger`, `protocolith://schema/<name>`) and the prompt `research-agent-protocol`. Arguments not listed in a tool's schema are rejected. `isError` is true when an
operation was rejected or the ledger does not verify; the JSON then carries `codes`, `error` (with a `hint` where
there is one) and `violations`, exactly as with `--json`.
Expand Down
Loading
Loading