Skip to content
AI Code Speed ≠ Org Efficiency: Restructuring Teams for 3.77M Lines in 5 Months
R&D Management 26 min read

AI Code Speed ≠ Org Efficiency: Restructuring Teams for 3.77M Lines in 5 Months

A 6-person team produced 3.77 million lines of code in 5 months using AI, but the real lesson is that local code acceleration doesn't improve organizational efficiency without restructuring roles into five result-oriented responsibilities, adding three shared agents, and building a nine-step Harness framework for agent-ready environments.

Smart Era Software Development
Smart Era Software Development
Smart Era Software Development

Introduction: The Paradox of Local Acceleration

At Agentic AICon Shenzhen, the speaker shared their experience rebuilding the R&D management product Kanban2 with AI. While the team achieved a daily output of tens of thousands of lines, the core insight was that local acceleration does not equal overall efficiency . Everyone feels faster — product managers write 50-page docs instead of 5, developers generate code and reviews rapidly — yet delivery lead time barely improves. The analogy of Brownian motion illustrates the problem: individual particles move more vigorously, but without a shared goal the system doesn't advance.

Three Crafts Replace One: Application, Data, Agent

The industry is shifting from role-based optimization (frontend AI, backend AI) to merging functions: ByteDance merges dev and QA, DeWu lets engineers own H5/Node/Go end-to-end, Alibaba Cloud CIO uses PDFE/ABE to compress collaboration chains. The direction: retain professional judgment, reduce handoffs across legacy roles .

However, AI won't replace everything. Systems of Record (SOR) still need deterministic storage; agent capabilities are endogenous to existing systems, not replacements. Consequently, three distinct engineering crafts emerge:

Application Craft : delivers user experience, business functions, rules; verifies functionality, performance, security, maintainability.

Data Craft : delivers trusted data, knowledge, business semantics; verifies consistency, lineage, freshness.

Agent Craft : understands goals, reasons, plans, calls tools; verifies task eval, behavioral boundaries, failure recovery.

Each craft builds and releases independently, integrated via business-outcome validation. The article warns against the digital-era mistake of forcing IT craft onto Data craft — data and ontology were long suppressed, and now agent adoption reveals insufficient organizational data/knowledge.

Five Result-Oriented Responsibilities

Because agents expand individual scope (business people can prototype, backend engineers can touch frontend), traditional role boundaries create waste. The team defined five result responsibilities (not roles):

Prototyper : decides what's worth building, creates runnable prototypes, validates value/scope early.

Productizer : turns prototypes into reliable products, owns implementation, testing, fixing, runtime quality end-to-end.

Challenger : independently challenges boundaries, exceptions, risks; finds issues builders miss.

Beautifier : works directly in the real product to refine UI, interaction, usability, experience details.

Grower : focuses on user adoption, sustained usage, value realization; feeds real feedback into product evolution.

Collaboration shifts to weak interaction : no formal requirement reviews; "you build, push to repo, I'll improve if needed." Daily standups replace two-week sprints for rapid alignment. The speaker notes: "Product managers who only write code will likely be obsolete next year" — the future PM becomes a Prototyper delivering runnable prototypes.

Personal Loop & Three Shared Agents

Each individual runs a closed loop: idea → discuss plan with AI (plan mode, refining requirements/design) → model reviews plan → build & test → at acceptance, produce full requirements record & user manual → deploy. Outputs (architecture designs, regression tests, requirements docs, test cases) flow back as assets for the next cycle.

Three shared agents support every loop:

System Agent : provides context, task state, skills, verification.

Exploratory Test Agent : explores scenarios, discovers and verifies defect leads.

Environment Ops Agent : patrols environments, observes runtime, detects anomalies.

Defects actively find people : exploratory test agent pushes defects to explorers or productizers; ops agent pushes anomalies to the relevant loop. Experience flows back into the system Git repo as default capabilities for the next round. Intensity is high: one person manages 3 environments, 6+ long-running agents, plus tools like Claude Code — 10–20 agents in parallel, 30–90 interactions/day (avg 40) .

Case Study: Kanban2 — 6 People, 5 Months, 3.77M Lines

Kanban2 serves financial clients with subtle management variations; the goal was to absorb differences via ontology, configuration, product capabilities, reducing long-term custom development burden.

Repository Statistics (May 31 – Oct 23, 2026)

Total text lines: ~399k → 3.773M (including blanks, comments, imports)

Business code: 1.63M lines (43.2%)

Test + CLI: 1.454M lines (38.5%)

Documentation: 689k lines (18.3%)

Team composition: 1 Prototyper, 4 Productizers, 1 Beautifier (no Challenger).

Daily Snapshot (July 21, 2026)

07:38–21:14, 52 commits

Net business code increase: 12,819 lines

7 task lines in parallel: kanban observation sub-card & popover, stage lead-time board, IM Agent login & Gateway integration, operation source model refactor, org structure API, Agent Admin simplification, dogfood infrastructure.

Code Ownership (blame % as of Oct 18)

EntClaw: 93.1%

Card Service: 65.4%

View Service: 56.1%

Platform Service: 50.5%

Metadata Service: 46.4%

Gateway: 45.8%

Frontend: 34.9%

Prototyper drives mainline construction; team supports existing customers, continuous refinement, delivery assurance.

Test Coverage — Unprecedented Numbers

Test source lines by module: 5 microservices Java 280k, shared Java 46k, frontend UI 416k, OrgSpec engine 42k (Seed init 8k), EntClaw 101k, graph DB Rust+Java driver 13k.

Executable-line coverage:

Java business total: 74.18% (168,966 executable lines)

5 microservices combined: 73.47%

Rust graph DB product subset: 67.56%

Per service: Gateway 90.46%, Card 77.74%, View 77.29%, Metadata 68.83%, Platform 65.21%

Weak spots: Java driver 44.54%, frontend line coverage not yet collected.

In manual-coding era, 40% layered coverage was considered good; many orgs claim "new code 80%" but can't define "new." Here, AI writes tests easily, so raw numbers need discounting : "claim 4×, treat as 2×; claim 1×, basically no change." Eventually they only counted business code.

Quality responsibility returns to developers: 80% of quality done by devs; only critical products get a Challenger — achieving Google's 10:1 dev:test ratio, previously a dream.

Nine-Step Harness: Building an Agent-Ready Environment

The 3.77M lines weren't from a stronger model but from fixing the agent's working environment first. Nine steps in three phases: operate & verify → observe & close loop → precipitate & reuse.

CLI : UI automation is slow/flaky. Added CLI for every operation point — 264k lines, 166 registered commands . Side effect: system becomes Agent-ready immediately.

Data Fabrication (OrgSpec) : Built a description language (core 46.9k lines, Seed init 9.7k) using YAML to describe target org, models, data; engine parses, validates, initializes. Solves the "dev env unusable → devs borrow test env → break UAT → borrow prod" mess. Now a 10-minute command spins up thousands of cards/users for AI to test and modify. Giving agents a controllable environment is mandatory in the agent era.

Layered Testing : fullcheck aggregates layer by layer; failures return with layer, case, error clues. L0 run sync & engineering constraints, L1 engineering invariants, L2 frontend unit+type check+build, L3–L4 backend unit+integration, L5/L5e graph DB & EntClaw, L6 CLI unit, L7 real Gateway API tests, L9 runtime health. Real report: L3 ran 9,692 backend unit tests, 0 failures ; L4 ran 354 integration tests, 0 failures; L7 545 passed, 2 failed — report pinpoints exact case and error; L9 aborted due to L7 failures.

Observability : logs, screenshots, traces all readable so agents see system state. Ops agent scans two envs every 10 min; on error, analyzes root cause & fix, forwards chat to coding agent. Counter-intuitive advice: Ops teams should read code — many deliberately don't, but at least they can articulate the problem.

Environment & Pipeline : Backend restarts only affected services via git diff; frontend pre-checks session/profile, probes ports/health, uses locks to avoid conflicts. Pipeline parameterized, runs on Tencent CNB. Key judgment: if pipeline still needs manual clicks and can't handle load, it must be rebuilt — agents must edit pipelines, Dockerfiles, spin up envs themselves.

UI Acceptance : Dev agent uses Playwright MCP in real browser to click, fill, screenshot, assert visible results; exploratory test agent independently adds regression/exploration scenarios based on requirements & manuals. It files real tickets — RD-001 was filed by exploratory agent with reproduction evidence; coding agent fixed it.

Everything as Code : Requirements, designs, code, test cases, deploy scripts in one repo — unified versioning, collaborative review, traceable changes. DevOps core holds: stop building separate test/requirement management systems; everything belongs in code — best context for AI.

Agent Main Body : Four-piece kit: AGENTS.md (responsibilities, boundaries, action rules), Skills (mature processes as callable skills), Git (project assets & changes), Tests (detect deviations, support fixes & regression). Hard reality: cannot build one R&D management agent that understands 300 systems . A bank with 200 systems needs 200 system agents, each grounded in its codebase, docs, test cases — 300 systems = 300 AGENTS.md × 10 skills. This is the biggest missing piece in current industry efforts.

Continuous Optimization : Tests run 30×/day, must be stable; false positives fixed immediately; any tech debt ruthlessly refactored. Practical tip: don't trust agents' human-like estimates — if it says "two days," tell it "10 minutes" and it might actually finish.

Together these enable "daily incremental progress": AI finishes a task, runs full test suite in ~10 minutes, dozens of cycles per day. Contrast with typical orgs: have automation but run once per release, then triage piles of failures. This intensity requires CLI, good data fabrication, agent-dedicated environments simultaneously. The automation testing debt accumulated for years can finally be repaid — AI writes code fast and cheap, but each system needs its own complete strategy coverage; a universal agent can't solve all code problems due to insufficient feedback. AI can't repay this debt for you; it helps you write, but you must drive it.

From Personal Loop to Organizational Evolution

The pieces form a four-layer structure (OntoSpace):

Top: Business Ontology (L1–L4 functions, products, contracts, policies, rules, metrics) + R&D Ontology (projects, versions, iterations)

Middle: Agent Collaboration Layer (chains requirements, stories, tasks, builds)

Bottom: Agent Access Layer (WorkBuddy, CodeBuddy, DSH concrete forms)

Sides: Org Structure & Efficiency Measurement

Platform provides collaboration layer + ontologies; bottom layer remains existing agents.

Thus an AI-Native organization is not "an org that uses AI" but simultaneous change across five dimensions:

New Org (3 layers) : Business scene + FDE squads, Product teams, Infrastructure teams

New Processes (3 types) : Application, Data, Agent crafts

New Roles (5 types) : Prototyper, Productizer, Challenger, Beautifier, Grower

New Crafts (9 steps) : CLI, Data, Testing, Observability, Environment, Acceptance, Context, Skills, Optimization

New Tools : Ontology + Agents

Local acceleration only stirs water more violently; only shared goals turn capability into collective force.

Start with One Real Product

For teams pursuing AI transformation: begin with one real product, one clear goal, one squad. Let them push a change from idea to verifiable post-launch result, record where they repeatedly wait for people, then systematically fill those system gaps. The accumulated CLI, data, tests, docs, skills become the starting point for subsequent tasks. Organizational gains must be continuously validated via delivery cycle, quality, user adoption, maintenance cost.

The deepest takeaway: the easier code generation becomes, the more the organization needs judgment, verification, and absorption capacity for those changes. That remains the north star for exploring AI-Native organizations.

Models change, tools change, value coordinates don't.
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

R&D managementAI-assisted developmenttest coverageorganizational restructuringHarness frameworkAI-native organizationagent-ready environmentrole redesign
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.