Ant farm for developers. Worker ants are CI agents, queen is the orchestrator, tunnels are pipelines, aphids are tech debt.
  • JavaScript 100%
Find a file
2026-06-30 11:13:43 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:08:59 +00:00
src feat(#1): ant farm engine — ants, tunnels, queen, food, ASCII colony 2026-06-15 08:09:56 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:40 +00:00
package.json feat(#1): ant farm engine — ants, tunnels, queen, food, ASCII colony 2026-06-15 08:09:56 +00:00
README.md feat(#1): ant farm engine — ants, tunnels, queen, food, ASCII colony 2026-06-15 08:09:56 +00:00

code-ant-farm

Ant farm for developers. Worker ants are CI agents, queen is the orchestrator, tunnels are pipelines, aphids are tech debt.

Usage

const { Colony, CASTES, SEASONS } = require('./src/colony');

const colony = new Colony('Dev Colony');
colony.spawnQueen('Queen Orchestrator');

// Spawn worker ants
colony.spawnAnt('build-agent-1', CASTES.WORKER);
colony.spawnAnt('security-1', CASTES.SOLDIER);
colony.spawnAnt('scout-1', CASTES.FORAGER);

// Dig tunnels (pipelines)
colony.addTunnel('security-scan', 15);

// Assign ants to tunnels
colony.assign('build-agent-1', 'ci-pipeline');
colony.dig('ci-pipeline');

// Forage for food
colony.forage(['scout-1']);

// Time passes
for (let i = 0; i < 10; i++) colony.tick();
colony.advanceDay();

console.log(colony.colonyView());
console.log(colony.report());

Ant Castes

  • Worker (CI Agent) — Builds tunnels, carries food, runs pipelines
  • Soldier (Security) — Defends against aphids, high combat
  • Nurse (Onboarding) — Tends eggs, cares for brood
  • Forager (Exploratory) — Scouts new territory, finds food
  • Builder (Infra) — Constructs tunnels, heavy carry capacity

Seasons (Sprint Cycles)

  • Sprint Start (growth x1.3) — New energy, ambitious scope
  • Mid-Sprint (growth x1.0) — Heads down, grinding
  • Wrap-up (growth x0.6) — Finishing, polishing
  • Production Freeze (growth x0.1) — Nobody deploys, survive

Components

  • Ant — 5 castes, health/energy/age, combat, food carrying
  • Tunnel — Pipelines with progress, branches, food storage
  • Aphid — Tech debt that drains resources, fought by soldiers
  • Colony — Queen, seasons, egg spawning, ASCII cross-section view