ForkFree

Prompts / Agents and automation

Audit Subagents Before Folding Them

You get a verdict for each subagent, backed by evidence and a test, plus a safe order for making changes. It works because it forces a measured decision per subagent instead of a blanket rewrite.

Worked in our testIt covers every step and the required format with well-evidenced verdicts, five-task tests and a risk-ordered plan. But Product Questions gets a hedged "fold, or keep with full message" instead of the one verdict asked for, and the closing question is compound.

The prompt

Act as a careful AI systems reviewer who simplifies multi-agent setups only when evidence supports it.

Task: Review the multi-agent system described below and decide what each subagent should become. Do not assume fewer agents is always better.

System description: {system_description}
Traffic and failure notes: {usage_notes}

Steps:
1. List every subagent with its job, and note which ones nearly always run together.
2. Give each subagent one verdict: merge (always runs with another), fold (becomes a skill or tool in the main agent), call as a tool (keep, but return a structured result), or keep (earns its own context).
3. Justify each verdict with evidence from the notes. Keep a subagent if it does parallel research, independent checking, or reads far more than the main agent needs afterwards.
4. Define a simple test for each change: five realistic tasks with a clear correct outcome, scored before and after.
5. Order the changes from lowest to highest risk, one at a time.

Output: A table with columns Subagent, Verdict, Evidence, Test. Then a numbered change plan and one question for me to confirm before any change is made.

Change the parts in curly braces. Use it before rebuilding a router-and-specialists setup that feels slow, costly or brittle.

What happened when we ran it

We sent

Act as a careful AI systems reviewer who simplifies multi-agent setups only when evidence supports it.

Task: Review the multi-agent system described below and decide what each subagent should become. Do not assume fewer agents is always better.

System description: Our customer support bot has a router agent in front of five subagents: Refunds, Order Status, Shipping Address Changes, Product Questions and Escalation Writer. Each subagent has its own prompt and tools. The router picks one based on the customer's first message and passes along a short summary.
Traffic and failure notes: Order Status and Shipping Address Changes run together in about 70% of conversations, because customers who ask where a parcel is often want to change the address. Refunds handles about 30% of traffic and rarely needs other agents. Escalation Writer reads the whole conversation history, often 20,000 tokens, but only produces a 150-word handoff note. Product Questions sometimes gives wrong answers when the router summary drops key details.

Steps:
1. List every subagent with its job, and note which ones nearly always run together.
2. Give each subagent one verdict: merge (always runs with another), fold (becomes a skill or tool in the main agent), call as a tool (keep, but return a structured result), or keep (earns its own context).
3. Justify each verdict with evidence from the notes. Keep a subagent if it does parallel research, independent checking, or reads far more than the main agent needs afterwards.
4. Define a simple test for each change: five realistic tasks with a clear correct outcome, scored before and after.
5. Order the changes from lowest to highest risk, one at a time.

Output: A table with columns Subagent, Verdict, Evidence, Test. Then a numbered change plan and one question for me to confirm before any change is made.

The model replied

## 1. Subagent inventory | Subagent | Job | Runs with | |---|---|---| | Order Status | Look up parcel location/state | Shipping Address Changes (~70% of conversations) | | Shipping Address Changes | Update delivery address | Order Status (~70%) | | Refunds | Process refund requests (~30% of traffic) | Rarely anything else | | Product Questions | Answer product questions | Depends on router summary | | Escalation Writer | Turn the full history into a 150-word handoff note | Runs at end of escalations | ## 2. Verdict table | Subagent | Verdict | Evidence | Test | |---|---|---|---| | Order Status + Shipping Address Changes | **Merge** into one "Delivery" agent (or a single skill and toolset) | They co-occur in ~70% of conversations. Under the current design, the router must pick one first, so the other is likely reached only by a second hop with a lossy summary. The domain (the same order and shipment record) is shared. The 30% residual is not evidence that they need separate contexts. It only means the merged agent must handle status-only cases cleanly. | 5 tasks: (a) status only, (b) address change on an unshipped order (allowed), (c) address change on a shipped order (must refuse or redirect), (d) "where is my parcel, and move it to my office" (both), (e) address change on an order that does not exist (graceful failure). Score: correct outcome, correct tool calls, number of handoffs. Run on the old and new setup. | | Refunds | **Keep** | ~30% of traffic, and it rarely needs other agents. It is self-contained with its own policy and tools, and has a clear boundary, so a separate prompt keeps refund policy out of the other flows. Evidence does not support merging or folding it. Caveat: "keep" is based on isolation, not on any evidence of a context-size benefit, so revisit if its prompt is small. | 5 tasks: (a) eligible refund in window, (b) outside window (decline), (c) partial refund for a damaged item, (d) already refunded (no duplicate), (e) refund plus an angry tone (no policy leak, correct amount). Score: amount, policy applied, tool call correctness. This is a baseline regression check, since nothing changes. | | Product Questions | **Fold** into the main agent as a skill, or keep with the **full first message** passed instead of a summary | The failure is caused by the router dropping key details. The fix is to remove the lossy summary, not to restructure the agent. There is no evidence of parallel research, independent checking, or large reads that would justify its own context. Folding removes the summary hop entirely. | 5 questions where the key detail sits in the customer's first message (a model number, a size, a compatibility constraint, a country, a prior purchase). Score: answer correct and uses the detail. Compare the summary-based setup against the full-message or folded setup. | | Escalation Writer | **Call as a tool** (keep the isolated read, return a structured result) | It reads about 20,000 tokens of history and produces only about 150 words. This is the clearest case of reading far more than the main agent needs afterwards, so its separate context earns its place. The weak point is the output format, so return structured fields (issue, steps tried, customer sentiment, order IDs, requested outcome, next action) to the main agent. | 5 recorded long conversations with a known set of facts. Score: each fact present, nothing invented, under 150 words, and structured fields complete. Have a person or a checker confirm the facts. | | Router | **Keep for now, but change what it passes** (full first message plus a summary) | Summary loss is the only failure observed in the notes. Removing the router is not supported by evidence. After merging the delivery agents, it picks among three or four targets, which may later be replaced by the main agent calling tools. | 5 first messages with a known correct destination, including two ambiguous or multi-intent ones. Score: right destination and no dropped details. | ## 3. Change plan (lowest to highest risk, one at a time) 1. **Pass the full first message alongside the summary** to every subagent. This is a tiny change that targets the observed Product Questions failure. Run the Product Questions and router tests. Note that this partly confounds the later Product Questions fold, so record the score here before moving on. 2. **Structure the Escalation Writer output** (call as a tool). The read stays isolated, and only the return format changes. Run the escalation test. 3. **Merge Order Status and Shipping Address Changes.** This has the best evidence and the biggest benefit (the ~70% co-occurrence), but it changes prompts and tools together. Union the toolsets, and keep the "no address change after shipping" rule explicit. Run the delivery test. Keep the old agents available to roll back to. 4. **Fold Product Questions into the main agent as a skill**, only if step 1 did not fully fix the errors or if the extra hop still costs latency. If step 1 reaches the target score, leave it as is. Run the product test. 5. **Revisit the router** after the other changes, only if the test results show the routing step still adds errors or latency. Leave Refunds untouched throughout. Stop rule: if any step scores worse than the baseline on its five tasks, revert it before moving on. ## 4. Question to confirm Does the Order Status + Shipping Address Changes pair share the same order system and permissions, or does the address-change tool have write access or approval rules that Order Status should never hold? If so, I would merge the prompts but keep the write tool gated, rather than giving the merged agent unrestricted access.

Run on Claude Sonnet 5.5, 10 Nov 2026. Automatic check: 4 out of 5.

Mentioned for

Claude, Claude Code

Where it came from

Found on GitHub, shared by anthropics: anthropics/single-agent-loop-kit.

This is our own version of the idea, written and tested by us. The original may differ.

More agents and automation prompts

Agents and automation Partly worked
Rewrite Agent Rules With Explicit Exceptions

You get a cleaner set of agent instructions where risky actions have a clear approval gate instead of a vague ban, plus progress updates and a cap on helpers. It works because models tend to treat "never" as absolute, so spelling out the exception avoids both blocked work and unsafe guesses.

Found on Web, shared by Anthropic (official docs)
Agents and automation Worked in our test
Make the AI Finish Every Task

You get every item on a list finished properly, instead of a few done and the rest left as suggestions. It works because it sets the depth of thinking up front, defines "done" as real deliverables, and makes the model count its work before replying.

Found on Web, shared by Moritz Kremb (@moritzkremb)
Agents and automation Partly worked
Find Silent Errors in Agent Traces

You get a structured list of hidden mistakes in an agent run, even when every tool call succeeded. It works because the AI checks each step against the stated goal instead of only the final answer.

Found on Hacker News, shared by skull8888888