Skip to content

Coding

Coding use cases have AI generate, debug, port, refactor, and explain code. This primitive extends far beyond traditional software engineering — it includes anyone who needs to create scripts, formulas, queries, macros, or technical artifacts as part of their work.

A marketing manager writing an Excel formula, a data analyst creating a SQL query, an operations lead building a Google Apps Script, and a software engineer writing a microservice — all of these are coding use cases. The AI handles the translation from intent to working technical implementation.

Coding is the primitive where AI agents are most mature. Modern AI coding agents can plan an approach, write code, run tests, debug failures, and iterate — handling multi-file changes across entire projects with minimal human guidance.

Coding is one of six use case primitives identified in OpenAI’s Identifying and Scaling AI Use Cases guide. The examples here are adapted to be platform-agnostic and mapped to Agentic Building Blocks.

  • Output is executable — the deliverable is code, scripts, formulas, or queries that run and produce results
  • Testable and verifiable — unlike content or research, code either works or it doesn’t, making quality assessment straightforward
  • Amplifies non-technical users — people who understand what they need but can’t write code can now create technical solutions
  • Benefits from iteration — AI can write, run, see errors, and fix them in a loop, converging on working solutions
  • Context accelerates quality — existing codebase, documentation, and examples help AI produce code that fits your patterns and standards

Use Coding when:

  • The deliverable is something that executes — code, scripts, formulas, queries, or macros
  • You need to translate a business requirement into a technical implementation
  • You’re debugging, refactoring, or porting existing code
  • Non-technical team members need technical artifacts (Excel formulas, SQL queries, simple scripts)

NOT the right primitive when:

  • The main output is a written document (that’s Content Creation)
  • You’re analyzing data and the insight is the deliverable, not the analysis code (that’s Data Analysis)
  • You’re creating a pipeline that runs autonomously (that’s Automation — though coding may be a step within it)
DepartmentUse CaseWhat AI DoesTypical Building Blocks
EngineeringFeature developmentPlans, writes, tests, and debugs features across multiple filesAgent, Context, MCP
MarketingDashboard formulasCreates complex spreadsheet formulas and Google Sheets scripts from plain-language descriptionsPrompt, Context
FinanceFinancial modelsBuilds Excel models and Python scripts for scenario analysisPrompt, Context, Skill
SalesCRM automation scriptsWrites scripts to automate CRM data entry, lead scoring, and pipeline managementPrompt, Context, Agent
HRWorkflow automationCreates Google Apps Scripts or Power Automate flows for approval processesPrompt, Context
IT/OperationsInfrastructure scriptsGenerates deployment scripts, monitoring configurations, and automation toolingAgent, Context, MCP
ComplexityBuilding BlocksExample
SimplePrompt + ContextAsk AI to write a VLOOKUP formula, providing the spreadsheet structure as context
IntermediateAgent + ContextAn AI agent that reads your codebase, writes a new feature, runs the tests, and iterates until they pass
AdvancedAgent + MCP + ContextAn agent connected to your repository (via MCP) that handles pull requests end-to-end — writing code, running CI, addressing review comments
DepartmentFinance
Autonomy levelCollaborative
Building blocksPrompt, Context
ProblemBuilding financial models in Excel takes hours of formula debugging — nested IF statements, VLOOKUP chains, and array formulas are error-prone and hard to verify
SolutionDescribe the model logic in plain language with sample data as context. AI generates the formulas, explains each step, and troubleshoots errors when the results don’t match expectations
DepartmentEngineering
Autonomy levelAutonomous
Building blocksAgent, Context, MCP
ProblemRoutine development tasks (bug fixes, test writing, dependency updates, small features) consume senior engineer time that should go to architecture and design
SolutionAn AI coding agent reads the issue, explores the codebase, writes the implementation, runs tests, and creates a pull request. Senior engineers review the output rather than writing it themselves
DepartmentMarketing
Autonomy levelCollaborative
Building blocksPrompt, Context, Skill
ProblemThe marketing team needs data pulled from multiple spreadsheets and combined into reports, but they depend on engineering for any formula or script work — creating a bottleneck
SolutionA skill that takes a plain-language description of what data to combine and how, generates the appropriate Google Sheets formulas or Apps Script, and explains how to use it. Marketing becomes self-sufficient for routine data tasks

Accepting code without testing it. AI-generated code often works but may have subtle bugs, security issues, or edge cases. Always run the code, verify the output, and test edge cases before deploying — especially for code that handles sensitive data or runs in production.

Providing requirements without examples. “Build a script that processes our invoices” is vague. “Build a script that reads CSV files with columns [date, vendor, amount, category], groups by category, and outputs a summary with totals — here’s a sample file” produces working code on the first try.

Confusing coding with data analysis. If the goal is the insight (what are our spending trends?), the primitive is Data Analysis. If the goal is the tool (build me a script that analyzes spending), the primitive is Coding. The distinction matters because it changes how you evaluate the output.

  • Product & Engineering — PRDs, user stories, acceptance criteria, and the full software development lifecycle
  • AI Use Cases Overview — all six primitives at a glance
  • Agents — autonomous coding agents that plan, write, test, and iterate
  • Context — providing codebases, documentation, and examples
  • Data Analysis — when the insight is the goal, not the code
  • Automation — when code runs as part of an unattended pipeline
  • Coding Resources — curated reports, guides, and references