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. Task: {task} Inputs and outputs: {inputs and outputs} Available tools: {tools} Risk level: {risk} Latency and cost limits: {limits} Success criteria: {success criteria} 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

    Customize and run

    Paste in your code, error message, or change description, then send it to get targeted guidance.

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, replace any placeholders with your own details, and send it. You can also 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.

Featured
Coding

Autonomous agent delivery loop designer

Turn a project goal into a repeatable, auditable spec-build-review loop with explicit stop controls.

agent workflowdelivery loop
Featured
Productivity

Editable report bundle planner

Plan a consistent workbook, presentation, and narrative report from one brief while keeping charts editable.

reportingspreadsheet
Research

Evidence-first content niche researcher

Evaluate a content niche through newcomer performance, consistency, monetization assumptions, and recent momentum.

market researchcontent strategy