agentleFS
irahardiantoirahardianto/awesome-agv/.agents/skills/agent-protocols/SKILL.md

agent-protocols

Skill157 starsChanged 3 months agoMITView on GitHub

Shared protocols for all agents in the multi-agent pipeline: recursive nesting, pre-implementation restatement, agent spawn protocol, parallel dispatch format, completion reporting, and sovereign subagent awareness. Load this skill instead of inlining these protocols in every agent file.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • fmind/dottheir own version, first seen Oct 5, 2026

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When your scope card is too broad for a single context:

    line 16
  2. Very specific:

    Write .agentwork/handoff.md for your parent coordinator

    line 22
  3. Distinctive:

    Before writing code, restate in your own words:

    line 32
  4. Distinctive:

    If any assumption is uncertain, document it in your handoff and proceed with the conservative interpretation.

    line 37
  5. Very specific:

    When spawning ANY agent type with a role file in .agents/agents/:

    line 43
  6. Very specific:

    Write .agentwork/handoff.md with status and file manifest

    line 76
  7. Distinctive:

    Write your deliverable file (findings, verdict, etc.)

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Protocols

Shared behavioral protocols for all agents in the workflow-team pipeline.

1. Recursive Nesting Protocol

When your scope card is too broad for a single context:

  1. Further decompose using parallel-dispatch skill (§1 Decomposition, §5 Hierarchical Decomposition)
  2. Spawn sub-agents with narrower scope cards using TypeName="self" with dedicated Role designations (see §3 Agent Spawn Protocol)
  3. Your scope becomes the ceiling — children cannot operate outside it
  4. Track sub-agent progress; merge results when all complete
  5. Write .agentwork/handoff.md for your parent coordinator

Triggers for nesting:

  • Task edits >3 unrelated files
  • Scope card contains >2 features
  • Context approaching 50% capacity
  • Secondary expertise needed (delegate to specialist)

2. Pre-Implementation Restatement

Before writing code, restate in your own words:

  1. What the .agentwork/brief.md / scope card asks you to build
  2. What files you will create or modify
  3. What assumptions you are making

If any assumption is uncertain, document it in your handoff and proceed with the conservative interpretation.

3. Agent Spawn Protocol (Universal TypeName="self" Pattern)

In the Antigravity subagent platform, TypeName="self" is the universal spawn mechanism that ensures subagents inherit their parent's full tool capabilities (file modification, command execution, and subagent dispatch for multi-tier nesting). Discovered named types default to read-only tool sets.

When spawning ANY agent type with a role file in .agents/agents/:

  1. Always use TypeName="self" in invoke_subagent calls. This guarantees the subagent inherits write, execution, and subagent tools from the parent.
  2. Differentiate roles via the Role field (e.g., Role: "Tech-Lead (Auth API)", Role: "Backend Engineer (Payments)", Role: "Test Automation Engineer").
  3. Reference the role file in the system prompt — never paraphrase:
    "Your role, domain, skills, boundaries, and protocols are defined in
     file://{workspace}/.agents/agents/{agent-type}.md.
    Read this file FIRST before beginning any work."
  4. The child agent MUST read the role file as its first action. Boundaries, domain rules, and workflow expectations are strictly defined by the role file.
  5. Propagate this protocol recursively — Tech-Leads spawn specialized builders using TypeName="self" with builder role files, enabling deep parallel execution.
  6. Subagent Monitoring & Reactivity: Parents receive automatic notifications when subagents send messages. Wait reactively or use manage_subagents to list active subagents. Do NOT use manage_task (which is exclusively for background commands/processes) for subagent lifecycle operations.

4. Parallel Dispatch Format

Each agent file contains a ## Parallel Dispatch section with role-specific values. The standard fields are:

FieldPurpose
Scope AxisThe dimension used to partition work (feature, concern, domain)
Write ScopeGlob pattern for exclusive write access
Shared ReadsGlob patterns for read-only access
ConstraintKey limitation on parallel instances
IntegrationHow parallel results are reconciled (if applicable)

For read-only agents, Write Scope becomes Read Scope and scoping is for coverage guarantee, not conflict prevention.

5. Completion Reporting Protocol

Every agent MUST report completion to its parent. This is non-negotiable.

For code-writing agents (builders, specialists):

  1. Write .agentwork/handoff.md with status and file manifest
  2. Message your parent (the conversation that dispatched you): ".agentwork/handoff.md ready — [scope-card-id] [COMPLETE|BLOCKED]"

For read-only agents (scouts, reviewers, red team members):

  1. Write your deliverable file (findings, verdict, etc.)
  2. Message your parent: ".agentwork/[deliverable-file] ready — [1-line summary]"

Critical: Reply-To Address

Your parent's conversation ID is the conversation that sent you your initial task. This is the conversation you received your first message from. Always reply to THIS conversation ID — never to any other ID mentioned in your task description or context.

6. Sovereign Subagent Awareness

Coordinators and tech-leads MUST proactively delegate to specialized builders when the work warrants it. This protocol ensures maximum parallelism, speed, and quality across the pipeline.

[!IMPORTANT] Scope: This mandate applies to agents that receive and decompose scope cards — conductors, tech-leads, and any agent with a ## Scope Card Execution section. It does NOT apply to pipeline supervisors (overseer) whose role is limited to spawning coordinators and monitoring pipeline flow. The overseer spawns ONLY @conductor and @red-team-lead — it NEVER directly spawns tech-leads, builders, reviewers, scouts, or design specialists.

When to spawn sovereign subagents:

  • Your scope card spans multiple domains (e.g., backend + frontend + tests)
  • Your task contains independently parallelizable sub-deliverables
  • A sub-task requires secondary expertise (e.g., you are a tech-lead but the work is pure frontend — delegate to @frontend-engineer)
  • The parallel-dispatch skill's nesting triggers fire (>3 files, >2 features, >50% context)

When NOT to spawn (do the work yourself):

  • The task is trivially small (<3 files, single concern, <50 lines of integration code)
  • You ARE the specialist for this domain (e.g., you are @backend-engineer and it's a backend task)
  • Spawning would create more overhead than value (single-file fix, quick config change)
  • You are a pipeline supervisor (overseer) — delegate to your conductor, not to builders

Sovereignty principle:

Each spawned subagent operates autonomously within its scope card boundaries. It reads its role file, loads its skills, makes implementation decisions, runs its own quality checks, and reports completion. The parent does NOT micromanage — it decomposes, dispatches, and validates results.

Anti-pattern: A Tech-Lead implementing all backend + frontend + test code itself instead of dispatching @backend-engineer, @frontend-engineer, and @test-automation-engineer in parallel. This defeats the purpose of the multi-agent hierarchy and serializes work that could run concurrently.

Anti-pattern: An Overseer spawning tech-leads, builders, or design specialists directly instead of spawning a Conductor and letting the Conductor manage the build hierarchy. This flattens the pipeline and removes orchestration control.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.