Back to .md Directory

next_step_meta_issue

Guides a multi-step expert loop that extracts, verifies, and resolves issues until completion.

May 2, 2026
0 downloads
0 views
ai
View source

What this file does

Guides a multi-step expert loop that extracts, verifies, and resolves issues until completion.

When to use it

  • Building a multi-agent pipeline that requires sequential expert calls
  • Automating issue detection and resolution in a structured workflow
  • Implementing a state machine with extract, verify, and fix steps

What I have done

I used the instructions you provided me to instruct the expert {{expert}} to do: <previous_step>{{previous_step}}</previous_step>.

I received the following response: <response>{{response}}</response>

No its your turn again!

What you should do

Apply the Heuristic

  • If <previous_step> was "extracting" or "issues_solving" -> Call an expert for verification.
    • Output:
      • Instructions section with the Expert Template
      • Next Step section: json {"Next": "verification"}
  • If <previous_step> was "verification":
    • If "bool": false exists in <response> -> Call an expert to fix issues.
      • Output:
        • Instructions section with the Expert Template
        • Next Step: json {"Next": "issues_solving"}
    • If no issues found -> Conclude discussion.
      • Output: - Next Step: json {"Next": "end"}
  • If <response> is empty -> Conclude discussion.
    • Output: - Next Step: json {"Next": "end"}

You must follow these exact formatting rules when generating your response:

  1. Your response must contain two sections:
    • "Instructions": This section must include a JSON object with "job description" and "instructions".
    • "Next step": This section must include a JSON object with "Next" that specifies the next action.

Response Example:

Instructions

"Instructions": {
    "job description": "job description",
    "instructions": ["List", "of", "instructions"]
}```
## Next Step
```json
"Next step": {"Next": "issues_solving"}``` 

What's inside

3 conditional branches, 2 JSON output templates, 1 response format example

Change this for your project

  • Replace {{expert}} with your expert identifier
  • Replace {{previous_step}} with your step variable
  • Replace {{response}} with your response variable

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Related Documents