Skip to content
Agentmart
Submit a tool

AGENTS.md Β· ruvnet/ruflo

AGENTS.md from ruvnet/ruflo: 708 lines covering πŸ“’ TL;DR - READ THIS FIRST, Ruflo Policy-Governed Concurrent Codex Workflow, 🚨 CRITICAL: CODEX DOES THE WORK…

Template by ruvnet

IndexedMITβ˜… 78,965
Write a review

Chalk Labs

Need help deploying AGENTS.md Β· ruvnet/ruflo?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/ruvnet/ruflo/main/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that ruvnet/ruflo (78,956 stars) keeps for coding agents. It has 708 lines in 16 sections: πŸ“’ TL;DR - READ THIS FIRST; Ruflo Policy-Governed Concurrent Codex Workflow; 🚨 CRITICAL: CODEX DOES THE WORK, CLAUDE-FLOW ORCHESTRATES; β›” DON'T STOP AFTER CALLING CLAUDE-FLOW; ⚑ QUICK COMMANDS (NO DISCOVERY NEEDED); πŸš€ SWARM RECIPES; πŸ“‹ BEHAVIORAL RULES; πŸ“ FILE ORGANIZATION; 🎯 WHEN TO USE SWARMS; πŸ”§ CLI REFERENCE; πŸ”Œ TOPOLOGIES; πŸ€– AGENT TYPES; βš™οΈ CONFIGURATION; πŸ”— SKILLS; πŸ”Œ MCP INTEGRATION (Learning & Coordination); πŸ“š SUPPORT. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
708 lines
File
AGENTS.md

Sections

  1. πŸ“’ TL;DR - READ THIS FIRST
  2. Ruflo Policy-Governed Concurrent Codex Workflow
  3. 🚨 CRITICAL: CODEX DOES THE WORK, CLAUDE-FLOW ORCHESTRATES
  4. β›” DON'T STOP AFTER CALLING CLAUDE-FLOW
  5. ⚑ QUICK COMMANDS (NO DISCOVERY NEEDED)
  6. πŸš€ SWARM RECIPES
  7. πŸ“‹ BEHAVIORAL RULES
  8. πŸ“ FILE ORGANIZATION
  9. 🎯 WHEN TO USE SWARMS
  10. πŸ”§ CLI REFERENCE
  11. πŸ”Œ TOPOLOGIES
  12. πŸ€– AGENT TYPES
  13. βš™οΈ CONFIGURATION
  14. πŸ”— SKILLS
  15. πŸ”Œ MCP INTEGRATION (Learning & Coordination)
  16. πŸ“š SUPPORT

First lines (shown under the repo's MIT license)

# Claude Flow V3 - Agent Guide

> **For OpenAI Codex CLI** - Agentic AI Foundation standard
> Skills: `$skill-name` | Config: `.agents/config.toml`

---

## πŸ“’ TL;DR - READ THIS FIRST

```
╔═══════════════════════════════════════════════════════════════════════════╗
β•‘  1. claude-flow = LEDGER (tracks state, stores memory, coordinates)       β•‘
β•‘  2. Codex = EXECUTOR (writes code, runs commands, creates files)          β•‘
β•‘  3. NEVER stop after calling claude-flow - IMMEDIATELY continue working   β•‘
β•‘  4. If you need something BUILT/EXECUTED, YOU do it, not claude-flow      β•‘
β•‘  5. ALWAYS search memory BEFORE starting: memory search --query "task"    β•‘
β•‘  6. ALWAYS store patterns AFTER success: memory store --namespace patternsβ•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
```

**Workflow (Use MCP Tools):**
1. `memory_search(query="task keywords")` β†’ LEARN from past patterns (score > 0.7 = use it)
2. `swarm_init(topology="hierarchical")` β†’ coordination record (instant)
3. **YOU write the code / run the commands** ← THIS IS WHERE WORK HAPPENS
4. `memory_store(key="pattern-x", value="what worked", namespace="patterns")` β†’ REMEMBER for next time

---

## Ruflo Policy-Governed Concurrent Codex Workflow

Ruflo is the coordination ledger and policy decision point. Codex agents are
the executors. Coordination records do not write code or run tests.

Use `guidance_brain({ mode: "recommend", task: "..." })` to select Ruflo
capabilities from the live MCP registry. A registered tool is not necessarily
configured, reachable, healthy, or authorized. If it is unavailable, continue
with compatible guidance tools, CLI discovery, and repository instructions.

1. Recall relevant AgentDB memory and ADRs.
2. Inspect source, runtime, dependencies, policy, and health.
3. Route to the smallest capable topology, agents, skills, and tools.
4. Plan acceptance criteria, safety envelope, ownership, and validation.
5. Execute with Codex workers in isolated scopes; Ruflo records coordination.
6. Test focused, regression, and failure paths.
7. Validate types, security, policy, compatibility, and artifact integrity.
8. Benchmark a source-bound candidate against a source-bound baseline.
9. Optimize only measured bottlenecks without weakening safety.
10. Bind claims and evidence into exact source/build receipts.
11. Reconcile handoffs and disclose unresolved limitations.
12. Publish only through a separately authorized release gate.

Hard invariants:

- Never run two writers in one worktree.
- Delegation may only reduce tools, servers, namespaces, network, spend,
  concurrency, expiry, and depth.
- Policy denial cancels dependent work before side effects.
- MetaHarness may evaluate candidates concurrently, but only ADR-322A may
  promote them and MetaHarness may never expand its own SafetyEnvelope.
- Do not commit, push, merge, release, or remove worktrees unless authorized.
- Existing installations migrate in `legacy` policy mode; use `observe` before
  switching to `enforce`.

Repository harness integration:

- If tracked repository instructions define a collaboration harness, start its
  session only after assigning an isolated worktree.
- Inspect existing claims, acquire exact paths/resources/ports, renew leases,
  check acknowledged inbox messages at integration boundaries, and release ownership on
  handoff or exit.
- A repository lease coordinates ownership; it does not grant authorization.
  Protected work still requires the ADR-324/325 action capability and current
  fencing epoch.
- In-memory reference adapters demonstrate semantics; they are not distributed,
  restart-durable release authorities.
- Heartbeats and lease expiry establish liveness; a PID is diagnostic only.
- `HEAD` alone is not an exact source-state identity in a dirty worktree.
  Release evidence must bind a clean commit or an immutable snapshot of tracked
  and untracked changes.

Useful checks:

```bash
npx ruflo policy status
npx ruflo policy verify
npx ruflo metaharness flywheel status
```

Repository release contract:

- The stable public train is exactly `@claude-flow/cli`, `claude-flow`, and
  `ruflo`; internal `@claude-flow/*` components are bundled and are not part of
  a normal standalone publish.
- Publish from a clean, reviewed source state in that order.
- Only the CLI publish receives the helper-signing configuration from
  `ruv-dev`; use the existing authenticated npm session for publication.
- Run `node scripts/audit-umbrella-version-lockstep.mjs`, verify all three
  registry versions, and align `latest`, `alpha`, and `v3alpha`.

---

## 🚨 CRITICAL: CODEX DOES THE WORK, CLAUDE-FLOW ORCHESTRATES

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CLAUDE-FLOW = ORCHESTRATOR (tracks state, coordinates)     β”‚
β”‚  CODEX = WORKER (writes code, runs commands, implements)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

### ❌ WRONG: Expecting claude-flow to execute tasks
```bash
npx claude-flow swarm start --objective "Build API"
# WRONG: Waiting for claude-flow to build the API
# Claude-flow does NOT execute code!
```

### βœ… CORRECT: Codex executes, claude-flow tracks
```bash
# 1. Tell claude-flow what you're doing (optional coordination)
npx claude-flow swarm init --topology hierarchical --max-agents 1
npx claude-flow agent spawn --type coder --name codex-worker

# 2. YOU (CODEX) DO THE ACTUAL WORK:
mkdir -p src
cat > src/api.ts << 'EOF'
export function hello() { return "Hello World"; }
EOF

# 3. Report to claude-flow what you did (optional)
npx claude-flow memory store --key "api-created" --value "src/api.ts" --namespace results
```

### The Division of Labor

| Component | Role | Examples |
|-----------|------|----------|
| **CODEX** | EXECUTES | Write files, run tests, create code, shell commands |
| **claude-flow** | ORCHESTRATES | Track agents, store memory, coordinate tasks |

---

## β›” DON'T STOP AFTER CALLING CLAUDE-FLOW

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ❌ WRONG: Call claude-flow β†’ STOP β†’ Wait for results                   β”‚
β”‚  βœ… RIGHT: Call claude-flow β†’ IMMEDIATELY continue β†’ YOU do the work    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

### ❌ WRONG Pattern (Stopping)
```bash
npx claude-flow swarm init --topology hierarchical
npx claude-flow agent spawn --type coder --name worker-1
npx claude-flow swarm start --objective "Build hello world"
# WRONG: Codex stops here and waits for something to happen
# Nothing will happen! Claude-flow doesn't execute code!
```

Signals

Stars
78,965
Forks
9,273
Open issues
658
Last commit (this folder)
Jul 29, 2026 (3 months ago)
Last release
Oct 24, 2026 (7 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ruvnet

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents β†’Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes Β· CoinDesk Β· Decrypt Β· Cointelegraph Β· The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get AGENTS.md Β· ruvnet/ruflo running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying AGENTS.md Β· ruvnet/ruflo?

CallGet help
Cite this page

AGENTS.md Β· ruvnet/ruflo. Agent Mart. https://agentmart.dev/templates/ruvnet-ruflo-agents-md (last updated 2026-10-24)