Giving the brief away
I said the brief was the artifact and the agents were fungible. So I packaged the brief as a repo, handed it to a teammate, and found out what breaks when someone else runs your workflow.
In May I wrote that the brief was the artifact and the agents just render it. 1 That was a claim, not a result. This summer the claim got its test: the candidate-research workflow behind that post left my machine, became a repo a teammate could clone and run, and I got to watch which half of my confident sentence was true. He was productive with it the next day. He also found a hole I had built, proved my fix for it wrong, and was right about the reason.
The kit is one command, an orchestrator. It looks up a candidate, sends a research subagent out to the public record, checks that every finding in the draft carries a source, and only then publishes the page.
#What packaging meant
The workflow had two halves, and neither one traveled. The runbook, the conventions, the catalog of tells lived in my personal notes vault; the scripts lived next to it, wired to my paths, my Python environment, my pre-approved permissions. Extracting it produced four things:
- A slash-command skill that orchestrates the whole run: look up the candidate, pull the resume, sweep the public record, dispatch the researcher, check citations, publish.
- A research subagent that carries the methodology in its own system prompt, so quality doesn’t depend on how well a calling session paraphrases the brief.
- Scripts on the standard library only. No virtualenv, no pip, nothing to install; a stock python3 runs them.
- Two hooks: database writes locked by ancestry to the one table they’re allowed to touch, and candidate PII physically blocked from entering git.
The code was the fast part. Rewriting a runbook for a reader with zero context is the slow part, because that’s where your assumptions surface, one at a time, each disguised as a sentence you almost didn’t write down. Every “obviously” in my notes became either an instruction or, later, a bug. The repo itself stays private — it drives a live candidate database — but nothing in it is specific to me anymore: no personal paths, no personal permissions, a blank env template.
The first commit was 22 files and 1,693 lines. The kit never writes to my notes vault, and my side of the split kept two triggers: a morning report of who is missing research, and a nightly driver that runs the kit with nobody at the keyboard. The contract between the two is one string, the title prefix of the research page. Change it on one side and the other stops seeing coverage.
The write hook takes the target of any write made through the interactive database connector, walks up its parents for at most four hops, and blocks the call unless the chain reaches the candidate table. Two limits shipped with it. With no API token configured it can’t do the walk, so it prints a warning and allows the write. And it only saw the connector’s calls. The publish script, added thirteen minutes after the first commit because the connector isn’t available in a headless run, went straight to the API, and when it was handed a row id nothing checked where that row lived. A mistyped id would have put a research page under a stranger’s page. I closed that the next evening by moving the walk into shared code that both write paths call. The shared version fails closed: an id it can’t resolve refuses the write.
The git hook sits behind the ignore file. It blocks any git add that names
the working directory or the env file, and any commit while either one is
staged, so a forced add doesn’t get through.
The ancestry walk, as pseudocode:
start at the target of the write
repeat at most four times:
if this is the candidate table: allow
look up the current page or database; if the lookup fails: refuse
if its parent is the candidate table: allow
if its parent is a page: move up to that page and go again
otherwise: refuse
out of hops: refuse#Five ways it broke before anyone else touched it
Every one of these failures happened while the only user was still me. None of them is about hiring.
- An untrusted workspace silently voids the project permission file. Clone the repo, skip the trust dialog, and every shell call the agent makes is denied. Interactively you’d get a prompt; in a headless run you get nothing but the bill. The agent flails, the budget drains, nothing gets produced, and no error says why. Silent and expensive is the worst combination, so setup now names the dialog and a preflight check refuses to spend money until the workspace can work.
- Trusting exit codes. The first unattended run took 1.6 minutes, cost about a dollar, exited zero, created nothing, and logged itself as a success. The driver now decides success by querying for the page it was supposed to create. Ask the system whether the artifact exists; never ask the process whether it thinks it succeeded.
- Permission syntax I assumed instead of tested, twice. A rule that passed my own test didn’t match the path the agent actually used. A write rule spelled as a relative path matched the relative form I tested and not the absolute path the agent actually used, and the deny loop that followed looked exactly like failure number one. The third time I touched a permission rule, I wrote a throwaway probe first. A probe costs a minute and protects a run that costs real money.
- Dispatching by name when I already had the unique id. Two candidates with the same name stalled a run that the row id would have sailed through. The id now flows from lookup to publish and the name is display only.
- No unattended-mode rule. The agent hit real ambiguity, reasoned about it correctly, and asked me what to do, in a nightly run with nobody awake to answer. Correct judgment, wrong ending. The brief now says it plainly: non-interactive runs never ask. Take the documented default or emit one BLOCKED line and stop.
Then the sixth, the one that wasn’t mechanical. The first real nightly run swept the entire candidate database and spent its whole budget researching applications far outside scope. The actual ask was one funnel stage. Worse: my own runbook had already ruled that scope out, in writing, precisely so research wouldn’t fire on untriaged arrivals. I re-introduced the exact thing a past decision existed to prevent. Scope bugs cost more than crashes and take longer to notice, because nothing fails.
Nothing errored. The job ran, exited clean, and researched the wrong people.
#What each fix checks now
Every fix on the kit’s side landed the same evening as its first commit.
Timeline of one evening's 8 commits. The first commit lands at 9:41 PM. A wording change follows at 9:51 PM. Two paths for headless runs land at 9:54 and 10:02 PM. Two permission fixes land at 10:25 and 10:56 PM. Two rules for unattended runs land at 11:07 and 11:11 PM.
The preflight reads the agent CLI’s own config file, finds the entry for the kit’s directory, and exits with the fix in the error message if the trust flag is off. It runs only when the driver is about to spend money, so a dry run skips it. It has a gap of its own: if the config file can’t be read, or the CLI has never seen the directory and has no entry for it, the check lets the run through.
The success gate lists the child pages under the candidate’s row and looks for the research page’s title prefix. The same function runs before dispatch to skip anyone already covered, so one string decides both “skip” and “succeeded”. Every run also appends the CLI’s full JSON result to a log file, including the list of denied tool calls, so I can diagnose a failed night in the morning without paying to reproduce it.
The permission failures came in three shapes. Write had no allow rule at
all, and a run got through the public-record sweep and then died on three
denials trying to save its draft. The next run succeeded but logged four
denials it had to work around. My rule for the working directory matched
only the relative spelling. The skill’s own example set an environment
variable inline in front of the sweep script, and an inline prefix breaks
prefix matching on the allow list. And the agent reached for a compound
mkdir && cat command to save the draft, which can’t match an allow rule
either; the skill now tells it to use the Write tool.
I fixed the relative-path rule by adding an absolute one, which put my home directory into a file I was about to hand to someone else. It matched nothing on his machine. During review of the first pull request I replaced eight path rules with four anchored at the project root.
On the same-name run, the lookup did its job and returned an “ambiguous” error listing both row ids. The skill gave no sanctioned next step, so the agent improvised a shell loop and a throwaway helper script, had both denied, and gave up. The driver already knows the exact row, so it now passes the id on the command line and the publish script takes the same id.
The unattended rule ships with four documented defaults. Two rows with the same name that are different people: research the row whose id you were given. The same person re-applying, with research already on either row: write nothing and stop with a BLOCKED line. A missing resume is not a blocker, and neither is a sweep that failed or is still running; the run proceeds without it and says so on the page. The run that prompted the rule was the second case. The agent had worked out that two rows were one person, and that the older row already had research.
On the scope bug, the run took four candidates, oldest first, which put it in applications from the previous December that had no status at all. The driver now researches one status by default, the one a person sets after deciding a candidate is worth the time. An empty status list is an error instead of meaning everyone, and the first line of each run’s log prints the statuses and the model.
The driver’s run for one candidate, as pseudocode:
for one candidate:
run the agent CLI headless, in the kit's directory, with:
the research command and the candidate's row id
JSON output
a budget cap for this one run
a permission mode that denies instead of asking
no saved session
no connectors, so the publish script is the only write path
the model, Sonnet unless overridden
a minimal environment and a 45-minute timeout
append the CLI's JSON result to the run log:
cost, error type, denied tool calls
list the child pages under the candidate's row
if one of them has the research page's title prefix: success
otherwise: failed, whatever the exit code saidThe working-directory write rule went through three spellings:
1. relative to the working directory matched the relative spelling only
2. the absolute path on my machine added for the path the agent used
3. anchored at the project root after review; the same on every cloneThe unattended rule comes down to this: if something blocks the run, it publishes nothing and ends with one line that starts with BLOCKED and names the specific thing a person has to decide. It never leaves a half-written page behind.
#The model question, one afternoon’s worth
Packaging forced a question I’d been dodging: does this workflow need the big model? One afternoon gave me a field answer, head-to-head on live candidates instead of vibes. Fable took 10.2 minutes; Sonnet took 6.2 minutes at roughly a third of the cost, and Sonnet’s output was not worse. It caught exactly the class of contradiction the workflow exists to catch, cross-checking an employment claim against public records, and it correctly discarded a coincidental username match as a different person. Sonnet is now the tracked default.
The caveat rides along in the repo: that was one run each, on different candidates. “No loss observed” is not “proven equivalent.” It’s the difference between a field note and a benchmark, and pretending otherwise is how a config default hardens into a false belief.
I set the default in the driver’s code instead of its env file, because the env file isn’t tracked and a fresh clone would otherwise run whatever model the CLI happened to be configured with. A flag overrides it per run and an env variable per machine. At the time each candidate was capped at 45 minutes, four candidates a night, two at once.
#Then someone else ran it
A teammate started using the kit the day after it shipped, and within a day he’d opened the repo’s first pull request, for a hole I had built. The research subagent had shell access, and the project settings pre-approved the publish script. Those two facts, together, let the subagent publish without the citation check that downgrades unsourced claims. It did exactly that three times in one of his batch runs.
The path I designed: the orchestrator runs every step
- Look up the candidate
- Pull the resume
- Sweep the public record
- Dispatch the researcher
- Check citations
- Publish
The path I left open: a researcher with a shell
- Research
Check citations- Publish, with the pre-approved script
Taken three times in one batch run.
After the fix: what the researcher can use
- Web search
- Web fetch
- Read
- Glob
- Grep
Shellremoved
Nobody decided the subagent should have shell access. It had it because I never took it away, and the default is everything. I had already met the publishing behavior and thought I’d fixed it with a line in the brief: don’t publish yourself. It reduced the behavior without stopping it. His framing is the one that stuck: shell access plus a pre-approved script is a structural bypass that prompt wording can’t reliably close. The agent never needed the shell — read-only file tools like Read, Glob, and Grep cover everything it does locally —, so the fix was removal, not rewording, and the publish step now belongs to the orchestrator, downstream of the citation check. 2
The publish script wasn’t in the first commit’s allow list. I added it thirteen minutes later, in the commit that created the script, so the orchestrator could publish without a prompt in a headless run. The subagent had carried a shell since the first commit. His pull request notes that the instruction not to publish held in most later runs and not all of them. The repo’s agent contract now carries the warning: don’t give that agent a shell again without also re-scoping the publish permission, or research pages can land on live rows unreviewed.
The whole fix is one word off one line of the subagent’s definition. Its tool list had been web search, web fetch, the three read-only file tools and the shell, and the shell came off. The allow rule for the publish script, the other half of the pair, stayed where it was.
The second thing he did impressed me more. He removed the shell access, tested in the same session, and watched the agent use the shell anyway. So he flagged his own fix as unverified, with a theory: tool grants resolve at session start, so an in-session test of a permission change proves nothing. He was right. A fresh session the next day confirmed the capability was gone, and his in-session test had been a false negative. An honest “I could not confirm this” is worth more than a green checkmark, and a repo one day old already had a better review culture than some production services I’ve inherited.
His pull request spelled out the check that would settle it: start a new session, spawn the researcher, ask it to run a shell command, and confirm that it can’t. While it was in review I pushed four commits of my own. Two brought the written rules in line with what the publish script now did, one put the ancestry check on the script’s write path, and one took my home directory out of the permission file.
#The scorecard on the May claim
The methodology, the conventions, the tier discipline, the tells: all of it transferred intact and produced comparable work in someone else’s hands, on a cheaper model, the day after handoff. That half of the claim held.
What didn’t transfer was everything I had never been forced to write down, like a capability grant that only looked safe because I never combined it with the permission next to it.
What didn’t transfer was everything I had never been forced to write down: paths on my machine, a trust dialog I’d clicked through once, which funnel stage deserved the spend, and a capability grant that only looked safe because I never combined it with the permission next to it.
What didn’t transfer was everything I had never been forced to write down. Machine-specific paths. A trust dialog I’d clicked through once and forgotten existed. Which funnel stage actually deserved the spend. A capability grant that only looked safe because I never combined it with the permission sitting next to it. None of that was in the brief, because none of it had ever needed to be: I was the environment, and the environment never has to explain itself until it’s gone.
A workflow that works and a workflow that travels are separated by the set of things you don’t know you know, and every one of mine was invisible until someone else needed it. The brief was never the whole artifact. It was the half I could see. 3
Notes
- The claim being tested comes from the end of Parallel agents for hiring research: what survives a model change, a tool change, a team-member change is the brief. ↩
- The principle has a name and a birthday: least privilege, from Saltzer and Schroeder's 1975 "The Protection of Information in Computer Systems". Fifty years later, agent tooling is re-learning it one pre-approved script at a time. ↩
- Companion posts: Discovery is cheap, curation is the cost covers the workflow this kit packages, and Treating a notes app like production makes the same argument about counted gates and silent failure from the personal-infrastructure side. ↩