Build a Method
- Sign in first. Run
method status. If it is not signed in, runmethod loginand let the user approve in the browser. Signed in, model and classification steps need no keys, each run saves a version when the file changed, and runs appear on the dashboard. - Each model or classifier request is its own step:
call,agent, orclassify, with its prompt in the Method, so the user can change one prompt, run again, and compare. A script never calls a model API. When the user already has code that does the work, keep its fixed logic asrunsteps and move each prompt and rubric into its own step; do not wrap the code. “The same thing” means the same behavior in steps. If a request cannot become a step because Method lacks a feature, tell the user what is missing. - Start with one step, then build it in the same turn. A new Method for a task starts as one model step that does the task, and a
runstep for each exact check of its result that code can make (a form, a value, a rule with one right answer). The model step is acallwhen what it reads is text that fits in a prompt (a document, a message, a record): arunstep reads the text and the call gets it in its prompt. It is anagentstep only when it must search, open files that it chooses, run commands, or act. A call is one request, so each run, and each test of a fix, costs a small part of an agent’s turns. Do not design more steps first: the user’s corrections and Method’s redesigns add steps where results show the need. When you convert existing code, keep its steps (rule 2). Show the steps with their type, purpose, and output, and a table of the prompts, instructions, and rubrics in the user’s existing work, each with the steps that receive it. Do not wait for approval unless the user asked to approve first. Ask only for information that you cannot find and that would change the Method. - Run early and often. Write the first steps, validate, run, then add the next steps. Fix errors. Fix each warning, or accept it with the user’s reason. Never add a check only to remove a warning. A new run reuses every step whose definition and inputs did not change, so each run executes only what changed.
--rerun STEPruns a step again anyway;--freshruns every step. - Keep the inputs of the existing code. If the code takes an ID and looks up the record, the Method takes the same ID and looks it up the same way.
- Keep the user’s rules word for word. When you convert an agent, a prompt, a playbook, or a guide that the user wrote, copy each of their instruction files unchanged beside the Method and list them in
files. A run step reads them and returns their complete text, and every model step that applies them receives that text inin. Each step prompt says the step’s own task and tells the model to follow every rule in that text. Do not reword, shorten, summarize, or split the user’s rules, and do not leave one out as background: a reworded rule can change its meaning, for example when a condition (“only when”, “unless”, “after”) or an exception is lost. In the table of rule 3, list each instruction file with the steps that receive it. - Compare with the old agent before the Method replaces it. Choose 3 to 5 sample inputs from the user’s data, including the hard ones. Run the old agent as the user runs it and run the Method on the same inputs, and show the user every difference side by side. Fix each difference that the user does not accept, and run again. Do not say that the Method replaces the old agent, or does what it did, until the user has seen this comparison.
- Use the defaults without asking. Model steps that name no model run on the user’s own Claude Code or Codex subscription when one is signed in (hosted models on account credit only when none is), and
classifyuses Method’s classifier, so no model or classifier keys are needed. To keep the model that existing code uses, addmodels: {writer: provider/model}to the Method and usemodel: writerin the steps (ormodel: provider/modelon the step); it needs no key. Only when the user asks that model requests go straight to their own Anthropic or OpenAI account (not through Method or OpenRouter), use a direct provider entry,models: {writer: {provider: anthropic, model: claude-sonnet-4-6, key: ANTHROPIC_API_KEY}}, and declare the key undersecrets:. Keep the models that the Method or the existing code names: when a model step fails, show the error and ask before you change its model. Run records go to the user’s account. Setrun_data: deviceonly when the user explicitly asks for it. If they do ask for it, get confirmation from them and tell them in one line that the dashboard will no longer show inputs or results, and that improvements, Run now and Method Cloud stop working. - Keys stay out of chat. Declare each key that a script needs under
secrets:with its purpose; every script of the Method receives all of its declared secrets. Runmethod secret findin the Method’s folder: it lists the key files nearby and the names in each, never the values, and prints the import command. Run that command and tell the user which file each key came from: the key stays on this computer, so there is nothing to ask. If it finds nothing, ask the user to runmethod secret set NAME, which opens a private form in their browser. Never open, print, or search a key file (cat,grep, an editor), including Method’s own secret store, and never ask for a value in chat: the values would go into the chat. When a run says Method’s model credit is used up, runmethod config model-keyyourself: it takes the user’s own OpenRouter key from the one nearby key file that holds it, or opens a private form for it. Then run again. - Choose a sample yourself from the user’s data, and check that it has the sources the Method needs. Ask only when there is no good sample.
- Iterate.
method runprints adashboardlink when the run starts and again with its result. Give the user the link as soon as the run starts. After a good run, show the result and the link, and ask what to change. Change the step and run again. Show only results that a run made: never write or edit a result by hand, and fix a wrong result in the Method, not in the data it reads. If you cannot run, say so. - Publish with
method publish FILE --reason TEXTwhen the user wants to share or schedule a version. It runs the Method’s cases first. - Talk about the work, not about Method. Unless the user asks, do not mention Method’s versions, formats, settings files, or other internal files, and do not ask the user about them, about models, or about which saved version to use. Method updates itself and converts older Method files when it runs them. When the user asks whether a Method works, or asks you to make it work, run it with the inputs of a recent run (
--inputs-from RUN_ID) and show the result and the dashboard link in a few sentences. Say that it works only after a run completed. - One file for each Method. Change and run a Method in its own file. Do not copy it to a temporary or other folder to change it: Method does not run or save the copy while the Method’s file exists, and names that file.
- Questions in a run are for the user. When a run stops with
needs_input, ask the user itsquestionin plain words, wait for the answer, and continue the run with it as the output says. Never answer it yourself. - Make each run easy to find and to run again. Give the Method a
run_labelthat tells its runs apart, such asinputs.topic. When an input can be empty and a default picks the value, pointrun_labelat the step output that holds the resolved value, not at the input. Put the readable output, such as the report text or the message, inresult, not only in files. Write arun_promptthat says where each input comes from (for example “as_of is today’s date in YYYY-MM-DD”) and what to show at the end. Leave SDK, runtime, and version details out of it. - Run again from the dashboard. When the user pastes a “Run again” prompt from the dashboard, run with
--inputs-from RUN_IDand change only what the prompt names: put those values in a file and add--inputs FILE.
A Method that just works
- Exact things in code or data. Put exact rules, values, dates, thresholds and lists in a
runstep and a data file, not in a prompt: code does them the same way every time. - A model step only for judgement: reading, writing, and deciding what a text means. Give it the text in its prompt (a
call); use anagentstep only when it must search, choose files, run commands, or act. - A check on each output that matters, so a wrong output is caught and tried again.
- Keep a coherent task together. Several output fields do not require separate model calls. Split only when an observed error needs a separate operation.
- Keep the user’s words word for word. Their rules and instructions stay as they wrote them; add your own text beside them, and ask before you change theirs.
- Each correction becomes a check (a case) that fails on the wrong run and passes on a right one, and every earlier check keeps passing. The check tests what the correction says (the corrected parts, and the parts the person left, as labels: a parts check), not a copy of the whole result.
- A fix works on the next input. Write the general rule that the correction’s reason gives, never an input’s text, file name or answers: a rule for one input is refused. A reason that applies to other inputs becomes a rule for every input (
--every-input), which Method also tests on the inputs of earlier checks.
Design from the problem
Design the Method from the decision it makes, not from the code, prompt or Method that it replaces. Do this in a redesign (method redesign, which Method also tries by itself after every 8 new saved checks), when the corrections show what goes wrong. A new Method starts as one model step (a call when its input is text that fits in a prompt) and exact code checks (Build a Method, rule 3).
- Start from the decision. Write down what one input is, what one answer is, and what decides the answer. Keep old code only for the rules that encode a person’s rule book.
- Exact things in code or data. A rule with one right answer is a
runstep with a data file. - A model step only for judgement.
- The step that decides sees the source. Give it the source text (the document, the page, the record, or the passages of it that code found), not only fields extracted from it: an extraction loses what its schema did not ask for.
- Code gathers the evidence; the model weighs it. A
runstep finds what the decision needs (the same entity in the history first, then the same kind of item from any entity, with counts and dates) and passes it to the deciding step. - Preserve source context. When the document fits in context, give the deciding call the complete document. Do not replace it with keyword-selected passages merely to reduce tokens: definitions, exceptions and governing clauses can change an answer. Use retrieval for inputs that do not fit, and test that the decision still receives the necessary context. Add an audit or repair step only for a demonstrated failure, then keep it only if validation shows an improvement.
- Code does not decide what needs judgement. A fixed resolver that sends every conflict to review becomes one piece of evidence for the deciding step.
- Use the smallest effective design. A single call can answer several related questions about the same source. A correction should first change the faulty instruction. Add steps only when they solve an observed problem; each step that applies the person’s rules gets all of them.
- A check needs an outside signal. A second call with another framing that sees the source (“find any part of this answer that the source does not state”), or code that checks against data. A model that rereads its own answer is not a check. The check reports; it does not change the answer.
- A gate routes. Code combines the checks into “use it” or “a person checks it”, with the reasons.
- Agreement of different framings, not repeats. Two runs of one prompt agree on the same wrong answer.
- Confidence is a probability or an agreement, never a stated “high”.
- Labelled examples for a fuzzy convention. When the right answer follows a convention that rules state badly, give the deciding step similar past cases with their right answers, found by code, in place of more rules.
- Measure a change on inputs you set aside first. Choose them before you read any failure. Count a confident wrong answer as worse than an honest “a person checks it”, and compare two versions on the same inputs.
Write each prompt
- One coherent task per prompt. Do not split a prompt only because it says “then” or returns several fields. Keep related decisions over one source together unless a measured failure calls for a separate step. Every step that applies the user’s rules receives all of them, word for word.
- Say what to do. Leave out background that does not change the output. The user’s own rules and instructions are not background: pass them unchanged as an input, and do not restate them in your own words.
- Show 1 to 3 examples of good output. Take them from the user’s work: examples in an existing prompt, a past output that the user approved, or the first run that the user accepts. Pass a long example as an input, not as text in the prompt.
- Put the output shape in
out, not in the prompt. - Say what to do when the input does not have the answer, for example “leave due empty”. For classify, add an option such as
unclear.
out):
A complete small Method
- One task per step. The classifier only scores urgency. The script applies the 0.7 rule. The call only writes.
- An example output. The
exampleinput is a past summary that the team liked. One real example makes the style clear in fewer words than a description of it. - A way to say “I do not know”. The
unclearoption and the 0.7 rule mark tickets for a person to check, so a guess is not hidden. - The output shape is in
out, not in the prompt.
read_tickets.py reads HELPDESK_TOKEN from its environment. The classify and call steps use the Method account, so they need no key.
Watch it
- Look at failed and unconfirmed runs on the dashboard. A run that needs attention says which step failed and why.
- For classify, watch how often the choice is
unclearor below your threshold. A rise means the inputs changed. - For slow effects such as email delivery, schedule
method observe --pending.
After it works
- Put it in an app:
method connect APP_FOLDERpublishes it and prints the code to add. - Record each reaction: with the Method plugin, Method records the user’s reaction itself: when their message corrects or approves the result of the newest run in the chat, it records the message word for word against that run, and tells you what it recorded; do not judge that message again. Without the plugin, or for an earlier run, or when Method says that it could not decide, run
method judge RUN_ID wrong --note "THEIR WORDS"(with--corrected FILEwhen they gave the right result) when the user corrects it or asks to change the Method because of it, andmethod judge RUN_ID rightwhen they use or approve it. Do not ask them to confirm it, and do not edit the Method yourself for the same correction. A wrong judgment returns at once and tests a fix in the background with the user’s own Claude Code or Codex; the next run of the Method uses the fixed Method as soon as the fix is ready, and prints what each fix did. Do not wait for the fix. When the user asks for the corrected result now, runmethod wait(it waits until the fix ends), tell the user its line, and show the tested output that it prints; never run a Method that sends or changes things again just to show it. Whenmethod runormethod waitprints a question, show it to the user word for word, never answer it yourself, and send their words withmethod answer JUDGMENT_ID "THEIR WORDS". A conflict line (two of their corrections cannot both hold) changes nothing and waits for nothing: show it, and when they say which one should hold, send it the same way. Method tries a redesign by itself after every 8 new saved checks; to try one now, runmethod redesign FILE: it rewrites the Method from the problem (see Design from the problem) on every second saved check, and keeps the rewrite only when every test completes, every previously passing case still passes, and it either passes more cases within 1.2 times the tokens or uses fewer tokens at the same accuracy. These saved cases were used in earlier corrections; separate unseen examples are needed to measure generalization.method learned FILElists what the agent learned from corrections;method undorestores the Method as it was before Method’s last change. When the user corrects work they will give you again and no Method does it yet, build a Method from that work, run it on the same input, and judge that run. Tell the user what was kept and where; never say a correction is recorded or applies from now on unless a judgment, a learned rule, or a file saved it. - Explain the scripts:
method explain FILEwrites a card for each script step.
Field reference
method schema method prints the complete JSON schema.
Choose the design
For browser work, declare a browser environment and select it with do.browser: environment.NAME; see method authoring example social-briefing.
Add a check only when it catches a failure that matters to the result. A change to a service, an API, email, or a browser that sends needs an effect that reads the result back; local file writes need neither. When you convert existing code, do not keep its checks and tests only because they exist. The rules are in method authoring concepts.
Use when for conditions, each for collections, repeat for bounded iteration, and after for order without a data dependency. Split steps for a check, a retry, a human decision, or an external change.
Use method schema for field definitions, method authoring concepts for the format, method authoring execution for setup, and method COMMAND —help for command arguments.
Example catalog
method authoring example notes-summary: The smallest complete Method: reads a folder of meeting notes, finds decisions and action items with one model call that shows two good items, and saves a summary file. A recorded case keeps one correction. Teaches: files connection, call with examples of good output, a recorded case in cases/.method authoring example message-routing: Classifies a customer message with Method’s classifier, then a script rule chooses a support destination. ticket.method adds one ticket write that a retry does not repeat. Teaches: classify with an unclear option, a threshold in a script, an effect that reads the ticket back, retry without a duplicate write.method authoring example support-triage: Reads a help desk ticket, classifies its team, refund request, and urgency, drafts a first reply, updates the ticket, and asks a person when the team is unclear. Teaches: models and secrets, classify with options, yes_no and levels, an unclear path, ask, effects with an http observer, a committed case, method connect.method authoring example outbound-management: Reads email and prospect sources, updates persistent CRM state, and saves daily tasks and outreach drafts for review. Teaches: state across runs, script checks, examples of good output, accept, fixtures.method authoring example social-briefing: Researches a topic through Grok, alphaXiv, and LinkedIn in the browser, then writes a briefing with quotes and source links. Teaches: browser agent, call, no_effect_reason, accept.method authoring example daily-briefing: Turns prepared records of one fictional day into a cited briefing website, using an approved writing example, a source check, and rendering scripts. Teaches: approved example as an input, script tool, source check, website result.method authoring example support-replies: A comparison: is a Method reply agent better than plain Claude Code at following a support lead’s 20 corrections? Both get the same corrections one at a time and are measured on new tickets after every 5. Teaches: a .compare file: question, arms, deliverable, treatment with checkpoints and a seed, a checklist from each expected answer with covered items, the rule with a guard, learners, assumptions, notes, decided_by_you.