Controller Prompts: How to Work Together and Get Things Done
Definition of Controller Prompts
Effective prompts for LLMs usually operate on two distinct levels:
- What: The desired outcome or end result
- How: The process for achieving that outcome
Consider this simple prompt for creating a tutorial about the periodic table in chemistry:
Write a beginner-friendly tutorial in Markdown format on the periodic table in chemistry, covering all key concepts a newcomer should learn.
This prompt specifies what to create but not how to create it. Without process guidance, the model typically generates the entire tutorial at once. It is not possible to provide feedback during creation. If the style or difficulty level is wrong, you only discover this after receiving the complete tutorial.
A better prompt for writing such a tutorial which gives more control over the process is the following:
## Role
You are a senior writer and explainer.
## Goal
Write a beginner-friendly tutorial in Markdown format on the periodic table in chemistry.
## Workflow
1. First reply:
* Output only a detailed outline (sections + subsections).
* Don’t write the actual content.
* Ask me to review/adjust the outline.
2. After I approve:
* Expand the tutorial section by section.
* After each reasonable chunk, ask if I want you to continue.
## Content specification
- Cover all key concepts a newcomer should learn.
This example contains two distinct levels of instruction:
- First level (goal and content specification): Defines what the LLM should produce
- Second level (role, workflow, interaction): Defines how the LLM should work
In many cases you can separate the second prompt level from the first and reuse it for multiple tasks within a domain. From the above prompt a generic reusable template wrapper can be created for writing tasks:
## Role
You are a senior writer and explainer.
## Goal
{Describe the document you want in a few lines.}
## Workflow
1. First reply:
* Output only a detailed outline (sections + subsections).
* Don’t write the actual content.
* Ask me to review/adjust the outline.
2. After I approve:
* Expand the tutorial section by section.
* After each reasonable chunk, ask if I want you to continue.
## Content Specification (TASK SPEC)
{Paste your actual content requirements / bullet list of topics here.}
In this template, you fill in the {…} placeholders with the specifics of your writing task. In a later section below, there is a more refined version of a controller prompt for writing tasks.
We call these reusable prompt templates that describe how tasks should be executed controller prompts:
A controller prompt is a reusable instruction pattern that governs the process (roles, phases, interaction rules, granularity) by which an LLM executes tasks, rather than defining the content of any single task.
Think of a controller prompt as the director of your conversation with the LLM.
In short:
- Task specification: “What I want done”
- Controller prompt: “How we should work together to get it done”
When to use
The prompting approach should match the task’s complexity and importance. Not every question requires a controller prompt. Simple tasks benefit from simple prompts.
Prompting complexity increases along a spectrum:
- Ad hoc prompting: Quick, one-off questions requiring immediate answers
- Task specification only: Clear description of what to do, suitable for medium-sized, low-risk tasks
- Task spec + controller prompt: Detailed task description plus process guidance, ideal for large, iterative, or high-stakes work
Controller prompts work best for tasks that are:
- Large: Long documents, non-trivial refactors, multi-file test suites, multi-step analyses
- Multi-step: Work that naturally follows a sequence: understand → plan → act → review → refine
- Interactive: Tasks where you want to steer, approve plans, or inject context mid-process
- Risky or expensive: Production code changes, business decisions, safety-critical steps, or anything where a poor one-shot answer is costly
- Repeated: Same patterns recurring (analyze then refactor, outline then write, etc.), the controller codifies your standard operating procedure
Software development is a domain where controller prompts are very suitable. Most coding tasks use a phased approach rather than a single large output:
Inspect → Plan → Change → Review → Iterate
Controller prompts are very applicable in this domain because they capture both the workflow and your preferences. They don’t just “generate code.” Frameworks like [Speckit]{https://github.com/github/spec-kit} build on this concept by providing libraries of reusable controller prompts.
Here is an example of a controller prompt suitable for software development:
Repo exploration navigator
You are my codebase navigator.
## Goal
Help me understand the structure and key components of this project so I can safely modify it.
## Workflow
1. First response:
- Ask me for: (a) the project’s main tech stack, (b) an entry file or directory listing, or (c) a short description of the app.
- Propose 3–5 “exploration questions” you’ll answer (e.g. main entrypoints, data flow, test layout).
2. Exploration loop:
- When I give you file contents or tree listings:
- Summarize what you see.
- Build a mental map: modules, responsibilities, dependencies.
- Keep an up-to-date bullet list of “What we know so far”.
3. When I say "I’m ready to change X":
- Use your current map to suggest where to hook in.
- Propose a plan and then switch into “feature” or “refactor” workflow.
## Constraints
- Focus on clarity and orientation, not rewriting code.
- Use diagrams or bullet lists, not long essays.
Apart from writing and software development, controller prompts are useful in the following domains:
- Research, reading, and analysis
- Tutoring, learning, and coaching
- Decision support & strategy
- Project management & planning
- Evaluation and QA
- Multi-tool / MCP orchestration
Over time you can build a small library of controllers for these and other domains. Then you just plug new task specs into the right controller.
Generating controller prompts
For complex tasks, letting the LLM infer the workflow from the task specification alone often produces less good results. However, you can use a hybrid approach that assigns some controller design to the model:
{task spec}. Design a workflow you think is appropriate (phases, when to ask me for feedback). Show me that workflow first.
After I approve, follow it.
This approach lets the model propose the controller while you retain approval authority. Notice this is already a minimal controller:
- Plan first
- Make the plan explicit
- Execute only after approval
This outperforms “task spec only” because you’ve constrained the meta-behavior.
In practice, there’s a spectrum:
- Pure task spec: Model improvises everything, including workflow
- Task spec + “plan first” meta-instruction: Model chooses workflow but shows it first
- Controller prompt: You define the workflow (phases, checkpoints, chunk sizes, interaction style)
As risk, cost, or complexity increase, move toward the controller end of the spectrum.
An extende example of a generic meta-controller is the following:
Generic meta-controller prompt (for any task)
You are an advanced assistant. I will provide a TASK SPEC below.
Your job is to:
- Understand the task.
- Design an appropriate workflow.
- Execute that workflow step by step with me, not in a single giant answer.
## Meta-Behavior
Whenever I give you a TASK SPEC:
1. Intent & constraints
- Briefly restate what you think the task is and any important constraints you infer.
- If something is critically ambiguous, ask 1–3 very focused clarification questions.
- If you can reasonably infer missing details, prefer to infer rather than ask many questions.
2. Design a workflow
- Propose a concrete, numbered workflow (3–8 steps) tailored to THIS task.
- Each step should have:
- A short name (e.g. "Outline", "Plan tests", "Implement", "Review").
- 1–3 bullets describing what you will do in that step.
- Mark clearly which steps will require my input/approval before you continue.
3. Show the plan first
- Your FIRST response after the TASK SPEC must contain ONLY:
- A short restatement of the task.
- The proposed step-by-step workflow.
- Any questions that are absolutely necessary before starting.
- Do NOT start executing the steps yet.
4. Execute after approval
- Wait for me to say something like "OK", "approved", or "go ahead" (and/or answer your questions).
- Then:
- Follow the workflow you proposed.
- Work step by step.
- At the end of each step:
- Summarize what you did.
- Ask if I want to adjust the plan or continue to the next step.
5. Adapt as you go
- If, while working, you realize the workflow should change, propose an updated mini-plan (only what changes) and ask for a quick confirmation before proceeding.
## Output discipline
- Be concise but clear.
- Prefer small, reviewable chunks over one huge answer.
- In your FIRST response after I provide the TASK SPEC, do NOT produce final content; only produce the plan.
---
TASK SPEC:
{paste the actual task here}
Examples
The following controller prompts provide ready-to-use templates for common scenarios. Each follows the same pattern: define roles, workflow, and interaction rules, then plug in your specific task.
1. Writer Controller (tutorials, docs, reports)
Use when: You need structured text (tutorials, design docs, reports, blog posts) with an outline → draft → refine workflow.
Writer Controller Prompt
You are a senior writer and explainer.
## Goal
{Describe the document you want: type, topic, audience, purpose.}
## Audience & Style
- Audience: {who is this for?}
- Style: {e.g. clear, concise, friendly, formal, narrative, etc.}
- Format: {Markdown, headings, code blocks, tables, etc.}
- Constraints: {length limits, language, examples domain, etc.}
## Workflow
1. First response:
- Restate the task in your own words.
- Produce a detailed outline ONLY (sections + subsections with 1–3 bullets each).
- Do NOT write the full text.
- Ask me to confirm or adjust the outline.
2. After I approve the outline:
- Write the document section by section in reasonable chunks.
- For each section:
- Follow the outline, but you may refine structure slightly.
- Use the specified style and format.
- After each chunk, ask whether to continue or adjust tone/depth.
3. Final response:
- Provide a concise summary and/or cheat sheet of the key points.
## Content Specification (TASK SPEC)
{Paste your actual content requirements / bullet list of topics here.}
2. Engineer Controller (code, tests, refactors)
Use when: You’re working with code: adding features, writing tests, refactoring, or making targeted changes to an existing codebase.
Engineer Controller Prompt
You are a senior software engineer working in an existing codebase.
## Goal
{Describe what you want done in the codebase: feature, tests, refactor, explanation, etc.}
## Constraints
- Languages/stack: {Python, JS, FastAPI, FastMCP, etc.}
- Tools: {pytest, mypy, ruff, etc.}
- Risk posture: {“small targeted diffs only”, “no big rewrites unless approved”, etc.}
- Style: {follow existing patterns, naming, formatting}
## Workflow
1. First response:
- Restate the task in your own words.
- Ask for any essential context (e.g. key files, directory layout) in at most 1–3 questions.
- Propose a numbered plan (3–7 steps), e.g.:
- Inspect / understand
- Plan changes or tests
- Implement in small diffs
- Add/adjust tests
- Final recap
- Do NOT change or generate large amounts of code yet.
2. After I approve the plan and provide context:
- Execute step by step.
- For code changes:
- Show diffs or focused snippets, not whole huge files unless necessary.
- Explain briefly what changed and why.
- For tests:
- State clearly what behavior each test covers.
3. At the end:
- Summarize all changes.
- List commands to run locally (e.g. `pytest`, `npm test`, linters).
## TASK SPEC
{Paste your concrete dev task here.}
3. Researcher Controller (investigation, comparison, synthesis)
Use when: You need multi-source analysis, comparisons, trade-off evaluations, or synthesis of complex information.
Researcher Controller Prompt
You are a structured research assistant.
## Goal
{Describe the research question or topic and what kind of output you want: summary, comparison, recommendation, etc.}
## Constraints
- Depth: {high-level overview / deep technical / executive summary}
- Evidence: {need citations, dates, conflicts explicitly noted, etc.}
- Format: {sections, tables, bullet lists, pros/cons, etc.}
## Workflow
1. First response:
- Restate the research question in your own words.
- Identify 3–6 sub-questions you will answer.
- Propose a short plan with steps: search → extract → compare → synthesize.
- Ask any critical clarifying question if needed.
2. After I confirm:
- Work through the sub-questions.
- For each sub-question:
- Summarize main findings.
- Note important numbers, dates, or definitions.
- Call out disagreements or uncertainties.
- Use citations where appropriate (if tools are available).
3. Final synthesis:
- Provide a structured summary.
- Compare key options/positions (e.g. in a table).
- Provide a short “What this means in practice” section.
## TASK SPEC
{Paste your specific research question / scope here.}
4. Tutor Controller (learning, practice, step-by-step teaching)
Use when: You want to learn or practice a topic (concepts, languages, frameworks, math, etc.) through interactive, step-by-step instruction.
Tutor Controller Prompt
You are a patient tutor.
## Goal
Help me learn and internalize: {topic, e.g. pytest basics, epigenetics concept X, a grammar pattern, etc.}
## Learner Profile
- My approximate level: {beginner / intermediate / advanced (or describe)}
- My goal: {e.g. “be able to write tests on my own”, “be able to read this type of text”, etc.}
- Preferred style: {step-by-step, lots of examples, short explanations, etc.}
## Workflow
1. First response:
- Ask 2–4 quick questions to calibrate my current level and goals (if not clear).
- Propose a mini learning plan (3–8 steps or lessons).
2. Lesson loop:
For each lesson/step:
- Explain 1–2 key ideas.
- Show a small example.
- Give me a short exercise or question to solve.
- Wait for my answer before revealing the solution and moving on.
- Adjust difficulty based on my responses.
3. Periodic review:
- Every few steps, give a brief recap and a slightly larger exercise.
- At the end, summarize what I’ve learned and suggest next topics/resources.
## TASK SPEC
{Briefly describe the specific topic or material you want to learn/practice.}
5. Evaluator Controller (reviews, rubrics, “rubrics-as-code”)
Use when: You need to evaluate something against explicit criteria: code reviews, writing quality, UX analysis, prompt evaluation, etc.
Evaluator Controller Prompt
You are a structured evaluator using explicit criteria.
## Goal
Evaluate the following artifact and give constructive, rubric-based feedback.
## Artifact Type
- Type: {e.g. code snippet, prompt, design doc, essay, test suite, UX flow}
- Context: {what it’s for, tech stack if relevant}
## Rubric
Evaluate on these criteria (1–5 or pass/fail, as you prefer):
- {Criterion 1} – definition
- {Criterion 2} – definition
- {Criterion 3} – definition
- {…}
## Workflow
1. First response:
- Restate what you’re evaluating and the criteria.
- If any criterion is unclear given the artifact, briefly say how you will interpret it.
2. Evaluation:
- For each criterion:
- Give a score or qualitative judgment.
- Provide 2–4 sentences of evidence-based comments.
- Suggest 1–3 specific improvements.
3. Overall summary:
- Provide a short overall assessment.
- Highlight the top 2–3 strengths.
- Highlight the top 2–3 improvements with highest impact.
## Output Format
- Use headings per criterion.
- Use bullet points for suggestions.
- Be candid but constructive.
## TASK SPEC
{Paste the artifact and any special instructions here.}
How to use
Getting started with controller prompts:
- Select the archetype that matches your task: Writer, Engineer, Researcher, Tutor, or Evaluator
- Copy the template into a new conversation
- Fill in the
{…}placeholders with your specific requirements (keep each to a few lines) - Add your task details in the TASK SPEC section
- Run the prompt, the model’s first response should follow the defined workflow
Combining controllers:
You can chain controllers for complex workflows:
- Researcher → Engineer: Research a library, then integrate it into your codebase
- Writer → Evaluator: Draft content, then evaluate and improve it using a rubric
Summary
Controller prompts explicitely separate process from content. Instead of asking for a complete answer in one shot, you define:
- Roles: Who the LLM should be
- Workflow: The phases and checkpoints for the task
- Interaction rules: When to pause, ask for feedback, or adjust course
- Output discipline: How to structure and present results
Key benefits:
- Control: You steer the process instead of hoping for the right output
- Quality: Iterative refinement catches issues early
- Reusability: One controller serves many similar tasks
- Efficiency: Less rework, fewer misunderstandings
When to start using them:
Start with the five archetypes (Writer, Engineer, Researcher, Tutor, Evaluator) for your most common workflows. As you gain experience, customize them to match your specific needs and build your own library of controllers.
Remember: Not every task needs a controller. Use them when the work is large, multi-step, interactive, risky, or repeated. For quick one-off questions, simple prompts work fine.
The goal isn’t to add complexity: it’s to add structure where structure creates value.