23 AI Coding Assistants
AI coding assistants bring a generative AI model into the environment where programming happens. Instead of moving between an R script and a separate chatbot, you can ask questions while the assistant has access to relevant code, files, error messages, and project conventions. Depending on the tool and the permissions you grant, it may suggest a single line, explain a function, edit several files, run commands, or check whether a change worked.
In my own work, GitHub Copilot has significantly changed my workflow and how I think about programming. I have had similar experiences with Claude Code and Cursor. These products are examples, not requirements or endorsements; other coding assistants offer comparable workflows, and their capabilities change quickly.
We will briefly demonstrate this way of working, but participants will not be asked to install or configure a coding assistant. Access may depend on an institution’s software, privacy, licensing, and security policies.
23.1 From Completion to Agent
“AI coding assistant” covers several related kinds of support:
- Inline completion predicts the next line or block of code as you type. You decide whether to accept each suggestion.
- Chat and explanation let you ask questions about selected code, an error, or a project. The assistant can explain unfamiliar syntax, compare approaches, or suggest a next step.
- Editing applies a requested change to one or more files and shows you the proposed differences.
- Agentic work gives the assistant a goal and tools. It can inspect a repository, propose a plan, edit files, run tests or other commands, and revise its work based on the results.
The final category is the most consequential. A chatbot returns text for you to transfer into a project. A coding agent can take actions inside the project. That access makes the interaction more useful, but it also makes clear instructions, bounded permissions, review, and validation more important.
23.2 Choosing Ask, Plan, and Agent
Many coding assistants now make this difference explicit through modes or agent settings. The exact names vary by product and change over time, but GitHub Copilot currently distinguishes Ask, Plan, and Agent in ways that map nicely onto the interaction patterns we’ve already practiced.1
| Setting | Closest workshop pattern | What it is useful for | What to watch |
|---|---|---|---|
| Ask | Conversational interaction | Understanding code, exploring alternatives, explaining an error, or asking “what would happen if…?” | The response may be plausible without being grounded in the right files, package versions, or institutional constraints. Ask for the evidence you need. |
| Plan | A conversation before a transaction | Turning a vague goal into a sequence of proposed steps before any code changes are made | A plan can feel complete while still hiding assumptions. Review the scope, answer open questions, and decide what evidence would make the implementation acceptable. |
| Agent | A bounded transaction or chained workflow | Giving the assistant a concrete task that may require reading files, editing code, running checks, and revising based on failures | The assistant can create side effects. Keep the task small enough to review, inspect the diff, and validate the result with appropriate checks. |
I find this distinction helpful because it separates three decisions that can otherwise get blurred together: Do I want an explanation? Do I want a reviewed plan? Or do I want the assistant to take action? In the earlier API chapters, this is similar to the difference between a conversation that helps refine thinking and a transactional call that produces an output for a workflow. With coding agents, the stakes are a little higher because the “output” may be changed files, terminal commands, or a running application.
Plan mode is often a useful middle step when you are not yet sure what files matter, what the risks are, or how large the change should be. The plan itself is still just model output, so it needs review. But it can make the human decision point visible before the assistant starts changing the project. Agent mode is better once the task is bounded: “Update this Shiny app so the prompt is saved with each response, then run the existing tests” is a better agent task than “make the app better.”
The next chapter takes this one step further. If Ask, Plan, and Agent describe how much action the assistant should take in a single session, skills describe reusable procedures the assistant can bring into that session: how to review a workshop page, how to validate an analysis, or how to follow a team’s release process.
23.3 How the Workflow Changes
A traditional programming workflow often begins with remembering syntax, searching documentation, copying an example, adapting it, and debugging the result. A coding assistant can compress parts of that loop because the question, the relevant files, the proposed edit, and the error output can remain in one working environment.
This changes the programmer’s role rather than removing it. More of the work can shift toward:
- describing the intended behavior and important constraints;
- giving the assistant the right project context;
- dividing a large goal into changes that can be reviewed;
- comparing a proposed solution with the actual requirement; and
- running appropriate checks and interpreting the results.
Programming knowledge still matters. It helps you ask more precise questions, notice when an answer is plausible but wrong, choose among alternatives, and determine what evidence would show that a change works.
23.4 Practical Benefits
23.4.1 Work With the Project in View
An assistant embedded in an editor or terminal can reason about more than an isolated prompt. It can inspect nearby functions, configuration files, naming conventions, and tests before suggesting a change. This project context can reduce the repeated work of explaining how pieces fit together.
23.4.2 Shorten the Feedback Loop
Coding assistants can help move quickly from an idea to a small draft, then from an error to a possible diagnosis. They are especially useful for scaffolding routine code, tracing where behavior is controlled, and making a consistent change across files. Agentic tools can also run local checks and use failures as feedback, although a successful command does not guarantee that the result meets the real need.
23.4.3 Support Learning at the Point of Need
You can ask for an explanation of unfamiliar code while looking at the exact file where it appears. Follow-up questions can connect a general concept to the current example: Why is this object reactive? What does this error imply? What would a simpler version look like? This can make documentation and examples easier to apply, provided you verify important details against authoritative sources.
23.4.4 Make More Room for Higher-Level Decisions
When an assistant handles some syntax recall and repetitive editing, you can spend more attention on the purpose of an analysis or application: the data being used, the assumptions being made, the people affected, and the evidence needed to trust the result. The benefit is not merely producing more code. It is creating more room to think about what the code should do.
23.4.5 Improve Routine Quality Practices
An assistant can draft tests, documentation, validation checks, and clearer error messages alongside an implementation. These tasks still require review, but asking for them as part of the original task can make quality work a normal part of development rather than an afterthought.
23.5 Keep the Human in Charge
Coding assistants can misunderstand a request, use an outdated interface, invent a function, weaken a security control, or produce code that runs but answers the wrong question. Treat generated changes as proposals:
- Review the plan and the file changes.
- Keep sensitive or restricted data out of tools that are not approved for it.
- Run focused checks using representative, non-sensitive inputs.
- Inspect the result, not only whether the code executed.
- Keep changes small enough to understand and reverse.
Institutional policy matters as much as technical capability. Before using a coding assistant for work, confirm which products, accounts, repositories, and data are approved by your organization.
23.6 Examples of Current Tools
- GitHub Copilot combines inline suggestions, chat, editing, review, and agentic workflows across supported development environments.
- Claude Code is an agentic coding tool available through terminal, editor, desktop, and web interfaces.
- Cursor is an AI-focused code editor and coding agent designed to understand repositories, plan changes, edit code, debug, and review results.
These examples illustrate a fast-moving product category rather than a complete comparison. Features, access, costs, and institutional controls vary by product and plan.2
The next chapter examines how custom skills can give coding agents reusable procedures. The chapters that follow apply this broader idea to Shiny development. The goal is not to hand control to an assistant, but to use one as a collaborator while you remain responsible for the problem, the evidence, and the final code.
Ask, Plan, and Agent descriptions were checked against official GitHub Copilot Chat documentation and VS Code agent customization documentation on September 21, 2026.↩︎
Product descriptions were checked against official GitHub, Anthropic, and Cursor documentation on September 19, 2026.↩︎