AI Throughout the Workflow: Agents, Building FOR AI vs WITH AI
AI in Design and Planning
Beyond writing code, AI assists earlier in the software lifecycle:
- Design and brainstorming: generating candidate features, user personas, and “Jobs to be Done” as a creative partner for Product Management. AI can produce architectural trade-off tables and generate diagrams (Mermaid, PlantUML) from a natural-language description.
- Team coordination: summarising long Slack threads, Jira tickets, and meeting notes into actionable items. Flagging blocked tasks from chat sentiment or stale tickets. Acting as a “Scrum Assistant.”
- Automated code review beyond linting: AI can catch architectural violations — “this function is called in a loop but performs a synchronous database query; this will become a performance bottleneck as the number of users grows.” This goes beyond “you forgot a semicolon” to genuine design-level review.
- Documentation generation and synchronisation: auto-generating and — critically — keeping in sync API documentation (Swagger/OpenAPI), docstrings, and READMEs. Flagging when documentation is stale because the code it references has changed.
AI Agents
An AI agent is an LLM with the ability to use tools — it can call functions, run shell commands, read and write files, and search the codebase. This enables agency: breaking a complex goal into multiple steps and executing them autonomously.
Example (Claude Code / GitHub Copilot Workspace, “Implement Dark Mode”):
- The agent reads the project’s CSS/theme files, the component tree, and existing colour-token definitions.
- It identifies every file that needs modification.
- It generates the changes — CSS variables, component-level toggles, a theme-switcher component.
- It runs the test suite and checks for visual regressions.
- It opens a PR with a summary of changes.
This is end-to-end task completion, not single-file code suggestions. The agent is acting as a junior developer directed by a high-level instruction.
Building WITH AI vs Building FOR AI
This is a critical distinction:
| Building WITH AI | Building FOR AI | |
|---|---|---|
| Definition | AI is a tool used during development; the final product contains no AI logic. | An LLM is a core runtime component of the product itself. |
| Example | Using Copilot to write a conventional e-commerce website. The deployed binary is standard code. | An automated legal-document assistant where the LLM parses user questions and generates responses at runtime. |
| Risk profile | AI errors are caught during development (compilation, tests, code review). A bad suggestion is rejected before it reaches production. | AI errors reach real users in real time. There is no “build time” to catch bad output. |
The Reliability Paradox
Traditional code: , always. Deterministically. If you call the same function with the same input, you get the same result.
AI code: , probably. The same input can produce different outputs on different calls. The model might behave differently tomorrow because the provider updated it.
The fundamental engineering question: how do you build a reliable system on top of a non-deterministic black box?
Why AI Coding Advances Faster than AI Medicine
Code has ground truth — a compiler and a test suite. If the AI generates a Python function, it can immediately run python -c "import module; assert module.func(2) == 4" and learn whether it was correct. The feedback loop is instantaneous, objective, and automatable.
There is no compiler for medical advice, legal opinions, or financial recommendations. The “Virtual Doctor Problem”: you cannot automatically verify whether an AI’s medical diagnosis is correct. You would need a panel of human doctors to grade every answer — slow, expensive, and subjective. This is why AI in creative, subjective, and high-stakes advisory domains lags behind AI in coding: coding has a built-in truth oracle.
Architectural Challenges of Building FOR AI
| Challenge | Detail |
|---|---|
| Latency | A database query takes ~10 ms. An LLM generation takes 2,000–10,000 ms. This requires streaming architectures (show text as it is generated, token by token) and asynchronous UX patterns. |
| Cost | AI APIs charge per token — unlike traditional APIs that are “free once hosted.” A viral app that calls an LLM on every user interaction can generate enormous bills within hours. Rate-limiting, caching, and cost-tracking are essential. |
| Provider lock-in | Building tightly around one vendor’s proprietary API (e.g. OpenAI’s specific function-calling format) makes switching providers expensive. Best practice: build a model-agnostic abstraction layer that can swap between providers. |
Expected Learning
- Describe at least three ways AI assists the non-coding parts of the software workflow.
- Define an AI agent and distinguish it from a code-completion tool.
- Distinguish Building WITH AI from Building FOR AI, with examples.
- Explain the Reliability Paradox: deterministic code vs probabilistic AI.
- Explain why AI coding advances faster than AI in other domains, invoking the concept of ground truth.
- Name architectural challenges specific to Building FOR AI (latency, cost, provider lock-in).
Past Paper Questions
The Building WITH AI vs FOR AI distinction and the reliability paradox are examinable. Expect a scenario-based question asking you to assess whether a proposed AI-powered feature is appropriate, or to identify risks in an AI-augmented development workflow.