2025 AI Coding Experience Summary
What are you actually doing when you polish a prompt, hit Enter, and hand it off to an Agent — armed with a requirements doc and existing code?
The scene is familiar: you open your IDE, switch to the AI chat panel, paste a chunk of requirements, attach a few relevant file paths, and hit send. Then — you lean back in your chair, watching code stream across the screen line by line, like a slow-motion film. Some people scroll through their phones, some switch tabs to slack off, some simply get up to grab a glass of water.
This is the classic ritual for nearly everyone who uses AI Coding. From Cursor to Copilot, from Claude to CodeX, the tools evolve — but this "waiting" posture remains remarkably consistent.
But here's the real question: when AI is doing the work, should you really just be waiting?
What Engineers Should Do While AI Generates Code
The moment AI is generating or has just output code is precisely when an engineer should be busiest.
AI excels at execution — rapidly generating code based on your instructions. What it lacks is judgment — the ability to determine whether the code truly solves the problem, whether it introduces new issues, and whether it aligns with the overall design direction.
So while AI is generating output, you should be thinking across multiple dimensions simultaneously:
From the requirements perspective: Does the AI-generated code cover all requirement scenarios? Are there any missing edge cases? Is error handling adequate? What happens when a user inputs invalid data? What about network timeouts? What additional features might be needed later?
From the testing perspective: Where are the potential pitfalls? Which paths need unit tests? What's the scope for integration testing? Are there any easily overlooked exception paths? For instance, a seemingly simple user registration feature — AI might not consider duplicate usernames, email format validation, password strength requirements, or concurrent registration scenarios.
From the architecture perspective: Does this implementation fit the project's overall architecture? Does it break any existing design patterns? How extensible is it? If requirements change in the future, how easy will this code be to modify? Is this library the right choice here? Are there lighter-weight alternatives?
From the security perspective: Are there common vulnerabilities like SQL injection, XSS, or CSRF? Is authorization properly enforced? Is there any risk of sensitive data leakage? AI-generated code often nails the functionality, but security awareness is its blind spot.
From the performance perspective: Could this become a performance bottleneck? Do database queries need indexing? Should caching be introduced? Are there unnecessary repeated computations inside loops?
See? While AI is "writing code," you are "doing engineering." These two activities don't conflict at all — and the latter is precisely where an engineer's core value lies.
Principle 1: Model and Agent Selection Strategy
Many people focus solely on "which model to use" while overlooking that the Agent matters just as much.
What does the model handle? The model's core capabilities are understanding, reasoning, and generation. It comprehends your requirements, reasons out an implementation plan, and generates the corresponding code. Model quality determines the code's "IQ" — whether the logic is rigorous, the code is elegant, and edge cases are considered.
What does the Agent handle? The Agent's core capabilities are tool invocation, file operations, and workflow orchestration. It reads project files, executes commands, modifies code, and runs tests. Agent quality determines the code's "landing ability" — whether it can correctly locate files to modify, work within the right context, and handle execution errors.
Criteria for choosing a model:
- Task complexity: Simple code completion works fine with lightweight models; complex architectural design demands strong reasoning models.
- Context window: Large projects need large context windows, otherwise the AI "forgets" your project structure.
- Reasoning capability: Scenarios involving logical deduction and algorithm design require models with strong reasoning.
- Cost: For frequent daily use, consider cost-effectiveness — not every task needs the most expensive model.
Criteria for choosing an Agent:
- Toolchain completeness: Can it execute the commands you need? Can it operate on the files you need?
- Project comprehension: Can it automatically identify project structure, tech stack, and coding conventions?
- Error recovery: When execution fails, can it auto-retry or provide useful error messages?
Pairing strategy: For complex projects, "strong model + strong Agent" is the ideal choice; for routine small changes, "medium model + lightweight Agent" may be more efficient. The key is matching the task's needs rather than blindly pursuing the most powerful configuration.
Principle 2: Precise and Comprehensive Prompt Engineering
The quality of your prompt directly determines the quality of the AI's output code.
Garbage In, Garbage Out — this adage is fully realized in AI Coding.
A well-structured prompt should include the following elements:
- Context: What feature you're working on, where it sits within the project
- Goal: What specifically needs to be implemented, what the expected outcome is
- Constraints: Tech stack limitations, performance requirements, compatibility requirements, coding standards
- Input/Output format: Function parameters and return values, API request and response formats
- Examples: Reference an existing similar implementation as a guide
Technical expression is key. Don't say "help me build a user management page"; say "create a user management page at src/pages/admin/users/page.tsx using Next.js App Router, fetching data via GET /api/users, supporting pagination (20 per page), search (by username and email), status filtering (enabled/disabled), using shadcn/ui's Table component for the UI."
Avoid vague language. "Optimize performance" is vague; "reduce homepage first-screen load time from 3s to under 1.5s" is precise. "Fix the bug" is vague; "fix the issue where the form data isn't cleared after the user clicks the submit button" is precise.
Provide contextual file paths and relevant code snippets. AI is not a fortune teller — it doesn't know what's in your project. Tell it where the relevant files are, and it can make changes that fit the project's current state.
Prompts need iterative refinement. The first prompt is rarely perfect. Based on the AI's output, continuously adjust your phrasing, supplement missing information, and correct inaccurate understandings. This is a process of ongoing improvement.
Principle 3: The Q&A Reversal Mechanism
This is a principle many overlook but is extremely important.
What is Q&A reversal? After describing the requirements, instead of rushing the AI to write code, first have the AI restate its understanding, outline the modification plan, and raise any unclear questions.
How to do it: Add this at the end of your prompt: "Please first restate your understanding of the requirements, list the files you plan to modify and your general approach, and point out anything unclear or needing my confirmation. Proceed with coding only after confirmation."
The value of this mechanism:
- Avoids misunderstandings: You think the AI understood, but it actually got it wrong. Q&A reversal exposes understanding gaps before coding begins, preventing you from discovering the direction was wrong only after everything is written.
- Catches omissions: While outlining the plan, the AI may discover edge cases or ripple effects you hadn't considered.
- Clarifies accountability: Have the AI state its plan first, confirm it, then execute. If something goes wrong, you can trace whether it was a planning issue or an execution issue.
- Saves cost: The cost of changes during the planning phase is far lower than the cost of rework after coding is complete.
When to use: For large requirements, complex requirements, or requirements with many interdependencies, Q&A reversal is mandatory. For simple single-file changes, you can skip this step to improve efficiency.
Principle 4: Post-Completion Review and Knowledge Retention
After AI finishes a task, don't rush to merge the code.
Have AI produce a post-completion report. In your prompt, ask AI to output upon completion: a change list (which files were modified and what was changed), points of attention (anything requiring special notice), and possible side effects (which other features might be affected).
For example: "After completing the requirement, please list: 1) the file change list with descriptions; 2) key points requiring manual review; 3) potentially affected related features; 4) suggested testing directions going forward."
Establish a checklist. Based on your project's characteristics, build a checklist for AI-generated code:
- Are there unhandled exceptions?
- Are there any hardcoded configurations?
- Are there security vulnerabilities?
- Are there performance issues?
- Does it comply with coding standards?
- Are there corresponding tests?
Knowledge retention. Document the mistakes AI has made, the pitfalls encountered, and the correct decisions made into project documentation. For example, write them into AGENTS.md or the project's docs directory. The next time AI handles a similar requirement, this retained knowledge can come into play.
Principle 5: The Art of Context Management
Context management is one of the most overlooked yet most impactful factors in AI Coding.
Why does context matter?
An AI's context window is finite. Stuff too much irrelevant information in, and the AI gets "lost" in the context, unable to find what matters. Put too little in, and the AI lacks sufficient background to make correct decisions.
Even more serious is context pollution. Chat through ten requirements in one session, and the AI's memory becomes a jumble of information from all ten. When it handles the eleventh requirement, it might mistakenly reference context from a previous one, leading to erroneous code.
Core principles of context management:
- One task, one session: Each requirement, each small module, each change point — start a separate session. Keep the context clean and focused.
- Rapid context establishment: When starting a new session, concisely help the AI understand the project's overall situation and the current task's focus.
AGENTS.mdis designed for this — it should contain core information like project structure, tech stack, coding standards, and common commands. - Memory retention: Automatically capture project conventions, historical decisions, and lessons learned into Memory files. When AI reads these Memories in subsequent sessions, it can quickly "recall" the project's key information.
- Balance completeness with conciseness: Context is neither the more the better nor the less the better. The key is providing "sufficient and necessary" information.
A practical tip: Prepare different "context templates" for different types of tasks. For example, an "Add API Endpoint" template includes: route file locations, database model definitions, and reference examples of existing endpoints. A "Bug Fix" template includes: error logs, relevant code snippets, and reproduction steps.
Principle 6: Recognizing AI's Capability Boundaries
Knowing what AI can do is important. Knowing what AI cannot do is even more important.
Areas Where AI Excels (Hand Off with Confidence)
Clearly defined, mechanical scenarios: Batch SQL data fixes, data format conversions, code migrations (e.g., migrating from JavaScript to TypeScript). These scenarios have clear rules and high repetitiveness — AI does them quickly and well.
Standardized workflows: Backend CRUD endpoints, API wrappers, unit test templates, DTO definitions. These scenarios have mature patterns and best practices — AI can generate them efficiently.
New frontend pages: Pages without strict UI constraints, admin panel list pages and form pages. As long as you clearly describe the fields and interactions, AI can quickly scaffold usable pages.
Modular additions: Single-module modifications, entirely new features, changes with limited scope of impact. For example, "add a user points query endpoint" — AI can independently complete the full chain from routing to database to response.
Areas Where AI Struggles (Require Human Leadership)
Strict, complex UI: Pixel-perfect design mockup reproduction, complex interaction animations, fine-grained responsive layout adjustments. These scenarios require visual judgment and micro-adjustments that AI currently can't handle well. Requires designer collaboration or manual pixel-by-pixel adjustment.
Wide-impact refactoring: Changes that involve little code but have broad impact, requiring coordinated modifications across multiple files and modules. For example, "change user ID from int to string" seems simple but may involve databases, APIs, frontend, caching, and more. These scenarios require human-led impact analysis, a refactoring plan, and step-by-step AI execution.
Cross-context scenarios: Situations requiring constant switching between multiple requirement documents, frontend and backend, pages, databases, and logs. For example, investigating a production bug requires looking at frontend errors, backend logs, database data, and user operation paths. AI lacks this cross-dimensional correlation analysis capability. Requires human-led investigation direction, with AI assisting in specific operations.
Architectural decisions: Technology selection, performance optimization strategies, security design. These decisions require comprehensive consideration of business status, team capability, and future planning — AI lacks this holistic perspective. Requires architect leadership, with AI providing option comparisons and technical details.
Core business logic: Complex business rules, domain model design. For example, e-commerce discount calculation rules, financial risk control models. These scenarios involve complex business logic and numerous edge cases — AI easily misses critical logic. Requires business expert-led rule definition, with AI assisting in implementation.
Principle 7: Advancing from AI Coding to AI Engineering
Knowing how to write code with AI is only the first step. Building systematic AI Engineering capability is what matters for the long run.
Establish AI Coding workflows and SOPs. Teams should have a standardized AI usage process: how to describe requirements, how to write prompts, how to review code, how to supplement tests, how to update documentation. This SOP enables everyone on the team to use AI efficiently rather than each person fumbling on their own.
Train AI to understand project conventions and code style. Every project has its own code style, naming conventions, and architectural patterns. Through configuration files like AGENTS.md, .cursorrules, and .github/copilot-instructions.md, let AI automatically follow project conventions, reducing the cost of manual adjustments.
Integrate automated testing with AI-generated code. AI-generated code must be validated through testing. Establish automated testing pipelines — after AI generates code, automatically run tests and feed back any issues found. Let testing become the safety net for AI Coding.
Integrate AI Code Review into CI/CD. Introduce AI Code Review into the Pull Request workflow to automatically check code quality, security vulnerabilities, and performance issues. AI can serve as the first line of defense, with human review as the second.
Establish team AI usage norms. Clarify which scenarios can use AI and which must be handled manually; how AI-generated code should be labeled and reviewed; security considerations in AI usage (e.g., never pass sensitive code to AI).
Continuous optimization: learn from AI's mistakes. Every time AI makes a mistake, it's an opportunity to optimize the process. Was the prompt not clear enough? Was the context insufficient? Was it beyond AI's capability boundary? Document it and continuously refine prompt templates, context management strategies, and task allocation plans.
The Future Paradigm of Engineers in the AI Era
Returning to the original question: when AI is doing the work, what are you doing?
The answer is increasingly clear: you are doing what AI cannot do.
The role of the engineer is undergoing a profound transformation. We are shifting from coders to architects — designing system architecture, making technical decisions, steering the overall direction; from executors to reviewers — reviewing AI-generated code, judging quality, managing risk; from knowledge consumers to AI trainers — transforming project knowledge, business rules, and best practices into forms AI can understand.
What capabilities have become more important?
- System design ability: AI can write code, but designing an extensible system still requires human engineers.
- Problem decomposition ability: Breaking complex requirements into small tasks AI can handle — this capability is increasingly important.
- Code review ability: Quickly judging code quality and spotting potential issues is more important than handwriting code.
- Communication ability: Communicating with AI (writing prompts) and communicating with people (understanding requirements, discussing solutions) have both become critical.
- Business understanding ability: Deeply understanding business logic is essential to judge whether AI-generated code truly solves the problem.
What capabilities are being replaced?
- Mechanized coding work: CRUD, boilerplate code, format conversions.
- Simple bug fixes: Bugs with clear error messages and predictable patterns.
- Basic code refactoring: Renaming, extracting methods, simplifying conditional expressions.
But this doesn't mean the value of engineers has decreased. On the contrary, the value of engineers has been amplified — because freed from repetitive labor, we can invest our energy in more valuable endeavors: better architectural design, deeper business understanding, more innovative technical solutions.
What is the ideal state of human-AI collaboration?
It's not AI replacing humans, nor humans depending on AI, but humans and AI each doing what they do best, complementing each other's strengths. AI handles execution, generation, and computation; humans handle judgment, decision-making, and innovation. AI is the engineer's "super assistant," not a "replacement."
The next time you pick up your mug and watch AI stream code across the screen line by line, I hope you're no longer just waiting.
Because you know — while AI is doing the work, you have more important things to do.
Prompt
Prompt:
Write an in-depth article exploring the work paradigm under the AI Coding model.
Start with a classic scenario to introduce the topic, illustrating the typical AI Coding workflow that many experience.
Then discuss what one should do while AI is generating output, including but not limited to: thinking from the requirements perspective about where logic may be incomplete and what needs supplementing, what may come next; from the testing perspective about where pitfalls may lie and what the boundary conditions are; from the architecture perspective about how to design and what trade-offs to make; and more.
Sections three through nine cover the major principles of AI Coding:
1. Model and Agent selection — both are equally important; who is responsible for and influences what; what principles to follow when choosing configurations for optimal results.
2. Use prompts that are as comprehensive, precise, and technical as possible.
3. Q&A reversal — for larger, more complex, or highly interdependent requirements, after describing the requirements, have the AI first outline the requirements and modification plan, and raise unclear questions for the user to clarify before proceeding with changes.
4. Post-completion prompts — for areas where AI is likely to make mistakes or where changes have ripple effects, after completing the requirement, have the AI highlight what to watch out for following the changes.
5. Context is critical — manage context wisely; for each requirement, small module, change point, or set of related files, it's best to start a separate session to avoid context pollution and unnecessary token usage. The core goal is to keep the model and Agent focused on a single task. Additionally, help the model quickly understand the overall situation and the current task's focus by writing a good AGENTS.md and automatically retaining Memory, etc.
6. Distinguish between areas where AI excels and areas where it does not. The former includes very clearly defined and mechanical scenarios (e.g., bulk SQL data fixes); standardized workflows such as backend CRUD and other clearly standardized processes, and new frontend pages especially those without strict UI constraints; modular, limited-scope scenarios such as single-module changes with little or no impact elsewhere, or entirely new additions. In these scenarios, describe clearly and let AI handle it. The latter includes frontend pages with strict and complex UI styling constraints, which still require advances in models — especially multimodal models — or UI collaboration; refactoring that involves little code but has broad impact, requiring coordinated changes across multiple files and modules in a project; cross-project, cross-context scenarios requiring constant switching between multiple requirement documents, frontend/backend, pages, databases, and logs. Indicate what approach to take in these scenarios. Beyond the examples above, provide additional common and important examples.
7. On top of the above, think about how to go further and do AI Coding at a deeper level.
The final section (end of the article) explores the future work paradigm of engineers in the AI era.
The above prompt is a rough outline I jotted down for the article. Please first provide an optimized and supplemented Prompt, aiming to: 1) avoid missing any key points of AI Coding as much as possible; 2) make the article more clearly structured; 3) make it more accessible through common examples; 4) ensure depth and insight, with a professional tone.
Finally, write the article based on the optimized Prompt.