← Dashboard Agentic Blazor 0% complete

We code in "AI Instructions" rather than code

Instructions In, Application Out

Figure 3: Instructions In, Application Out

When I build an application today, the file I spend the most time on is not a .cs file or a .razor file. It is a Markdown file in the Docs folder. It describes what the application does, how it is structured, what each service's contract is, what the screens look like, how data flows, what the tests check, and in what order the work should be done. I call these files "AI Instructions", and they are where the programming now happens.

This section explains what those files are, why they matter more than the code they produce, and what writing them well looks like.

The instructions are the source

In a traditional project, the source code is the source of truth. The design document, if there is one, goes stale the week after it is written, because the code moves and the document does not.

In an agentic project, that relationship is reversed. The Markdown plan is written first. The agent is told to code from it. When something needs to change, I change the plan and have the agent re-code the affected part. The plan does not go stale, because it is the thing being edited. The code is the output.

This has a practical consequence that surprised me. Editing a document is much faster than editing code. When I want a feature to work differently, I change two sentences in the plan. The agent changes the forty files. The agent and I go back and forth on the document, not on the code, and only when I am satisfied with the document do I tell the agent to build from it.

The Plan Is the Source

Figure 4: The Plan Is the Source

What is in the instructions

A good set of instructions for an application is not a wish list. It is closer to a specification that a contractor could build from without calling you. In the projects in this course, the instructions always include:

  • Decisions, with the rejected alternatives: Each important choice, what else was considered, and why this one won. This is the part the agent cannot invent, because it depends on what you want.
  • Contracts: Function signatures, schemas, configuration keys and parameters, with types, defaults and sample input and output.
  • Flows: A diagram for each major flow, including what happens when it fails.
  • A file-by-file change table: Which files are new, which are modified, and what changes in each.
  • A task list: The work broken into ordered steps, each one commit in size, each with a "done when" check.
  • Hard rules: The things that must never happen, such as changing a file format or putting a secret in a document.

Chapter 3 shows a real example, the plan for AIStoryBuilders 4.0, with excerpts from each of those parts.

A Real Plan: The First Page of the AIStoryBuilders 4.0 Plan

Figure 5: A Real Plan: The First Page of the AIStoryBuilders 4.0 Plan

Writing instructions is programming

It is tempting to think of this as writing documentation, and to give it the attention documentation usually gets. That would be a mistake. The instruction files decide the architecture, the data model, the service boundaries and the user experience. They are where the design decisions are made and recorded. If a decision is wrong in the plan, the agent will build it wrong, quickly and completely, and it will write tests that prove the wrong thing works.

So the care that used to go into the code goes into the plan. Read it the way you would review a pull request. Look for the step a developer could not carry out without asking someone. Look for the claim about the existing code that is not backed by a link to that code. Look for the failure path that is missing from a flow diagram. The prompt template in the next chapter tells the agent to look for exactly those things, and then to have a second, fresh agent look again.

This is the heavy work of programming now. It is heavy in quotes, because it is reading and deciding rather than typing. But it is the part that determines whether the application comes out right, and it is the part only you can do.

Something went wrong. Reload ×