afm-mesh-driven-development

afm-mesh-driven-development is a skill for Claude Code, Codex from akopichin/afm. It costs 47 tokens per session (3,069 once invoked), scanned A, original, MIT.

A procedure for carrying out an implementation plan by sending tasks to named AFM team members and checking their replies. AFM is a system for coordinating coding agents that share one worktree, the directory containing the project files.

In plain words
What is it for?
Use it to assign implementation tasks, wait for asynchronous agent replies, validate their work, and integrate tasks in the required order.
Why use it?
It provides durable requests, recovery steps, and evidence checks while preventing the coordinator from changing files at the same time as an assigned writer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Codex.

Good fit Use it to assign implementation tasks, wait for asynchronous agent replies, validate their work, and integrate tasks in the required order.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/akopichin/afm/afm-mesh-driven-development
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add akopichin/afm --skill afm-mesh-driven-development
Clone the repo
git clone --depth 1 https://github.com/akopichin/afm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afm-mesh-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/akopichin/afm/afm-mesh-driven-development/github.svg)](https://agentmods.dev/skills/akopichin/afm/afm-mesh-driven-development)
Your own site
<a href="https://agentmods.dev/skills/akopichin/afm/afm-mesh-driven-development"><img src="https://agentmods.dev/badge/skills/akopichin/afm/afm-mesh-driven-development/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for afm-mesh-driven-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/akopichin/afm/afm-mesh-driven-development"><img src="https://agentmods.dev/badge/skills/akopichin/afm/afm-mesh-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.03069
Opus 5.5 $0.00019 $0.01228
Sonnet 5.5 $0.00009 $0.00614
Haiku 4.5 $0.00005 $0.00307

Measured 6d ago against content hash f98cb3d28979, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

afm-mesh-driven-development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/claude/skills/afm-mesh-driven-development/SKILL.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mesh-Driven Development

Execute a plan by sending each task as a durable AFM request to a named team writer, validating the returned work against evidence, and only then moving on. This is subagent-driven development re-based onto the AFM mesh: requests and replies replace dispatch and report, afm agent wait + yield replaces blocking on a child, and a shared worktree replaces isolated contexts.

Division of labor. This skill defines the dispatch, recovery and acceptance protocol. The CALLING FLOW owns ordering and gates — sections, review rounds, markers, board duties. Apply the loop below to the flow's current unit of work; writers finishing never by itself completes a unit or the stage.

You are the orchestrator. You assign, verify and integrate; writers write. Never implement a task yourself while its assigned writer is active, and never use native subagents for work the mesh team owns. Stage-started AFM helpers are available for bounded review and analysis (see below).

Key differences from native subagents

Native subagents AFM mesh
Dispatch prompt, blocking result afm agent send --kind request, reply arrives later
Isolated context per agent ONE shared worktree — file ownership is the isolation
Controller session memory Your turn can END (yield); the ledger plus afm's durable message records are the memory
Resume agent in-session A follow-up request to the same writer continues its conversation — but must still name the task, the prior request id and the remaining work explicitly

The Task Loop

  1. Reconcile before acting. At the start of EVERY turn — before any send or edit — load the ledger (team-progress.json or the flow's equivalent), <your_requests> and afm agent inbox, and reconcile them. afm's own records are the source of truth: a request present in <your_requests> but missing from the ledger WAS sent — record it, never resend it. Re-dispatching completed or pending work is the single most expensive failure. Persist in the ledger: the current unit/phase, each task's assignee, request/reply IDs with their purpose, task ACCEPTANCE separately from "reply received", and retry counts. Write via temp file + atomic rename. A missing or stale ledger is rebuilt from <your_requests>/inbox before anything is dispatched. A registered batch and the replies already collected for it survive a restart; check afm agent wait-status before deciding whether a request still needs an answer.
  2. Contracts come from the plan. If parallel tasks share a contract, pin down the one the plan or the code already defines; delegate only missing contract work the plan requires, and accept it before dependent tasks start. Do not create abstractions solely to enable parallelism.
  3. One request per plan task. Each request is self-contained — a writer never reads your session history. It names: the task id, allowed files (explicit ownership), dependencies and interfaces from earlier tasks, acceptance criteria, required checks, the TDD requirement for behavior changes (failing test first, red→green evidence in the reply), and any identifiers the calling flow requires (board key etc.). Ownership covers the tests, fixtures, manifests and generated files the task's commands may touch; a writer needing a file outside its grant must stop and ask — resolve the overlap and record the expanded grant before it proceeds. Record the baseline (git rev-parse HEAD plus the dirty state) before dispatching — acceptance is read against it. Corrections are linked follow-up requests to the same writer, not replays of the original. Include the diagnosis and escalation checkpoints below in writer requests: writers may not have loaded this skill. An ownership handoff records a new assignee instead of sending another correction to the original writer.
  4. Record, then wait. Record every returned message_id immediately (step 0 fields). For independent requests whose outcomes belong in one round, register ONE afm agent wait --condition reply_to_all --message-ids <id1,id2,...> (optionally with --deadline-seconds N; at most 16 IDs). ready means all have ended; yield means save the batch_id and END YOUR TURN. A separate incoming question can wake you before the batch ends: answer it, check the batch, then park again if it is still pending. Never poll or sleep in a shell, and never write a final summary while requests are pending.
  5. Classify every outcome by its request's purpose. On continuation, read afm agent wait-status --wait-id <batch_id> for each item's status and reason, and afm agent inbox --all for its answer. An implementation reply must carry the completed scope and verification evidence; a review reply must cover the requested scope — an explicit "no findings" is a valid, complete review. An acknowledgement or partial status is NEITHER: do not re-wait the satisfied message id and do not redispatch the task — send one linked follow-up to the same agent asking for the final result. A cancelled or expired item is an outcome without an answer, even when the batch status is ready: retain the other results and its reason. It proves nothing about the tree: confirm the writer stopped editing and inspect the partial changes in its files before retrying (at most one retry per request chain, counted in the ledger) or reporting the concrete blocker.
  6. Accept on evidence, not on words. The writer's changes are ALREADY in the shared worktree — never apply a returned diff on top of them. Acceptance = inspect the staged, unstaged and new-file changes against the recorded baseline, verify the acceptance criteria and the ownership boundaries. Missing red→green evidence: ask for the existing record first; if the test-first step simply did not happen, record the unmet requirement — never invent evidence or rewind the shared tree to manufacture a red state.
  7. Integrate. Reuse successful writer checks for the same relevant code and environment; HEAD alone does not identify a dirty shared tree. Run missing checks and checks needed for combined changes. Repeat broad suites after relevant edits, failures or a concrete new concern, not on every wake-up. Preserve every final gate required by the calling flow. Record the command, actual exit code, log location and tested tree state; piping through tail must not hide the check's failure. Attribute a failure BEFORE routing it: it may belong to this task, another writer's unfinished work, or the environment — do not send writer A to fix writer B's red phase or expand ownership just to make an aggregate check green. Small integration fixes are yours; a writer-sized defect goes back to its owner, subject to the escalation budget below.

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +98 lines f98cb3d28979
  2. 7d ago First seen · 119 lines · 47 tokens per session scan A 023db1d3e0d1

Subscribe to this mod's changes

afm-mesh-driven-development is a skill published in the GitHub repository akopichin/afm (25 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 3,069 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-23.