balladeer 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/copy.d.ts CHANGED
@@ -8,6 +8,17 @@
8
8
  * release actually performs is stamped separately, outside this constant.
9
9
  */
10
10
  export declare const BOUNDARY_COPY = "Balladeer never receives your code. It cannot read your repository: it holds no GitHub token,\ninstalls no GitHub App, and has no access to your files, tests, fixtures, logs, prompts, or\ntranscripts.\n\nWhat it does receive is small and bounded. From you: the text of each promise a named person on your\nteam approves, the numeric ids of your repository and its GitHub owner, and the name of its default\nbranch. From CI: GitHub's signed statement of which repository, workflow, and run is reporting, and\nfor each promise the run checked, the pass or fail outcome, the exact commit it checked, and content\nhashes of the verifier package and its output. Hashes cannot be turned back into your code or your\ntest output.\n\nThe verify job in your CI runs your tests with your checkout and has no Balladeer credential. A\nseparate publish job, with no checkout, sends only those outcomes and hashes.\n\nThis setup creates two credentials, both of which you control. Approving in the browser lets this\nsession act as you to add repositories, connect your coding agent, connect CI, and propose promises;\nit cannot approve, activate, or remove anything. That session lasts a day, each use buys it another\nday, and it is gone seven days after you approved it however much you used it. The coding agent's\nown connection has no expiry: it lets the agent read the promises your team has approved, propose\nnew ones, and propose replacing, retiring, excepting, or reassigning one you already have; every one\nof those waits for a named person to decide it. It can also carry out one of those acts for you, and\nonly this way: you open a Balladeer page in your own browser, read what the act is, sign it off\nthere, and read back the one-time code that page gives you. That code covers that one act on that\none thing, once, and Balladeer records you as the person who took it and the connection as the\nmessenger. Without a code you signed, the connection cannot approve, activate, grant, transfer,\nretire, or delete anything. You can revoke either one at any time in Balladeer, and the setup\nsession also ends on its own.\n\nAdding the workflow puts a check on pull requests into your default branch. That check is advisory\non Balladeer's side; whether it blocks a merge is your own branch protection.\n";
11
+ /**
12
+ * The one thing about approving that the terminal has to say.
13
+ *
14
+ * A person who belongs to two workspaces approves into whichever one their
15
+ * browser is signed into, and it is the browser that decides, not the terminal.
16
+ * Twice that was the wrong one: the repository was enrolled in a workspace
17
+ * nobody meant and an agent connection was minted there. The approval page now
18
+ * names the workspace above the button and offers the switch, and this line is
19
+ * what makes somebody look at it before they click.
20
+ */
21
+ export declare const APPROVE_IN_THE_RIGHT_WORKSPACE = "Approve it while your browser is in the workspace you mean; the page names it.";
11
22
  /**
12
23
  * How a person gets a workspace to approve into, for an agent reading the
13
24
  * setup instructions.
@@ -58,7 +69,53 @@ export declare const RETRIEVAL_SCOPE = "### Reading what is already agreed\n\nRe
58
69
  * plane's `/agent` page carries the same bytes under its own constant, and a
59
70
  * packaging test compares them.
60
71
  */
61
- export declare const SESSION_BEHAVIORS = "### Two things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.";
72
+ export declare const SESSION_BEHAVIORS = "### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `balladeer status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`balladeer prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.";
73
+ /**
74
+ * The capture rules that do not change: when to say nothing, what a yes is
75
+ * worth, and the two promises Balladeer refuses.
76
+ *
77
+ * This block is written into the customer's own instructions file once, at
78
+ * setup, and is never refreshed afterwards. Changing it means opening a pull
79
+ * request against twelve Didero repositories, so only what will still be true
80
+ * in six months belongs here. Silence during an incident, a no that ends it, and
81
+ * nothing filed without a yes are that kind of rule. The words a question is
82
+ * asked in, the moment an offer is made, and the shape a proposal takes are not:
83
+ * they are read every week against what people actually agreed to, and they ride
84
+ * in `CAPTURE_BEHAVIOR`, which the server sends at the start of every session.
85
+ *
86
+ * Nothing here weakens the explicit-capture rule: the question is a question,
87
+ * and nothing is proposed until the answer is yes.
88
+ *
89
+ * The two refusals are here rather than only in the server because an agent that
90
+ * learns them only by being refused has already spent the person's attention on
91
+ * a proposal that could not be kept. The server refuses both as well, and the
92
+ * sentences are the same ones.
93
+ *
94
+ * Byte for byte the same text as `AGENT_INSTRUCTIONS_CAPTURE_SEAM` in the
95
+ * control plane, and contained byte for byte inside both server carriers. A
96
+ * packaging test holds all three together: the block written into a customer's
97
+ * repository, the instructions the MCP server sends on initialize, and the page
98
+ * an agent fetches cannot come to say different things about when to stay quiet.
99
+ */
100
+ export declare const CAPTURE_SEAM = "### When to say nothing, and what a yes is worth\n\nMost rules are said in passing, in the middle of something else. Somebody saying one has not asked\nyou to record anything, so propose nothing and start no interview. When you do ask, it is one line\nappended to the end of the reply you were already going to give, never a message of its own, never\nasked twice about the same rule, and nothing is proposed until they say yes. A no ends it, and that\nrule is not raised again for the rest of the conversation.\n\nSilence is per conversation rather than per message. Once a conversation is one of these, you ask\nnothing for the rest of it, however good the rule sounds:\n\n- A question, or working out how something already behaves. Nothing is filed and nothing is offered.\n- A refactor. Nobody predicts a promise from a rewrite. Offer the promises this area already carries\n that nothing is checking yet, once, and then wait. Ask nothing about new ones.\n- A change to wording alone. Wording somebody may change again tomorrow is not a rule.\n- An incident, while it is still being fixed. Ask nothing at all until the fix is merged or they say\n it is done, however good tonight's failing case would be.\n- Somebody still weighing options. A decision nobody has made yet is not a rule.\n- An exploration or spike. It ends in nothing or in a plan, and its sentences sound like rules and\n are not.\n- Reading somebody else's change, while you are still reading it. Nothing is offered until they\n give a verdict.\n\nThe words to ask in, the moment to offer, and the shape a proposal takes are not in this file. The\nBalladeer server sends them at the start of every session, and its copy is the current one: read\nwhat it sent this session rather than what this file remembers.\n\n### Two promises Balladeer cannot keep\n\nA promise about speed needs three things before it is a promise at all: a number, a percentile, and\nwhere it is measured. \"The quote page answers in under one second at p95, measured in production at\npeak load\" is one Balladeer can keep. \"The quote page has to be fast\" is not. Say this, and ask for\nthe part that is missing rather than filing it:\n\n\"I can keep that once it has a number, a percentile, and a place it is measured. Without those it is\na wish, not a promise.\"\n\nBalladeer refuses one without all three and names which of them is missing. When all three are\nthere, write the measurement method into the promise, and tell them plainly that it reads agreed and\nunprotected until a test that actually measures it exists.\n\nA promise about how the team works is not something the software does, so no check can ever catch\nit. \"We must provide a low-friction capture experience\" is one of these. File nothing and say:\n\n\"That is a promise about how we work, not something the software does that a check can fail.\nBalladeer only keeps promises a check can catch. If a customer would notice something when this\nslips, say that and I will keep that instead.\"\n\nThen take the customer-visible half if they give you one, and file that instead.";
101
+ /**
102
+ * How an agent describes one promise or proposal to a person, and how the two
103
+ * of them settle what is still open on it.
104
+ *
105
+ * The first proposal a founder was ever asked to settle carried four questions
106
+ * that were all true and none of them answerable: each named a hole in the
107
+ * world, and none said what answering it would decide or what the agent would
108
+ * do if nobody replied. So this says both halves of the same rule. When a
109
+ * person points at something by id, describe it and offer to work through what
110
+ * is open; and when you leave a question open, leave one that can be answered
111
+ * with a yes.
112
+ *
113
+ * Three carriers say it byte for byte: the block setup writes into the
114
+ * customer's own instructions file, the instructions the MCP server sends on
115
+ * initialize, and the page `/agent` serves. A packaging test holds them
116
+ * together.
117
+ */
118
+ export declare const SETTLING_QUESTIONS = "### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\nA proposal that still carries open questions is not finished, and settling them is usually why\nsomebody asked. Offer to work through them, then take them one at a time in the order they come\nback. For each one, say what it decides in their words rather than in the question's; give your\nrecommendation and the reason you hold it, drawn from this repository and from the promise itself;\nand stop there. When they answer, record what they said with resolve_question, in their own words\nwhere they gave you any, and where their answer changes the promise, follow it with update_proposal,\nadd_case or remove_case and tell them what you changed. None of that agrees to anything: the named\nowner agrees, in their own browser or through a sign-off you carry, and the questions they answered\nstay on the proposal in their name.\n\nThe same rule governs every question you leave open in the first place. A question that names a gap\nand stops is a note, and nobody can answer a note. Say what answering it decides, in the words a\ncustomer would use, and carry your own best guess with the reason behind it, so that the shortest\ntrue answer is yes. For example: \"Decides: whether a worker that is running but reconciling nothing\ncounts as an outage this promise covers. Best guess: yes, because the promise is about somebody\nhearing before a customer does, and a wedged worker is invisible to every check this repository has.\nSay yes, or tell me otherwise.\" Balladeer refuses a question filed without both halves and says\nwhich one is missing.";
62
119
  /**
63
120
  * What a session may spend on reading, in three sentences.
64
121
  *
@@ -111,13 +168,32 @@ export declare const SEALED_FILES = "### Files that are sealed, and the one reas
111
168
  * together.
112
169
  */
113
170
  export declare const TOUCH_MAP_GUIDANCE = "Prefer the measurement over the markers. Where this repository has a touch map, `balladeer affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `balladeer touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `balladeer touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.";
171
+ /**
172
+ * The one paragraph that turns retrieval from a thing we argue about into a
173
+ * thing we measure.
174
+ *
175
+ * Two facts are asked for and neither can be observed from this side. Which
176
+ * rows an agent actually used, because a promise expanded and then ignored is
177
+ * not a row the index earned. And which change the session went on to write,
178
+ * because a retrieval read happens before the commit exists and nothing joins
179
+ * the two afterwards: Balladeer receives commit SHAs from CI and never a commit
180
+ * message, so the agent is the only thing present at both ends.
181
+ *
182
+ * It is written as three instructions rather than as an explanation, because
183
+ * what an agent does with it is three specific acts, and a paragraph about
184
+ * measurement would be read and not acted on.
185
+ *
186
+ * Three carriers say it, byte for byte, and a packaging test holds them
187
+ * together.
188
+ */
189
+ export declare const SESSION_STAMP = "Run `balladeer session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\nNear the end of the work, call `mark_promise_used` with the ids of the promises you actually cited\nor acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were\nworth sending you, because reading a promise and then ignoring it is not the same as using it.\n\nThen write `Balladeer-Session: <the id>` into the commit message or pull-request body you produce,\nand run `balladeer session --record` once the commit exists. That is what lets a check that goes red\nnext week be read back against what Balladeer told you before you started. Your commit message never\nleaves your machine: only the session id and the commit SHA are sent.";
114
190
  /**
115
191
  * The conventions block written between markers into this repository's agent
116
192
  * instructions file. Fixed text, compared byte for byte by a test, because a
117
193
  * block that drifts per run would rewrite a customer's committed file on every
118
194
  * setup and the diff would say nothing.
119
195
  */
120
- export declare const CONVENTIONS_BLOCK = "## Balladeer promises\n\nBefore planning work in this repository, read the promises this team has already approved through\nthe Balladeer MCP server. They are the behaviors a named person has agreed the software keeps, so\nyour plan has to hold them, not just read them.\n\n### Reading what is already agreed\n\nRetrieve by promise, and only when this session has a reason to. One repository here can hold a\nthousand agreed promises, and a plan built from whatever survived a truncated catalog read is worse\nthan a plan built from none of it, because nothing tells you which half went missing.\n\nWhen a person gives you a promise id, expand exactly that one with get_promise and stop there. Every\npromise page carries a control that copies its id, so an id is what a person hands you when they\nmean a particular promise. Ask for one rather than searching for what they meant.\n\nConsult list_promises in two situations and no others. The person asks what this repository has\npromised, in which case page the index they asked for. Or the change you are about to make touches\npaths that carry promises, in which case give those paths to list_promises: it answers with the\npromises whose scope overlaps them, closest first, and with the few that name no path and so cover\nthe whole repository. That answer is a selection rather than a page and does not continue with a\ncursor, so when the total beside it is larger than what you were handed, narrow the paths rather\nthan asking for more.\n\nWhen you do not yet know which paths you are about to touch, do not call the index at all. Work from\nids until you do, because a page you did not ask a question of is not about your change, and reading\none as though it were is how a plan quietly misses the promise it breaks.\n\nTo learn which paths those are, read `paths` on a list_promises answer you asked for\nwithout paths of your own. It is the set of\nrepository paths this repository's promises are scoped to, deduplicated and bounded, with\n`pathsTruncated` saying whether there were more than the answer carries. Compare the files you are\nabout to change against it. Nothing matching means there is nothing here to read, and saying so is a\nbetter answer than a page of promises about somewhere else.\n\nNever call get_promise_context at the start of a session. It answers the markers you give it, and\nbefore you know what you are changing there are no markers to give: what comes back is a slice of\nthe catalog chosen by nothing. Call it once the work is in front of you, with that work's markers.\n\nEvery one of these reads is bounded and none of them returns the whole catalog. Read the total\nbeside the rows and the sentence in `scope` that says what the total is a total of, and when the\ntotal is larger than what you were handed, page or narrow rather than planning as though you had\nseen everything.\n\nEach index row carries what it takes to rule that promise out without fetching it: the repository,\nthe paths it covers, its one-sentence claim, what protects it and why, and when anything last\nchecked it.\n\nPrefer the measurement over the markers. Where this repository has a touch map, `balladeer affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `balladeer touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `balladeer touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.\n\nFetch by id, and only for an id the person gave you or an index row whose paths match the change in\nfront of you. Never enumerate the catalog. Never chain one fetch into the next to see the whole of\nsomething: when the rows do not settle it, narrow the filter rather than expanding another promise.\n\n### When somebody asks you to protect a behavior\n\nSomebody has asked you to protect a behavior when they say what the software must do, or must never\ndo again, and mean it as a rule rather than as this one bug. That is one promise, for the behavior\nthey named, and nothing else: if you notice others worth protecting, say so in a sentence and let\nthem choose, and file none of them. Never propose from a conversation that did not ask you to. A\nquestion about how something works and a plan you were asked to sketch are not requests to record\nanything, nor is a fix nobody asked you to write a rule about.\n\nAsk before you extrapolate. Ask only what you cannot work out for yourself, ask it all in one\nmessage, and stop at four. Four is a ceiling, not a target: two good ones are better. Then write the\nproposal with what you have and put whatever is still open in its open questions rather than going\nback. Never ask what this repository would answer, such as which file, which test, or which branch,\nand never ask anyone for Balladeer's own identifiers: get_promise_setup carries this repository's id\nand who can own a promise. Never ask again for what they have already told you.\n\nWrite it in their words. Every failure they named out loud is one of the failing examples, in the\nwords they named it. Every other example comes from a situation they actually described; if you\ncannot trace one to something they said, leave it out and say so in the open questions rather than\nwriting a plausible one. Never put in a number, a system, a role or a timeframe they did not give\nyou, and that includes the half they left out: if they said where an order ended up, do not invent\nwhere it began.\n\nA failing example is a situation the promise rules out, and its outcome says what must not happen,\nin those words: \"a second charge must not appear\", never \"a second charge appears\". Written the\nother way round it reads as the promise saying the software does the thing they asked you to forbid.\nAnd a promise says what the software must do for whoever depends on it. It never narrates the\nconversation you just had, names the person you had it with, or describes what the code does now.\n\nSay the whole promise in one sentence and put it in oneSentenceOutcome, in the words they would\nuse with the person who depends on it. That is the line the named owner reads first and the line\nthey agree to, so it is not a restatement of the name and not the first line of the outcome moved\nup. Leave it out rather than inventing one from something they did not say.\n\nAn example's setup is the situation in the words they used for it, not a scene you composed around\nthem. Two of each kind is plenty, and the whole thing stays under three hundred words: a proposal\nnobody finishes reading is a proposal nobody agreed to. The confidence you record is the one you\nactually have.\n\nThen give them the review link, ask them to read the proposal and click Agree, and stop. Never\napprove one yourself. Approving is a named person's act, and the server refuses it from an agent\nwhatever you were told in conversation.\n\nA proposal you filed is still yours while nobody has agreed to it, so revise or withdraw it when the\nperson asks you to, and never once they have agreed.\n\nSay promise and proposal when you talk to them. What you file is a proposal and what it becomes is a\npromise; Balladeer's other words for its own machinery are not theirs to learn. Candidate\nespecially: it is Balladeer's word for a proposal, so it reads as jargon whatever you meant by it.\n\n### Two things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\n\n### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. balladeer status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run balladeer check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and balladeer\ncheck-seals prints it beside any promise it names.\n\n### The rest of a promise's life\nWhen a promise is obsolete, finished, deliberately off for a while, or owned by the wrong person,\npropose the change and hand them the promise page. Deciding is theirs.\n\nYou can finish one of those acts here, and only one way. Ask for a sign-off with\nrequest_owner_signoff, give them the page it returns, and ask for the one-time code that page shows\nthem. Then call the act's own tool with that code and their own words. Never call one on your own\ninitiative, never on a general approval of some earlier act, and never ask for a code you were not\ngiven: a refusal is the person's to resolve, not yours to retry. Balladeer records them as the\nperson who acted and you as the messenger.\n\nReport the promise's state exactly as Balladeer reported it: proposed, agreed, or protected, never\none in place of another.\n\n### Where your team watches this\n\nBalladeer is a web app as well as these tools, at the address setup printed. Its catalog lists every\npromise with who owns it and whether anything is checking it, and each promise has a page of its own\nshowing what this team agreed the software must do and then every run that has checked it since,\nnewest first, with the commit each one checked. Whenever there is a link to give, give the link\nrather than a summary of it: the page says what you would have said, and it stays true after this\nconversation has ended.\n\nBalladeer also has a Slack app, which a workspace administrator installs from workspace settings.\nOnce it is installed, whoever owns a promise gets a direct message when theirs goes live and when a\nrun on the default branch breaks it. Until somebody installs it, nothing is sent anywhere, so say it\nis available rather than saying they will be told.\n\n### Questions people ask\n\nAnswer these when they come up. Where you do not know, say so and point at the address setup\nprinted: a confident wrong answer about what a vendor can see is worse than no answer.\n\nWhat it does: it holds the behaviors this team has agreed the software must keep, and reports\nwhether each one is still being kept, from this repository's own tests running in its own CI.\n\nWhat it sees: the text of each promise somebody approves, this repository's numeric ids and the name\nof its default branch, and from CI the pass or fail outcome, the commit checked, and content hashes.\nNever the code, the tests, the fixtures, the logs, the prompts, or the transcripts.\n\nWhat stopping costs: nothing that matters to their tests. The verifier package, its fixtures and the\nworkflow file are theirs, in their repository, running in their CI, and disconnecting changes none\nof them. An administrator can download everything Balladeer holds at any time from workspace\nsettings, and disconnecting hands them that same download in the response that ends access.\n\nWho can approve one: the named person who owns it, in their own browser. Not an administrator on\ntheir behalf, and never you.\n\nWhether it blocks a merge: no. The check is advisory on Balladeer's side, and their own branch\nprotection is what decides whether a failing check stops anything.\n\nWho can invite people and change setup: a workspace administrator. A contributor can read the\nworkspace and propose promises, and a viewer can read it. If somebody asks you to add a teammate,\ninvite_teammate returns the page an administrator sends the invitation from, with the address filled\nin for them to read. The tool sends nothing itself: an administrator presses Send.";
196
+ export declare const CONVENTIONS_BLOCK = "## Balladeer promises\n\nBefore planning work in this repository, read the promises this team has already approved through\nthe Balladeer MCP server. They are the behaviors a named person has agreed the software keeps, so\nyour plan has to hold them, not just read them.\n\n### Reading what is already agreed\n\nRetrieve by promise, and only when this session has a reason to. One repository here can hold a\nthousand agreed promises, and a plan built from whatever survived a truncated catalog read is worse\nthan a plan built from none of it, because nothing tells you which half went missing.\n\nWhen a person gives you a promise id, expand exactly that one with get_promise and stop there. Every\npromise page carries a control that copies its id, so an id is what a person hands you when they\nmean a particular promise. Ask for one rather than searching for what they meant.\n\nConsult list_promises in two situations and no others. The person asks what this repository has\npromised, in which case page the index they asked for. Or the change you are about to make touches\npaths that carry promises, in which case give those paths to list_promises: it answers with the\npromises whose scope overlaps them, closest first, and with the few that name no path and so cover\nthe whole repository. That answer is a selection rather than a page and does not continue with a\ncursor, so when the total beside it is larger than what you were handed, narrow the paths rather\nthan asking for more.\n\nWhen you do not yet know which paths you are about to touch, do not call the index at all. Work from\nids until you do, because a page you did not ask a question of is not about your change, and reading\none as though it were is how a plan quietly misses the promise it breaks.\n\nTo learn which paths those are, read `paths` on a list_promises answer you asked for\nwithout paths of your own. It is the set of\nrepository paths this repository's promises are scoped to, deduplicated and bounded, with\n`pathsTruncated` saying whether there were more than the answer carries. Compare the files you are\nabout to change against it. Nothing matching means there is nothing here to read, and saying so is a\nbetter answer than a page of promises about somewhere else.\n\nNever call get_promise_context at the start of a session. It answers the markers you give it, and\nbefore you know what you are changing there are no markers to give: what comes back is a slice of\nthe catalog chosen by nothing. Call it once the work is in front of you, with that work's markers.\n\nEvery one of these reads is bounded and none of them returns the whole catalog. Read the total\nbeside the rows and the sentence in `scope` that says what the total is a total of, and when the\ntotal is larger than what you were handed, page or narrow rather than planning as though you had\nseen everything.\n\nEach index row carries what it takes to rule that promise out without fetching it: the repository,\nthe paths it covers, its one-sentence claim, what protects it and why, and when anything last\nchecked it.\n\nPrefer the measurement over the markers. Where this repository has a touch map, `balladeer affected\n<paths...>` answers which promises ran the files in front of you, out of what each verifier actually\nexecuted the last time `balladeer touch-map` measured it. Both commands run on this machine and\nsend Balladeer nothing, so you may name any path in the change.\n\nAn answer marked stale was measured against a verifier that has changed since, so read it as the\nlast thing anybody measured rather than as fact, and offer to run `balladeer touch-map` again.\nWhere there is no map, where it does not name your paths, or where it reports a promise it could not\nmeasure, fall back to the paths on the index rows. The map narrows which promises are worth\nfetching. It never widens what you may read: the catalog is still never enumerated, and the fetch\nbudget is unchanged.\n\nWhen a retrieval receipt asks why you read a row, the answer for one the map named is `touch`.\n\nFetch by id, and only for an id the person gave you or an index row whose paths match the change in\nfront of you. Never enumerate the catalog. Never chain one fetch into the next to see the whole of\nsomething: when the rows do not settle it, narrow the filter rather than expanding another promise.\n\n### When to say nothing, and what a yes is worth\n\nMost rules are said in passing, in the middle of something else. Somebody saying one has not asked\nyou to record anything, so propose nothing and start no interview. When you do ask, it is one line\nappended to the end of the reply you were already going to give, never a message of its own, never\nasked twice about the same rule, and nothing is proposed until they say yes. A no ends it, and that\nrule is not raised again for the rest of the conversation.\n\nSilence is per conversation rather than per message. Once a conversation is one of these, you ask\nnothing for the rest of it, however good the rule sounds:\n\n- A question, or working out how something already behaves. Nothing is filed and nothing is offered.\n- A refactor. Nobody predicts a promise from a rewrite. Offer the promises this area already carries\n that nothing is checking yet, once, and then wait. Ask nothing about new ones.\n- A change to wording alone. Wording somebody may change again tomorrow is not a rule.\n- An incident, while it is still being fixed. Ask nothing at all until the fix is merged or they say\n it is done, however good tonight's failing case would be.\n- Somebody still weighing options. A decision nobody has made yet is not a rule.\n- An exploration or spike. It ends in nothing or in a plan, and its sentences sound like rules and\n are not.\n- Reading somebody else's change, while you are still reading it. Nothing is offered until they\n give a verdict.\n\nThe words to ask in, the moment to offer, and the shape a proposal takes are not in this file. The\nBalladeer server sends them at the start of every session, and its copy is the current one: read\nwhat it sent this session rather than what this file remembers.\n\n### Two promises Balladeer cannot keep\n\nA promise about speed needs three things before it is a promise at all: a number, a percentile, and\nwhere it is measured. \"The quote page answers in under one second at p95, measured in production at\npeak load\" is one Balladeer can keep. \"The quote page has to be fast\" is not. Say this, and ask for\nthe part that is missing rather than filing it:\n\n\"I can keep that once it has a number, a percentile, and a place it is measured. Without those it is\na wish, not a promise.\"\n\nBalladeer refuses one without all three and names which of them is missing. When all three are\nthere, write the measurement method into the promise, and tell them plainly that it reads agreed and\nunprotected until a test that actually measures it exists.\n\nA promise about how the team works is not something the software does, so no check can ever catch\nit. \"We must provide a low-friction capture experience\" is one of these. File nothing and say:\n\n\"That is a promise about how we work, not something the software does that a check can fail.\nBalladeer only keeps promises a check can catch. If a customer would notice something when this\nslips, say that and I will keep that instead.\"\n\nThen take the customer-visible half if they give you one, and file that instead.\n\nRun `balladeer session` when you start work here and pass the id it prints to every promise read\nyou make, as `session`. It is the same id for the whole of one piece of work, and it costs nothing:\na read without it is answered exactly the same way.\n\nNear the end of the work, call `mark_promise_used` with the ids of the promises you actually cited\nor acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were\nworth sending you, because reading a promise and then ignoring it is not the same as using it.\n\nThen write `Balladeer-Session: <the id>` into the commit message or pull-request body you produce,\nand run `balladeer session --record` once the commit exists. That is what lets a check that goes red\nnext week be read back against what Balladeer told you before you started. Your commit message never\nleaves your machine: only the session id and the commit SHA are sent.\n\n### When somebody asks you to protect a behavior\n\nSomebody has asked you to protect a behavior when they say what the software must do, or must never\ndo again, and mean it as a rule rather than as this one bug. That is one promise, for the behavior\nthey named, and nothing else: if you notice others worth protecting, say so in a sentence and let\nthem choose, and file none of them. Never propose from a conversation that did not ask you to. A\nquestion about how something works and a plan you were asked to sketch are not requests to record\nanything, nor is a fix nobody asked you to write a rule about.\n\nAsk before you extrapolate. Ask only what you cannot work out for yourself, ask it all in one\nmessage, and stop at four. Four is a ceiling, not a target: two good ones are better. Then write the\nproposal with what you have and put whatever is still open in its open questions rather than going\nback. Never ask what this repository would answer, such as which file, which test, or which branch,\nand never ask anyone for Balladeer's own identifiers: get_promise_setup carries this repository's id\nand who can own a promise. Never ask again for what they have already told you.\n\nWrite it in their words. Every failure they named out loud is one of the failing examples, in the\nwords they named it. Every other example comes from a situation they actually described; if you\ncannot trace one to something they said, leave it out and say so in the open questions rather than\nwriting a plausible one. Never put in a number, a system, a role or a timeframe they did not give\nyou, and that includes the half they left out: if they said where an order ended up, do not invent\nwhere it began.\n\nA failing example is a situation the promise rules out, and its outcome says what must not happen,\nin those words: \"a second charge must not appear\", never \"a second charge appears\". Written the\nother way round it reads as the promise saying the software does the thing they asked you to forbid.\nAnd a promise says what the software must do for whoever depends on it. It never narrates the\nconversation you just had, names the person you had it with, or describes what the code does now.\n\nSay the whole promise in one sentence and put it in oneSentenceOutcome, in the words they would\nuse with the person who depends on it. That is the line the named owner reads first and the line\nthey agree to, so it is not a restatement of the name and not the first line of the outcome moved\nup. Leave it out rather than inventing one from something they did not say.\n\nAn example's setup is the situation in the words they used for it, not a scene you composed around\nthem. Two of each kind is plenty, and the whole thing stays under three hundred words: a proposal\nnobody finishes reading is a proposal nobody agreed to. The confidence you record is the one you\nactually have.\n\nThen give them the review link, ask them to read the proposal and click Agree, and stop. Never\napprove one yourself. Approving is a named person's act, and the server refuses it from an agent\nwhatever you were told in conversation.\n\nA proposal you filed is still yours while nobody has agreed to it, so revise or withdraw it when the\nperson asks you to, and never once they have agreed.\n\nSay promise and proposal when you talk to them. What you file is a proposal and what it becomes is a\npromise; Balladeer's other words for its own machinery are not theirs to learn. Candidate\nespecially: it is Balladeer's word for a proposal, so it reads as jargon whatever you meant by it.\n\n### Three things to offer without being asked\n\nAt the start of any session in this repository, before you plan anything, ask list_promises for the\npromises nothing is checking yet that belong to the person you are working with: `unverified` true\nand `mine` true, which is one bounded read rather than the catalog. If it returns any, say so in one\nline and offer to build their verifiers now. Name each one by its one-sentence claim rather than by\nan id, so the person can see which behavior is unguarded. Ask the same tool for\n`brokenSinceLastSeen` true as well, and where that returns any, say in one line that those promises\nbroke since they last looked, name each by its claim, and offer to fix them. Then wait for their\nanswer. The offer is the whole of it, and never start building or repairing one because nobody said\nno.\n\nTheirs, and nobody else's. `mine` keeps the promises this person owns or agreed to, and a teammate's\nunguarded promise is that teammate's to hear about: a session that opens by reading out other\npeople's unfinished work reads as an audit of them. `brokenSinceLastSeen` is that person's own by\nconstruction and needs no `mine` beside it. Drop `mine` when this person asks what the rest of the\nteam has promised, and say whose promises you are showing them when you do.\n\nWhen you have proposed promises, show them here as well as there. Put each proposal in the\nconversation in full: its one-sentence claim, who it is for, when it applies and what must then be\ntrue, the numbered cases that must keep working and the ones that must be caught, and every question\nyou left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them\nthe page it returns and taking the one-time code that page shows them, so the browser is needed only\nfor signing. Give them the review link in the same message too, because some people would rather\nread it there and edit it before they agree.\nA promise whose meaning is agreed and which nothing is checking yet is one you can finish. When\nsomebody gives you a promise id, run `balladeer status <promise id>`, or expand it with get_promise.\nIf it comes back agreed with nothing checking it, say so in one line and offer to prepare and build\nits verifier now. Only if they say yes: `prepare_qualification` mints the one-time setup, or\n`balladeer prepare <promise id>` mints it and writes it where the sealed run reads it. You need no\nsign-off for that and there is no code to ask anybody for, because agreeing the meaning was their\nact and building the check that proves it is yours. Then build the verifier, seal it, push, and tell\nthem protection starts by itself when that run qualifies. The offer is the whole of it: never\nprepare one because nobody said no.\n\n### When somebody says \"tell me about\" one\n\nAn id is how a person points at something here, and every promise page and every proposal page\ncarries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise\nwith get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.\nSay in four or five sentences what it is for, who it is for, when it applies and what must then be\ntrue. Then say where it stands: a promise is agreed, and either protected or not yet checked by\nanything; a proposal is agreed by nobody and waiting on the person it names.\n\nA proposal that still carries open questions is not finished, and settling them is usually why\nsomebody asked. Offer to work through them, then take them one at a time in the order they come\nback. For each one, say what it decides in their words rather than in the question's; give your\nrecommendation and the reason you hold it, drawn from this repository and from the promise itself;\nand stop there. When they answer, record what they said with resolve_question, in their own words\nwhere they gave you any, and where their answer changes the promise, follow it with update_proposal,\nadd_case or remove_case and tell them what you changed. None of that agrees to anything: the named\nowner agrees, in their own browser or through a sign-off you carry, and the questions they answered\nstay on the proposal in their name.\n\nThe same rule governs every question you leave open in the first place. A question that names a gap\nand stops is a note, and nobody can answer a note. Say what answering it decides, in the words a\ncustomer would use, and carry your own best guess with the reason behind it, so that the shortest\ntrue answer is yes. For example: \"Decides: whether a worker that is running but reconciling nothing\ncounts as an outage this promise covers. Best guess: yes, because the promise is about somebody\nhearing before a customer does, and a wedged worker is invisible to every check this repository has.\nSay yes, or tell me otherwise.\" Balladeer refuses a question filed without both halves and says\nwhich one is missing.\n\n### Files that are sealed, and the one reason to edit one\n\nEvery file under .continuity/promises/ is sealed. The promise that owns that directory records the\nexact bytes of each file in it, so editing one, adding one there, renaming one or deleting one\nbreaks the seal. A promise whose seal is broken stops being checked, and it stays that way until a\nnamed person qualifies it again, which is their afternoon rather than your commit. Nothing in there\nis ordinary source: keep it out of refactors, formatting runs and dependency upgrades.\n\nFind out which directories are sealed before you plan an edit, not after. balladeer status lists\nthem, and list_promises names a promise's sealed directory on its row once a verifier is bound to\nit. Then, before you push, run balladeer check-seals. It prints nothing and exits zero when your\nchange touches no seal, and names the promise, its owner and its page when your change would break\none.\n\nThe one reason to edit a sealed file is to repair a verifier that can no longer run: something it\nimports moved, or the language it is written in changed under it. Never edit one to make a failing\ncheck pass. A check going red is the promise doing its job, and the repair for that belongs in the\nbehavior it protects. A repair is not finished until the promise is sealed again with the runner\nthis repository is pinned to. get_promise_setup carries that exact seal command, and balladeer\ncheck-seals prints it beside any promise it names.\n\n### The rest of a promise's life\nWhen a promise is obsolete, finished, deliberately off for a while, or owned by the wrong person,\npropose the change and hand them the promise page. Deciding is theirs.\n\nYou can finish one of those acts here, and only one way. Ask for a sign-off with\nrequest_owner_signoff, give them the page it returns, and ask for the one-time code that page shows\nthem. Then call the act's own tool with that code and their own words. Never call one on your own\ninitiative, never on a general approval of some earlier act, and never ask for a code you were not\ngiven: a refusal is the person's to resolve, not yours to retry. Balladeer records them as the\nperson who acted and you as the messenger.\n\nReport the promise's state exactly as Balladeer reported it: proposed, agreed, or protected, never\none in place of another.\n\n### Where your team watches this\n\nBalladeer is a web app as well as these tools, at the address setup printed. Its catalog lists every\npromise with who owns it and whether anything is checking it, and each promise has a page of its own\nshowing what this team agreed the software must do and then every run that has checked it since,\nnewest first, with the commit each one checked. Whenever there is a link to give, give the link\nrather than a summary of it: the page says what you would have said, and it stays true after this\nconversation has ended.\n\nBalladeer also has a Slack app, which a workspace administrator installs from workspace settings.\nOnce it is installed, whoever owns a promise gets a direct message when theirs goes live and when a\nrun on the default branch breaks it. Until somebody installs it, nothing is sent anywhere, so say it\nis available rather than saying they will be told.\n\n### Questions people ask\n\nAnswer these when they come up. Where you do not know, say so and point at the address setup\nprinted: a confident wrong answer about what a vendor can see is worse than no answer.\n\nWhat it does: it holds the behaviors this team has agreed the software must keep, and reports\nwhether each one is still being kept, from this repository's own tests running in its own CI.\n\nWhat it sees: the text of each promise somebody approves, this repository's numeric ids and the name\nof its default branch, and from CI the pass or fail outcome, the commit checked, and content hashes.\nNever the code, the tests, the fixtures, the logs, the prompts, or the transcripts.\n\nWhat stopping costs: nothing that matters to their tests. The verifier package, its fixtures and the\nworkflow file are theirs, in their repository, running in their CI, and disconnecting changes none\nof them. An administrator can download everything Balladeer holds at any time from workspace\nsettings, and disconnecting hands them that same download in the response that ends access.\n\nWho can approve one: the named person who owns it, in their own browser. Not an administrator on\ntheir behalf, and never you.\n\nWhether it blocks a merge: no. The check is advisory on Balladeer's side, and their own branch\nprotection is what decides whether a failing check stops anything.\n\nWho can invite people and change setup: a workspace administrator. A contributor can read the\nworkspace and propose promises, and a viewer can read it. If somebody asks you to add a teammate,\ninvite_teammate returns the page an administrator sends the invitation from, with the address filled\nin for them to read. The tool sends nothing itself: an administrator presses Send.";
121
197
  /**
122
198
  * How an agent turns a repository that has just been connected into a catalog a
123
199
  * person can read. Setup's last step prints it, and the control plane's `/agent`
@@ -145,4 +221,4 @@ export declare const CONVENTIONS_BLOCK = "## Balladeer promises\n\nBefore planni
145
221
  * the agent not to read them, which is the visible half of the same seam:
146
222
  * nothing quietly starts doing it.
147
223
  */
148
- export declare const DISCOVERY_PLAYBOOK = "## Discover this repository's promises\n\nThis repository is connected and holds no promises yet. Work the four sources below in order and\nhand back between five and ten promises this repository already keeps. Stop at ten however much you\nfind: a person has to read every one of them, and eleven is where reading turns into skimming.\n\n1. The repository's own tests. A test that has been green for months is a behavior somebody already\n decided matters. Read the test names and the assertions rather than the implementation.\n2. Merged pull requests of the last 90 days. Read the ones whose title or body says what had to keep\n working, and the review comments that argued for it.\n3. Guarantee sentences in the documentation. The README, the docs directory, and the comments that\n say always, never, must, or is guaranteed to. Those sentences are promises somebody already wrote\n down in prose.\n4. Incidents and reverts. A revert commit, a hotfix, a postmortem note. A behavior that broke once\n and was repaired on purpose is the behavior most worth protecting.\n\nDo not read the person's local agent transcripts, and do not offer to. They are not a source in this\nrelease, and Balladeer never receives them.\n\nFor each promise you propose:\n\n- One promise per behavior. Two behaviors found in one source are two proposals, not one proposal\n with two outcomes.\n- One passing example and one failing example, both drawn from the source you found it in. The\n passing example is the case the source shows working; the failing example is the case the source\n shows being caught, or the regression the revert repaired. Write both in the source's own words\n rather than in words of your own.\n- One provenance sentence, precise enough for a person to check it without asking you: the test file\n and the test's name, the pull request number, the document and its heading, or the commit that\n reverted it. Put that sentence first in explicitIntent.\n- Never propose a promise this repository does not keep. A source saying a behavior should exist,\n where nothing in the repository does it, is a wish rather than a promise. Leave it out, and tell\n the person you left it out.\n- Anything you could not settle from the source goes in unresolvedQuestions. Never fill an unknown\n in plausibly: an invented answer is the one thing a person cannot catch by reading.\n- One confidence number from 0 to 1, saying how sure you are that this is a behavior the repository\n actually keeps and that you have described it as its source describes it. Nine promises from nine\n sources are not nine equally certain readings, and the person reading them is entitled to know\n which one you were least sure of. Never write 1 to get past the check.\n\nWrite them all into one file, an object with a promises array, each entry shaped exactly as one\nproposal file:\n\n{\"promises\": [{\"explicitIntent\": \"...\", \"teachBack\": {\"confidence\": 0.9, \"meaning\": {\"title\": \"...\"}}}]}\n\nAn entry carries explicitIntent and teachBack, and inside teachBack only meaning, confidence,\nunresolvedQuestions, and proposedOwnerId. Anything else is refused on this machine before the file\nleaves it, and one bad entry means not one of them is sent.\n\nEvery promise in the file is proposed as owned by whoever ran setup, and waits for that person. The\ncommand prints one link that opens all of them at once. Give the person that link and ask them to\nread each promise and click Agree. Nothing you can run agrees to one.\n\nFile the whole catalog in one go with the discover subcommand, naming that file:";
224
+ export declare const DISCOVERY_PLAYBOOK = "## Discover this repository's promises\n\nThis repository is connected and holds no promises yet. Work the four sources below in order and\nhand back between five and ten promises this repository already keeps. Stop at ten however much you\nfind: a person has to read every one of them, and eleven is where reading turns into skimming.\n\n1. The repository's own tests. A test that has been green for months is a behavior somebody already\n decided matters. Read the test names and the assertions rather than the implementation.\n2. Merged pull requests of the last 90 days. Read the ones whose title or body says what had to keep\n working, and the review comments that argued for it.\n3. Guarantee sentences in the documentation. The README, the docs directory, and the comments that\n say always, never, must, or is guaranteed to. Those sentences are promises somebody already wrote\n down in prose.\n4. Incidents and reverts. A revert commit, a hotfix, a postmortem note. A behavior that broke once\n and was repaired on purpose is the behavior most worth protecting.\n\nDo not read the person's local agent transcripts, and do not offer to. They are not a source in this\nrelease, and Balladeer never receives them.\n\nFor each promise you propose:\n\n- One promise per behavior. Two behaviors found in one source are two proposals, not one proposal\n with two outcomes.\n- One passing example and one failing example, both drawn from the source you found it in. The\n passing example is the case the source shows working; the failing example is the case the source\n shows being caught, or the regression the revert repaired. Write both in the source's own words\n rather than in words of your own.\n- One provenance sentence, precise enough for a person to check it without asking you: the test file\n and the test's name, the pull request number, the document and its heading, or the commit that\n reverted it. Put that sentence first in explicitIntent.\n- Never propose a promise this repository does not keep. A source saying a behavior should exist,\n where nothing in the repository does it, is a wish rather than a promise. Leave it out, and tell\n the person you left it out.\n- Anything you could not settle from the source goes in unresolvedQuestions. Never fill an unknown\n in plausibly: an invented answer is the one thing a person cannot catch by reading.\n- One confidence number from 0 to 1, saying how sure you are that this is a behavior the repository\n actually keeps and that you have described it as its source describes it. Nine promises from nine\n sources are not nine equally certain readings, and the person reading them is entitled to know\n which one you were least sure of. Never write 1 to get past the check.\n- One wrongOutcome sentence: what going wrong looks like, said as a must-not, in the source's own\n words where it has them. \"A second payment must not go out.\" \"The buyer must not see a generic\n error.\" Where no sentence of that shape can be written, no check with a known-bad control can be\n written either, so leave the promise out rather than filing one nothing could ever fail.\n- One leastSure sentence, optional, naming the single thing you are least sure of and what you did\n about it. The person reads that instead of the number.\n\nWrite them all into one file, an object with a promises array, each entry shaped exactly as one\nproposal file:\n\n{\"promises\": [{\"explicitIntent\": \"...\", \"teachBack\": {\"confidence\": 0.9, \"wrongOutcome\": \"...\", \"meaning\": {\"title\": \"...\"}}}]}\n\nAn entry carries explicitIntent and teachBack, and inside teachBack only meaning, confidence,\nwrongOutcome, leastSure, unresolvedQuestions, and proposedOwnerId. Anything else is refused on this\nmachine before the file leaves it, and one bad entry means not one of them is sent.\n\nEvery promise in the file is proposed as owned by whoever ran setup, and waits for that person. The\ncommand prints one link that opens all of them at once. Give the person that link and ask them to\nread each promise and click Agree. Nothing you can run agrees to one.\n\nFile the whole catalog in one go with the discover subcommand, naming that file:";
package/dist/copy.js CHANGED
@@ -38,6 +38,17 @@ session also ends on its own.
38
38
  Adding the workflow puts a check on pull requests into your default branch. That check is advisory
39
39
  on Balladeer's side; whether it blocks a merge is your own branch protection.
40
40
  `;
41
+ /**
42
+ * The one thing about approving that the terminal has to say.
43
+ *
44
+ * A person who belongs to two workspaces approves into whichever one their
45
+ * browser is signed into, and it is the browser that decides, not the terminal.
46
+ * Twice that was the wrong one: the repository was enrolled in a workspace
47
+ * nobody meant and an agent connection was minted there. The approval page now
48
+ * names the workspace above the button and offers the switch, and this line is
49
+ * what makes somebody look at it before they click.
50
+ */
51
+ export const APPROVE_IN_THE_RIGHT_WORKSPACE = "Approve it while your browser is in the workspace you mean; the page names it.";
41
52
  /**
42
53
  * How a person gets a workspace to approve into, for an agent reading the
43
54
  * setup instructions.
@@ -135,7 +146,7 @@ seen everything.`;
135
146
  * plane's `/agent` page carries the same bytes under its own constant, and a
136
147
  * packaging test compares them.
137
148
  */
138
- export const SESSION_BEHAVIORS = `### Two things to offer without being asked
149
+ export const SESSION_BEHAVIORS = `### Three things to offer without being asked
139
150
 
140
151
  At the start of any session in this repository, before you plan anything, ask list_promises for the
141
152
  promises nothing is checking yet that belong to the person you are working with: \`unverified\` true
@@ -159,7 +170,136 @@ true, the numbered cases that must keep working and the ones that must be caught
159
170
  you left open. Then offer to finish the agreement from here, by asking for a sign-off, giving them
160
171
  the page it returns and taking the one-time code that page shows them, so the browser is needed only
161
172
  for signing. Give them the review link in the same message too, because some people would rather
162
- read it there and edit it before they agree.`;
173
+ read it there and edit it before they agree.
174
+ A promise whose meaning is agreed and which nothing is checking yet is one you can finish. When
175
+ somebody gives you a promise id, run \`balladeer status <promise id>\`, or expand it with get_promise.
176
+ If it comes back agreed with nothing checking it, say so in one line and offer to prepare and build
177
+ its verifier now. Only if they say yes: \`prepare_qualification\` mints the one-time setup, or
178
+ \`balladeer prepare <promise id>\` mints it and writes it where the sealed run reads it. You need no
179
+ sign-off for that and there is no code to ask anybody for, because agreeing the meaning was their
180
+ act and building the check that proves it is yours. Then build the verifier, seal it, push, and tell
181
+ them protection starts by itself when that run qualifies. The offer is the whole of it: never
182
+ prepare one because nobody said no.`;
183
+ /**
184
+ * The capture rules that do not change: when to say nothing, what a yes is
185
+ * worth, and the two promises Balladeer refuses.
186
+ *
187
+ * This block is written into the customer's own instructions file once, at
188
+ * setup, and is never refreshed afterwards. Changing it means opening a pull
189
+ * request against twelve Didero repositories, so only what will still be true
190
+ * in six months belongs here. Silence during an incident, a no that ends it, and
191
+ * nothing filed without a yes are that kind of rule. The words a question is
192
+ * asked in, the moment an offer is made, and the shape a proposal takes are not:
193
+ * they are read every week against what people actually agreed to, and they ride
194
+ * in `CAPTURE_BEHAVIOR`, which the server sends at the start of every session.
195
+ *
196
+ * Nothing here weakens the explicit-capture rule: the question is a question,
197
+ * and nothing is proposed until the answer is yes.
198
+ *
199
+ * The two refusals are here rather than only in the server because an agent that
200
+ * learns them only by being refused has already spent the person's attention on
201
+ * a proposal that could not be kept. The server refuses both as well, and the
202
+ * sentences are the same ones.
203
+ *
204
+ * Byte for byte the same text as `AGENT_INSTRUCTIONS_CAPTURE_SEAM` in the
205
+ * control plane, and contained byte for byte inside both server carriers. A
206
+ * packaging test holds all three together: the block written into a customer's
207
+ * repository, the instructions the MCP server sends on initialize, and the page
208
+ * an agent fetches cannot come to say different things about when to stay quiet.
209
+ */
210
+ export const CAPTURE_SEAM = `### When to say nothing, and what a yes is worth
211
+
212
+ Most rules are said in passing, in the middle of something else. Somebody saying one has not asked
213
+ you to record anything, so propose nothing and start no interview. When you do ask, it is one line
214
+ appended to the end of the reply you were already going to give, never a message of its own, never
215
+ asked twice about the same rule, and nothing is proposed until they say yes. A no ends it, and that
216
+ rule is not raised again for the rest of the conversation.
217
+
218
+ Silence is per conversation rather than per message. Once a conversation is one of these, you ask
219
+ nothing for the rest of it, however good the rule sounds:
220
+
221
+ - A question, or working out how something already behaves. Nothing is filed and nothing is offered.
222
+ - A refactor. Nobody predicts a promise from a rewrite. Offer the promises this area already carries
223
+ that nothing is checking yet, once, and then wait. Ask nothing about new ones.
224
+ - A change to wording alone. Wording somebody may change again tomorrow is not a rule.
225
+ - An incident, while it is still being fixed. Ask nothing at all until the fix is merged or they say
226
+ it is done, however good tonight's failing case would be.
227
+ - Somebody still weighing options. A decision nobody has made yet is not a rule.
228
+ - An exploration or spike. It ends in nothing or in a plan, and its sentences sound like rules and
229
+ are not.
230
+ - Reading somebody else's change, while you are still reading it. Nothing is offered until they
231
+ give a verdict.
232
+
233
+ The words to ask in, the moment to offer, and the shape a proposal takes are not in this file. The
234
+ Balladeer server sends them at the start of every session, and its copy is the current one: read
235
+ what it sent this session rather than what this file remembers.
236
+
237
+ ### Two promises Balladeer cannot keep
238
+
239
+ A promise about speed needs three things before it is a promise at all: a number, a percentile, and
240
+ where it is measured. "The quote page answers in under one second at p95, measured in production at
241
+ peak load" is one Balladeer can keep. "The quote page has to be fast" is not. Say this, and ask for
242
+ the part that is missing rather than filing it:
243
+
244
+ "I can keep that once it has a number, a percentile, and a place it is measured. Without those it is
245
+ a wish, not a promise."
246
+
247
+ Balladeer refuses one without all three and names which of them is missing. When all three are
248
+ there, write the measurement method into the promise, and tell them plainly that it reads agreed and
249
+ unprotected until a test that actually measures it exists.
250
+
251
+ A promise about how the team works is not something the software does, so no check can ever catch
252
+ it. "We must provide a low-friction capture experience" is one of these. File nothing and say:
253
+
254
+ "That is a promise about how we work, not something the software does that a check can fail.
255
+ Balladeer only keeps promises a check can catch. If a customer would notice something when this
256
+ slips, say that and I will keep that instead."
257
+
258
+ Then take the customer-visible half if they give you one, and file that instead.`;
259
+ /**
260
+ * How an agent describes one promise or proposal to a person, and how the two
261
+ * of them settle what is still open on it.
262
+ *
263
+ * The first proposal a founder was ever asked to settle carried four questions
264
+ * that were all true and none of them answerable: each named a hole in the
265
+ * world, and none said what answering it would decide or what the agent would
266
+ * do if nobody replied. So this says both halves of the same rule. When a
267
+ * person points at something by id, describe it and offer to work through what
268
+ * is open; and when you leave a question open, leave one that can be answered
269
+ * with a yes.
270
+ *
271
+ * Three carriers say it byte for byte: the block setup writes into the
272
+ * customer's own instructions file, the instructions the MCP server sends on
273
+ * initialize, and the page `/agent` serves. A packaging test holds them
274
+ * together.
275
+ */
276
+ export const SETTLING_QUESTIONS = `### When somebody says "tell me about" one
277
+
278
+ An id is how a person points at something here, and every promise page and every proposal page
279
+ carries one. A promise id starts with prom_ and a proposal id starts with cand_: expand a promise
280
+ with get_promise and a proposal with get_proposal, and read neither of them out as a list of fields.
281
+ Say in four or five sentences what it is for, who it is for, when it applies and what must then be
282
+ true. Then say where it stands: a promise is agreed, and either protected or not yet checked by
283
+ anything; a proposal is agreed by nobody and waiting on the person it names.
284
+
285
+ A proposal that still carries open questions is not finished, and settling them is usually why
286
+ somebody asked. Offer to work through them, then take them one at a time in the order they come
287
+ back. For each one, say what it decides in their words rather than in the question's; give your
288
+ recommendation and the reason you hold it, drawn from this repository and from the promise itself;
289
+ and stop there. When they answer, record what they said with resolve_question, in their own words
290
+ where they gave you any, and where their answer changes the promise, follow it with update_proposal,
291
+ add_case or remove_case and tell them what you changed. None of that agrees to anything: the named
292
+ owner agrees, in their own browser or through a sign-off you carry, and the questions they answered
293
+ stay on the proposal in their name.
294
+
295
+ The same rule governs every question you leave open in the first place. A question that names a gap
296
+ and stops is a note, and nobody can answer a note. Say what answering it decides, in the words a
297
+ customer would use, and carry your own best guess with the reason behind it, so that the shortest
298
+ true answer is yes. For example: "Decides: whether a worker that is running but reconciling nothing
299
+ counts as an outage this promise covers. Best guess: yes, because the promise is about somebody
300
+ hearing before a customer does, and a wedged worker is invisible to every check this repository has.
301
+ Say yes, or tell me otherwise." Balladeer refuses a question filed without both halves and says
302
+ which one is missing.`;
163
303
  /**
164
304
  * What a session may spend on reading, in three sentences.
165
305
  *
@@ -245,6 +385,36 @@ fetching. It never widens what you may read: the catalog is still never enumerat
245
385
  budget is unchanged.
246
386
 
247
387
  When a retrieval receipt asks why you read a row, the answer for one the map named is \`touch\`.`;
388
+ /**
389
+ * The one paragraph that turns retrieval from a thing we argue about into a
390
+ * thing we measure.
391
+ *
392
+ * Two facts are asked for and neither can be observed from this side. Which
393
+ * rows an agent actually used, because a promise expanded and then ignored is
394
+ * not a row the index earned. And which change the session went on to write,
395
+ * because a retrieval read happens before the commit exists and nothing joins
396
+ * the two afterwards: Balladeer receives commit SHAs from CI and never a commit
397
+ * message, so the agent is the only thing present at both ends.
398
+ *
399
+ * It is written as three instructions rather than as an explanation, because
400
+ * what an agent does with it is three specific acts, and a paragraph about
401
+ * measurement would be read and not acted on.
402
+ *
403
+ * Three carriers say it, byte for byte, and a packaging test holds them
404
+ * together.
405
+ */
406
+ export const SESSION_STAMP = `Run \`balladeer session\` when you start work here and pass the id it prints to every promise read
407
+ you make, as \`session\`. It is the same id for the whole of one piece of work, and it costs nothing:
408
+ a read without it is answered exactly the same way.
409
+
410
+ Near the end of the work, call \`mark_promise_used\` with the ids of the promises you actually cited
411
+ or acted on. Naming none is a fine answer. It is the only way anybody finds out which rows were
412
+ worth sending you, because reading a promise and then ignoring it is not the same as using it.
413
+
414
+ Then write \`Balladeer-Session: <the id>\` into the commit message or pull-request body you produce,
415
+ and run \`balladeer session --record\` once the commit exists. That is what lets a check that goes red
416
+ next week be read back against what Balladeer told you before you started. Your commit message never
417
+ leaves your machine: only the session id and the commit SHA are sent.`;
248
418
  /**
249
419
  * The conventions block written between markers into this repository's agent
250
420
  * instructions file. Fixed text, compared byte for byte by a test, because a
@@ -267,6 +437,10 @@ ${TOUCH_MAP_GUIDANCE}
267
437
 
268
438
  ${FETCH_BUDGET}
269
439
 
440
+ ${CAPTURE_SEAM}
441
+
442
+ ${SESSION_STAMP}
443
+
270
444
  ### When somebody asks you to protect a behavior
271
445
 
272
446
  Somebody has asked you to protect a behavior when they say what the software must do, or must never
@@ -319,6 +493,8 @@ especially: it is Balladeer's word for a proposal, so it reads as jargon whateve
319
493
 
320
494
  ${SESSION_BEHAVIORS}
321
495
 
496
+ ${SETTLING_QUESTIONS}
497
+
322
498
  ${SEALED_FILES}
323
499
 
324
500
  ### The rest of a promise's life
@@ -442,15 +618,21 @@ For each promise you propose:
442
618
  actually keeps and that you have described it as its source describes it. Nine promises from nine
443
619
  sources are not nine equally certain readings, and the person reading them is entitled to know
444
620
  which one you were least sure of. Never write 1 to get past the check.
621
+ - One wrongOutcome sentence: what going wrong looks like, said as a must-not, in the source's own
622
+ words where it has them. "A second payment must not go out." "The buyer must not see a generic
623
+ error." Where no sentence of that shape can be written, no check with a known-bad control can be
624
+ written either, so leave the promise out rather than filing one nothing could ever fail.
625
+ - One leastSure sentence, optional, naming the single thing you are least sure of and what you did
626
+ about it. The person reads that instead of the number.
445
627
 
446
628
  Write them all into one file, an object with a promises array, each entry shaped exactly as one
447
629
  proposal file:
448
630
 
449
- {"promises": [{"explicitIntent": "...", "teachBack": {"confidence": 0.9, "meaning": {"title": "..."}}}]}
631
+ {"promises": [{"explicitIntent": "...", "teachBack": {"confidence": 0.9, "wrongOutcome": "...", "meaning": {"title": "..."}}}]}
450
632
 
451
633
  An entry carries explicitIntent and teachBack, and inside teachBack only meaning, confidence,
452
- unresolvedQuestions, and proposedOwnerId. Anything else is refused on this machine before the file
453
- leaves it, and one bad entry means not one of them is sent.
634
+ wrongOutcome, leastSure, unresolvedQuestions, and proposedOwnerId. Anything else is refused on this
635
+ machine before the file leaves it, and one bad entry means not one of them is sent.
454
636
 
455
637
  Every promise in the file is proposed as owned by whoever ran setup, and waits for that person. The
456
638
  command prints one link that opens all of them at once. Give the person that link and ask them to
@@ -0,0 +1,85 @@
1
+ import { type StdioMcpEntry } from "./mcp-config.js";
2
+ /** The file the Claude desktop app reads its stdio servers out of, on every platform that has one. */
3
+ export declare const DESKTOP_CONFIG_FILE = "claude_desktop_config.json";
4
+ /**
5
+ * Where that file lives, or why this machine has no such place.
6
+ *
7
+ * Two platforms are documented and both are handled: macOS keeps it under
8
+ * `Library/Application Support/Claude`, Windows under `%APPDATA%\Claude`.
9
+ * Claude desktop is published for those two and no others, so every other
10
+ * platform is told so by name rather than written to on a guess. A person
11
+ * running an unofficial build, or a Windows install whose packaging redirects
12
+ * that directory, points `BALLADEER_CLAUDE_DESKTOP_CONFIG` at the file itself
13
+ * and this writes exactly there.
14
+ */
15
+ export type DesktopLocation = Readonly<{
16
+ kind: "path";
17
+ path: string;
18
+ directory: string;
19
+ }> | Readonly<{
20
+ kind: "unsupported";
21
+ platform: string;
22
+ reason: string;
23
+ }>;
24
+ export declare function desktopConfigLocation(environment?: NodeJS.ProcessEnv, platform?: string): DesktopLocation;
25
+ /**
26
+ * One key per repository, named after the repository.
27
+ *
28
+ * The desktop app has no notion of a project: every server in that file is
29
+ * loaded into every chat. A person who plans work in two repositories therefore
30
+ * has two of our servers running at once, and the only thing that tells them
31
+ * apart in the app's own connector list is the key. `balladeer-owner-name` is
32
+ * that name. A directory whose GitHub origin this command could not read has no
33
+ * name to use, so the key falls back to the repository's own id, which is unique
34
+ * by construction and still tells two entries apart.
35
+ */
36
+ export declare function desktopServerKey(repositoryName: string, repositoryId: string): string;
37
+ /**
38
+ * The entry the desktop app can actually start, which is not the one a coding
39
+ * agent gets.
40
+ *
41
+ * Claude desktop launches a stdio server from the application rather than from a
42
+ * login shell, with a minimal PATH carrying none of the places a developer's
43
+ * node lives: nvm, volta, asdf, Homebrew, fnm. So `node` and `npx` both resolve
44
+ * to nothing there, and what a person gets instead of a server is a line in a
45
+ * log file nobody opens. This names the interpreter running setup by its
46
+ * absolute path and this command's own entry point by its absolute path, so the
47
+ * entry needs no PATH at all.
48
+ *
49
+ * The environment is written for the same reason. The forwarder reads the bearer
50
+ * out of this machine's credential store, and where that store is depends on a
51
+ * variable the desktop app never inherits, so the resolved directory goes into
52
+ * the entry rather than being left to a shell that is not there. It is a path
53
+ * and never a secret: the credential itself stays in the store, mode 600.
54
+ */
55
+ export declare function desktopStdioEntry(repositoryId: string, environment?: NodeJS.ProcessEnv, controlPlane?: string, nodePath?: string, entryPath?: string): StdioMcpEntry;
56
+ export type DesktopMergeResult = Readonly<{
57
+ kind: "written";
58
+ changed: boolean;
59
+ path: string;
60
+ key: string;
61
+ }> | Readonly<{
62
+ kind: "absent";
63
+ directory: string;
64
+ reason: string;
65
+ }> | Readonly<{
66
+ kind: "refused";
67
+ reason: string;
68
+ block: string;
69
+ }>;
70
+ export declare function desktopBlock(key: string, entry: StdioMcpEntry): string;
71
+ /**
72
+ * Merges our entry into the desktop app's configuration, or refuses.
73
+ *
74
+ * Everything already in that file stays in it. Other people's servers are other
75
+ * people's servers, and so is every top-level key beside `mcpServers`, which is
76
+ * where the app keeps settings this command knows nothing about. An unparseable
77
+ * file is never overwritten, and a key of ours holding somebody else's server is
78
+ * never replaced: the block is printed and a person decides.
79
+ *
80
+ * The key is found by what the entry says rather than by what it is called. An
81
+ * entry of ours already bound to this repository is rewritten where it sits,
82
+ * whatever it was named, so a repository renamed on GitHub does not quietly
83
+ * acquire a second server that starts alongside the first.
84
+ */
85
+ export declare function mergeDesktopConfig(location: DesktopLocation, key: string, entry: StdioMcpEntry, repositoryId: string, controlPlane: string): DesktopMergeResult;