{"slug": "you-bought-the-machine-now-build-the-software-factory", "title": "You Bought the Machine. Now Build the Software Factory.", "summary": "A developer argues that coding agents are like fast machines that increase production but not useful output unless the surrounding 'factory'—engineering practices, executable rules, and verification—is built. The post emphasizes defining precise work orders and tolerances, encoding domain rules in code, and requiring explicit verification commands to ensure agent output stays within quality boundaries.", "body_md": "// follow-up post from ...\n\nA factory owner buys a machine that works ten times faster than his employees.\n\nHe drops it into the middle of the workshop and switches it on.\n\nWithin an hour, it produces hundreds of parts.\n\nSome are correct.\n\nSome are nearly correct.\n\nSome only look correct until somebody puts weight on them.\n\nNobody can reliably tell the difference.\n\nThe drawings are outdated. The measuring equipment is broken. Important specifications exist only inside the head of one senior employee. Quality control is one exhausted person saying:\n\nLooks fine to me.\n\nProduction has increased.\n\nUseful production has not.\n\nThat is software development with coding agents.\n\nWe bought the machine.\n\nNow we need to build the factory.\n\nCoding agents can already:\n\nThat is real production power.\n\nIt is not engineering maturity.\n\nA factory also needs:\n\nWithout those things, an agent is just a very fast developer with incomplete context and no responsibility for the production incident.\n\nWe already had developers like that.\n\nNow they scale horizontally.\n\nThis is not a useful agent task:\n\n```\nImprove customer validation.\n\nAdd tests where appropriate.\n\nDo not break anything.\n```\n\n“Do not break anything” is not a requirement.\n\nIt is a prayer.\n\nA useful task defines the part:\n\n```\nReject an empty customer identifier before database access.\n\nRequired behavior:\n- Reject an empty string.\n- Reject whitespace-only input.\n- Throw InvalidArgumentException.\n- Include \"customerId\" in the exception message.\n\nConstraints:\n- Preserve public interfaces.\n- Do not add dependencies.\n- Do not modify unrelated files.\n- Do not suppress static-analysis errors.\n\nVerification:\n- Add a regression test that fails before the fix.\n- Run PHPUnit.\n- Run PHPStan.\n- Run PHP-CS-Fixer in dry-run mode.\n- Report commands, exit codes, and results.\n\nNo change is a valid result if the defect cannot be reproduced.\n```\n\nThat is not clever prompting.\n\nIt is a work order.\n\nThe agent does not need encouragement.\n\nIt needs dimensions.\n\nCritical software knowledge still lives in:\n\n`DO NOT TOUCH`\n\nA senior developer may understand the invisible rules around a codebase.\n\nThe agent sees files.\n\nIt does not see tribal knowledge.\n\nStore durable knowledge (ADRs, Skills, Docs, ...) in predictable places:\n\n```\nAGENTS.md\nREADME.md\ndocs/architecture.md\ndocs/domain-rules.md\ndocs/decisions/\ndocs/runbooks/\n```\n\nBut documentation is not enough.\n\nMake important rules executable.\n\nDo not merely write:\n\nControllers must not execute SQL.\n\nAdd an architecture test.\n\nDo not merely write:\n\nMoney uses integer cents.\n\nEncode it:\n\n```\n<?php\n\ndeclare(strict_types=1);\n\nfinal readonly class Money\n{\n    /**\n     * @param int<0, max> $cents\n     */\n    public function __construct(\n        public int $cents,\n    ) {\n        if ($cents < 0) {\n            throw new InvalidArgumentException(\n                'Money cannot contain negative cents.',\n            );\n        }\n    }\n}\n```\n\nThe best documentation is a system that rejects invalid construction.\n\nFactories do not ask machines to produce “high-quality parts.”\n\nThey define tolerances.\n\nSoftware needs the same thing:\n\n```\nPublic APIs must not change.\nDomain code must not depend on HTTP infrastructure.\nOnly repository classes may execute SQL.\nNo new production dependencies.\nPHPStan errors must not be suppressed.\nEvery skipped verification command must be reported.\n```\n\nA vague instruction forces the model to invent its own definition of quality.\n\nThen everybody acts surprised when it chooses convenience.\n\nDo not ask whether the model was smart.\n\nAsk whether the result stayed inside the tolerances.\n\nAn agent saying:\n\nAll tests pass.\n\nis not evidence.\n\nIt is text generated by the same system that generated the code.\n\nRequire:\n\nFor a PHP project:\n\n```\ncomposer test\nvendor/bin/phpstan analyse --no-progress\nvendor/bin/php-cs-fixer fix --dry-run --diff\n```\n\nWhere configured:\n\n```\nvendor/bin/infection --min-msi=80\n```\n\nThe result must be explicit:\n\n```\nPASSED\nFAILED\nSKIPPED\nNOT AVAILABLE\n```\n\nNot:\n\n```\nLooks good.\n```\n\nNot:\n\n```\nShould work.\n```\n\nNot:\n\n```\nI could not run the tests, but the change is straightforward.\n```\n\nA factory with broken gauges can produce consistently broken products.\n\nConsistency is not correctness.\n\nAgents assume that every task must produce a patch.\n\nThat creates ceremonial changes:\n\nSometimes the correct result is:\n\nNo change required.\n\nThe bug may already be fixed.\n\nThe report may be wrong.\n\nAnother service may own the failure.\n\nThe required external system may be unavailable.\n\nThe requested change may make the architecture worse.\n\nRequire reproduction first:\n\n```\nReproduce the reported behavior before modifying production code.\n\nIf it cannot be reproduced:\n1. Report the scenarios tested.\n2. Report the commands executed.\n3. Report the observed behavior.\n4. Identify unavailable dependencies.\n5. Do not create a diff merely to appear productive.\n```\n\nEvidence is progress.\n\nA diff is not.\n\nReading every generated line with equal intensity is not a quality strategy.\n\nIt is an attention-distribution bug.\n\nSpend human attention on:\n\nSpend less attention on deterministic work protected by automation:\n\nA decorative screw and a structural bolt do not deserve the same inspection.\n\nThat is not laziness.\n\nThat is engineering.\n\nBut there is no free shortcut:\n\nReading less code requires testing more behavior.\n\nReading less and testing less is not industrialization.\n\nIt is negligence with better branding.\n\nLines generated do not matter.\n\nTokens consumed do not matter.\n\nThe percentage of AI-written code does not matter.\n\nMeasure:\n\nOne thousand generated lines may be useful.\n\nThey may also be industrially produced waste.\n\nYour repository is the benchmark that matters.\n\nNot the vendor’s multiplier.\n\nWhen generated code breaks production, responsibility cannot be assigned to the model.\n\nThe model does not:\n\nA real workflow defines:\n\nThis is not new AI bureaucracy.\n\nThis is engineering accountability that should already have existed.\n\nThe machine simply exposes its absence.\n\nDo not build a giant internal AI platform first.\n\nThat is how companies spend a year automating work they never understood.\n\nChoose one repeatable task:\n\nThen define:\n\nThat is already a software factory.\n\nSmall, but real.\n\nThe developer is not disappearing.\n\nThe work is moving.\n\nLess value comes from manually typing predictable code.\n\nMore value comes from:\n\nA master carpenter should not spend every day producing identical shelf pins.\n\nBut somebody still needs to understand material, structure, load, and failure.\n\nOtherwise the factory produces furniture efficiently until somebody sits on it.\n\nThe same applies to software.\n\nThe agent is not the factory.\n\nThe model is not the production system.\n\nGenerated code is not automatically the product.\n\nThe factory is the system of constraints, evidence, inspection, and responsibility around the machine.\n\nYou bought the machine.\n\nStop admiring how fast it moves.\n\nBuild something that can reject its garbage.", "url": "https://wpnews.pro/news/you-bought-the-machine-now-build-the-software-factory", "canonical_source": "https://dev.to/suckup_de/you-bought-the-machine-now-build-the-software-factory-1nhp", "published_at": "2026-08-02 12:03:19+00:00", "updated_at": "2026-08-02 12:13:19.998067+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-agents", "ai-tools", "mlops"], "entities": ["PHPUnit", "PHPStan", "PHP-CS-Fixer", "Infection"], "alternates": {"html": "https://wpnews.pro/news/you-bought-the-machine-now-build-the-software-factory", "markdown": "https://wpnews.pro/news/you-bought-the-machine-now-build-the-software-factory.md", "text": "https://wpnews.pro/news/you-bought-the-machine-now-build-the-software-factory.txt", "jsonld": "https://wpnews.pro/news/you-bought-the-machine-now-build-the-software-factory.jsonld"}}