rdy agent guide v0.51.0

Agent guide

Approvals, policy and disputes

Load this ruleset when you show a card, relay an answer, or work under the authority policy or a dispute.

Approvals and relays

  • At session start, also call rdy_pending and tell the person in one line what waits; do not list it unless asked.
  • Propose at the point rdy_session's propose.cadence sets, by default at a natural break; under changes, propose when a write reply says propose_due.
  • Present a batch card from rdy_pending at the end of an iteration, then each exception on its own; show each option label word for word and never change the options, the recommendation or the version.
  • Relay the person's answer with rdy_answer: pass the card_hash you showed, their words as evidence and your question; interrupt the person only for a blocking item.
  • Use rdy_answer with elicit: true to ask a supporting client to show the card. Never send a request to /~ui/. Use rdy_answer, with elicitation or the person's relayed words.
  • When rdy_propose reports policy accepts, land with rdy_land; else show the card to the person.

Before you ask for an approval, check the propose reply: ready is true, blocking is empty, and no tension has refuses: true. Give the person the live link: rdy_site {scope: "proposal:P-x@n"}. When the proposal changes a publication profile, add profile to that call. Then the person reviews the selection they will publish. Pass on every warning in the reply.

Relay each card in this order:

  1. Call rdy_pending with your session_ref. Find the approve card for your version, and the confirm and defer cards beside it.
  2. Show each card to the person word for word, with the option labels as rdy gives them. Keep the recommended mark and the line Why recommended: <reason>. The approve card counts exceptions but does not show them, so show each exception card too.
  3. Relay each card beside the batch first. An approval waits until every exception has a confirm answer (E_EXCEPTION_OPEN) and the defer card has an answer (E_DEFERRAL_OPEN). Accepting the deferrals changes the approve card's hash. Call rdy_pending again, and show the fresh approve card.
  4. Call rdy_answer {ref, option, card_hash, evidence, question, session_ref, kind: "card"}. evidence is a string, not an object. It holds their exact words, such as the label they chose.

Elicitation. When your client supports form elicitation, call rdy_answer {ref, card_hash, elicit: true} in place of steps 2 to 4. The client shows rdy's own card, and the person's choice goes straight to rdy. A decline or cancel records nothing. On E_ELICITATION_UNAVAILABLE, show the card in chat and relay the answer with option and evidence.

The live site also shows the person's pending cards at /~ui/. That page is for the person. Never send a request to it.

  • Relay only the person's exact words. Never approve, confirm or reject for them, and never fill a gap with your guess.
  • option is the option id from the card (approve, confirm, reject, o1), not its label.
  • The recommended option has recommended: true and a reason (200 characters or fewer). No other option has either.
  • An approve card's reason is one of three fixed texts. Don't rewrite it.
  • The approve card's facts include Justification, Re-affirms and Change plan. Show them as rdy gives them.
  • The approve card and each decision's confirm card have a Related decisions fact. It lists the decisions found by a link. It only counts the rows found by text, as in 2 listed by link, 14 found by text, 0 omitted: …. A card that an older rdy stored can still list text rows. To read the text rows, use the briefing or the fact sheet.
  • A re-affirmation of a one_way decision is an exception with its own confirm card. Other re-affirmations are listed in Re-affirms.
  • Branch on the card kind. Send confirm only to a confirm card. A tension card offers dismiss and later. Never send one option name to every card.
  • A defer card (defer:P-x@n) offers o1 "Accept the deferrals", o2 "Refuse: do them in this proposal" and later. A refusal makes the version not ready.
  • A reaffirm card (reaffirm:<block>@<version>) offers o1 "They still hold" and o2 "Keep them suspect". o1 lands the re-affirmation at once. o2 needs the person's reason in note.
  • defer and reaffirm cards carry no recommended option. Show both options and wait for the person's own choice.
  • A decision that no content applies is an exception, and it needs its own confirm.
  • A decision that only structural blocks carry, such as a publication profile, a folder or a doc, always reads as applied by no content. Show its exception card before the approve card.
  • Before you report a landing, check it: read landing in the answer, or rdy_log. When another landing comes between your propose and your relay, the base moves and rdy refuses the relay. Stop at the first refusal, show the fresh card and ask again.
  • A changed card is refused with the fresh card in corrected, as are E_PROPOSAL_MOVED and E_ITEM_MOVED. Show it and ask again.
  • An approving answer to a version that is not ready fails with E_PROPOSAL_NOT_READY. The message counts the problems, such as P-x@n is not ready: 2 issues. Each entry in issues names one failed check, with its own code and fix. Fix each issue, propose again, and relay the new card.
  • Pass all_recommended (a list of {ref, card_hash}) only when the person asks you to accept every recommendation. It refuses defer and reaffirm cards.
  • A relay checks the question in your view. A view that moved a question cannot relay its answer: relay from a fresh view.
  • Relay only from the session the person talks to. A subagent never relays.
  • A tag is the person's act too: rdy_tag {version, evidence, question}, on their words.
  • The CLI fallbacks are rdy answer <ref> <option> --card <hash> and rdy approve P-x@n. Add --relayed-by <your actor> --evidence "<their words>" --question "<what you asked>". --relayed-by takes your actor alone, without a run. The run comes from your session.

The authority policy

The authority policy is an authority_policy block (ap-…) that a person approves. Its agent_may_accept rules say which versions an agent may land without a person. With no policy block, nothing lands without a person.

  • rdy_policy {op: "init", doc} starts it. It writes a proposed decision and the policy block from rdy's template into your view, and proposes them. The template accepts nothing. A person adds the rules, and each rule change implements a decision.
  • The propose reply and the approve card show the verdict as Policy. When it accepts, land with rdy_land {proposal: "P-x@n"}. CLI: rdy land P-x@n.
  • E_POLICY_HUMAN means the policy needs a person for this version, or your actor matches none of the rule's actors. Show the card and relay the answer.
  • The policy never accepts a version that is not ready, carries a redaction request, changes the policy, has an exception, defers an item that is not a code item, records a direct_ruling or recorded_ruling decision, makes a doc stable, or carries an imported decision status.
  • A landing under the policy records the policy version and is never signed.
  • Never edit the policy unless the person asks. A version that changes it always needs a person.

Disputes

A person disputes a landing that they think is wrong, most often a wrong relay. A dispute shows on the landing and never blocks one.

  • Open and resolve are the person's acts. Relay their words: rdy_dispute {op: "open", landing, reason, evidence, question}.
  • {op: "resolve", dispute, outcome, evidence, question} takes upheld, dismissed or withdrawn. Only the person who opened a dispute withdraws it. Only upheld may name a correcting landing in correction.
  • {op: "list", landing?, open?} lists disputes, oldest first.
  • CLI: rdy dispute open|resolve|list, with --relayed-by, --evidence and --question for a relay.

A snapshot of rdy agent guide at v0.51.0.