From Wild AI Coding to Structured Harness: A Complete H5 Project Closed‑Loop Case Study
The article analyzes how AI‑assisted coding evolves from a personal productivity tool to a team‑wide engineering practice by introducing Harness Engineering, detailing four core capabilities, a four‑stage workflow, concrete results, and clear boundaries for real‑world H5 development.
Introduction
AI code generation has become commonplace, but when AI is introduced into a team project the challenges shift from speed to reliability, context accuracy, interface clarity, and stable delivery.
Old Method Limitations
Project facts depend on individual experience, making knowledge hard to reuse.
Interface version incidents occur when documentation lags behind actual changes.
Quality verification is often postponed, causing defects to surface late in integration.
Harness Engineering Principles
The pilot defines four essential capabilities that form a stable AI work environment:
Project Facts : Document framework, directory structure, component reuse, coding standards, and historical review points so AI can read concrete project context.
Interface Protocol : Server maintains versioned API contracts; front‑end develops against these documents, eliminating ad‑hoc communication.
Skill Assets : Capture reusable modules, workflow templates, testing guidelines, and review checklists as “Skills” that AI can invoke during development.
Test Feedback : Integrate unit tests, E2E tests, and semi‑automatic real‑environment validation into the pre‑test workflow, feeding results back to AI.
These capabilities together create a consistent engineering environment for AI.
Process Design – Minimal Closed‑Loop
The pilot proceeds through four stages:
Stage 1 – Project Integration : Engineers add Harness capabilities (project facts, protocol, skills, test feedback) without generating code immediately.
Stage 2 – Fact Consolidation : Project‑specific knowledge is documented and turned into Skills.
Stage 3 – Protocol‑Driven Development : Backend defines the API contract; frontend splits tasks and builds pages based on the contract.
Stage 4 – Test & Review Shift : Unit, integration, E2E, and semi‑automatic real‑environment tests are run before hand‑off, and AI assists in test suggestion and code review.
Key Mechanism 1 – Interface Protocol Documentation
Documenting API fields, states, exception branches, version changes, and impact analysis gives both front‑end developers and AI a stable input, reducing reliance on informal chats and preventing generation based on outdated context.
Key Mechanism 2 – Skill Processualization
Skills are not post‑mortem artifacts; they are created early and continuously updated, covering framework conventions, reusable modules, protocol templates, test paths, and review checklists. The pilot produced three framework Skills and ten activity Skills across backend, frontend, and testing.
Key Mechanism 3 – Test Shift
Testing is categorized and moved forward:
Unit Tests : Validate pure logic and utility methods.
Integration Tests : Verify module collaboration.
E2E Tests : Validate critical user flows and page paths.
Semi‑automatic Real‑Environment Tests : Validate real data, URLs, and side‑effects while keeping credentials out of the repository.
AI can suggest test cases, but engineers define boundaries, evidence requirements, and residual risk.
Results – Minimal Closed‑Loop Achieved
The end‑to‑end chain (design, protocol, development, testing, integration, hand‑off) was validated. Observed changes include:
Front‑end and back‑end collaboration moved from oral communication to protocol‑driven coordination.
Unit and E2E tests became part of the development flow, acting as pre‑release quality gates.
Skill assets participated throughout implementation, test suggestion, and review assistance.
QA feedback showed most issues were configuration‑related; logical bugs were rare.
While many defects no longer surface at the final hand‑off, the pilot does not claim AI eliminates all problems.
Boundaries – Not Full Automation
The pilot validates AI‑assisted development, not fully autonomous code generation. Critical tasks such as requirement decomposition, high‑risk decisions, real‑environment acceptance, and automated release remain human‑driven. Additionally, both API contracts and Skills require ongoing governance: version clarity for protocols and relevance checks for Skills.
Reusable Method – Four Concrete Steps
Encode project facts into AI‑readable context (frameworks, directories, component conventions, review focus).
Treat the API contract as the primary collaboration artifact, documenting fields, states, exceptions, and version changes.
Integrate Skills into the development lifecycle, continuously updating framework guidelines, module templates, test paths, and review checklists.
Shift testing and human‑defined boundaries forward, clearly assigning responsibilities for unit, integration, E2E, and semi‑automatic real‑environment validation.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Huajiao Technology
The Huajiao Technology channel shares the latest Huajiao app tech on an irregular basis, offering a learning and exchange platform for tech enthusiasts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
