Noureddine RAMDI / Goal-Driven: orchestrating long-lived AI agents with prompt-based verification loops

Created Tue, 05 May 2026 16:46:42 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

lidangzzz/goal-driven

Goal-Driven addresses a challenge that anyone working with autonomous AI agents has faced: how to keep an AI system persistently productive over extended periods without complex infrastructure or frameworks. It presents a surprisingly straightforward approach based purely on prompt engineering, orchestrating multiple AI agents through a master-subagent pattern with explicit success criteria and periodic verification. This method enables autonomous problem-solving sessions that can last hundreds of hours — all without any code, dependencies, or additional tooling beyond AI agent platforms.

What Goal-Driven does and how it orchestrates AI agents

At its core, Goal-Driven is a prompt template methodology designed to manage multi-agent AI workflows tackling complex, verifiable tasks such as compiler design, theorem proving, and database architecture. Unlike traditional AI workflows that rely on persistent code, databases, or orchestration frameworks, Goal-Driven operates entirely via carefully crafted prompts that define agent roles, responsibilities, and success criteria.

The system employs a master-subagent architecture: a master agent creates a subagent tasked with making progress on a given problem. The master agent then monitors the subagent’s activity at fixed intervals (every five minutes), checking whether the subagent’s output meets explicit success criteria defined in the prompt. If the subagent becomes idle or its output fails verification, the master terminates it and spawns a fresh subagent initialized with the same context.

This creates a verification-driven while-loop pattern:

  • The master agent continuously oversees the subagent’s progress.
  • Subagents are short-lived but persistent through shared context passed at each restart.
  • Explicit success criteria embedded in prompts ensure outputs meet defined standards before continuing.

Because the entire orchestration logic lives in the prompt, the approach sidesteps the need for persistent code, databases, or external state management. The master-subagent cycle is a self-correcting system: it detects stalling or failure early, discards unproductive agents, and restarts new ones with the latest context, effectively sustaining autonomous work for extended durations.

The repo itself contains no code or framework but offers the prompt templates and architecture description necessary to implement this pattern with AI platforms like Claude Code, Codex, or OpenClaw. This minimal footprint makes it easy to adapt and integrate with existing AI agent tools.

The verification-driven loop as a technical strength and its tradeoffs

What makes Goal-Driven technically interesting is its elegant simplicity paired with a clear verification mechanism. The master-subagent orchestration loop enforces a disciplined structure on otherwise stateless AI agents:

  • Explicit success criteria force the subagent to produce verifiable outputs, preventing silent failure or drift.
  • Periodic activity checks detect idleness or lack of meaningful progress, prompting timely restarts.
  • Restarting subagents with preserved context creates persistence across transient agents without external state.

This design turns a loosely coupled collection of AI calls into a reliable, persistent problem-solving engine. It’s a tradeoff between complexity and robustness: instead of building a heavy orchestration framework, the repo leverages AI prompt engineering and simple loop logic to maintain agent productivity.

However, there are limitations:

  • The approach depends heavily on well-designed prompts and clearly defined success criteria. Poorly specified criteria reduce effectiveness.
  • Restarting agents every few minutes can lead to repeated overhead in context loading and re-initialization.
  • Because it is prompt-based, it lacks built-in tooling for deep state management, logging, or debugging beyond what the AI platform provides.

The code is minimal (just prompt templates), so code quality concerns shift to prompt clarity and completeness. The architecture is opinionated: it favors a verification-driven loop over more complex stateful orchestration. This makes it lightweight but requires discipline in prompt design.

Here’s a simplified illustration of the master agent’s verification loop logic:

master_agent_loop(context, success_criteria):
    while not success_criteria_met:
        subagent = spawn_subagent(context)
        while subagent_active:
            wait(5 minutes)
            output = subagent.get_output()
            if output_meets_criteria(output, success_criteria):
                success_criteria_met = True
                break
            if subagent_idle_or_failed(output):
                subagent.terminate()
                break

This pattern elegantly balances persistence and self-correction without external dependencies.

Explore the project

Since Goal-Driven is a prompt-based methodology rather than executable software, there are no installation commands or runnable binaries. Instead, the repository focuses on prompt templates and detailed descriptions of the master-subagent orchestration pattern.

To explore the project:

  • Review the prompt templates that define the master and subagent roles, interaction patterns, and success criteria.
  • Understand the architectural overview explaining the verification-driven loop and how agents are restarted based on activity and verification checks.
  • Familiarize yourself with the recommended use cases, such as complex problem-solving domains where sustained autonomous AI sessions are needed.

This repo is essentially a design pattern expressed through prompt engineering. Implementers will need to paste these prompt templates into their preferred AI agent platform and possibly adapt the success criteria and monitoring intervals to fit their specific tasks.

Verdict

Goal-Driven is a neat example of how prompt engineering can orchestrate multi-agent AI workflows for extended autonomous problem-solving without any external framework or persistent code. Its master-subagent verification loop offers a self-correcting mechanism that manages agent liveness and output correctness purely through prompts.

This makes it relevant for researchers and developers working with AI agents who want a lightweight, framework-free approach to sustaining complex tasks over long durations. It’s particularly suited to domains requiring explicit verification of agent outputs, such as compiler construction, theorem proving, or complex system design.

The tradeoff is clear: you gain simplicity and minimal dependencies but lose deep integration, sophisticated state management, and tooling that more mature AI orchestration frameworks provide. Also, success depends heavily on careful prompt and success criteria design.

If you are experimenting with multi-agent AI orchestration or need a prompt-driven pattern to maintain persistent AI workflows without infrastructure overhead, Goal-Driven is worth understanding and adapting. For production-grade applications, consider the limitations around monitoring, debugging, and overhead inherent in prompt-only orchestration.

Overall, the repo is a good starting point for prompt-based AI agent orchestration, demonstrating how much can be achieved with well-structured prompts and simple control logic.


→ GitHub Repo: lidangzzz/goal-driven ⭐ 1,146