@lidangzzz: I’ve open-sourced an extremely simple yet incredibly powerful multi-agent system. It’s called goal-driven (goal-driven). https://github.com/lidangzzz/goal-driven… The principle is very simple: as I’ve said, let a m…

X AI KOLs Following Tools

Summary

Developer lidangzzz has open-sourced the goal-driven multi-agent framework, which leverages a master agent to supervise sub-agents in a loop until preset criteria are met. They claim it can autonomously complete complex tasks such as compiler development, and have demonstrated example projects including a C++ implementation of the TypeScript compiler and a Rust implementation of SQLite.

I’ve open-sourced an extremely simple yet incredibly powerful multi-agent system. It’s called goal-driven (goal-driven). https://github.com/lidangzzz/goal-driven… The principle is very simple: as I’ve said, let a master agent continuously supervise the sub-agent’s work until the sub-agent completes the task and the master agent itself certifies that the work meets the criteria and satisfies the requirements. Otherwise, it continues to loop infinitely, forcing the sub-agent to keep working. As the name suggests, goal-driven is goal-driven — it is a purely goal-driven framework. As long as the criteria indicate that the goal has not been reached, it must collect all error information for improvement and loop infinitely until the final goal is completely achieved. The advantage of this design is that it allows you to spend over 100 hours and extremely high token consumption costs to let this master agent-sub-agent system continuously solve extremely difficult problems that are complex in design, complex in logic, highly abstract, and push the limits of human and AI agent capabilities, such as designing compilers/interpreters/transpilers, solving complex mathematical problems, complex systems problems, electronic simulation problems, and so on. Currently, this goal-driven system has completed three projects: one is a fully autonomous design of a Rust implementation of SQLite, with a very stable SQL parser; one is a fully autonomous design of a TypeScript Compiler implemented in C++, a task that only a few people at Microsoft accomplished last year; and one is a fully autonomous implementation of the world’s most complex mathematical proof tool — a TypeScript version compiler for Lean 4, which was also invented by Microsoft in the past and maintained by the entire mathematical academia. goal-driven has proven to be an extremely powerful, extremely simple, and extremely straightforward multi-agent system, requiring only a single prompt to be written in. As long as you set the goal (objective) and the criteria (the standard for judging success or failure, such as generating 1,000 complex test cases), you can let the agent and sub-agent work continuously for 100 hours to complete some of the most challenging, most complex, most abstract, and most difficult tasks in human history. Alright, hurry up and give it a star. Next, I’m going to open-source something even bigger.
Original Article
View Cached Full Text

Cached at: 09/06/26, 02:49 PM

I’ve open-sourced an extremely simple yet incredibly powerful multi-agent system.

It’s called goal-driven.

https://github.com/lidangzzz/goal-driven

The principle is very simple: as I said, have a master agent continuously supervise a subagent’s work until the subagent completes the task and the master agent personally certifies that the work meets the criteria and satisfies the requirements defined in the criteria.

Otherwise, continue the infinite loop, forcing the subagent to keep working.

As the name suggests, goal-driven is goal-driven. It is a purely goal-driven framework. Whenever the criteria indicate the goal has not been reached, it must collect all error information for improvement, proceeding in an infinite loop until the final goal is completely achieved.

The advantage of this design is that it allows you to spend >100 hours and an extremely high token consumption cost to let this master agent–subagent system continuously solve extremely difficult problems that are complex in design, complex in logic, highly abstract, and push the limits of human and AI agent capabilities—

such as designing compilers/interpreters/transpilers, solving complex mathematical problems, complex systems problems, electronic simulation problems, and more.

So far, this goal-driven system has completed three projects:

  • A fully automated design of a Rust implementation of SQLite, with a very stable SQL parser.
  • A fully automated design of a TypeScript Compiler implemented in C++. Last year, only a few people at Microsoft accomplished this.
  • A fully automated implementation of the world’s most complex mathematical proof tool—a TypeScript version of the Lean4 compiler. Previously, this was invented by Microsoft and maintained by the entire mathematical academia.

Goal-driven has proven to be a very powerful, very simple, and very straightforward multi-agent system. It only requires a single prompt.

As long as you set the goal and the criteria (the standard for judging success, such as generating 1,000 complex test cases),

you can let the agent and subagent work continuously for 100 hours, completing some of the most challenging, most complex, most abstract, and most difficult tasks in human history.

Alright, go give it a star now. Next, I’m going to open-source something even more groundbreaking.


lidangzzz/goal-driven

Source: https://github.com/lidangzzz/goal-driven

Chinese Version

Goal-Driven

The purpose of the Goal-Driven approach is to enable your multi-agent system (e.g., Claude Code, Codex, OpenClaw) to sustain more than 300 hours of continuous effort in solving an extremely complex problem that has a specific objective and a set of strict, well-defined criteria.

Goal-Driven is best suited for tasks that are highly intricate, time-consuming, logically complex, and abstract—yet can be thoroughly evaluated for success. Typical examples include compiler design, mathematical theorem proving, computational problems, database architecture, sophisticated system-level design, and EDA simulation challenges.

The core concepts of Goal-Driven are as follows:

  1. Goal – the ultimate objective of the entire system and the central task of all subagents.

  2. Criteria – a clear set of conditions that allow the master agent to determine whether the task is completed and the goal has been achieved.

  3. Subagent – an agent responsible for continuously working toward solving the problem and achieving the assigned goal.

  4. Master Agent – the only controller of subagents, responsible for independently evaluating whether the goal has been reached based on the defined criteria. It acts as the final decision-maker for the system’s process.

The core philosophy of Goal-Driven is straightforward:

  1. When the Goal-Driven process starts, the master agent creates a subagent and instructs it to persistently work toward solving the problem and reaching the goal.

  2. The master agent periodically checks whether the subagent is active. If the subagent becomes inactive, claims completion, or enters an idle state, the master agent must evaluate the current result according to the criteria. If the result fails to meet the criteria, it commands the subagent to continue working, repeating this cycle until the criteria are satisfied.

  3. Once the subagent’s output meets the criteria, the system halts and announces successful completion.

The pseudocode representation of this process is as follows: while (criteria not met) { let the subagent work on solving the problem and achieving the Goal }

Example of open source projects developed by Goal-Driven system

TypeScript compiler in C++(in ~100 hours) https://github.com/lidangzzz/TypeScript-C-Implementation-by-OnlySpecs

SQLite in Rust(in ~30 hours) https://github.com/lidangzzz/sqlite-rust-by-OnlySpecs

Lean4 compiler in TypeScript (in progress) https://github.com/lidangzzz/Lean4-ts

Usage:

Copy the following prompt into your text editor. Carefully fill in the blanks for both goal and criteria, then run it using your multi-agent–supported tool (for example, Claude Code, Codex, OpenClaw, etc.).

Example:

Goal: [[[[[Write a TypeScript compiler in C++ that correctly transpiles TypeScript into JavaScript, including complete documentation and unit tests.]]]]]

Criteria for success: [[[[[Ensure that the TypeScript compiler successfully compiles and generates 2,000 comprehensive TypeScript test case files covering as many TypeScript syntax features as possible. Confirm that the C++ TypeScript compiler correctly transpiles the code into JavaScript. Then, run both the outputs from this compiler and the official tsc transpiler on Node.js, and verify that the two resulting JavaScript files produce identical outputs.]]]]]

Notes:

  1. I strongly advise not adding this prompt to any AI agent’s skills or plugins, as doing so could contaminate your context window.

  2. Goal-Driven processes may consume significant time and LLM tokens; please make sure your AI agent’s API plan or subscription balance is sufficient.


The Goal-Driven Prompt Template (1 master agent + 1 subagent)

``

Goal-Driven(1 master agent + 1 subagent) System

Here we define a goal-driven multi-agent system for solving any problem.

Goal: [[[[[DEFINE YOUR GOAL HERE]]]]]

Criteria for success: [[[[[DEFINE YOUR CRITERIA FOR SUCCESS HERE]]]]]

Here is the System: The system contains a master agent and a subagent. You are the master agent, and you need to create 1 subagent to help you complete the task.

Subagent’s description:

The subagent’s goal is to complete the task assigned by the master agent. The goal defined above is the final and the only goal for the subagent. The subagent should have the ability to break down the task into smaller sub-tasks, and assign the sub-tasks to itself or other subagents if necessary. The subagent should also have the ability to monitor the progress of each sub-task and update the master agent accordingly. The subagent should continue to work on the task until the criteria for success are met.

Master agent’s description:

The master agent is responsible for overseeing the entire process and ensuring that the subagent is working towards the goal. The only 3 tasks that the main agent need to do are:

  1. Create subagents to complete the task.
  2. If the subagent finishes the task successfully or fails to complete the task, the master agent should evaluate the result by checking the criteria for success. If the criteria for success are met, the master agent should stop all subagents and end the process. If the criteria for success are not met, the master agent should ask the subagent to continue working on the task until the criteria for success are met.
  3. The master agent should check the activities of each subagent for every 5 minutes, and if the subagent is inactive, please check if the current goal is reached and verify the status. If the goal is not reached, restart a new subagent with the same name to replace the inactive subagent. The new subagent should continue to work on the task and update the master agent accordingly.
  4. This process should continue until the criteria for success are met. DO NOT STOP THE AGENTS UNTIL THE USER STOPS THEM MANUALLY FROM OUTSIDE.

Basic design of the goal-driven double agent system in pseudocode:

create a subagent to complete the goal

while (criteria are not met) { check the activty of the subagent every 5 minutes if (the subagent is inactive or declares that it has reached the goal) { check if the current goal is reached and verify the status

Similar Articles

@Xudong07452910: Open-source framework recommendation: Agency Agents — 232 professional AI agents, divided by function, covering 16 business departments. If you've used Claude Code or Codex, you may have encountered this problem: AI is very capable at coding tasks, but when it comes to front-end design, writing marketing...

X AI KOLs Timeline

Agency Agents is an open-source framework providing 232 professional AI agents covering 16 business departments. Each agent has a unique personality, communication style, and delivery standards. It supports multiple development tools such as Claude Code, GitHub Copilot, and has community-translated versions.

@Xudong07452910: Open source project recommendation: loop-engineering — a practical framework that gives your AI coding agent self-looping and intelligent orchestration capabilities. loop-engineering is a very popular concept right now, offering practical patterns, starters, and CLI tools to help developers design systems…

X AI KOLs Timeline

loop-engineering is an open-source framework that provides self-looping and intelligent orchestration capabilities for AI coding agents (such as Claude Code, Codex, Cursor). It includes 7 production-grade loop patterns, practical CLI tools, and a five-data-block design, helping developers transition from manual prompting to systematic automation.

@sunmer575399: Stumbled upon a god-tier open-source project, Cline, with 65.6k stars. It really boosts coding efficiency. One engine powers the SDK, CLI, VS Code, and the entire JetBrains suite. Click twice in the editor, and it reads code, creates files, runs commands, and after making changes, waits for your nod before proceeding. Run full-auto in the terminal...

X AI KOLs Timeline

Introducing the open-source AI coding agent tool Cline, supporting the SDK, CLI, VS Code, and the JetBrains suite. It can automatically read code, create files, and run commands in the IDE and terminal, and supports kanban-based parallel multi-agent workflows and CI/CD integration.

@Xudong07452910: Strongly recommended open-source project: Trellis — an open-source harness that gives your AI coding agent team-level engineering standards. Trellis is the AI coding engineering framework I've been using, known as 'The best agent harness'. It…

X AI KOLs Timeline

Trellis is an open-source project that provides team-level engineering standards and a project memory framework for AI coding agents. It supports multiple platforms and enhances agent development efficiency and quality by persisting specifications and task context to code repositories.

@teach_fireworks: A one-image comparison of mainstream Agent development frameworks! How to choose among so many Agent development frameworks? For personal heavy daily coding / research on open-source projects: try Pi Agent AI SaaS or enterprise-level agents: OpenAI Agents SDK + Lang…

X AI KOLs Timeline

A tweet compares mainstream AI Agent development frameworks (such as Pi Agent, OpenAI Agents SDK, LangGraph, LlamaIndex, Pydantic AI) and gives selection recommendations for different scenarios.