Factory for developers. Assembly lines per feature, QA inspectors, conveyor belts of commits, smoke tests as quality control.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
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