Agent guide
Write and change content
Load this ruleset when you create or change content, structure, decisions or links.
Using this guide
rdy delivers this guide through rdy_instructions. No file needs saving, and you download nothing. rdy setup writes three lines at the top of CLAUDE.md and AGENTS.md in the project root, and they tell an agent to call rdy_instructions. It also creates the person's meta project if none exists. Outside a project, and in the meta project, it writes no stub.
It is for an agent that works on an rdy project for a person. rdy computes. You write. The person decides.
From Release 1, a tool, parameter, result field, code or config key changes only with an upgrade path in the same release. A renamed name keeps working, with a warning, for two minor releases and at least 30 days. Message and fix texts can change in any release, so match the code, never the text. After an update, read rdy_schema again.
Agent instructions
At the start of every task, call rdy_session with your own actor and run, or state rdy/actor and rdy/run in _meta. Then call rdy_instructions. It returns every required rule in full, and a menu of the other rulesets. The bootstrap is rdy's one required built-in ruleset, and the rest of this guide is on the menu. CLI: rdy instructions. Until a call succeeds, rdy_overview and rdy_brief carry a reminder.
Writing a rule. When the person states a rule, save it with one rdy_rule call, from any session: rdy_rule {scope, op: "add", text: "<the rule>", why: "<one line>", evidence: "<the person's exact words>"}. CLI: rdy rule add. If the person answered your question, pass that question as question. To change a rule, use op: "edit" with its id. To retire one, use op: "remove" with its id, and no text.
- Scope.
personis the person's meta project, for their preferences and their rules for all work.projectis this project, for a rule specific to it. Ask the person only when you are unsure. - Evidence. Pass the person's exact words, never your own. Use
rdy_ruleonly for a rule that the person stated. A subagent never relays, so a subagent never callsrdy_rule. rdy cannot check either rule. - Wording. When your
textgoes beyond the person's words, show it to the person before the call. After each landing, tell the person where the rule went and show all the saved wording, fromrule.text:Saved to your own rules, for all your projects: "<rule>".If the place or the wording is wrong, the person says so, and you correct it the same way. - Default place. With no
ruleset, the rule goes inMy rulesorProject rules. rdy creates these docs on first use, withrequired: true. With noapplies_to, the selector isall. - Rules for some work. A required doc delivers every rule in it, so a narrower selector there is only a hint. It shows in the menu's
hints, and the rule still arrives on every task. For a rule meant only for some work, passrulesetwith a named ruleset that is not required, and a narrowerapplies_to. A rule withallarrives on every task, wherever it is. Tell the person the ruleset's name.rdy_ruledoes not create a named ruleset (E_NOT_FOUND). Create it by the normal path below. - Stops. The reply can stop before the rule lands:
state: "card": the policy hasrules_from_chat: card. Show the card as it is. Then relay the answer:rdy_rule {scope, answer: {ref, option, card_hash, evidence, question}}.state: "not_ready": readissues, then finish the open proposalrefby the normal path. Forscope: "person", use a session on the meta project.corrected.state: "normal_path": the change touches stable content (E_BRIEF_REQUIRED), or the rule's decision governs other blocks (E_BAD_INPUT). Briefcorrected.blocksand use the normal path.E_NO_PROJECT: do what its fix says. With no meta project, the fix isrun rdy setup.
Writing a rule by the normal path. Use this path for the stops above and for a named ruleset. For a rule that you inferred or want to suggest, ask the person first, or use this path and show the card. Record the rule as an instruction block under a doc or section, with a decided_by link to the decision that is its reason: {"op":"create","type":"instruction","parent":"<doc>","body":"<the rule>","fields":{"applies_to":["all"]},"links":{"decided_by":[{"target":"D-…"}]}}. Read rdy_schema {block_type: "instruction"} for its fields. CLI: rdy new instruction.
- A selector is
all,area:<name>,type:<block type>oract:<act>. A rule withall, or any rule in a doc withrequired: true, is required. - A named ruleset is a doc that holds
instructionblocks. Leaverequiredoff. Its lead paragraph becomes the menu'swhen, so say there when to load it. - The person's own rules go in their meta project,
~/.rdy/metaby default. Outside an rdy project,rdy mcpserves it. - Propose the rule like any change. It is in force after it lands.
- Pass on
W_INSTRUCTION_SELECTOR: thearea:selector names an area that the pack lacks, so it matches nothing yet.
Ground rules
- The person talks to you in chat. You do the work through the rdy MCP tools, and you relay the person's decisions.
- Don't ask the person to run routine rdy commands. The CLI is a fallback.
- Use the tools only. Never edit files under
.rdy/, the working copy, an export or the rendered site. - When you run the
rdyCLI, setRDY_ACTORto your ownagent:actor on every call. Never run it as the person. - Never claim a
human:actor. An agent session with one fails withE_PERMISSION. Relay the person's words instead. - When a command fails with
E_BAD_INPUTbecause the configuredactoris outside the actor form, tell the person. The fix names the file. Don't edit it yourself. - Never approve, tag or answer on your own judgment. Every one of those acts relays the person's own words.
- rdy refuses a tag from an agent session unless it relays the person's words. See "Approvals and relays" in the
rdy:approvalsruleset. - When an error says a store is open or locked, read the code.
E_LOCKEDmeans another process holds the store: stop that process or use the daemon.E_HELD_BY_READERmeans an earlier read state in this process holds it: release that state and try again. - "No suspects" means no stale pins. It does not mean that the content is correct.
Structure first
When you start a project or a new area, plan the tree first: folders by area, a doc type for each doc, decisions recorded with rdy_decide and no parent, open questions as question blocks and terms in the glossary; show the person the plan before the first content write.
A flat list of pages is the most common failure. These details make the plan work:
- Create a folder with
{"op":"create","type":"folder","fields":{"name":"billing","title":"Billing","description":"…"}}. Don't use a name prefix such asbilling-overviewin place of a folder. - A doc or folder name uses only
A-Z,a-z,0-9,.,_and-. A name that reads as a block id fails withE_BAD_NAME. Ford-andfd-ids, rdy ignores case. The refusal carries a fixed name incorrected. - Give every folder a one-sentence
description, and open every doc with a plain lead paragraph. - Use the
pagedoc type only when no other type fits. One topic per doc: split a long doc into sections, not into sibling docs. - A question's
promptstates the product question and its options. Put your own advice in chat. - Close a question with a decision that has an
answerslink to it. Never write the answer into the question. - Define each term as a
termblock in the doc that explains it. The site's glossary page collects them. - To fix a flat project, create the folders, then move each doc with a
moveop. A move keeps block ids and history.
Show the person the plan as a tree, as in this example. A doc then moves before any content exists.
billing/ folder: How customers pay and get refunds.
overview doc, type overview
invoices doc, type components
refund-flow doc, type flows
limits doc, type constraints- Put each term in the doc that explains it, beside the content that uses it. Never create a doc only for terms.
- A decision needs no content doc.
rdy_decidewith no parent puts it in the decision home, and content links to it withdecided_by. - Only decision, question, finding and source blocks may sit at the project root or directly in a folder. Every other block goes in a doc. A pack's own supporting type keeps the parent rule that its pack gives.
The loop, for every change
- Start. Call
rdy_sessionwith your ownagent:actor, arunnamed for the task, and rolewriter. Keep the run name when you resume. See "Actors and runs" inrdy:troubleshootfor the form of each. Then callrdy_instructions, as "Agent instructions" says. - Brief. Call
rdy_briefon the blocks you will change, or on a doc withpath. To brief one section, pass<doc>#<heading-slug>. To create a block, brief its parent. Readgoverns: "Decisions and their links" says what to check when you change a block's text. - Write. Pass the briefing's
base.tokenstring asbrief, not the whole briefing. AnE_BRIEF_REQUIREDorE_BRIEF_STALEreply carries a fresh briefing: retry with itsbase.token. - Answer the consequences of each write, as "What each consequence asks" in
rdy:after-writesays. Brief again before each follow-up write. - Check. After your last write, run
rdy_suspectsandrdy_tensionswithscopeset to your view. Clear what your changes caused. - Plan. Read
rdy_planfor your view. Close or answer each item, as "Change plans" inrdy:after-writesays. - Propose. Call
rdy_proposewith a plain-wordstitleand asummary. A version without a summary gets no card:rdy_pendinglists it undernot_ready. - Land or ask. When
readyis false, fix each issue and propose again. Whenpolicy.verdictisaccepts, land withrdy_land. Otherwise relay the card, as "Approvals and relays" inrdy:approvalssays.
Propose once per iteration, at the break that propose.cadence sets. Propose again only when the view changed since the last version.
To see what your view changes before you propose, call rdy_diff {from: "view:<run>"}. See "Reading changes" in the rdy:read ruleset.
- Brief before editing (
rdy_brief); writes to stable content must cite a briefing (brief: <token>). - Before editing a block, read it with format markdown or yaml: compact lines are a summary.
- Work in your own view; include others' changes, never write into their views.
- When a block comes back as a consequence a second time in a session, do not rewrite it again: confirm it (repin) or ask the person, and show what remains as a change plan.
Decisions and their links
decided_byis a link you write on a content block: this decision governs the block.- When you change what a block says, read its
decided_byandimplementslinks against the new text, on aneditorialwrite too. Add the decision that the text now rests on. Remove a link that the text no longer rests on. A wrong link gives the block a wrong as-built status and a wrong "Why?" trail. rdy cannot judge this for you. implementsonrdy_writesays that the change carries out these decisions. rdy adds animplementslink to every block that the write creates or edits. It skips decisions, questions, findings, sources, docs, folders and sections, but not notes.- So group writes by each block's own governing decisions. Name only the decisions that the new text carries out, not every old link. Never pass a whole list of decisions on one write. Write scaffolding and planned notes in their own write.
- A write takes one justification:
implements,editorial: {class, reason}orreflects. The editorial class istypo,restructureorclarify. "Sources, findings and code" inrdy:as-builtexplainsreflects. - The approval card's Justification fact shows each claim, such as
implements D-…oreditorial clarify: <reason>. - An accepted decision is frozen (
E_FROZEN). Only its tracking fields change, such as a disposition, and each such edit needseditorial. - An update replaces only the link kinds it names, and
"<kind>": []removes that kind. Read the block first, and send the full list for each kind you name. $nameplaceholders work only inside one write, also as{{$name}}in text. The create must come before every op that names it.- Keep a chain of creates that name each other in one write. When you must split creates across writes, replace each placeholder with the real id of the block already written. Group by each block's own decisions even in a recovery write.
- New blocks that name each other in text (a cycle) need two writes. Create them with the references left out, then update the text with the real ids.
- Give each decision a
title(80 characters or fewer) and awhy(160 or fewer). Card option labels take 60 or fewer. - A question's
recommendedis the exact text of one option, nevero1. A wrong form only warns (W_CARD_WORDS).rdy_answerstill takes option ids such aso1. - Give every recommendation a reason:
recommend_reasonon a question, andrecommendwithrecommend_reasonon a decision.recommendtakes onlyconfirmorreject. Write it in one line of 200 characters or fewer. rdy warns when it is missing or long. - Add a new block's
affectsanddescribeslinks in the write that creates it. A later link-only edit makes every pin on the block go stale. Still remove a wrong link. - Before you supersede, count the blocks in the briefing's
dependents. If only the reason changes, refine instead, or supersede withpart. - After a supersede, move each citing block's links to the new decision yourself.
- For a process ruling that no content carries, pass
fields: {needs_content: false}. Otherwise the card shows the decision as an exception. - Before you choose a decision key, look it up with
rdy_searchand check for an exact match. Never pick one from an export. authority_basisisdirect_ruling,recorded_ruling,delegated,precedent,elimination,noneorreconstructed. Adelegateddecision needsattested_by, which names who ruled and under whose mandate.decided_at,recorded_at,effective_fromandreview_bytake an RFC 3339 UTC time, such as2026-10-21T15:10:58Z, or a date, such as2026-10-05.
Briefing a new decision. rdy_decide, rdy_supersede and rdy_revoke each create a decision under a parent. The parent is the doc, section or folder in parent. When you leave parent out, it is the project's decision home, or the project root when the project names none. rdy_schema names the decision home.
- Brief that parent. A briefing of the old decision does not cover it.
rdy_decideandrdy_revoketake the token asbrief.rdy_supersedetakes it insidedecision, asdecision.brief.- The
E_BRIEF_REQUIREDrefusal names the parent, as<id> (the parent of the new decision). It carries a fresh briefing: retry with its token.
rdy_decidetakes its own parameters. It has nomessageand nosupersedes. To supersede, userdy_supersede.
- When the person states something that should hold, record it at once with
rdy_decideas a proposed decision, in their words, and say so in one line. - A decision is worth recording when every agent should keep to it next month; a passing preference is not.
- Record a decision with
rdy_decideand no parent: it goes to the decision home, or to the project root when the project names none; link content to it withdecided_by, and never put a decision in a content doc or create a doc to hold decisions. - When a change retires only some of a decision's rules, supersede that part (
rdy_supersedewithpart), not the whole decision. - While coding, a change within the design is just code; a gap is a proposed decision plus the doc update; a contradiction is a finding plus a superseding decision, and you stop when it is blocking or
one_way.
Reconstructed decisions. A decision that you infer from existing code or a running system, and that nobody ruled, is reconstructed.
- First record what you read as a finding. Quote the code with its path and lines, or the system's output, in
evidence. - Then call
rdy_decidewithauthority_basis: "reconstructed"and adepends_onlink to the finding. Say inbodywhat you are not sure of, and why. - Keep it proposed. No authority policy can accept it, so it lands only when a person approves. It keeps the basis after that.
- Only a
direct_rulingis precedent for agents. When you find a reconstructed decision, cite it, and ask the person before you act on it.
Revising a decision
Revise a decision when the person changes its rule, its reason or its scope. Other content and code rest on it, so do these steps in order:
- Brief. Call
rdy_briefon the decision. Count the blocks independents, and read each one that the change can touch. - Choose the act from the table below. When you cannot tell which row applies, ask the person.
- Write the one change. For a new decision, brief its parent, as "Briefing a new decision" says.
- Repair the links. After a supersede, move each citing block's
decided_byandimplementslinks to the new decision. Send the full list for each link kind that you name. - Answer the consequences, as
rdy:after-writesays. A refine or a part supersede givesconfirmentries: check each block, and edit only a block that no longer holds. - Propose. Read
rdy_planand close each item. Then callrdy_proposewith a summary that names the old decision, the act and the reason.
| When the decision | Act | Call |
|---|---|---|
| still holds, and a change only made it suspect | re-affirm it | a reaffirm op in rdy_write |
| keeps every rule, and gains a condition, a limit or a new reason | refine it | rdy_decide with refines |
| loses some of its rules, and the rest still hold | supersede that part | rdy_supersede with part |
| no longer holds, and a new decision replaces it | supersede it | rdy_supersede |
| no longer holds, and nothing replaces it | revoke it | rdy_revoke |
Examples:
- A decision says "Invoices use the customer's currency." The person adds that an invoice with no currency uses euros. No rule retires, so refine it.
- A decision says "Refunds take 14 days, and they go back to the card." The person now allows a refund to a balance. The 14-day rule still holds, so supersede only the part "they go back to the card".
Adjustments while you code
While you code, sort each change to the design into one of three cases before you continue. Never change the design silently.
| Case | How you know | What you do | Example |
|---|---|---|---|
| Within the design | The design covers the change, or leaves it as an implementation detail. | Write the code. Cite the blocks in the commit's Implements: trailer. | The spec lists the line items of an invoice. You keep them in a vector. |
| Fills a gap | The design is silent, and every agent should keep to your choice next month. | Record a proposed decision with rdy_decide. Keep coding, and update the doc in the same view. | The spec does not say how to round tax. You round half to even, and every invoice must agree. |
| Contradicts the design | The code cannot keep to a decision, as a test or the system shows. | Record a finding with evidence. Propose a superseding decision that depends on it. | The spec says that refunds go back to the card. The payment provider refunds only to a balance. |
For a contradiction:
- Record the finding with
rdy_write, typefinding, as "Sources, findings and code" inrdy:as-builtsays. Quote the failing test, the error or the code, with its path. - Supersede the decision with
rdy_supersede, and give the new decision adepends_onlink to the finding. Its change plan lists what to update. - Stop and ask the person when the contradiction blocks the work or the decision is
one_way. - Otherwise keep coding. Commits cite the proposed decision, and that code stays provisional until the person rules. A rejection flags those files for rework.
Content cited from a linked project
- Content cited from a linked project is read-only here. A write that edits, moves, deletes, supersedes, refines or revokes it is refused with
E_FOREIGN_READ_ONLY. - Write a citation as
{{<alias>:<id>}}. The alias must name a repo link, and the block must be in what that link delivers. - To depart from a cited decision or instruction, propose a decision with
deviates_from: ["<alias>:<id>"]. A person confirms it. A locked organization or team instruction refuses it withE_INSTRUCTION_LOCKED: add an instruction on top of it instead. - A delivery moves no pin. When it changes a cited block, an adopt card in
rdy_pendingasks the person to adopt the new version or keep theirs. Relay the person's answer, as for any card. - When the home project delivers back a copy of a local decision, supersede the local one with
rdy_supersede {old, adopted_as: "<alias>:<id>"}. A person approves the landing. - A repo link widens what governs the project, so a person approves it. The authority policy never accepts it.
Links and Grounded
Grounded measures how well content ties to what it is about. It checks mentions only on normative blocks, such as requirements, constraints and claims.
- Tie each content block to what it is about. A block with no tie gets the check
untied_content. - Link each entity that a normative block names. An unlinked mention there counts against Grounded. When the mention is only in passing, dismiss it with
rdy_resolveand a reason. - On prose, notes and other informative blocks, an unlinked mention is only a link suggestion. It adds no check. Accept the suggestion when the block is about that entity. Ignore a passing mention.
- An entity with
everyday: truegets no link suggestions anywhere. - Don't add links only to raise the score.
- Search a thing's name, key or alias with
rdy_searchto get its fact sheet. - Write responses carry suggestions (links to the entities your text names, new entities for literals that recur): accept the right ones with one
rdy_acceptcall; they never block. - Fact sheets, search hits and briefings carry a confidence level: act on high; on medium or low, widen the search, fix the coverage issues you can, or ask the person before you act.
- Link every entity a normative statement names, and elsewhere the entities a block is about; dismiss a passing mention of an everyday word with
rdy_resolve(mention, dismiss).
Examples:
- You search
refund windowbefore you change the refund rules, and the fact sheet has confidencemedium. Search its aliases, and read the decisions that govern the refund docs. Link it from each normative block that names it. If the confidence is still medium, ask the person before you change a rule. - A requirement says "An invoice shows the customer's tax number." Link the
invoiceandtax numberentities, because a normative block names both. A prose line that says "See the invoice rules" only passes by. Ignore its suggestion: a mention in prose adds no check. - Never link a block to an entity that it is not about. A link added only for the score gives a wrong "Why?" trail.
New assessments use method 2. A stored method-1 assessment keeps its old scores, so the same content can score differently in an older version. Don't compare scores across methods. A score that rises with the move to method 2 shows a new method, not better docs. Never tell the person that their docs improved because of it.
Hygiene
- Stop at the first failed write. Read the view before you run anything again.
- Change each block at most once per write. To edit and move a block, use one
updateop withmove_to. - When a decision narrows or reverses a rule, find every statement of the old rule. Search its words, and search with
governed_by. - Before you propose, read each section that you changed from top to bottom. Two blocks on one page must not contradict.
- Before you propose a decision, read its related decisions and the neighbours in its section. Search for closed lists that it changes.
- When a block states an exception, link it to the block that states the rule.
- Search the terms (
rdy_search,typesset toterm) before you introduce a term or a field name. - Before you remove or move a doc, brief it and read each block in
dependents. - Don't write decisions that sit in a sibling view's open proposal.
- A list of ids in a hand-off names the project that holds each id. Read an id only in its own project.
- Quote decisions from
rdy_read, not from the site or an export. - When you retitle a doc, decide its
nametoo, because the name sets its page path.
- To show a ref as plain text, put a backslash before its two opening braces. Without it, rdy reads the text as a ref, and a ref to no block fails with
E_UNKNOWN_REF.
- A list item can hold more paragraphs and fenced code. Indent each part past the item's marker, with a blank line before a new paragraph. Code in an item is literal: a ref in it is not read as a ref and adds no link.
- A section with
collapsed: trueshows closed until the reader opens it. Collapse a section only when the person asks, such as for a long optional part. Links, search and the page index still reach its text.
with an HTTPS URL puts an image from another host in block text. The site and the prints show its alt text, and Markdown outputs keep the image.- A figure can carry a dark image: set
dark_blob, fromrdy_asset, anddark_media_typetogether. The project's first dark image turns on the store featurefigure_darkfor good, and rdy 0.50.0 and older then refuse the project. Ask the person before you add the first one.