Agent pattern and critic loop

Choose the right control flow, then improve reliability with an independent critic and bounded revision loop.

Prompt
You are a multi-agent systems adviser. Select a control flow for the task below and design an executor-critic loop. Start with the current conversation, attachments, and accessible materials. Treat available information as the input. When details are missing, choose safe, sensible, easy-to-edit defaults and state them. Ask the minimum number of concise questions first only when missing facts would create a high-risk action or fundamentally change the result. Task: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default Inputs and outputs: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default Available tools: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default Risk level: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default Latency and cost limits: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default Success criteria: Infer it from the current conversation, attachments, or accessible project; when unspecified, use a safe, sensible, easy-to-edit default First decide which pattern fits: - Sequential: steps are fixed and branching is rare. - Reactive: the next action depends on the latest observation. - Planning: dependencies require a plan before execution. Explain the decision using task dependencies, environmental change, failure cost, and observability. If a hybrid is appropriate, provide the state transitions and boundaries. Second, design two independent roles: 1. The executor produces a candidate result and supporting evidence but never grades itself. 2. The critic checks correctness, completeness, sources, constraints, safety, and recoverability against a predefined rubric. Fluent wording is not evidence of success. Third, define a revision protocol capped at three rounds. Every round must return the failed rubric items, reproducible evidence, the smallest proposed correction, whether execution must be repeated, and a pass or stop decision. Do not let the roles share a hidden conclusion. When the critic cannot verify a claim, label it insufficient evidence. Finish with the recommended architecture, role prompts, state machine, scoring rubric, retry and stop rules, human escalation conditions, and one demonstration using sample input. Never let two model opinions automatically authorize a high-risk action.

Inspiration source

This prompt is an original adaptation. The source link is provided for attribution; load the post only if you want to inspect the reference.

The X embed stays off until you choose to load it. Loading it may share your IP address and browser information with X.

Open original on X

Editor's note

Use this before building an agent to choose sequential, reactive, or planning control. The critic must rely on reproducible evidence; agreement from another model is not factual verification.

About this prompt

Best for code review, debugging, and development tasks where you need precise, actionable engineering feedback.

How to use this prompt

  1. 1

    Copy the prompt

    Click Copy prompt to grab the full text, ready to paste anywhere.

  2. 2

    Paste into your AI tool

    Drop it into ChatGPT, Claude, Gemini, or any AI assistant you use.

  3. 3

    Run or refine

    Run it against the current project or conversation. Add code, an error, or change details only when they are not already available.

Frequently asked questions

What is the Agent pattern and critic loop prompt for?

Choose the right control flow, then improve reliability with an independent critic and bounded revision loop.

How do I use this prompt with ChatGPT or other AI tools?

Copy the prompt, paste it into your AI assistant, and send it. It will use the current context and safe defaults; you can add details or open it in the card maker to restyle and share it.

Is this prompt free to copy and customize?

Yes. Every prompt in the library is free to copy, adapt, and reuse, with no account required.

More prompts from the Coding collection.

Coding

First-Principles Subtraction Review

Before calling the work done, revisit the goal and challenge weak assumptions and unnecessary complexity. Prioritize deletion, simplification, optimization, then automation, and leave good work unchanged.

first-principlescode-review
Release Notes Page
Coding

Release Notes Page

Turn a defined range of pull requests or commits into user-facing release notes with traceable evidence, plus a reviewable stable-page update and notification draft.

opsworkflow
New Hire Ramp Plan
Coding

New Hire Ramp Plan

Plan first-week introductions, reading and a small verifiable deliverable from role goals and authorized onboarding examples, without automatically scheduling meetings.

opsworkflow