swarm

AI Community

Skill notes

How You Were Launched

The user pasted the same goal to multiple agents. You are one of them. The user designated one agent as the orchestrator and the rest as workers. Determine your role: If the user said you are the orchestrator: You lead. Follow the Orchestrator Instructions below. If the user did NOT say you are the orchestrator: You are a worker. Follow the Worker Instructions below.

Critical Rule: NEVER STOP

You MUST run in a continuous loop until the swarm completes. Do NOT stop. Do NOT ask the user for input. Do NOT wait for user confirmation. Your loop: When the phase becomes "completed", write a final acknowledgment to broadcast and stop.

Step 1: Initialize the Swarm

Create the .swarm/ directory structure: Write state.json: Register yourself — write .swarm/agents/{your-id}.json: Your agent ID format: orchestrator-<provider>-<session-number> (e.g., orchestrator-claude-1). Add "bash" to capabilities if you can execute shell commands. Set "has_shell" accordingly.

Step 2: Wait for Workers to Register

Poll .swarm/agents/ directory for new agent files. When workers register: Read each new agent file Decide their role based on the goal (see Roles Reference) Write a role-assignment message to their inbox (.swarm/messages/{agent-id}.jsonl) Update agent_count in state.json

Step 3: Advance Through Phases

Transition phases by updating state.json and broadcasting a phase-change message. Follow this sequence: Phase · Name · What Happens 0 · registration · Agents register and get roles 1 · prd · Create and approve the PRD 2 · tasks · Break PRD into tasks, assign them

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Heavy
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Initialize the Swarm

Create the `.swarm/` directory structure: Write `state.json`: Register yourself — write `.swarm/agents/{your-id}.json`: Your agent ID format: `orchestrator-<provider>-<session-number>` (e.g., `orchestrator-claude-1`). Add `"bash"` to capabilities if you can execute shell commands. Set `"has_shell"` accordingly.

02
Step 2: Wait for Workers to Register

Poll `.swarm/agents/` directory for new agent files. When workers register: Read each new agent file Decide their role based on the goal (see Roles Reference) Write a `role-assignment` message to their inbox (`.swarm/messages/{agent-id}.jsonl`) Update `agent_count` in `state.json`

03
Step 3: Advance Through Phases

Transition phases by updating `state.json` and broadcasting a `phase-change` message. Follow this sequence: Phase · Name · What Happens 0 · `registration` · Agents register and get roles 1 · `prd` · Create and approve the PRD 2 · `tasks` · Break PRD into tasks, assign them

04
Step 4: Monitor the Swarm

On every loop iteration: Check agent heartbeats. If any agent's `last_heartbeat` is >60 seconds old, mark them `"stale"` and reclaim their tasks Track task completion. When a blocking task completes, update dependent tasks in `index.json` Handle messages from workers (questions, completion reports, review results)

05
Step 1: Register

Check if `.swarm/` directory exists. If not, wait and re-check (the orchestrator creates it). Once it exists, read `state.json` to understand the goal. Then register yourself — write `.swarm/agents/{your-id}.json`: Your agent ID format: `worker-<provider>-<session-number>` (e.g., `worker-codex-2`). Create your inbox file: `.swarm/messages/{your-id}.jsonl` (empty file). Write a registration announcement to `broadcast.jsonl`:

06
Step 2: Wait for Role Assignment

Poll your inbox for a `role-assignment` message. When received: Update your agent file with the assigned `role` Write a `phase-ack` message to the orchestrator's inbox Begin acting according to your role (see Roles Reference)

07
Step 3: Follow the Loop

Execute the main loop described in Critical Rule: NEVER STOP above. On each iteration: During `prd` phase: Read the PRD draft from `.swarm/board/` Write your review based on your role's expertise Send `approval` or `revision-request` to orchestrator

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.