Notarizing documentation

User guide

This guide describes Notarizing at revision 58d3f66610e4cce25ddd64d065c8f36f06abb229. Source: docs/user-guide.md. Source links require repository access. The App examples on the product page use reviewed revision 98455fe03bb7.

Contents

Use this guide to import an OpenSpec change and review it with its evidence. The MCP host is your client application. It starts the local Notarizing server and displays the Workspace App. The server and workspace run in the environment that you configure for that host.

You need Go and Git to build and use Notarizing. Building the App also needs Node 22.12 or later. Node, a broker and a model service are unnecessary at runtime for basic local use.

The workflow has three parts:

  1. Import a committed specification revision. Review its requirements and assumptions even before evidence exists.
  2. Run checks with your existing tools. Import their reports and artifacts.
  3. Inspect the reported outcomes, policy evaluation and missing coverage in the App.

Notarizing never edits your repository, runs your checks or fetches content from imported URLs. It treats repository text, reports and review text as data.

Lint specifications without a workspace

With Notarizing installed, check the specifications in a local Git repository:

notarizing spec lint --path ~/src/payments --at main
notarizing spec lint --path ~/src/payments --at main --change add-refund-limits

The first command checks accepted specifications. The second checks the effective specifications of the named change, including accepted requirements. Both resolve the branch once and report its full commit ID. You can also name a tag or a full commit ID. Commit your edits before running lint: it reads committed Git objects and excludes uncommitted files. HEAD and revision expressions are refused.

Lint needs no workspace or repository registration. It opens no database, runs no source content and changes no file. It reports the parser's existing diagnostics, including malformed IDs, empty premise groups and unresolved references. Separate advisory checks find missing normative wording and repeated scenario labels within one requirement. Normative wording uses uppercase whole-word SHALL or MUST in the requirement preamble. Headings, metadata, comments, Markdown block quotes, code examples and hidden link destinations do not satisfy that check. Scenario labels compare without case or whitespace differences. The same label in different requirements is allowed.

Each finding includes its severity, code, rule version and manual repair guidance. Available source paths, inclusive line spans and file digests identify the exact input. Lint checks structure and wording; it does not prove correctness.

For a CI gate, use strict mode and JSON:

notarizing spec lint --path . --at main --change add-refund-limits --strict --output json

The notarizing.cli/1 envelope contains a notarizing.spec-lint/1 result. Errors and fatal findings exit 1. Warnings exit 0 by default and exit 1 with --strict. A lint failure retains its findings in the JSON result with ok: false. Usage errors exit 2; operational failures use the normal CLI error codes.

The result names parser and advisory coverage. Fatal parsing skips advisory checks. An empty effective target, invalid encoding or any skipped snapshot entry blocks a clean result. Reads allow 2,000 files, 1 MiB per file and 32 MiB total. Results allow 10,000 findings and 8 MiB of formatted, escaped report JSON, excluding the envelope. A saturated parser diagnostic limit or an excessive result fails with too_large; the command does not return a partial success. Repairs remain manual source edits.

1. Set up a workspace

A workspace is one directory that holds one SQLite database. One process owns it at a time.

  1. Build and install the binary with the MCP App assets:

    make install

    make install runs make web and then go install. make web installs the locked npm packages and builds the MCP App into internal/mcp/appdist. go install embeds it into the binary and writes the binary to the directory of go env GOBIN. If GOBIN is empty, the directory is the bin directory of go env GOPATH.

  2. Add the install directory to PATH, and check that the shell finds the binary:

    export PATH="$(go env GOPATH)/bin:$PATH"
    notarizing version

    If you set GOBIN, add that directory instead. The rest of this guide runs notarizing from PATH. To use the build of make web and make build in its place, run bin/notarizing, or add the bin directory of the checkout to PATH.

    Without the built App assets, the CLI and agent read tools work but no graphical App resource is advertised. doctor names the missing MCP App assets.

    If you cannot read the private ka2a module, install the build without the ka2a adapter: make install TAGS=noka2a. That build needs no ka2a module. Its ka2a reload and serve --ka2a-config fail with exit code 5.

  3. Create the workspace:

    notarizing --workspace ~/reviews/ws init

    The command makes the directory with mode 0700 and the database with mode 0600. If the directory holds other files, the command refuses it.

  4. Select this workspace for the remaining commands in this shell:

    export NOTARIZING_WORKSPACE=~/reviews/ws

    Keep this variable set for the walkthrough. If you open another terminal, set it there too. Alternatively, pass --workspace ~/reviews/ws to each command. Without either setting, notarizing uses ./.notarizing.

  5. Check the setup:

    notarizing doctor

    The exit code is 1 when a check has the status error.

2. Import a change

  1. Register the local Git repository under an ID of your choice:

    notarizing repo add payments ~/src/payments

    The ID has 1 to 64 characters: lower-case letters, digits, ., _ and -. The first character is a letter or a digit. If the checkout moves or you clone it again, point the ID to the new path:

    notarizing repo set-path payments ~/work/payments

    The command checks that the new path is a Git repository with the same object format that contains the latest imported commit. Otherwise it changes nothing and fails with conflict. There is no repo remove, because stored history names the repository ID. If the workspace may no longer show a repository, the operator revokes its source access with notarizing repo access revoke. See the operator guide.

  2. List the changes at a commit:

    notarizing change list --repo payments --at main
  3. Check the change before you import it:

    notarizing change import --repo payments --at main --change add-refund-limits --dry-run

    The dry run stores nothing. It lists each problem with a stable code, its location (path:line) and a suggested repair, and the counts and identifiers that the import would store. Fix the source, commit and run the dry run again. See Check a change before import for the codes.

  4. Import one change at an exact revision:

    notarizing change import --repo payments --at main --change add-refund-limits

    --at takes a branch, a tag or a full commit ID. HEAD is not accepted. The import resolves the locator to one commit and stores that commit. If the branch moves later, the stored target does not change. Import the change again to review the new commit. If the locator does not resolve, nothing is stored.

  5. Read the change report:

    notarizing change report --repo payments --change add-refund-limits

    The report is useful before any check report exists. Each requirement without a binding or a report shows as unassessed.

A requirement without a Requirement-ID line has a provisional identity. A provisional requirement never matches a requirement of another revision. Review shows the badge Provisional in place of the ID, the inspector shows its provisional reference, and the Diagnostics tab lists it. The same block at two revisions is two objects.

3. Review in the MCP App

Configure your MCP host to launch this local command:

notarizing --workspace /absolute/path/to/ws mcp

Replace the path with your workspace path. Call open_workspace in the host. Select a repository, change and snapshot in the App. These reads need no running owner or review grant.

To add notes or other review records, follow Give a review grant. The headless owner, notarizing serve, handles these writes. It exposes private local control and serves no website. While it runs, CLI imports also go through its control API. Refresh the App after an import to read the new evidence.

Host connection

Configure the host to launch the server in the same trusted environment as the workspace. There is no browser port to open or forward. The App loads no remote assets. The host receives tool results, so choose a host that you trust with your workspace content. See MCP setup for a client configuration example.

Review mode

Review lists each effective requirement of the selected change and snapshot. Each row shows:

  • the exact source of the requirement;
  • the assessment rows: the reported claim beside the evaluated status;
  • the missing dimensions, for example a required configuration without a report;
  • the stale reasons, for example a report about an older implementation revision;
  • the contradictions: applicable failing and passing reports of one row;
  • the assumptions, premise groups and open questions.

Select a row and press Enter to open the inspector. The inspector shows the requirement block, its evidence history, its review history and its relationships. Press Escape to go back.

A reported pass is not an established pass. The evaluated status is pass only when the policy trusts the source for the method and an approved evaluator made the report.

Each row of the evidence history names the source that submitted the receipt: the channel, the source namespace and, for a signed ka2a transport, the verified principal. A verified principal names the producer. It is not evaluator evidence: a signed proof claim stays unknown until a report of an approved evaluator exists.

A review decision applies only to the target where it was made. When the wording of a premise changes, the new target starts the premise open. The inspector shows the earlier decision with the warning that the source changed after it, and the Diagnostics tab lists the premise. Record a new decision at the new target.

The App keeps the selected change, target, item and review checkpoint in memory. The host can supply initial identifiers when it opens the App. After a CLI import, refresh the App to read the new evidence.

What needs attention

The tab What needs attention below the requirements lists the unresolved work of the change: requirements that fail, are stale or unknown (also not assessed), have no approved binding, have contradicting reports or raise an open question; undecided assumptions; open questions; and premise groups with an unresolved member.

Each item shows why it is unresolved and a table of factors: the value, the points, the weight and the contribution of each factor. The score is the sum of the contributions. The order is score descending, then object ID ascending, so the same data and weights always give the same order.

FactorPoints
Statefail 3, stale 2, unknown 1; disputed 2, open 1; an unresolved premise group 1
Downstream requirementsone per requirement that depends on the item through Depends-On, Assumes or a premise group
Severity1 for unknown. The specification format has no severity, so every item is unknown. Unknown is never treated as low.
Contradicting evidence1 when reports of the requirement contradict each other
Missing binding1 when the requirement has no approved binding
Open questionsone per open question that the item raises

Move a slider to change a weight from 0 to 100. The panel reorders the items at once. The weights stay in the App: they are not sent and not stored. A weight of 0 removes the contribution of its factor. It never removes an item. Select Reset weights to go back to the defaults. The queue never changes an assessment or a review state.

The CLI gives the same queue:

notarizing review queue --repo payments --change add-refund-limits --weights missing_binding=0

Hand off a review

A handoff capsule gives another reviewer the exact scope of open work. It is a file in the format notarizing.handoff-capsule/1. It names the repository, the change and the commit, the selected requirements, the reports that decide their rows (report ID and SHA-256), the undecided questions that they raise, your own questions and the next steps in order.

notarizing review capsule export --repo payments --change add-refund-limits \
  --requirement PAY-R1-004 --question "Is the limit per card or per account?" \
  --step "Run the refund tests on staging" --step "Decide ASM-LIMITS" \
  --recipient "payments reviewers" --due 2026-11-01 --output handoff.json

The command writes the file. It does not send a message. Send the file through your usual channel. The recipient label is an unverified claim: nobody checks it.

The receiver imports the capsule into their own workspace:

notarizing review capsule import handoff.json

The result is a task list. Each requirement, linked question and report is resolved against the receiving workspace. An object that the workspace lacks shows as an unresolved link with a reason. No reference is dropped. Import the change at the same commit and the reports (for example from a bundle) to resolve the links. The import writes nothing. It grants no authority and changes no assessment, review state, binding or policy.

Explore mode

Explore shows a bounded dependency graph around a root. Select the view:

  • dependencies: the premises and requirements that the root depends on;
  • impact: the claims that depend on the root;
  • gaps: requirements without approved coverage and assumptions without review;
  • selection: every relationship near the root.

Use the depth control and the relation filter to make the graph smaller. Machine suggestions are hidden by default. Select "Show suggestions" to see them. A suggestion is never followed as a dependency and never gives coverage. Select "Table" for a table of the same nodes and relationships.

The product makes one kind of suggestion: similar wording (notarizing.suggest/1). It compares the wording of the requirements of the target in the search index. The lexical method always runs. The embedding method runs only when the operator enabled the local provider and built the semantic index; it uses the stored vectors and never calls the model. Without a current search index there are no suggestions. In the inspector of a requirement, select "Show suggestions" under "Suggested similar wording" to see its suggestions with their method and score. A score is a similarity, not a confidence. To keep a suggestion, a reviewer selects "Propose a link". This sends the normal relationship.propose command with a rationale. The suggestion itself never becomes a link, a binding or coverage. In the CLI, run notarizing graph suggestions --target tgt_ID. A view that does not fit its limits says that it is partial and gives a next page. A graph is a review aid. Its reachability never establishes correctness.

Compare mode

Compare shows two exact revisions of a change side by side. It keeps these aspects apart: wording, assumptions, premise groups, relationships, review decisions and evidence applicability. Rows match only by stable ID. A model result can stay valid while the implementation correspondence is stale. Compare shows these two facts in separate columns.

To compare from the CLI:

notarizing compare --left tgt_LEFT --right tgt_RIGHT

To see which claims a draft change of assumptions could affect, use a what-if draft. The draft stores nothing:

notarizing graph whatif --target tgt_ID --remove ASM-FSYNC
notarizing graph whatif --target tgt_ID --replace "ASM-FSYNC=Fsync survives power loss on ext4"

The result lists the claims that are potentially affected under recorded dependencies and the premise groups that change. It does not invalidate historic evidence.

4. Give a review grant

An App session starts as a reader. Review writes require an expiring CLI grant. Use the same workspace path in every step:

  1. In terminal A, start the owner. Leave it running:

    notarizing --workspace /absolute/path/to/ws serve
  2. Reopen the App session in the MCP host. Copy its displayed session ID.

  3. In terminal B, grant that session access to the selected change. Replace ses_ID with the copied ID:

    notarizing --workspace /absolute/path/to/ws review session grant --session ses_ID --ttl 30m --scope change:payments/add-refund-limits

The scope is workspace, repo:<repository_id> or change:<repository_id>/<change>. The time to live is 1 minute to 8 hours. A reviewer can add notes, decide on assumptions, propose and review relationships, and write wording drafts. A grant never allows imports, policy or binding changes, purges, provider changes or source edits.

To name the reviewer in review events and exports, add --actor "Alice Example". The events then show Alice Example (unverified, MCP App session XXXX). Notarizing does not verify the name, and the name changes nothing that the grant allows.

To end a grant:

notarizing --workspace /absolute/path/to/ws review session revoke --session ses_ID

A restart of serve ends every session and grant.

If two tabs change the same object, one save commits and the other gets a conflict. The conflict shows the current revision and keeps your text. Read the new version before you submit again. A draft is "saved" only after the server confirms it.

5. Import evidence

Evidence is a notarizing.check-report/1 report with its artifacts. See the evidence producer guide for the format.

notarizing evidence import --artifacts ./artifacts report.json

Every declared artifact must be below the --artifacts directory with its declared length and SHA-256. A bad artifact rejects the whole report. The same report again returns the same receipt. The same report_id with other bytes is a conflict.

To import several reports, name several files, or name the output directory of the example producer gotestreport with --dir:

notarizing evidence import --dir ./reports

Each report is imported alone with its own receipt. If one report fails, the others are still imported. The command then lists each file with accepted, failed or not_attempted and exits with a non-zero code. The exit code is 4 when an outcome is unknown. Run the same command again: accepted reports return the same receipts.

A local file import has the attribution manual_unverified. Its reported pass is "not independently established" until the policy trusts the local source.

To read a receipt:

notarizing evidence show RECEIPT_ID
notarizing requirement history --repo payments RFD-R1-001

A producer cannot change a report. To retract or correct a result, the producer submits a new report. Then record the relation:

notarizing evidence correct --corrected OLD_RECEIPT --correcting NEW_RECEIPT --relation corrects --reason "Wrong fixture."

A correction keeps both receipts. It does not retire a failure.

Only a reviewed supersession retires a corrected failure. A reviewer with a review grant opens the requirement in the App inspector and selects Retire failure by supersession. The button shows only for a failing receipt that a correction links to a later receipt. Enter the reason. The App records two review events: a supersedes proposal from the later receipt to the failure, with the requirement and the dimension, and its acceptance. The server accepts them only when the correction exists and the later receipt is eligible and applicable under the policy. Then:

  • the assessment of that target uses the later receipt and marks the failure "Superseded by review";
  • both receipts stay, and the evidence history names the reviewer and the reason;
  • a view at an earlier review checkpoint shows the earlier result;
  • a later reject or investigate decision on the relationship revokes the effect.

evidence show, requirement history and change report show the supersession. The CLI cannot record one: it is a review decision.

6. Set the policy and the bindings

A binding links a requirement to an approved check. Only binding import creates bindings. A declared Evaluated-By link, a review decision or a report never does.

notarizing binding import bindings.json
notarizing binding show --repo payments

A bindings file (notarizing.bindings/1) names the repository, the checks with their method, target kind and approved evaluators, and the bindings with their required configurations. See examples/refund-limits/evidence/bindings.json. The JSON Schema bindings.schema.json describes the format for editors and other tools; binding import checks more, for example a check ID defined twice.

In the Workspace App, select a requirement with a stable ID. Open Compose binding proposal in the inspector. Enter the check ID and select Preview binding. Inspect each field, the report applicability and the affected requirements. Confirm each suggested value. Enter a rationale and, for a new check, a description. Preview again. A complete proposal offers Download binding proposal. This works in Viewer mode and changes no workspace record. The operator adopts the file with binding import.

The preview uses the active policy, bindings and retained evidence at the selected source revision. It does not reconstruct a historical review checkpoint. If evidence changes a confirmed suggestion, refresh the suggestions and inspect them again. For missing or ambiguous values, use the CLI's explicit options. A proposal above 512 KiB also needs the CLI. An exported file preserves the previewed bytes; it does not freeze the workspace. Review active bindings again before later adoption.

To write a binding from reports that you already imported, compose a proposal:

notarizing binding propose --repo payments --change add-refund-limits \
  --requirement PAY-R-101 --check CHK-LIMIT-UNIT

The command suggests the producer (source namespace), the method, the configurations and the evaluator from the imported reports of the requirement. It derives the target kind when the method allows only one. It shows which reports the proposed binding would apply and the resulting status under the active policy version. A suggestion is not adopted until you confirm it. A value with two or more candidates is ambiguous; give it explicitly, for example with --producer. When every field is given, confirmed or derived, export the bindings file:

notarizing binding propose --repo payments --change add-refund-limits \
  --requirement PAY-R-101 --check CHK-LIMIT-UNIT \
  --confirm producer,method,configurations,evaluator \
  --description "Refund limit unit tests" --rationale "The unit tests cover the limit." \
  --export proposed-bindings.json
notarizing binding import proposed-bindings.json

The exported file holds the active bindings of the repository and the proposed binding. An incomplete or ambiguous proposal is refused, and no file is written. binding propose changes no binding, policy, repository or producer authority. Only binding import adopts the file.

The policy (notarizing.policy/1, JSON Schema policy.schema.json) names the trusted source namespaces with their methods and the reviewed not_applicable exclusions:

{
  "schema_version": "notarizing.policy/1",
  "trusted_sources": [
    {"source_namespace": "local", "methods": ["implementation_test", "integration_test"]}
  ],
  "exclusions": []
}
notarizing policy set policy.json
notarizing policy show

A policy set with a changed policy stores a new version. The same policy again keeps the current version. The MCP App can never change the policy.

Preview a policy change

Preview a draft policy before you adopt it. The preview stores nothing:

notarizing policy preview --draft draft-policy.json --repo payments --change add-refund-limits

For each requirement, the preview lists the rows whose applicability, trust decision or evaluated status changes under the draft. Each changed row names the assessment rule, for example rule_2_eligibility, and the policy clause that causes the change, for example "trusted source removed: local for implementation_test". Unresolved dependencies of the target stay listed. Without --target or --repo and --change, the preview covers the latest import of every change, at most 64. The same workspace and draft give the same output, byte for byte. The preview reads the workspace read-only and works while serve runs. It refuses a draft that policy set refuses. To adopt the draft, run notarizing policy set.

Test the policy with scenarios

A policy scenario (notarizing.policy-scenario/1, JSON Schema policy-scenario.schema.json) holds archived inputs and the states that you expect from them: the requested commit and file digests, the requirement revisions, a complete bindings file, a complete policy file and check reports. Each requirement has an expected status and expected rows; the coverage and the reasons are optional. A scenario is self-contained. It needs no workspace.

notarizing policy scenarios run examples/policy-scenarios/*.json

The command evaluates each scenario in memory with the assessment rules of the binary. A deviation names the scenario, the requirement and row, the field, the expected and actual values, the rules and the scenario input, for example $.reports[0] with its report ID. A deviation gives exit code 1 with conflict. A file that is not valid gives exit code 1 with invalid_input; the other files still run. The command runs no producer, reads no repository and reads no artifact bytes. A passing scenario covers only the archived inputs in its file. examples/policy-scenarios/ holds five boundary cases: a stale digest, an untrusted producer, contradicting reports, a partial observation and an unsupported method. make verify runs them.

7. Read the change report

The change report gives no overall pass badge. Read each requirement row by row.

Evaluated statusMeaning
passAn eligible, applicable and complete report supports this dimension under the selected policy.
failAn eligible, applicable and complete report establishes a scoped violation under the selected policy.
staleThe report is about another revision of the requirement, the implementation, the model inputs, the correspondence inputs or the checker.
unknownNo conclusion: for example an untrusted source, an incomplete run, an integrity failure or a report without a conclusion.
not_applicableA reviewed policy exclusion makes the check not applicable.

Each row also has a coverage value: complete, partial or not_assessed. The reasons of a row say why it has its status. A later pass never clears an earlier failure. Both stay visible as an unresolved contradiction until a reviewed supersession resolves it.

Use --format markdown or --format json for a document. Use --checkpoint N to pin a review checkpoint.

8. Export

Each export pins one target and one review checkpoint. The same request gives the same bytes.

  • A graph as Mermaid, Markdown or notarizing.graph/1 JSON:

    notarizing graph export --target tgt_ID --object RFD-R1-001 --view dependencies --format mermaid --output graph.mmd
  • The review of a change as Markdown or JSON:

    notarizing review export --repo payments --change add-refund-limits --checkpoint latest --output review.md
  • A wording draft as a proposal-only patch:

    notarizing review patch --draft EVENT_ID --base FULL_SHA --output change.patch

    The patch replaces the complete requirement block and keeps every other byte of the file. If the base file differs from the file of the draft, the command reports a conflict. Notarizing never applies the patch. Review it against your working tree, then apply it yourself.

In the App, the Export dialog prepares the same formats for the current view. The MCP host handles the file download. The inspector shows the before and after text of a wording draft.

notarizing search --query RFD-R1-001
notarizing search --query "refund limit" --kind requirement

An exact Requirement-ID or declaration ID comes first. Then come FTS5 full-text results. A missing or stale index shows as coverage pending, partial or stale, never as "no match". To rebuild an index, run notarizing search index --target tgt_ID.

An index is partial when it omits part of the selected source, for example a change document that is not valid UTF-8. A search with no result in a partial index says that the index is incomplete. It does not say that nothing matches.

In the App search dialog, the scope "Only the items of this change" reads like a change-scoped graph: the accepted baseline and the review notes on it are hidden. Search then shows no result, excerpt or count of a hidden item.

Without a configured embedding provider, the App search dialog disables the Hybrid option and says why. Lexical search works without a network call.

The query is sensitive. Shell history can keep --query. For sensitive text, use --query-stdin.

Hybrid search (--mode hybrid) needs the local Ollama provider. It is off by default. See the operator guide.

All Notarizing documents