goal-driven-multi-agent
```markdown
What this skill does
```markdown
---
name: goal-driven-multi-agent
description: A framework for running multi-agent systems that sustain 100+ hours of continuous effort to solve complex coding or math problems with verifiable criteria
triggers:
- set up a goal-driven multi-agent system
- run agents for hours on a complex problem
- create a master agent with subagents
- solve a hard coding problem with multiple agents
- long-running multi-agent task
- use goal-driven to build a compiler
- automate a complex task with agents until criteria are met
- keep agents running until a goal is achieved
---
# Goal-Driven Multi-Agent Framework
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Goal-Driven is a prompt-based framework for running multi-agent systems (Claude Code, Codex, OpenClaw, etc.) that sustain **300+ hours of continuous effort** on extremely complex, verifiable problems. A **master agent** supervises one or more **subagents**, restarting them if they go idle, and halts only when strict success criteria are met.
Ideal use cases: compiler design, theorem proving, database engines, EDA simulation, computational math, and large-scale system architecture.
---
## How It Works
```
while (criteria not met) {
let subagent work on solving the problem toward the Goal
}
```
| Role | Responsibility |
|------|---------------|
| **Master Agent** | Creates subagents, monitors every 5 min, evaluates criteria, restarts idle agents |
| **Subagent** | Breaks down the goal, works continuously, reports status |
The master agent is the **only** entity that decides if the goal is complete. It does **not** stop unless criteria are fully satisfied or the user intervenes manually.
---
## Installation / Setup
Goal-Driven requires no package installation. It is a **prompt template** you paste into your AI agent tool.
### Step 1 — Copy the prompt template
Grab the full prompt from the repository:
```
https://github.com/lidangzzz/goal-driven
```
### Step 2 — Fill in Goal and Criteria
Open the template and replace the two placeholder blocks:
```
Goal: [[[[[YOUR GOAL HERE]]]]]
Criteria for success: [[[[[YOUR CRITERIA HERE]]]]]
```
### Step 3 — Run in your agent tool
Paste the completed prompt into:
- **Claude Code** — paste into the system prompt or a new conversation
- **Codex CLI** — use as the task description
- **OpenClaw** — configure as the master agent's initial instruction
---
## The Full Prompt Template
```
# 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 break down the task into smaller sub-tasks and continue
to work on the task until the criteria for success are met.
## Master agent's description:
1. Create subagents to complete the task.
2. If the subagent finishes or fails, evaluate the result against the
criteria. If met, stop all subagents. If not, ask the subagent to
continue.
3. Check subagent activity every 5 minutes. If inactive, verify whether
the goal is reached. If not, restart a new subagent with the same name.
4. DO NOT STOP THE AGENTS UNTIL THE USER STOPS THEM MANUALLY FROM OUTSIDE.
## Pseudocode:
create a subagent to complete the goal
while (criteria are not met) {
check the activity of the subagent every 5 minutes
if (subagent is inactive or declares goal reached) {
check if goal is reached and verify status
if (criteria are not met) {
restart a new subagent with the same name
} else {
stop all subagents and end the process
}
}
}
```
---
## Real Examples
### Example 1 — TypeScript Compiler in C++
```
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.]]]]]
```
Output: [TypeScript-C-Implementation-by-OnlySpecs](https://github.com/lidangzzz/TypeScript-C-Implementation-by-OnlySpecs) (~100 hours)
---
### Example 2 — SQLite in Rust
```
Goal: [[[[[Implement a SQLite-compatible database engine in Rust that supports
SQL parsing, B-tree storage, and CRUD operations with full test coverage.]]]]]
Criteria for success: [[[[[The Rust implementation must pass the official SQLite
compatibility test suite. Run 500 SQL queries against both the Rust engine and
the reference SQLite binary; all results must be byte-for-byte identical.
Include documentation and benchmarks.]]]]]
```
Output: [sqlite-rust-by-OnlySpecs](https://github.com/lidangzzz/sqlite-rust-by-OnlySpecs) (~30 hours)
---
### Example 3 — Math Theorem Proving
```
Goal: [[[[[Prove the infinitude of twin primes up to a bound of 10^6 using
a verified Lean4 proof script.]]]]]
Criteria for success: [[[[[The Lean4 proof must compile without errors using
`lake build`. All lemmas must be machine-checked. Output a final `#check`
statement confirming the main theorem.]]]]]
```
---
### Example 4 — Database Architecture
```
Goal: [[[[[Design and implement a distributed key-value store in Go with
consistent hashing, replication factor 3, and a REST API.]]]]]
Criteria for success: [[[[[The system must pass a chaos test suite: 1,000
concurrent PUT/GET operations with random node failures. Consistency is
verified by comparing all replica values after each operation. Zero data
loss is acceptable only with acknowledged writes.]]]]]
```
---
## Writing Effective Goals and Criteria
### Goal — Best Practices
```
# Too vague (avoid)
Goal: [[[[[Write a compiler.]]]]]
# Good — specific, scoped, includes deliverables
Goal: [[[[[Write a Lua 5.4 interpreter in Zig that correctly executes Lua
scripts, including a standard library stub, error handling, and a test suite
of at least 500 scripts covering all major language features.]]]]]
```
### Criteria — Best Practices
Criteria must be **mechanically verifiable**. Use one of these patterns:
| Pattern | Example |
|---------|---------|
| Test suite pass rate | "All 2,000 test cases pass" |
| Output diff | "Output of X and reference Y are identical" |
| Compilation success | "`lake build` exits with code 0" |
| Benchmark threshold | "P99 latency < 10ms under 1,000 RPS" |
| Line/file count | "At least 500 documented test files" |
```
# Criteria template
Criteria for success: [[[[[
1. [Quantitative check — e.g., N test files generated]
2. [Correctness check — e.g., outputs match reference implementation]
3. [Build/compilation check — e.g., compiles without warnings]
4. [Optional: performance check]
]]]]]
```
---
## Choosing Problem Types
| ✅ Great fit | ❌ Poor fit |
|-------------|------------|
| Compiler / interpreter | Open-ended creative writing |
| Database engine | Subjective design reviews |
| Theorem proving (Lean4, Coq) | Tasks with no verifiable output |
| Algorithm implementation | Conversational tasks |
| EDA / simulation | Exploratory research |
| Constraint satisfaction | Ambiguous success conditions |
---
## Multi-Subagent Variant
For parallelism, spawn multiple subagents with distinct sub-goals:
```
# Goal-Driven (1 master + 3 subagents)
Goal: [[[[[Build a full-stack web frRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.