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 X post appears below, and you can also open it directly on X.

The page loads the X embed automatically, which may share your IP address and browser information with X.

Open original on X

Loading the X post…

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

Website 9/10 optimization loop

Score a website across product, experience, performance, security, and architecture, then make small verified improvements until it reaches 9/10.

webquality-audit
Coding

Turn a product idea into a working Web MVP

Turn a rough product idea into a working, verifiable Web MVP that is ready for the next iteration.

webmvp
Coding

Turn a business requirement into a publishable landing page

Build the information hierarchy, conversion path, responsive implementation, and release checks around one business goal.

weblanding-page