跪拜 Guibai
← Back to the summary

From Copilot to WorkBuddy: The Three Pillars for Trusting AI to Write Code

Who Accepts AI-Generated Code? From Copilot to WorkBuddy, Three Practices

Introduction

Let me start with my current daily routine.

When I need to build a new feature, I don't open an editor or a project—I just describe the requirement in a chat. Everything else is done by WorkBuddy: it reads the code to understand the project structure, pulls a new branch from the release branch, writes pages, connects APIs, and after making changes it proactively runs the acceptance gate. If it finds blocking issues, it fixes them and re-runs verification. Finally it gives me a report—what files changed and how it verified them.

My only two jobs are: explain the requirement clearly, and make the final merge decision. Fixing bugs, refactoring, and style tweaks all follow the same rhythm—most of my day-to-day development already works this way.

What's even more striking is its continuous accumulation: everything we collaborate on leaves traces—the conventions we agree on, the pitfalls we hit, the business knowledge of each project—and it archives them for you. Conversations end, but the content stays. Over time, it feels more and more like a member of our team.

Six months ago, this wasn't the case. I was using AI with Copilot at the time. Conversational completion did improve efficiency, but a few problems grew more uncomfortable the more I used it. This article talks about how I moved from "AI assists, human leads" to the current model, and the three pillars I find most valuable in this approach: self-learning, autonomous verification, and multi-project collaboration.

Section 1: The Copilot era: real efficiency, real pain

The work pattern then: code editor on the left, chat window on the right. I'd throw a requirement at it, and after it made changes I'd review each file one by one—code review and page review both had to pass. Reviewing became my main job. For anything worth accumulating, I'd ask it to write the experience into an instruction file.

I'd often run several chat sessions in parallel. Even so, weird bugs still appeared in the test environment—AI changing A would break B, and such misses couldn't be caught by human review alone.

Cross-project was worse: pitfalls and experiences from other projects could only be copy-pasted. There was no connection between projects, no way to integrate knowledge.

After working this way for a while, three problems became clear:

  1. Accumulation depended on humans: instruction files were static and didn't grow on their own—agreed conventions and pitfalls had to be remembered and updated by me. Why can't AI learn on its own? With every use it should understand a little more.
  2. Review depended on human fallback: AI generated code far faster than I could review, and all verification fell on humans, so things still slipped through.
  3. Projects were silos: knowledge and experience were tied to a single project, copy-pasted between them, with no collaboration or integration.

These three problems line up exactly with the three pillars I'll discuss: self-learning, autonomous verification, and multi-project collaboration.

Section 2: The current model: what we actually have

In one sentence: WorkBuddy is responsible for keeping capabilities running continuously across projects and sessions; ai-harness is responsible for verification and assets. The architecture has three layers:

architecture image

Two key flows: work flow—requirement conversation → WorkBuddy pulls fix/feat branch and changes code → runs gates → report (how it verified) → autonomous verification → human spot-checks and merges; accumulation flow—experience from conversations is written to both personal memory and team knowledge base, effective in the next session.

At the file level, it looks like this.

ai-harness repo—just an ordinary git repo, a Node project:

ai-harness/
├── AGENTS.md               # repo description for AI (entry point)
├── knowledge/              # team knowledge base
│   ├── team-conventions.md # team-approved conventions: branches, deployment, coding standards
│   ├── system-registry.md  # system archive: Chinese/English names, ports, production addresses
│   ├── test-env.md         # test environment and login methods
│   └── ...                 # business knowledge, SOPs, grow as needed
├── gates/                  # gates: tsc/build + red-line regex always run; AI review/e2e on demand
├── cases/                  # e2e test cases, organized by project/page
├── config/                 # project registration and secrets (secrets not in git)
├── report/metrics/         # gate ledger, JSONL auto-written
└── scaffold/               # new project scaffold

WorkBuddy expert package—the so-called "expert" is essentially a single markdown prompt file. The overall logic:

Role: You are the frontend development companion, your workspace is the project directory; tasks that require judgment—where the problem is, which solution to pick, what the page should look like—are decided together with the human in conversation, not by you alone; once decided, the code implementation is yours.

First step when starting: read the team conventions document (branch conventions, coding standards, gate standards), treat it as the highest authority.

Red lines: the most common mistakes are written directly into the prompt—requests must go through a common wrapper, ambiguous business requirements must be asked first, never guessed; the full standard is in the team knowledge base, and red-line regex provides a final check after writing.

Workflow: receive requirement → locate root cause → implement → self-verify → proactively run acceptance gates and interpret the report yourself (blocking issues must be fixed and re-run, warnings judged one by one) → report (change list + verification method + acceptance actions).

The whole expert is one file: role, convention entry points, red lines, workflow—not a single line of code.

Now let me break down the three pillars.

Pillar 1: Self-learning—let accumulation happen in the system, not on me

The current mechanism: when a new convention emerges from my conversation with WorkBuddy—say, one day we decide "branch prefixes follow change type, new features use feat/, bug fixes use fix/"—it automatically distills that experience into two copies:

There are four layers of accumulation:

Layer What is accumulated Where it lives
Experience team conventions, coding standards, pitfalls knowledge/ directory, in git, distributable to team
Project system archives (Chinese/English names, ports, addresses), business knowledge, reusable test cases knowledge/ + cases// , project's own assets
Habits my personal preferences, correction feedback WorkBuddy's long-term memory, effective across sessions
Logs every gate run's duration/token/block records auto-written to JSONL ledger, used for efficiency stats

The bulk of the project layer is project archives and business knowledge—code structure, system ports and addresses, business conventions, maintained long-term with the project. For project docs I chose the "code-generated document" path: documents grow from real code, so they naturally never go stale—that's why project archives stay current with the project. Reusable test cases live here too: once a page passes an e2e self-test, the acceptance criteria are distilled into the case library, and when the page changes they're added to the regression list.

The last layer is something many people overlook: the collaboration process itself is recorded. When I need to report on efficiency, the data is already there, no manual reporting.

These accumulations grew into a knowledge base: team conventions, coding standards, design baseline, CLAUDE project template, server archive, test environment and login recipes... 20+ documents, all in git. Before starting work it finds the relevant ones and reads them—the image below shows it accepting a deployment task, first checking the deployment process for the test environment. That was one of my goals from the start: distill myself—turn the experience in my head into a public asset that any colleague or any AI session loads automatically before starting.

knowledge base image

Accumulated knowledge isn't just obeyed; it's also used to do work. For example, when creating a new project, the AI automatically selects a project template according to team rules, runs template rendering, directory classification, git initialization, GitLab remote repo creation, and generates a CLAUDE.md skeleton based on project type—so the project's own knowledge has a home, and team-wide conventions connect to the public knowledge base through references. A new project is born already wired into the system, not built from scratch.

project creation image

But at this point, someone will surely ask: isn't it too much authority for AI to create GitLab repos directly?

Its permissions are deliberately narrowed. On the GitLab side: the AI uses my developer account, and pushing fix/feat branches and creating repos are within its rights; but pushing branches like develop that trigger deployment requires explicit authorization from me in the conversation; the merge-to-main button is always in human hands. The token used for API operations lives only in a local config file that's not in git, and never enters a repo or a document. On the page side: it only gets the test environment's address and credentials; it has no account and no entry point to production—there's no door to exceed its authority even if it wanted to.

AI autonomy isn't handed out; it's framed by permissions. What it can do depends on what permissions we give. When boundaries are clear, autonomy is safe to grant.

Pillar 2: Autonomous verification—separating athlete and referee

Verifying the quality of AI-generated code has always been a headache: AI generates fast and there are more and more requirements, so reducing the outflow of AI mistakes matters even more. That's why I introduced AI code review—it borrows the athlete/referee separation principle, using team rules and the code diff to do an independent code review. The AI that writes the code doesn't get the final say.

Here's how it works. The reviewing AI is a brand-new independent session, without any context from the coding session, with read-only permissions enforced, and it only sees an excerpt of team rules and the code diff—the separation is guaranteed by code, not by verbal convention. Where it runs is tiered by cost: locally there's only a seconds-level fallback (tsc/build + red-line regex) that runs immediately after changes, blocking issues fixed on the spot and re-run; the LLM semantic review doesn't run on every local change—not every change is worth burning an LLM call. It's embedded in CI, triggered automatically after push via ai-code-review, and conclusions are left as comments on the commit.

The review conclusions come back to WorkBuddy, which handles each one: those it can fix it fixes and replies "fixed", false positives get a reason, ambiguous ones go to human—iterating round after round until no red-line issues remain, with everything recorded.

review flow image

Look at a real closing report—a requirement dropped in one sentence, WorkBuddy locates the root cause, changes code, runs local gates (tsc + red lines all pass), pushes to trigger CI deployment to test environment, then explains root cause, fix, verification result, and deployment status in one shot; for notifications sent to colleagues, it reads back and verifies completeness, confirming the content isn't truncated.

report image

Now look at a real multi-round CI review convergence: first round had 18 comments (2 high), which the AI processed one by one—fixing what it could, sending anything outside today's change scope to human for decision; over four rounds it went 18→7→6→2, high cleared, and it stopped proactively when only copy-level nitpicks remained, not fixing for the sake of fixing. Everything is recorded, and the production deploy button stays with a human.

CI convergence image

Bug fixing isn't just fixing: after making changes, it doesn't just report; it mounts a real browser and tests the full chain (login → enter page → open modal → scroll), and provides acceptance screenshots.

bug fix image

Pillar 3: Multi-project—from "one project's configuration" to "the team's capability"

The first two pillars handle quality and accumulation; this one handles scale—and it's the biggest reason I switched from Copilot.

The current model: one AI companion + one team knowledge base, serving all my projects. A few key designs:

The feeling: before it was "I have a tuned AI in project A", now it's "I have an AI that understands all my projects". The former is configuration, the latter is capability.

Switch projects, same rhythm: a maintenance work-order management page, "don't show reassign button when repairman is empty"—no editor, a one-line requirement dropped into chat, changed in 3 minutes: it locates the exact line itself and reuses a utility function already in the file. That's the feel of automatic project discovery: switch projects without teaching, just start.

project switch image

Summary: the complete workflow now

  1. I throw the phenomenon to the companion; it reads code and locates the exact file and line; if there's ambiguity in business rules, it asks me first, never guesses.
  2. After confirmation, it pulls a new branch from release and implements, following team conventions.
  3. After changes, it proactively runs acceptance gates—no reminder needed, this is an agreed closed loop: blockers must be fixed and re-run, warnings judged one by one, with reasons for not fixing.
  4. The report comes out: change list, verification method. Only when everything passes does it come to me.
  5. I spot-check the diff and click merge. The production release authority always stays with a human.

Work that needs thinking happens in conversation, code is handed to AI, verification to an independent referee, and merge power stays in human hands—that's the entire workflow.

This system has been running for a while: at least five projects have been fully developed with it, and for everyday small requirements I don't touch the code myself. A colleague joked that we should make a digital human so requirements could be thrown directly at it—maybe it could bypass me hh. (Don't worry, the merge button is still in my hands.)

This post only covers the skeleton; each of the following points deserves its own article, and I'll write them later:

This system is still evolving; it's not a "finished product" but a growing process—and growth itself relies on pillar one, self-learning.

Afterword

Back to the contrast at the start: why am I willing to hand over my everyday development to it?

The answer is in the pillars above. But while writing this article, I've become clearer about the trend: AI applications are moving from single project to single person to team—from a tool that helps one project write code, to a companion that works continuously across projects and sessions, to team-level agents and collaboration between agents. These forms are already happening.

But no matter how the form changes, one thing stays the same: the experience in your head, the conventions in chat logs, and the team's spoken standards must all complete the step of "converting to data" before AI can handle them. The three pillars in this post are doing exactly that: self-learning accumulates experience, autonomous verification accumulates quality standards, and multi-project scales the accumulated capability.

So I'm more and more convinced of one thing: the bottleneck in AI efficiency is never generation, but the ability to accumulate, verify, and scale. Generation capability is similar across providers; what differs is the engineering system built around it. By the time AI reaches "team core", the battle is still the same—whoever's team knowledge is datafied first, their AI becomes a real team member first.

Back to the digital-human joke—in the short term we still can't bypass me: the next phase is still mostly human-machine collaboration. And the human's role in that collaboration is clear—taking responsibility for AI's results: AI can do work but can't bear accountability; when problems arise, they fall on people. So verification isn't an optional process; it's the necessary checkpoint before a human takes responsibility.

Feel free to discuss in the comments.