Before Rolling Out AI Coding to My Team, I Rebuilt the Development Process First
1. A Manager's Real Pain Points
I'm a team lead managing several developers. Before introducing AI-assisted programming, my biggest concern wasn't "whether the AI can write the code," but a few other things:
1. Code review becomes a gamble. Engineers generate large chunks of code with AI, and the PRs they submit often run to hundreds of lines. When I review them, I keep wondering: does he actually understand this code? Who's responsible when there's a production incident?
2. Loss of control over style and quality. AI-generated code comes in all kinds of styles. Some people paste it straight into a PR—comments in English, empty exception handling, not even any logging. Merging that is just technical debt.
3. The process becomes a black box. Who's using what tools, what prompts they wrote, whether the generated code passed security scans—I can't see any of it. For a manager, the risks you can't see are the biggest risks.
4. The illusion of efficiency. Code gets written faster, but the time spent on requirement understanding, testing, and review stays the same or even grows. The overall delivery cycle doesn't shrink much.
The common root cause of all these problems: the team treated AI as a "personal speed booster" rather than "a step in the process." So what I did was rebuild the process, not simply "let everyone use AI."
2. The Three Rules I Set
Before AI officially entered our development process, I established three rules, written into the team wiki:
Rule 1: AI can write code, but requirements must be broken down by humans. Requirement clarification, acceptance criteria, and edge-case definitions must be done by engineers and written up as a document; AI works only from that document. This ensures every line of code in a PR has a traceable "requirement basis."
Rule 2: Traces of AI involvement must be visible. Prompts, AI-generated drafts, and the diff of human edits—all attached to the PR description. Not for surveillance, but so the reviewer understands "the thought process behind this code," and so newcomers can learn how to use AI well.
Rule 3: Quality gates have absolute veto power. AI-generated code goes through exactly the same gates as any other code—unit tests, static analysis, security scanning, at least one human review. AI gets no "fast lane" whatsoever.
Once these three rules were in place, AI truly went from "personal toy" to "team tool."
3. The Complete Process: From Requirement to PR
The revamped process has six steps, with AI playing a clearly defined role in each:
Step 1: Requirement understanding and task breakdown (human-led, AI-assisted)
The engineer feeds the requirement document to AI and has it output a task breakdown, technical solution suggestions, and a list of risk points. Humans make the judgments and trade-offs. This step produces a "task specification document," which is the input for all subsequent steps.
Step 2: Generate an implementation plan
Based on the task specification, AI outputs an implementation plan: which files to change, the blast radius, and a list of required test cases. Engineers confirm the plan before writing any code—align on the plan first, then generate code—which dramatically reduces rework.
Step 3: Code generation and self-testing
Generate code in chunks according to the plan; after each chunk, immediately run it locally and read it through by hand. "Generate five hundred lines in one go and look back later" is forbidden.
Step 4: AI-assisted test generation
Have AI generate unit tests based on the implementation code, then humans add edge cases. Tests must actually run, and PRs that don't meet the coverage threshold are not merged.
Step 5: PR preparation
AI generates a structured PR description based on the changes: what was done, why, risk points, rollback plan, and a record of AI involvement.
Step 6: AI pre-review + final human review
Before human review, AI does a pre-review pass first, flagging suspicious spots (unhandled exceptions, potential injection, naming inconsistencies, etc.). Reviewers go through the code with this list in hand, which clearly improves efficiency. But the final say always rests with a human.
4. Prompt Template (Ready to Copy)
Here's the template we use in "Step 2: Generate an implementation plan." The whole team uses it and maintains it together:
你是一名资深工程师,请基于以下需求完成实现计划。
## 需求描述
[粘贴需求文档或用户故事]
## 现有代码上下文
[粘贴相关的接口定义/数据模型/关键代码片段]
## 请输出:
1. 技术方案概要(200字以内,说明改哪些模块、为什么)
2. 文件级改动清单:每个文件改什么、新增还是修改
3. 影响范围分析:这次改动可能影响哪些现有功能
4. 测试用例清单:至少包含正常路径、边界条件、异常处理
5. 风险点与回滚方案
6. 你不确定的地方(需要人来决策的问题清单)
## 约束:
- 遵循团队现有的代码规范和目录结构
- 不要引入新的依赖,除非在"不确定的地方"中说明理由
- 输出为Markdown格式Item 6, "things you're unsure about," was added after we got burned—it forces the AI to expose its blind spots and hands decision-making power back to the engineer.
5. Before and After AI
| Dimension | Before (ad hoc AI use) | After (process-driven use) |
|---|---|---|
| PR quality | Large blocks of unread code submitted directly; review like opening a mystery box | Plan first, complete PR descriptions, review grounded in evidence |
| Review time | Longer on average, with heavy reviewer burden | AI pre-review filters out low-level issues; humans focus on design |
| Test coverage | Often "runs fine, ship it" | Test checklist up front; no merge without meeting coverage |
| Risk visibility | Who used AI and how—completely invisible | Complete AI involvement records; auditable trail |
| Onboarding | Everyone with their own prompts; quality was luck of the draw | Unified templates + accumulated best practices; quick ramp-up |
| Delivery pace | Fast coding but lots of rework; little net speedup | Less rework; delivery cycle actually shortened |
The biggest change isn't "coding got faster," but that the entire process became controllable, auditable, and replicable. As a manager, I can say with confidence: everything AI produces has a traceable trail.
6. Three Recommendations for Managers
- Set the process first, then hand out tools. Without rules, the efficiency gains from AI will be eaten alive by review costs and production incidents.
- Let AI handle the "repetitive labor" while humans hold onto "judgment and accountability." Delegate breakdown, generation, and pre-review to AI; solution trade-offs and final merges get a human signature.
- Templates are team assets. Maintaining a shared prompt library is more valuable—and easier to iterate—than everyone building their own.
If you don't yet have a stable model access solution, you can register an account at https://api.thistoken.ai/register and give it a try to get this process running—the tools aren't hard to find; the hard part is establishing the rules, starting today.
---
Every example in this post runs with a single API key — get yours at https://api.thistoken.ai/register and start in minutes.
Ready to try Token.AI?
Create a project-level API Key, enable channels in the console, and configure routing, budgets, and audit logs.
注册 ThisToken.AI 并获取 API Key