Skip to content

PRDs and ADRs

Zentri does not draft documents. The agent writes them, and two template skills in its kit tell it when and how. The zentri-prd skill covers a product requirements document (PRD), which says what to build and why. The zentri-adr skill covers an architecture decision record (ADR), which writes down a design choice that other code and other sessions must follow.

The coordinator stores both. A PRD is a series of numbered revisions on the session’s intent, saved with zentri_update_prd. An ADR is a decision record, saved with zentri_propose_decision. Neither one is written to your repository.

A PRD belongs to an intent, not to a session. Every session on the same intent writes to the same PRD. Anyone in the org with role viewer or above can read it over HTTP.

zentri_update_prd takes three fields.

Field What it holds
title The feature name, at most 200 bytes.
body The whole PRD in Markdown, at most 32 KiB.
base_revision The revision you edited. Send 0 for the first one.

Each save stores a new revision, numbered one past the latest. Nothing is overwritten. The coordinator takes a per-intent lock for the write, so two sessions on one intent save one at a time. If another writer saved first, your base_revision is stale and the save fails with 409 stale_revision.

the PRD is at revision 3, not 2; read revision 3, merge your change into it, and send base_revision 3

The coordinator records the session’s owner as the author, redacts text that looks like a credential, and writes a prd.update audit entry. A session with no intent gets 422, and an ended session gets 409 session_ended.

The reply carries intent_id, revision, title, redacted, created_at, and a next line such as “Send base_revision 1 with the next revision.”

The skill tells the agent to write a PRD before it writes code for feature-size work. That means behavior a person can see, work that spans several packages or sessions, or a task whose scope it would otherwise guess. A bug fix, a refactor that changes no behavior, or a one-file change needs no PRD. The PRD says what and why. The plan the agent sends with zentri_submit_plan says how.

The template has these sections. The agent writes “None.” in a section that has nothing.

# <Feature name>
## Problem
## Users
## Goals
## Non-goals
## Requirements
## Acceptance criteria
## Open questions
1. <The question.> Asked as <question_id>. Pending.

Each open question that a person must settle becomes one zentri_ask call with kind: "product". The agent writes the question_id into the Open questions section and saves the PRD. It does not stop to wait. When the answer arrives, it folds the answer into the sections it changes and saves a new revision. When a question expires, it writes its assumption next to the question. Questions and decisions covers asking, routing, and expiry.

The skill tells the agent to record a decision when it chooses something hard to undo or that others build on. That includes a data shape, a wire format, a dependency, a module boundary, how errors or retries work, and anything on the high-risk list. A choice that stays inside one function needs no ADR.

  1. The agent searches first with zentri_search_decisions.
  2. An accepted decision on the subject is the rule. The agent follows it and names it in its plan.
  3. If an accepted decision no longer fits, the agent proposes a new one with supersedes set to the old one’s ID, instead of working around it.
  4. A proposed decision is still waiting for review, so the agent does not build on it.
  5. Otherwise the agent proposes a decision. When in doubt it sets risk to high.

The fields of zentri_propose_decision map to the sections of an ADR.

Field ADR section
title # <Title>
context ## Context
decision ## Decision
consequences ## Consequences
alternatives ## Alternatives considered

Each decision is one ADR. Its status is proposed, accepted, rejected, or superseded, and supersedes links it to the decision it replaces. A low-risk decision is accepted at once. A high-risk one waits for a lead, and the merge check fails the session’s branch until a lead approves it. Questions and decisions has the risk rules and the review flow.

An answer to a question does not create a decision. The coordinator keeps questions and decisions as separate records.

The MCP server tells every agent to ask with zentri_ask instead of guessing and to record design choices with zentri_propose_decision. It adds “If your agent has the zentri-prd and zentri-adr skills, follow them.” The skills reach each agent as follows.

Agent Where the skills are
Claude Code The kit’s plugin at .zentri/claude-code, with zentri, zentri-prd, and zentri-adr
OpenCode The kit’s .zentri/opencode/skills
Codex with openshell /etc/codex/skills/ in the sandbox
Codex with local-dev None. Copy them yourself.
Another MCP client None. Copy the skill folders, or paste each SKILL.md without its --- header.

The agent saves a first revision with a call like this.

{
"title": "Invoice currency",
"body": "# Invoice currency\n\n## Problem\n\nInvoices show no currency.\n\n## Users\n\nNone.\n",
"base_revision": 0
}

Read a PRD over HTTP with your user token. Leave out revision to get the latest one.

Terminal window
curl -s -H "Authorization: Bearer $TOKEN" "$API/v1/intents/$INTENT_ID/prd?revision=2" | jq

Read the decisions with zt.

Terminal window
zt decisions # accepted and proposed decisions
zt decisions --status superseded,rejected
zt decisions show 0192f3b7 # the full record and its review

Give a local Codex the template skills from a Zentri checkout.

Terminal window
mkdir -p ~/.agents/skills && cp -R adapters/skills/zentri-prd adapters/skills/zentri-adr ~/.agents/skills/
  • No zt command and no MCP tool reads a PRD. zentri_context does not include it. After a 409, the skill tells the agent to read the latest revision, but only GET /v1/intents/{intent_id}/prd can.
  • Zentri writes no PRD or ADR file to your repository. The records live in the coordinator’s database.
  • The skills are guidance. The coordinator does not check that a PRD follows the template, or that feature work has a PRD at all.
  • A local Codex kit carries no skills, and neither does a generic MCP client.
  • The zentri-adr skill asks for a search query of at most 500 bytes and says search returns up to 10 results. The tool accepts 1 KiB and a limit of up to 20.