Complete lesson text and action cards
Source-owned text for offline reading and retrieval. Command success still requires actual local evidence.
Name the missing pieces
Write the stage your current workflow actually reaches. Name the human who assigns tasks, the goal and the missing coordinator. You do not need an existing fleet or hub. A run ID names one saved mission. A SHA256 hash is a content fingerprint: changed bytes produce a different value. A wave is a group of tasks allowed to run together. A fixture is invented test input, not a real customer or model result. SQLite is the small local database file that keeps observed worker results.
Expected: Your note distinguishes human coordination from bounded mission execution.
See the whole architecture
Picture human -> mission contract -> coordinator -> talent database -> workers -> verifier -> approval -> report. Worker results and failures return to shared memory. Open kit/README.md and identify the manager, specialists and human release gate. PRACTICE workers are Python functions; they are not AI or brands.
Expected: You can point to every component and state the PRACTICE limit.
Prepare one practice folder
Download Resources, extract into a new folder named swarm-practice outside any shared agent folder, and open that folder in a terminal. All later commands run in this extracted folder. Windows: Shift+right-click the folder and Open in Terminal. macOS/Linux: open Terminal and use cd followed by the folder path in quotes. Run the version command. If Python is absent, use your existing Python setup course or ask a helper to install it; do not install packages or create paid accounts for this exercise.
Expected: Python reports 3.10 or newer.
windows
python --version
macos
python3 --version
linux
python3 --version
Run the environment check
Run doctor and keep its actual output. Open guardrails.py: it permits only PRACTICE, local tools, no websites, zero monetary spend, bounded attempts and runtime. This guard checks application inputs; it does not sandbox arbitrary malicious Python. Inspect downloaded code before running it.
Expected: DOCTOR PASS appears; no credential or network is required.
windows
python coordinator.py doctor
macos
python3 coordinator.py doctor
linux
python3 coordinator.py doctor
Read the mission contract
Open mission.json in a text editor. Find MISSION, OBJECTIVE, CONSTRAINTS, AVAILABLE RESOURCES, SUCCESS CRITERIA and APPROVAL RULES. The supplied source notes are invented and labelled. Human approval covers local release only. Run plan.
Expected: The plan contains research and planning with no dependencies, writing waiting for both, and testing waiting for writing.
windows
python coordinator.py plan --mission mission.json
macos
python3 coordinator.py plan --mission mission.json
linux
python3 coordinator.py plan --mission mission.json
Test a rejected boundary
Run the supplied negative-contract check. It attempts an external website permission, nonzero spending, malformed score and escaped output path. It must reject every case before any mission work.
Expected: CONTRACTS PASS appears.
windows
python test_swarm.py --contracts
macos
python3 test_swarm.py --contracts
linux
python3 test_swarm.py --contracts
Run twelve independent auditions
Run audition. Amber, Blue and Coral each attempt research, planning, writing and testing against the same input. The grader checks source preservation, outline structure, draft shape and review outcome. It records actual elapsed time, errors and pass/fail. Scores of 0 or 100 mean structural fixture performance only.
Expected: AUDITION PASS: 12 observed PRACTICE tests.
windows
python coordinator.py audition --mission mission.json
macos
python3 coordinator.py audition --mission mission.json
linux
python3 coordinator.py audition --mission mission.json
Inspect the talent database
Run talent. Identify the best currently observed writer and researcher, the number of observations, last-test date, average seconds and success rate. The latest five observations per bot/skill drive selection. A live audition uses reviewed 25-point quality, 25-point accuracy, 20-point completeness, 15-point usefulness and 15-point tool-discipline ratings, plus measured speed, errors, reliability and usage separately.
Expected: Each skill has measured PRACTICE profiles; tokens are not invented.
windows
python coordinator.py talent
macos
python3 coordinator.py talent
linux
python3 coordinator.py talent
Trace a selection decision
Read selection_score in coordinator.py and your talent output: 70% quality, up to 25 reliability points, and up to 5 speed points. Require quality at least 50. Costs are equally zero in this kit, so money does not distinguish workers. A live selector must reject unknown usage when a hard budget is required; among qualified candidates compare measured cost, speed and quality with a declared policy.
Expected: You can explain why the first candidate ranks ahead of the next and why no real-model price is claimed.
windows
python coordinator.py talent
macos
python3 coordinator.py talent
linux
python3 coordinator.py talent
Retest instead of freezing reputations
Repeat auditions once and compare observation counts. The database retains all observations, while selection uses the most recent five. Repeat after a changed model, tool, prompt or recurring failure. Wider skills such as coding, debugging, SQL, fact checking, image/video creation and editing need their own test artifacts and human rubrics; this kit does not fake those capabilities.
Expected: Another twelve observations are recorded and rankings are recomputed.
windows
python coordinator.py audition --mission mission.json
macos
python3 coordinator.py audition --mission mission.json
linux
python3 coordinator.py audition --mission mission.json
Open a read-only monitor
In a second terminal in the same extracted folder, start dashboard.py. It binds only 127.0.0.1 and chooses an available port automatically. Open the printed URL, not a guessed port. Leave the terminal open; Ctrl+C stops it. Before the first mission, Waiting is expected.
Expected: A PRACTICE Mission Control page opens at the printed localhost URL.
windows
python dashboard.py
macos
python3 dashboard.py
linux
python3 dashboard.py
Know what the monitor means
Keep the dashboard open while running the next lesson. It polls every two seconds and shows status, workers, queued/completed/failed/blocked tasks, measured skills, attempts, messages, usage, errors, verification and approval hash. Short sub-second practice tasks may finish between refreshes; the message history retains each wave. Tokens are null because no model ran.
Expected: The dashboard labels its PRACTICE scope, and you know how to inspect message history for quick tasks.
Launch the first mission
Run the mission once. Watch the monitor or open state/dashboard.json afterward. The coordinator chooses workers dynamically, keeps one assignment per worker per wave, runs independent tasks concurrently, sends results forward, grades outputs and waits at approval. It manages work instead of doing all jobs itself.
Expected: MISSION awaiting_approval plus a unique run ID. Four tasks complete; no approved.json exists yet.
windows
python coordinator.py run --mission mission.json
macos
python3 coordinator.py run --mission mission.json
linux
python3 coordinator.py run --mission mission.json
Prove parallel work and a waiting task
Run the kit self-test and inspect the latest report. The research and planning wave contains two different workers. Writing depends on their completed results. The test records worker start/end intervals and requires overlap. It also checks that the peer reviewer differs from the writer.
Expected: SWARM TEST PASS includes overlap, dependency order and independent review.
windows
python test_swarm.py
macos
python3 test_swarm.py
linux
python3 test_swarm.py
Inject a crash and see replacement
Run with --inject crash. The first writing attempt fails on purpose. The coordinator records the error, lowers that observed skill result, tries a different qualified worker and verifies the replacement. No worker is blamed for a real crash: this failure is injected PRACTICE.
Expected: The report records failure_detected, a second writing assignment to another worker and awaiting_approval.
windows
python coordinator.py run --mission mission.json --inject crash
macos
python3 coordinator.py run --mission mission.json --inject crash
linux
python3 coordinator.py run --mission mission.json --inject crash
Test timeout and bad-output repair
Run test_swarm.py again. The regression suite injects a deadline failure and empty output, detects each, reassigns once and verifies. It also tests a one-attempt mission that must stay blocked. In real work, distinguish service outage, missing permission, misunderstood brief and unusable content before selecting a recovery strategy.
Expected: Timeout, malformed-output recovery and exhausted-attempt blocking checks pass.
windows
python test_swarm.py
macos
python3 test_swarm.py
linux
python3 test_swarm.py
Read the actual usage ledger
Open the latest report usage object. It records task count, successful tasks, failures, retries, tool calls, elapsed seconds, images/videos and zero billed practice dollars. Tokens are null, with a reason. Local runtime is measured; model token and subscription measurements need an actual provider receipt.
Expected: You can identify actual seconds/calls and explain unknown tokens without turning unknown into zero.
windows
python coordinator.py memory
macos
python3 coordinator.py memory
linux
python3 coordinator.py memory
Prove the stop switches
Run the self-test resource cases. A one-call cap must stop before the next dispatch. A very short mission deadline must stop and never release. Practice workers honor bounded sleeps, but this is not containment for arbitrary external tools. Maximum cost is exactly zero because this mode never invokes paid models.
Expected: Tool-call and runtime stop cases remain unapproved.
windows
python test_swarm.py
macos
python3 test_swarm.py
linux
python3 test_swarm.py
Reuse observations across missions
Close and reopen a terminal, then run memory and talent. Reports live under state/<run-id>, the SQLite talent database persists observations, and recent failures influence the next selection. Each run ID prevents overwriting earlier missions. The local message history is separate from any external team communication service.
Expected: Earlier missions, attempts, source notes and outcomes remain available after process restart.
windows
python coordinator.py memory
macos
python3 coordinator.py memory
linux
python3 coordinator.py memory
Keep a tested backup of swarm memory
Stop the coordinator before backing up; keep the dashboard read-only. Run restore.py. It copies state to a unique archive backup, restores into a second scratch folder, and compares every file hash. Nothing is deleted. A backup recovery lesson is that a same-disk copy is only a rehearsal: retain a real non-secret backup on a different device before relying on it.
Expected: RESTORE PASS reports matching hashes; original state is still present.
windows
python restore.py
macos
python3 restore.py
linux
python3 restore.py
Review the held draft
Open state/<run-id>/draft.json and report.json using the run ID printed by run. Confirm source IDs and exact note preservation, a different reviewer, all grades and no failed tasks. Read source accuracy and usefulness yourself: fixture structural scores cannot prove factual correctness, creativity or whether your own success criteria were understood.
Expected: Your review records what passed mechanically and what still needs human or real peer evaluation.
Approve one reviewed hash
Copy the exact run_id and draft_sha256 from report.json. Replace RUN_ID and SHA256 below; do not literally run the placeholders. The command accepts only the reviewed current bytes of a verified held draft. It creates approved.json locally and records the human release event. It never posts online. The self-test proves changed bytes and blocked runs cannot be approved.
Expected: APPROVAL PASS; approved.json exists only in the chosen run folder.
windows
python coordinator.py approve --run-id RUN_ID --sha256 SHA256
macos
python3 coordinator.py approve --run-id RUN_ID --sha256 SHA256
linux
python3 coordinator.py approve --run-id RUN_ID --sha256 SHA256
Create real-team handoff tickets
Move from the prototype to observed real work gradually. Create a task list, a dated work journal, separate authorized worker identities and a reviewer. Keep the human responsible for handoffs until real automatic dispatch has been tested.
Expected: HANDOFF PREPARED emits tickets into live-evidence; no real worker invocation is falsely claimed.
windows
python handoff.py prepare mission.json
macos
python3 handoff.py prepare mission.json
linux
python3 handoff.py prepare mission.json
Import a real observed result
Use real-observation-template.json only after a real worker returns an artifact and a different reviewer checks it. Save a permitted artifact beside the receipt, fill every field and ratings, replace null usage only with observed data, and run import. It rejects missing artifacts, self-review, invalid ratings and escaped paths. The importer checks receipt structure, not identity authenticity or factual truth. No synthetic real result is provided.
Expected: REJECTED: Real identity and independent reviewer required. This expected rejection exits with code 1 and saves no observation.
windows
python handoff.py import real-observation-template.json
macos
python3 handoff.py import real-observation-template.json
linux
python3 handoff.py import real-observation-template.json
Create a fresh capstone input
Copy mission.json to capstone.json in your editor. Invent a new topic not used in the club sample, set deliverable to checklist, replace every source note with permitted accurate notes, and write your objective and success criteria. Keep the zero-spend local constraints. Human supplies mission/constraints/success criteria and resources, but never writes task assignments. Run auditions on the new notes, then launch with bad-output to require recovery.
Expected: A new mission has selected workers, parallel work, recovered error, verified results, held draft and complete usage/memory evidence.
windows
python coordinator.py audition --mission capstone.json
python coordinator.py run --mission capstone.json --inject bad-output
macos
python3 coordinator.py audition --mission capstone.json
python3 coordinator.py run --mission capstone.json --inject bad-output
linux
python3 coordinator.py audition --mission capstone.json
python3 coordinator.py run --mission capstone.json --inject bad-output
Graduate on evidence, not labels
Complete graduation.md. PRACTICE graduation requires measured auditions, selection, dependency order, overlap, communication, memory, budget stops, recovery, peer structural review, human review, approval and final report. REAL Stage 5 requires actual artifacts and independent real reviews. REAL Stage 6 additionally requires automatically dispatched authenticated workers, arbitrary mission decomposition validated by a human, measured usage, enforced external permissions and a fresh mission without hand-chaining. Keep that checkbox unearned until observed.
Expected: PRACTICE graduation evidence is complete; real autonomy limits remain explicit.
windows
python test_swarm.py
macos
python3 test_swarm.py
linux
python3 test_swarm.py