> For the complete documentation index, see [llms.txt](https://stemma.sh/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stemma.sh/docs/evidence-and-internals/design-notes.md). Agents can also search and read this documentation through its [MCP server](https://stemma.sh/docs/~gitbook/mcp).

# Design notes

These decision records explain why shipped designs work as they do. They keep the reasoning a future contributor needs without preserving draft negotiation history.

## Audit / session review (RFC 0001, shipped)

The decisions:

* **One core, two surfaces.** `review_session` (a handle's open-time baseline vs now) and `audit_docx` (any two files) produce the same report. The stateless form exists so stemma can certify edits it didn't make.
* **Receipts-only was rejected** as the verification mechanism: receipts record what the engine did, which cannot prove the *absence* of unintended change, and cannot bind changes to intent. Receipts remain the per-step surface; audit is the end-state surface; they must agree.
* **Byte diff was rejected**: churn-vs-change is the problem the canonical IR exists to solve (see the [fidelity contract](https://stemma.sh/docs/understand-the-model/fidelity.md)).
* **A hard commit-gate was deferred**: which audit findings are blocking is task-dependent, so review-then-save is doctrine, not mechanism. Revisit with usage data.
* **Accept-vs-reject attribution is content-based.** Both resolutions remove the marker; only content distinguishes them. Anything that grades or reports resolution state must compare text, never marker presence.

### Verified-delivery follow-up

The common MCP save path now hard-gates the objective delivery invariants: unexplained committed delta, changed prior revisions without successful typed session resolution evidence, untouched-scope violations, and new validator issues. This does not claim to infer the caller's whole task intent.

A successful accept/reject command records its exact selected identities plus an independently audited before/after committed-content transition batch. Final review replays those batches in order. A direct mutation before, between, or after them breaks the chain and remains unexplained; a block-id allowlist was rejected because it would let later mutations inherit an earlier resolution's exemption. Stateless audit remains conservative because a file pair contains no session command evidence.

## Policy

New design work lands here as a decision record once shipped.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stemma.sh/docs/evidence-and-internals/design-notes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
