A normal chat prompt can be loose. A long-running agent prompt cannot.

When an AI agent is expected to work through several steps, use tools, make decisions, correct mistakes, and keep going until the job is finished, it needs more than a simple instruction. It needs a destination, boundaries, and a way to prove that the result is actually complete.
For agent work, the prompt is less like a message and more like a brief.
For longer tasks in Claude Code, OpenClaw, or any tool-using agent, I use a simple five-part structure.
The framework: Task, Why, Outcome, Constraints, Verification.
Those five pieces are enough to turn a vague request into something an agent can actually finish.
/goal TASK: [What the agent should do] WHY: [Why the task matters and who it is for] OUTCOME: [The exact finished result] CONSTRAINTS: [What the agent must or must not do] VERIFICATION: [How the agent should prove the work is complete]
Loose Prompt
Before
Improve my website.
The agent has to guess the goal, audience, scope, and finish line.
Agent Brief
After
Review the homepage, rewrite the structure and copy, keep the existing brand, and verify the result on mobile and desktop.
The agent knows what to change, what to protect, and how to prove the work.
1. Task
The task is the action.
Start with a clear verb and describe what you want the agent to do. This section should be direct. It is not the place for a long backstory.
Instead of:
Improve my website.
Write:
Review the homepage, identify the main usability problems, and rewrite the page structure and copy.
The clearer the action is, the easier it is for the agent to begin in the right direction.
2. Why
The why gives the agent context.
Explain why the work matters, who it is for, and what problem you are trying to solve. This helps the agent make better decisions when it encounters details that were not covered in the original prompt.
This homepage is for small business owners who are interested in AI but do not have a technical background. It should make the service feel useful and easy to understand.
Without this context, the agent may produce something technically correct but wrong for the intended audience.
3. Outcome
The outcome defines the finish line.
Describe the completed result clearly enough that both you and the agent can recognise when the task is done.
Avoid vague instructions such as:
Make it look professional.
A stronger outcome would be:
Deliver a finished homepage structure with a headline, supporting introduction, three content sections, two calls to action, and notes for the mobile layout.
The agent should not have to guess what finished means.
4. Constraints
Constraints are the guardrails.
They define what the agent may change, what it must leave alone, which tools it can use, and where it should stop.
Do not change the database structure. Keep the existing brand tone. Use only the files already available in the project. Do not publish or deploy anything. Stop after three review and revision passes.
Be direct here. Important limits should not be hidden inside a long paragraph.
A good constraint prevents the agent from solving the right problem in the wrong way.
5. Verification
Verification is how the agent proves the result.
This is often the hardest part to write, but it is also one of the most important.
Do not ask the agent to simply tell you that the work is complete. Ask it to test, inspect, compare, or score the result against a measurable standard.
Verification should produce evidence, not confidence.
Instead of:
Check that everything works.
Write:
Test every form, confirm that all links work, review the layout at mobile and desktop widths, and provide a list of any remaining issues.
A Complete Example
Here is what the full structure could look like for a website task:
/goal TASK: Review the current homepage and rewrite its structure and copy. WHY: The page is aimed at small business owners who are curious about AI but may find the subject technical or confusing. The page should make the service feel practical, useful, and approachable. OUTCOME: Deliver a complete homepage outline containing a headline, introduction, three benefit sections, a short process section, frequently asked questions, and two calls to action. CONSTRAINTS: Keep the existing company name and core services. Do not invent customer testimonials or statistics. Use clear language and avoid unnecessary technical terminology. Do not publish or modify the live website. VERIFICATION: Confirm that every section has a clear purpose. Check that the main service can be understood within the first screen. Review the copy for repeated ideas and unnecessary jargon. Provide a final checklist showing how the result meets each outcome and constraint.
The Important Part
The most difficult part is usually not writing the task. It is defining the outcome and verification.
Make it good is not a finish line.
Score at least 8 out of 10 using a defined review checklist, fix every critical issue, and provide the final test results is much closer to one.
For long-running AI agents, a good prompt should answer five questions:
What should be done? Why does it matter? What does finished look like? What are the boundaries? How will success be proven?
That is often enough to turn a vague request into a task an agent can actually complete.