← Machine Coding

Give the Machine the System

Establish the world the software must work within before the machine chooses an implementation.

Chapter 04 was about discovering what is worth bringing into existence. This chapter is about the world that new thing must inhabit.

An imagined possibility becomes buildable only when it meets reality: the client’s systems, the users, the infrastructure, the permissions, the obligations, and the things that cannot be compromised. My central claim is simple.

The machine needs to understand the world it is building within.

A machine can propose almost anything. My responsibility is to establish what it may build, what it must work with, and what it must preserve. The purpose is not to suppress its imagination but to direct it. A machine that understands the deployment environment can spend its intelligence exploring solutions that could actually be used. Well-chosen constraints make creativity more productive.

Your idea meets reality

Every intention arrives with conditions. A reporting tool must run on the client’s existing Windows infrastructure. A document assistant must never send customer records to an unapproved provider. A workflow must respect permissions the client defined years ago and has no intention of renegotiating.

None of this diminishes the idea. It locates it. Some of the most instructive failures in my own work occurred not in the logic the machine wrote but in the assumptions it made about the world around that logic. I have seen impressive implementations fail for precisely this reason: correct against the request, wrong for the system.

So before the machine chooses an implementation, I establish the reality. I think of that reality in four categories.

First, the environment: what already exists. Operating systems, frameworks, databases, legacy systems, networks, deployment infrastructure, APIs, and the body of existing code the new software must live alongside.

Second, the people: who this is for. What users need, what the client already owns, what knowledge I bring, and who will maintain the software after the machine has written it.

Third, the non-negotiables: what cannot be compromised. Security, personal data, access permissions, regulatory obligations, reliability, cost ceilings, approved technologies, contractual restrictions, and the human authority that governs consequential actions.

Fourth, the choices still available: where freedom remains. Which technologies can change, which components can be reused, what can be replaced, and which trade-offs are permitted? This is the category I find easiest to neglect. A charter that specifies everything leaves little room for the machine to discover a better solution. I want it to see the open ground as clearly as the boundaries.

Elicit the non-negotiables

Some constraints announce themselves; others surface only when someone asks the right question. Commercial terms may be obvious, while security obligations, data-handling rules, and regulatory duties remain implicit. I establish these with the people authorised to interpret them before the machine proposes an architecture that assumes them away.

The questions are direct. What must the software never do? Which data must never leave which boundary? Whose permission gates which action? What regulations apply, and who attests compliance? What reliability is owed, and what happens if it is missed? What may the AI itself access during development?

For each answer I identify the accountable owner or authoritative source: the client’s security officer, the contract clause, the regulation itself. An obligation does not disappear because nobody has been assigned to administer it. Unresolved authority is a reason to escalate, not permission to proceed. If the cheapest hosting conflicts with a binding data-residency requirement, the responsible humans must find a permissible solution and record the decision. The machine cannot trade away the obligation.

The machine must stop and report a conflict rather than reinterpret a non-negotiable. But telling a machine what it must never do is not the same as preventing it from doing it.

If customer records must never reach an unapproved provider, enforce that boundary through authorised data sources and controlled provider routing. Scope credentials and tool permissions, separate execution authority from conversation, and cap spending through budgets the model cannot raise. The prompt tells the machine what rule to reason about; the surrounding system constrains what it can actually do.

These controls reduce risk rather than eliminate it, which is why defence runs in layers. Detailed governance belongs to the later safety chapter. For now, the principle is enough: instructions guide, mechanisms bind. A boundary that lives only in a prompt is a request, not a control.

Discover the existing system

I cannot establish the constraints of a real system from memory alone. For a client project, I investigate the questions the machine might otherwise answer by guessing:

Area The question for the developer and the machine
Data ownership and location Where does the data live? Who owns it? Can it leave the client’s environment? How is it retained or deleted?
Identity and permissions Who can do what? Which roles already exist? What must the new software never be able to access?
Existing investments Which databases, services, APIs, licences, and tools has the client already paid for? Can they be reused?
Integration contracts Which interfaces must the solution respect? Which schemas, limits, protocols, or workflows cannot change?
Deployment and operations Who installs, updates, backs up, monitors, and repairs this system? Local, cloud, or private network?
Reliability and recovery What happens when a service fails, an upgrade breaks compatibility, or data must be restored? Can the change be rolled back?
Commercial and legal boundaries What licences, contracts, regulations, procurement limits, or support commitments apply?
Uncertainty and missing knowledge What do we not know yet? Who can answer it? What should be investigated before designing anything?

The last row deserves particular attention. An unknown is not the same as an open decision. If a client requests an integration but nobody has established the existing system’s permissions, data model, or API limits, the machine should investigate before committing to an architecture. Unknowns are tasks for research, not blanks for the machine to fill with confidence.

Discovery is a discipline of its own. I have the repository examined rather than relying on its README: the code may reveal what the documentation omits, while the tests show which behaviours someone considered important enough to verify. Schemas, interfaces, and configuration expose contracts the new software will inherit. Where the documents run out, I consult the people who operate the system — nobody knows a legacy integration quite like the person who has nursed it through three upgrades.

I keep verified findings separate from working assumptions. The System Charter names the sources supporting its findings and identifies who will investigate unresolved questions, and by when. An unsupported assertion must not acquire the status of a fact simply because it has been written down.

Preferences are not constraints

Chapter 02 recorded my preferences: PostgreSQL, Python, ZeroMQ, HTML, YAML. Those are starting choices, and they stand — until someone else’s reality overrules them. Suppose a client already runs its business on a different database and requires the new application to operate against it. My preference no longer determines the decision.

I do not need to become an expert in the client’s platform overnight, but I need enough knowledge and independent verification to direct work responsibly. My ability to supervise a technology is itself a constraint. Where my knowledge runs out, I record the limitation and compensate through stronger reasoning, specialist review, narrower work packages, or deliberate learning before delegation.

A simple classification keeps these apart:

Classification Meaning Example
Non-negotiable Must be respected Customer records never reach an unapproved provider
Existing reality The solution must account for it The client operates an established database
Preference A starting choice, reconsiderable Python for backend services
Open decision The machine may explore alternatives How to structure a new reporting view
Unknown Investigate before committing Whether the existing API supports the operation

This is more useful than handing the machine a technology stack. It tells the machine which decisions are already made, which it can help make, and which need further information or human authority. In particular, it gives the machine somewhere legitimate to be creative: the open decisions, where exploration is wanted rather than merely tolerated.

Explore the options that remain

Open ground is where the partnership pays. I want the machine to propose alternatives, expose their costs, and challenge preferences that have become habits. For a reporting view, it might suggest server-rendered pages for simplicity, client-side caching for responsiveness, or precomputed summaries for scale. My preference for familiar tools is the default, not the verdict. If the machine can make an evidence-based case for a better choice within the charter, I want to hear it.

Three kinds of work meet here. Where the machine explores, I judge its alternatives. Where my expertise matters most — the client’s domain, the unwritten rules of its operation, the trade-offs for which I am responsible — I lead and the machine assists. Where neither of us knows enough, we investigate: read the API documentation, probe the limits in a sandbox, ask the vendor. Research may reveal a new constraint or open a new possibility. Guesswork merely postpones the discovery of a defect.

A real example: approval tied to the wrong thing

The clearest case I can document comes from ALIVE’s own source handling, reported on 5 November 2026 and verified against the repository, the implementation, and its tests.

The inconvenience was familiar: ordinary edits to project files invalidated previously approved sources, repeatedly interrupting work for renewed approval. Removing checks or automating approval clicks might have eliminated the interruption. It would also have risked dismantling the security boundary those checks were intended to protect: the owner’s authority over access to a project.

The investigation found that approval was tied to an immutable capture. Refreshing a folder created a new manifest; subsequent reads were verified against it; approval covered those exact bytes and had an expiry. Ordinary edits therefore invalidated approval even when the project and its authorised scope had not changed.

The diagnosis came from examining the project and custody modules, workspace APIs, dashboard refresh flow, permissions documentation, and existing tests. The report names the files inspected. That is part of the method: before redesigning a boundary, establish how it actually works.

The redesign separated two things that change at different rates. A binding records the durable owner authorisation — project, scope, operations — while the file revision can change beneath it, either as a live folder or a pinned snapshot. Each revision carries a derived approval recording its use rather than requiring a fresh owner decision.

The security boundary was preserved in the inspected central workspace path: explicit owner selection of the project root, canonical-path validation, rejection of symlinks and traversal, secret and ignore policies, scoped reads, and revocation that prevents future reads. Live mode grants neither execution authority nor access beyond the approved root.

The redesign was implemented but only partially qualified. The 5 November report records that legacy callers using old approval references retained exact-revision behaviour, background indexing was best-effort, and the committed migration still awaited owner approval. It did not establish exhaustive coverage of legacy read paths or report full slow-suite, container, or paid-model qualification. I do not infer later deployment from that report.

The lesson is the chapter in miniature. The right solution emerged from understanding what the system was protecting, not simply removing what annoyed the user. Had the machine been told only ‘stop asking me to reapprove’, it might have removed the very control we needed to preserve. Tests could then have confirmed that the prompts disappeared without ever establishing that authorisation still worked.

Give the machine the right context

With constraints established, I must decide what the machine needs to see. Access is not understanding. Giving it every client file or unrestricted web access can increase cost, obscure relevant material, and expose information unnecessarily. The objective is sufficient, accurate, authorised context: relevant code, architecture, interface definitions, schemas, configuration, tests, and client documentation.

Web research and broad source access need a purpose and a scope. I weigh disclosure, relevance, and token cost against the value of the information. Neither whole-repository reading nor targeted retrieval is universally superior. A small, well-mapped repository may be read whole; a larger one may need selective navigation. I need evidence that the machine can locate the relevant boundaries before trusting it to change them.

Before delegating consequential work, I ask the machine to describe the system’s boundaries back to me: what it may touch, what it must preserve, and where it must stop. I expect references to the files, interfaces, database structures, and policies supporting its account. A fluent summary is not enough. Important claims without supporting evidence remain assumptions or unknowns in the System Charter. If the machine cannot establish the boundaries, I am not ready to delegate the work, however much context I have supplied.

The System Charter

I record the project’s world in a short, durable System Charter: the target environment, client needs, existing components, non-negotiables, permitted choices, unknowns, authorised sources, and acceptance requirements. I distinguish verified findings, binding obligations, preferences, open decisions, and assumptions awaiting investigation.

The following hypothetical client integration illustrates the shape of the charter; it is not drawn from an actual engagement:

System Charter field Example
What we are building Internal reporting interface
Who it is for Sales managers and authorised staff
Existing system The client’s established customer system
Target environment Existing Windows infrastructure
Existing integration Approved customer-system API
Non-negotiable Preserve existing user permissions
Data boundary No live customer records sent to unapproved providers
Cost restriction No additional commercial licences without approval
Our preference Python and HTML where compatible
Open design choice Reporting view and caching strategy
Unknown API capabilities and limits — investigate first
AI access Approved documentation, sanitised fixtures, selected code
Acceptance Demonstrate permission enforcement, correct reports, deployment compatibility

The charter defines the machine’s room for manoeuvre. It may explore open decisions and challenge preferences with reasons. It must report conflicts with non-negotiables and investigate consequential unknowns before committing to a solution. Changes to binding boundaries require the appropriate human authority and must remain permissible. Once agreed, those changes are recorded so the next task begins from the revised charter.

I use the charter to judge proposals. If the machine suggests a reporting cache, I ask whether it preserves permissions, respects the data boundary, and stays within the cost restriction. If an unknown prevents that judgement, the proposal must identify it. An elegant design that cannot demonstrate compatibility with its environment is not ready. Over time, the charter becomes the project’s memory of its own world: what is known, what has been decided, what remains open, and who is responsible.

The conditions of success

Constraints are the conditions under which the machine must succeed. An unfamiliar platform changes how I supervise the work. A client’s existing systems change the range of available solutions. A data boundary changes how I allocate intelligence and arrange testing. Some constraints may even make the original idea infeasible; discovering that before implementation is valuable work.

The previous chapter asked what could exist. This one asks what can exist here, under these conditions. The better I establish that world, the more usefully the machine can explore it. I want to give the machine not merely a problem and a set of prohibitions, but a world in which it can build — with the freedom marked as clearly as the walls.

With intention discovered and the world established, the next step is to divide the work itself into pieces a machine can be trusted to perform. That is the subject of The Work Package.