In this article
- Learning Outcomes
- 1. Two Ways Developers Work with AI
- Quick Check
- Worksheet: Map Your Current Usage
- Apply It to Your Project 1: Find One Repeatable Workflow
- 2. Vibe Coding vs. AI-Assisted Development
- Quick Check
- Worksheet: Choose the Right Mode
- Apply It to Your Project 2: Classify a Real Task
- 3. How an LLM Produces an Answer
- Quick Check
- Worksheet: Response Variance
- Apply It to Your Project 3: Measure Nondeterminism
- 4. Model, Agent, and Harness
- Model: The Reasoning Engine
- Agent: The Orchestrator
- Harness: The Operating Environment
- Quick Check
- Worksheet: Responsibility Map
- Apply It to Your Project 4: Trace One Agent Interaction
- 5. Context Engineering
- Project Context: What Persists
- Quick Check
- Worksheet: One-Page Project Context
- Apply It to Your Project 5: Create a Minimal Context File
- 6. Context Engineering for a Single Interaction
- Quick Check
- Worksheet: Task Context Canvas
- Apply It to Your Project 6: Rewrite a Vague Request
- 7. Modern Context Management
- Just-in-Time Retrieval
- Progressive Disclosure
- Structured Notes
- Context Isolation
- Quick Check
- Worksheet: Context Budget
- Apply It to Your Project 7: Reduce a Context Package
- 8. Acceptance Criteria, Evals, and Verification
- Quick Check
- Worksheet: Verification Matrix
- Apply It to Your Project 8: Turn Requirements into Evidence
- 9. Permission and Authority Boundaries
- Quick Check
- Worksheet: Authority Matrix
- Apply It to Your Project 9: Define a Safe Operating Boundary
- 10. End-to-End Practice: The Tax Service
- Quick Check
- Step 1: Establish the Business Objective
- Step 2: Locate the Ownership Boundary
- Step 3: Retrieve Relevant Context
- Step 4: Define the Task Contract
- Step 5: Define Authority
- Step 6: Define Acceptance Evidence
- Step 7: Ask the Agent to Research and Plan
- Step 8: Implement and Verify
- Final Practice Worksheet
- Quick Reference
- Conclusion
- References
AI-assisted development is not simply writing a prompt and accepting the generated code. It is a disciplined engineering practice in which a developer gives an AI system the right context, defines the boundaries of the task, evaluates its decisions, and verifies the result.
This guide introduces the mental models needed to work effectively with coding agents and large language models. Each topic includes a practical worksheet and an exercise so that the concepts can be applied to a real codebase.
Learning Outcomes
By the end of this guide, you should be able to:
- distinguish experimentation through vibe coding from disciplined AI-assisted development;
- explain the responsibilities of a model, an agent, and an agent harness;
- account for the nondeterministic nature of language models;
- create concise, useful project context;
- turn a vague request into a well-scoped engineering task;
- manage context as a limited resource;
- define permissions, acceptance criteria, and verification evidence;
- evaluate whether AI-generated work is actually ready to use.
1. Two Ways Developers Work with AI
There is a meaningful difference between using an AI tool and engineering a workflow around AI.
A developer using AI may ask ChatGPT, Claude, Gemini, or Copilot for an explanation or a code sample. The interaction is usually local and temporary: ask a question, receive an answer, and manually decide what to do next.
A developer building with AI-assisted workflows goes further. They design how the agent discovers context, which tools it can use, how work is divided, what evidence proves completion, and where human approval is required.
| AI tool user | AI-assisted workflow designer |
|---|---|
| Interacts mainly through prompts | Designs repeatable development workflows |
| Supplies context manually | Creates persistent and task-specific context |
| Reviews one answer at a time | Defines validation and feedback loops |
| Uses the model as an assistant | Coordinates models, agents, tools, and permissions |
| Optimizes individual requests | Improves the surrounding engineering system |
These roles are not competing job titles. They describe a progression in how deliberately a developer uses AI.
Quick Check
- What distinguishes an isolated AI interaction from an AI-assisted workflow?
- Which responsibilities should remain with the developer even when an agent performs most implementation steps?
Worksheet: Map Your Current Usage
| Activity | How I do it today | Manual or repeatable? | Evidence of correctness | Improvement opportunity |
|---|---|---|---|---|
| Asking for explanations | ||||
| Generating code | ||||
| Finding relevant files | ||||
| Running tests | ||||
| Reviewing changes | ||||
| Recording project conventions |
Apply It to Your Project 1: Find One Repeatable Workflow
Choose one AI-assisted activity you perform at least once per week.
- Write down every manual step.
- Mark which steps require engineering judgment.
- Mark which steps could be represented as instructions, tools, or automated checks.
- Design a repeatable workflow without removing the human decisions that protect quality.
Deliverable: A workflow map showing its manual steps, agent actions, human decisions, and validation gates.
Proof of completion: You can explain what remains under human control, what the agent performs, and how the result is verified.
2. Vibe Coding vs. AI-Assisted Development
Vibe coding is useful when the objective is exploration. You describe what you want, iterate quickly, and accept that the implementation may be temporary. It can be effective for prototypes, experiments, learning exercises, and small applications with limited risk.
AI-assisted development is appropriate when the software contains important business rules, integrations, customer data, operational risk, or long-term maintenance requirements. The developer remains responsible for architecture, context, trade-offs, review, and validation.
| Vibe coding | AI-assisted development |
|---|---|
| Optimized for speed of exploration | Optimized for controlled delivery |
| Useful for disposable prototypes | Suitable for production systems |
| Requirements may emerge during generation | Requirements and constraints are made explicit |
| Broad changes may be acceptable | Changes are scoped and reviewed carefully |
| Generated output drives the next step | Engineering intent drives the agent |
The distinction is not about whether AI writes code. It is about whether the development process contains enough control for the risk involved.
flowchart TD
A[New development task] --> B{Production or long-lived?}
B -- No --> C{Low impact if incorrect?}
C -- Yes --> D[Vibe Coding]
C -- No --> E[AI-Assisted Development]
B -- Yes --> F{Business rules or sensitive data?}
F -- Yes --> G[Controlled AI-Assisted Development]
F -- No --> E
D --> H[Explore quickly]
E --> I[Define context and acceptance criteria]
G --> J[Add permissions, verification, and human approval]
Quick Check
- When is vibe coding a reasonable choice?
- Which task characteristics require a controlled AI-assisted workflow?
Worksheet: Choose the Right Mode
| Scenario | Impact if wrong | Expected lifetime | Business complexity | Recommended mode | Why? |
|---|---|---|---|---|---|
| Weekend prototype | Low | Days | Low | ||
| Internal reporting script | Medium | Months | Medium | ||
| Payment authorization | Critical | Years | High | ||
| UI concept test | Low | Hours | Low | ||
| Database migration | High | Permanent | High |
Apply It to Your Project 2: Classify a Real Task
Select one item from your current backlog. Decide whether it should be handled as exploration or controlled implementation.
Document:
- the cost of an incorrect result;
- whether the implementation is disposable or permanent;
- which architectural decisions require a developer;
- which checks must pass before the change can be accepted.
Deliverable: A one-page risk classification for a real backlog item, including the selected development mode and required controls.
Proof of completion: Your chosen workflow matches the risk and expected lifetime of the software.
3. How an LLM Produces an Answer
A large language model generates output by predicting tokens based on the context available to it. Given an incomplete sentence such as:
It works on my ___
the model may assign different probabilities to tokens such as machine, computer, or environment. It selects a continuation and repeats this process token by token.
This produces an essential property of LLM-based systems: their output is not inherently deterministic. The same request can produce different implementations, explanations, or decisions. Model configuration can reduce variation, but it does not turn generated output into verified truth.
For software development, this means:
- plausible code is not necessarily correct code;
- confident explanations can still contain false assumptions;
- repeated runs may reveal different interpretations of an ambiguous requirement;
- deterministic tools such as compilers and tests should verify nondeterministic output.
Quick Check
- Why can the same prompt produce different implementations?
- Which deterministic tools can you use to evaluate nondeterministic output in your project?
Worksheet: Response Variance
Run the same request three times and record the differences.
| Observation | Run 1 | Run 2 | Run 3 |
|---|---|---|---|
| Proposed design | |||
| Files selected | |||
| Assumptions made | |||
| Error handling | |||
| Tests suggested | |||
| Potential risks |
Apply It to Your Project 3: Measure Nondeterminism
Select a real backlog item and first reduce it to an intentionally incomplete request similar to:
Create a service that calculates taxes.
Submit it three times in separate conversations. Compare the responses and identify every assumption the model had to invent.
Then write a second version containing the real business domain, module, existing integration, inputs, outputs, error behavior, and acceptance criteria. Run that version three times as well.
Deliverable: A comparison table containing six responses, the assumptions each response invented, and the context that removed those assumptions.
Proof of completion: The second set of responses contains fewer conflicting assumptions than the first set.
4. Model, Agent, and Harness
The terms model, agent, and harness describe different layers of an AI-assisted system.
Model: The Reasoning Engine
The model interprets the supplied context and generates the next response. It can analyze a problem, propose a plan, write code, or recommend a tool call. By itself, however, the model does not browse your repository or execute commands.
Agent: The Orchestrator
The agent manages the interaction with the model. It gathers context, exposes tools, sends information to the model, receives requested actions, executes authorized actions, and continues the loop until it reaches a stopping condition.
Harness: The Operating Environment
The harness is the broader system that makes agent behavior useful and controlled. It includes:
- instructions and context-loading rules;
- repository access and search tools;
- terminals, browsers, MCP servers, and external integrations;
- approval and permission boundaries;
- state, memory, and progress tracking;
- tests, linters, builds, evals, and other validation mechanisms.
OpenAI describes agents as systems that combine models, tools, instructions, and orchestration. Anthropic similarly describes agents as models using tools in a loop. The practical lesson is that model quality is only one part of system quality. OpenAI: A Practical Guide to Building AI Agents Anthropic: Building Effective AI Agents
flowchart LR
H[Human Developer] -->|Goal, constraints, and approval| A[Agent]
A -->|Instructions and selected context| M[Model]
M -->|Reasoning or requested action| A
A -->|Read, edit, or execute| R[Harness]
R --> T[Repository]
R --> C[Terminal and Tests]
R --> X[External Tools and APIs]
R -->|Results and evidence| A
A -->|Plan, changes, and verification| H
Quick Check
- What can an agent do that a model alone cannot?
- Which harness controls prevent technical capability from becoming uncontrolled authority?
Worksheet: Responsibility Map
| Responsibility | Model | Agent | Harness | Human |
|---|---|---|---|---|
| Interpret requirements | ||||
| Search repository files | ||||
| Suggest a code change | ||||
| Execute a test command | ||||
| Grant production access | ||||
| Decide whether risk is acceptable | ||||
| Record verification evidence |
Apply It to Your Project 4: Trace One Agent Interaction
Observe a coding agent completing a small task. For every action, label it as model reasoning, agent orchestration, harness capability, or human decision.
Deliverable: An annotated trace of one real coding-agent session, with every step assigned to the model, agent, harness, or human.
Proof of completion: You can identify where each layer begins and ends, including at least one action the agent must not perform without approval.
5. Context Engineering
Prompt engineering focuses on how a request is written. Context engineering addresses the larger question:
What information should be available to the model at this moment so that it can make a good decision?
Context can include:
- system and repository instructions;
- architecture and directory structure;
- relevant source files and tests;
- coding conventions;
- examples of correct behavior;
- tool descriptions;
- task requirements and acceptance criteria;
- previous messages and decisions;
- tool results, logs, and external documentation.
flowchart LR
T[Task] --> S[Select initial context]
S --> R[Retrieve relevant information]
R --> W[Perform the work]
W --> V[Validate the result]
V --> D{More context needed?}
D -- Yes --> R
D -- No --> P[Preserve decisions and evidence]
P --> E[End]
Good context is not the largest possible collection of information. It is the smallest high-signal set that supports the current decision. Anthropic describes context as a finite resource and recommends curating relevant information, retrieving details just in time, and using progressive disclosure rather than loading everything up front. Anthropic: Effective Context Engineering for AI Agents
Project Context: What Persists
Project-level context should explain durable facts:
- what the system does;
- its major architectural boundaries;
- the directory structure;
- how to build, test, lint, and run it;
- naming and coding conventions;
- important domain rules;
- examples that represent the expected style.
Repository instruction files such as AGENTS.md can hold this persistent guidance. GitHub Copilot, for example, discovers repository-wide and path-specific instruction files and combines applicable instructions for the current task. GitHub Docs: Adding Custom Instructions
Quick Check
- How is context engineering broader than prompt engineering?
- Which information belongs in persistent project context, and which information belongs only to a task?
Worksheet: One-Page Project Context
| Section | Questions to answer | Your project |
|---|---|---|
| Purpose | What problem does this system solve? | |
| Architecture | What are the major modules and boundaries? | |
| Commands | How do developers build, test, lint, and run it? | |
| Conventions | Which patterns, names, and styles are mandatory? | |
| Domain rules | Which business rules must never be guessed? | |
| Examples | Which files demonstrate the preferred implementation? | |
| Restrictions | What must the agent not modify or access? |
Apply It to Your Project 5: Create a Minimal Context File
Create a one-page AGENTS.md draft for a real repository. Keep only information that is both durable and useful across multiple tasks.
Remove:
- generic advice such as “write high-quality code”;
- documentation already easy to discover;
- rules the team does not actually follow;
- detailed instructions relevant to only one task.
Deliverable: A one-page AGENTS.md draft stored in, or ready to add to, a repository you actively maintain.
Proof of completion: Another developer or a fresh agent session can use the file to locate the architecture, run the primary checks, follow conventions, and avoid prohibited changes.
6. Context Engineering for a Single Interaction
Persistent project context is not enough. Every task needs local information that explains the desired change.
Compare these requests:
Create a service that calculates taxes.
In the billing module, add a service that calculates tax for invoices.
Use the existing Stripe integration and follow the adapter pattern used by
the other billing integrations. The service must return either the calculated
tax breakdown or a domain error. Add unit tests for domestic, international,
and unsupported-region cases. Do not change the public invoice API.
The second request does more than add words. It reduces the number of decisions the model must invent.
A useful task context normally includes:
- Objective: the observable outcome.
- Location: the module, feature, or ownership boundary.
- Business context: why the change exists.
- Existing patterns: examples and integrations to reuse.
- Constraints: behavior or interfaces that must not change.
- Acceptance criteria: conditions that define success.
- Verification: commands or evidence that prove completion.
Quick Check
- Which decisions did the vague tax-service request force the model to invent?
- What is the difference between an implementation constraint and an acceptance criterion?
Worksheet: Task Context Canvas
| Field | Content |
|---|---|
| Task identifier | |
| Business objective | |
| User-visible outcome | |
| Relevant module | |
| Files or examples to inspect first | |
| Existing APIs to reuse | |
| Constraints and non-goals | |
| Failure behavior | |
| Acceptance criteria | |
| Verification commands | |
| Actions requiring approval |
Apply It to Your Project 6: Rewrite a Vague Request
Choose a vague request from your real backlog. If none is available, use one of these examples:
Refactor this code.
Improve the performance of this endpoint.
Add authentication.
Rewrite it using every field in the Task Context Canvas. Do not prescribe the implementation unless a genuine constraint requires it.
Deliverable: A completed Task Context Canvas attached to, or ready to attach to, the real backlog item.
Proof of completion: A developer unfamiliar with the conversation can explain the expected behavior, scope, non-goals, and proof of completion.
7. Modern Context Management
Larger context windows do not eliminate the need for context engineering. As conversations and tool outputs accumulate, relevant facts compete with old logs, rejected approaches, and unrelated files.
Modern agent workflows commonly use four techniques:
Just-in-Time Retrieval
Give the agent identifiers such as file paths, ticket IDs, or documentation links, and let it retrieve the full content when required.
Progressive Disclosure
Start with architecture and task boundaries. Load implementation details only after the agent identifies the relevant component.
Structured Notes
Store decisions, progress, unresolved questions, and verification results outside the active conversation so that long-running tasks can resume without retaining every raw tool output.
Context Isolation
Use separate focused agents or sessions for independent investigations. Return concise findings to the coordinating agent instead of merging every exploratory detail into one context window.
These techniques are intended to preserve signal, not to hide required information. The goal is to make relevant context available at the point of decision.
Quick Check
- Why does a larger context window not remove the need for context management?
- When should information be retrieved just in time instead of loaded at the beginning?
Worksheet: Context Budget
| Information | Load now | Retrieve later | Exclude | Reason |
|---|---|---|---|---|
| Architecture overview | ||||
| Entire repository documentation | ||||
| Relevant interface | ||||
| Historical logs from last year | ||||
| Current failing test | ||||
| Similar implementation | ||||
| Unrelated module source code |
Apply It to Your Project 7: Reduce a Context Package
Select a completed engineering task and gather every artifact associated with it: ticket, conversation, files, logs, documentation, and test output.
Create three lists:
- information required before work begins;
- information retrievable when a specific question appears;
- information that adds noise without changing a decision.
Deliverable: A three-part context inventory labeled load now, retrieve later, and exclude for a real engineering task.
Proof of completion: A fresh agent session can produce the correct implementation and verification plan using the reduced context package.
8. Acceptance Criteria, Evals, and Verification
Because model output varies, quality cannot depend only on whether one generated answer looks convincing.
An effective AI-assisted workflow separates three questions:
- Did the agent produce something?
- Does it satisfy the requested behavior?
- What evidence proves that it satisfies the requested behavior?
Acceptance criteria define the required behavior. Verification collects deterministic evidence such as test results, compiler output, schema validation, or a focused manual check. Evals measure performance across a representative set of tasks or cases instead of relying on one successful example.
OpenAI recommends establishing eval baselines when building agents, while Anthropic emphasizes defining outcomes and combining appropriate graders for the task. OpenAI: A Practical Guide to Building AI Agents Anthropic: Demystifying Evals for AI Agents
flowchart TD
A[Research existing system] --> B[Create implementation plan]
B --> C{Human approves plan?}
C -- No --> B
C -- Yes --> D[Implement scoped change]
D --> E[Run tests and quality checks]
E --> F{Evidence satisfies criteria?}
F -- No --> G[Diagnose failure]
G --> D
F -- Yes --> H[Review diff]
H --> I{Only intended changes?}
I -- No --> D
I -- Yes --> J[Complete task]
Quick Check
- What is the difference between acceptance criteria, verification, and an eval?
- Why is an agent's statement that tests passed not sufficient evidence?
Worksheet: Verification Matrix
| Requirement | Evidence | Verification method | Expected result | Actual result |
|---|---|---|---|---|
| Domestic tax is calculated | Unit test | run focused test |
Pass | |
| Unsupported region returns an error | Unit test | run error-case test |
Pass | |
| Public API remains compatible | Contract test | run API suite |
Pass | |
| Code follows repository style | Formatter/linter | run quality gate |
No violations | |
| No unrelated files changed | Diff review | inspect diff |
Only scoped files |
Apply It to Your Project 8: Turn Requirements into Evidence
Take the improved task from Exercise 6. For each acceptance criterion, define one observable piece of evidence.
Reject evidence such as:
- “the implementation looks correct”;
- “the agent said the tests pass”;
- “the code follows best practices.”
Replace it with a test result, command output, contract comparison, or explicit review procedure.
Deliverable: A verification matrix attached to a current task, pull request, or implementation plan.
Proof of completion: Every acceptance criterion has evidence that another developer can independently reproduce.
9. Permission and Authority Boundaries
An agent may be technically capable of performing an action without being authorized to perform it. A mature workflow distinguishes capability from permission.
Typical permission levels include:
- read repository files;
- modify files inside the current task scope;
- execute local tests;
- install dependencies;
- access secrets or customer data;
- modify databases;
- deploy software;
- send messages or create external records.
High-impact or difficult-to-reverse actions should require explicit approval. The boundary should be defined before execution, not after the agent announces what it has done.
Quick Check
- Why are capability and permission different concerns?
- Which actions in your environment are difficult to reverse or affect people outside the development team?
Worksheet: Authority Matrix
| Action | Allowed automatically | Requires approval | Prohibited | Notes |
|---|---|---|---|---|
| Read source files | ||||
| Edit task-related files | ||||
| Run local tests | ||||
| Install a dependency | ||||
| Change a database schema | ||||
| Access production logs | ||||
| Deploy to production | ||||
| Contact a customer |
Apply It to Your Project 9: Define a Safe Operating Boundary
Choose one development environment and complete the Authority Matrix. For every action requiring approval, define who can approve it and what information they need before deciding.
Deliverable: A reviewed Authority Matrix for a real repository or development environment.
Proof of completion: The agent can make useful progress without gaining unnecessary access or guessing whether a sensitive action is permitted.
10. End-to-End Practice: The Tax Service
Apply the complete workflow to the original vague request:
Create a service that calculates taxes.
flowchart TD
A[Business request] --> B[Define expected outcome]
B --> C[Locate owning module]
C --> D[Retrieve relevant context]
D --> E[Define task contract]
E --> F[Set authority boundaries]
F --> G[Create implementation plan]
G --> H[Implement]
H --> I[Collect verification evidence]
I --> J[Human review]
J --> K{Accepted?}
K -- No --> D
K -- Yes --> L[Preserve decisions and results]
Quick Check
- Which artifacts from the previous sections are required before implementation begins?
- At which points can the workflow return to context collection or implementation?
Step 1: Establish the Business Objective
Explain who needs the service, which transaction it supports, and what an incorrect result would affect.
Step 2: Locate the Ownership Boundary
Identify the module responsible for invoices, the existing integration boundary, and the public API that must remain stable.
Step 3: Retrieve Relevant Context
Load the architecture overview, the existing Stripe adapter, one representative test, and the domain error conventions. Do not load unrelated modules.
Step 4: Define the Task Contract
Specify inputs, outputs, supported regions, rounding rules, failure behavior, constraints, and non-goals.
Step 5: Define Authority
Allow repository reads, scoped file changes, and local tests. Require approval for dependency changes, schema migrations, external API calls, or deployments.
Step 6: Define Acceptance Evidence
Map each supported behavior to a test or reproducible check. Include compatibility and diff-scope checks.
Step 7: Ask the Agent to Research and Plan
Require the agent to inspect existing patterns and present a plan before implementation. Review assumptions that affect business behavior.
Step 8: Implement and Verify
Run the focused tests, the project quality gate, and a final diff review. Record the actual command output rather than accepting a summary without evidence.
Final Practice Worksheet
| Phase | Decision or artifact | Owner | Evidence |
|---|---|---|---|
| Business objective | |||
| Architecture boundary | |||
| Context package | |||
| Task contract | |||
| Authority boundary | |||
| Implementation plan | |||
| Verification results | |||
| Final review |
Final challenge: Apply this workflow to one real backlog item. Preserve the completed worksheets as part of the task record and compare the result with a previous AI-assisted task that did not use the workflow.
Deliverable: A complete task record containing the context package, task contract, authority matrix, implementation plan, verification matrix, and final review.
Proof of completion: A second developer can reproduce the checks, understand the important decisions, and determine why the task was accepted without relying on the original conversation.
Quick Reference
Before asking an agent to implement a change, confirm that you can answer:
- What outcome is required?
- Why does the business need it?
- Which module owns the behavior?
- Which existing pattern should be reused?
- What must not change?
- Which information belongs in context now?
- Which information can be retrieved later?
- Which actions require approval?
- What are the acceptance criteria?
- What evidence will prove completion?
If these answers are unclear, the agent is being asked to invent engineering decisions rather than execute them.
Conclusion
Effective AI-assisted development is not primarily about discovering a perfect prompt. It is about designing an environment in which a probabilistic model can contribute without replacing engineering responsibility.
The developer remains accountable for context, architecture, constraints, permissions, trade-offs, and evidence. The agent accelerates exploration and execution inside those boundaries. The model supplies reasoning and generation. The harness connects everything to the real development environment.
When these layers are designed deliberately, AI becomes more than a code generator. It becomes part of a repeatable engineering system.
References
- Anthropic: Effective Context Engineering for AI Agents
- Anthropic: Building Effective AI Agents
- Anthropic: Demystifying Evals for AI Agents
- OpenAI: A Practical Guide to Building AI Agents
- GitHub Docs: Adding Custom Instructions for GitHub Copilot CLI
- AGENTS.md
- DORA: State of AI-Assisted Software Development 2025