Agentic AI systems — tools that take actions, modify files, run commands, and make sequences of decisions without a human in the loop — fail for a different reason than language models do. They don’t fail because the prompt was vague. They fail because the prompt didn’t define the boundary. An agent with no explicit stop conditions will keep working, making increasingly confident decisions, until it has done something you can’t undo. Prompt Master’s three agentic templates exist to prevent this. Each one structures the prompt around constraints and boundaries, not just goals. The agent knows what it should do, what it must not do, and exactly when to stop and hand control back to you.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nidhinjs/prompt-master/llms.txt
Use this file to discover all available pages before exploring further.
File-Scope Template
The File-Scope Template is used for any code editing AI that operates on a specific file or function. It contains the smallest possible agentic context — enough to execute a targeted change precisely — without giving the agent latitude to modify anything outside the defined scope. Routed when: the target tool is Cursor, Windsurf, GitHub Copilot, or any AI with a code editing interface, and the task is a bounded change to a known file or function.File-Scope Template components
File-Scope Template components
| Component | What it carries |
|---|---|
| File path | Exact relative path to the file being modified |
| Function / component name | The specific function, class, or component to change |
| Current behavior | What the code does right now — factual, not evaluative |
| Desired change | What it should do after the change — single, concrete outcome |
| Do-not-touch list | Explicit list of files, functions, or behaviors that must not change |
| Done when | The acceptance condition — what observable behavior confirms the task is complete |
ReAct + Stop Conditions
ReAct (Reason + Act) is the standard framework for autonomous agents that need to take sequences of actions to reach a goal. Prompt Master’s implementation adds an explicit Stop Conditions block — the component most ReAct implementations omit — which is what separates a safe agent task from an unbounded one. Routed when: the target tool is Claude Code (standard tasks), Devin, AutoGPT, or any autonomous agent that can run commands, create files, call APIs, or take multi-step actions in an environment.ReAct + Stop Conditions components
ReAct + Stop Conditions components
| Component | What it carries |
|---|---|
| Starting state | The current state of the environment — what exists, what’s installed, what’s running |
| Target state | What the environment should look like when the task is complete |
| Allowed actions | Explicit list of what the agent may do (create files, run commands, call APIs, etc.) |
| Forbidden actions | Explicit list of what the agent must never do |
| Stop conditions | The exact conditions under which the agent must stop and report back |
| Checkpoints | Optional: intermediate milestones where the agent should report progress before continuing |
Template M
Template M is the newest framework in Prompt Master (v1.7.0) and the most structured agentic template. It was designed specifically for Claude Code running on Opus 4.7 and Opus 4.8 — models with extended reasoning capability and large context windows that can handle genuinely complex, multi-session engineering tasks. Template M adds components that ReAct doesn’t cover: session strategy, context management, and explicit scope gates that prevent the agent from expanding its own mandate mid-task. Routed when: the target is Claude Code (explicitly on Opus 4.7/4.8) and the task is multi-step, spans multiple files or subsystems, or requires autonomous decision-making across a significant portion of a codebase.Template M takes routing precedence over standard ReAct when both Claude Code and a multi-step scope are detected. If you don’t specify Opus 4.7/4.8 but ask Claude Code to do complex work, Prompt Master will ask which model you’re using before selecting between ReAct and Template M.
Template M components
Template M components
| Component | What it carries |
|---|---|
| Task scope | A precise statement of what the task covers — and where it ends |
| Acceptance criteria | Numbered list of conditions that must all be true for the task to be considered complete |
| Stop conditions | Conditions that require the agent to halt and return control immediately |
| Forbidden expansions | Explicit list of scope expansions the agent must reject even if they seem beneficial |
| Session strategy | Instructions for context management — when to use /compact, when to start a new session |
| Reporting format | How the agent should communicate progress, blockers, and completion |
Session Hygiene for Agentic Tasks
Context management is not optional for agentic work. A bloated context window causes the agent to lose track of constraints defined early in the session — exactly the constraints that prevent it from doing the wrong thing.New task = new session
Never carry over a previous agentic task into a new one in the same session. Unfinished state from the prior task bleeds into the new one. Open a fresh Claude Code window for every distinct task.
Run /compact at 50% context
When the context window reaches approximately 50% capacity, run
/compact before continuing. This compresses the session history while preserving the active constraints and current state.Re-anchor after /compact
After running
/compact, your first message should explicitly re-state the current step, the nearest stop condition, and the acceptance criterion you’re working toward. Don’t assume the compressed context carries all constraints forward with equal weight.One acceptance criterion at a time
For Template M tasks with multiple acceptance criteria, instruct the agent to confirm each criterion is met before moving to the next. This creates natural checkpoints and prevents the agent from accumulating changes that are individually correct but collectively broken.