Factory for developers. Assembly lines per feature, QA inspectors, conveyor belts of commits, smoke tests as quality control.
  • JavaScript 100%
Find a file
2026-06-30 11:13:10 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-24 11:08:09 +00:00
src feat(#1): factory engine — assembly lines, workers, QA, conveyor, ASCII floor 2026-06-15 02:38:53 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:07 +00:00
package.json feat(#1): factory engine — assembly lines, workers, QA, conveyor, ASCII floor 2026-06-15 02:38:53 +00:00
README.md feat(#1): factory engine — assembly lines, workers, QA, conveyor, ASCII floor 2026-06-15 02:38:53 +00:00

code-factory

Factory for developers. Assembly lines per feature, QA inspectors, conveyor belts of commits, smoke tests as quality control.

Usage

const { Factory, ROLES } = require('./src/factory');

const factory = new Factory('Code Assembly Plant #1');

// Hire workers
factory.hireWorker('Alice', ROLES.SENIOR_ENGINEER);
factory.hireWorker('Bob', ROLES.JUNIOR_LINE);
factory.hireWorker('Carol', ROLES.QA_INSPECTOR);

// Assign to lines
factory.assignToLine('Alice', 'feature');
factory.assignToLine('Bob', 'bugfix');
factory.assignToLine('Carol', 'feature');

// Start production
factory.startProduction('feature');
factory.startProduction('bugfix');

// Queue work
factory.queueWork('feature', 'New Dashboard', { complexity: 8 });
factory.queueWork('bugfix', 'Fix null pointer', { complexity: 2 });

// Run
for (let i = 0; i < 50; i++) factory.tick();

// View
console.log(factory.floorView());
console.log(factory.metrics());

Assembly Lines

  • Bugfix Line (speed 1.5, 5% defects) — Quick patches
  • Feature Line (speed 1.0, 10% defects) — Full features with care
  • Refactor Line (speed 0.7, 8% defects) — Tear down and rebuild
  • Migration Line (speed 0.5, 15% defects) — High risk data moves
  • Hotfix Line (speed 2.5, 20% defects) — All hands, speed over safety

Pipeline Stages

plan -> code -> review -> test -> deploy

Workers

  • Junior Line Worker, Senior Engineer, QA Inspector, Shift Supervisor, Night Engineer, Intern
  • Skill levels affect productivity, defect catch rate, and line speed
  • Energy/morale system with breaks and training