Skip to main content

Command Palette

Search for a command to run...

My Workflow with Copilot, Autocomplete, and Agent Mode

Updated
4 min read

1. Overview

AI-assisted coding has evolved into three key modes of interaction:

  1. Autocomplete Mode – inline suggestions as you type.

  2. Agent (Chat) Mode – context-aware generation through conversation.

  3. Ask Mode – querying external AI chat systems like Gemini or ChatGPT.

This document outlines how I use each of these modes efficiently, where they fit in the workflow, and the reasoning behind the balance between automation and human control.

2. Autocomplete Mode: The Foundation

2.1. What It Is

Autocomplete mode (Copilot inline suggestions, etc.) assists as you write code.

It predicts your intent based on immediate context — a function signature, a variable, or the current file content.

2.2. Why It Works Best for Core Development

  • You remain in control: You know what you want to do, and the AI merely accelerates execution.

  • Preserves the mental model: The developer’s understanding of the codebase — structure, flow, and dependencies — stays intact. This is critical to prevent codebase detachment that often occurs when too much is auto-generated.

  • Encourages deliberate architecture: You still create files, folders, and functions consciously. The AI merely accelerates your typing speed and pattern recognition.

2.3. Core Rule

Everything should start from Autocomplete mode.

Create files, define classes, and write the initial scaffolding yourself.

Don’t let the agent create entire modules or services in one go — it weakens your mental model.

3. Agent Mode (Chat Mode in Copilot or Similar Tools)

3.1. What It Is

The agent sits in the IDE sidebar (e.g., VS Code’s Copilot Chat).

You provide prompts like:

“Generate a service for fetching shipment documents with retry logic and logging.”

It interprets context and generates code snippets, files, or test cases.

3.2. Ideal Use Cases

  • Writing unit and integration tests: Perfect for auto-generating comprehensive tests once the core logic is written.

  • Debugging and refactoring assistance: Great for understanding errors, stack traces, or reworking logic for clarity.

  • Boilerplate-heavy code: For repetitive patterns, setup scripts, or schema definitions.

3.3. Discouraged Use Cases

Avoid using Agent Mode for:

  • Full module creation: It removes human ownership.

  • Complex architecture design: It bypasses your mental model and may break established patterns.

3.4. Central Principle

The developer’s mental model must remain the anchor.

Use Agent Mode for augmentation, not delegation.

4. Ask Mode (External Chat Tools like Gemini / ChatGPT)

4.1. What It Is

These are web or desktop AI tools that allow you to query about:

  • API usage

  • Framework-specific behavior

  • Error interpretation

  • Architectural best practices

4.2. Typical Workflow

When something’s unclear or you want to validate an approach:

  1. Open Gemini or ChatGPT.

  2. Paste relevant context (without sensitive data).

  3. Ask clarifying or “why” questions rather than “build this” questions.

Example:

“In NestJS, how should I handle dependency injection for dynamic modules when testing?”

4.3. Why It’s Useful

It separates understanding from generation.

You use it to learn, not to code directly.

5. Debugging and “Make It Work” Mode

5.1. What It Is

The “Make it work” approach — especially in Copilot Agent Mode — is invaluable for troubleshooting weird, context-specific issues.

5.2. Example Workflow

When you encounter a tricky error:

  1. Copy the full error message and surrounding code.

  2. Paste it into the Agent Chat sidebar.

  3. Ask: “Fix this error without changing the intended functionality. Suggest multiple possible causes.”

This lets the agent explore different solutions — dependency issues, type mismatches, import errors — while you pick the correct one.

5.3. Why It’s Effective

  • Reduces trial-and-error debugging time.

  • Surfaces non-obvious dependency or type issues.

  • Allows iterative refinement while keeping control.

6. Best Practices Summary

ScenarioTool/ModeWhy
Writing new code, classes, or modulesAutocompleteKeeps control and understanding of code structure
Generating testsAgent ModeEfficiently handles boilerplate and test scaffolding
Debugging errorsAgent ModeFast experimentation and contextual reasoning
Exploring frameworks or APIsAsk Mode (Gemini/ChatGPT)Good for conceptual clarity and research
Architecture or design changesManual + AutocompleteEnsures you stay mentally aligned with system design

7. Closing Thoughts

The future of software engineering lies not in replacing developers but in amplifying cognition.

Using AI tools effectively means:

  • Preserving your architectural thinking.

  • Letting AI handle boilerplate and debugging.

  • Treating it as a collaborative assistant — not a replacement.

Optimizing Workflow with AI Tools