What Happened

A Chinese developer published a practical template set for implementing Harness Engineering in a brownfield Android project. The system uses one root AGENTS.md file plus three subagent definition files stored in .ai/subagents/: code-analyst.md, code-implementer.md, and change-reviewer.md. Each file defines strict role boundaries, input/output contracts, and execution sequences to prevent AI agents from over-reaching during code tasks.

Why It Matters

Most AI coding workflows fail not because the model is weak, but because the agent has no enforced scope. These templates solve three concrete problems for indie developers and small teams:

  • Scope creep prevention: The analyst agent is explicitly forbidden from modifying code; the implementer is forbidden from touching unrelated modules.
  • Brownfield safety: The AGENTS.md explicitly declares legacy compatibility assumptions, telling the AI to respect existing call chains rather than refactor them.
  • Auditability: Every implementation step requires a five-part output: changed file list, change description, reason, build result, and risk notes.

For SMEs running legacy codebases, this pattern reduces the risk of an AI agent silently breaking production logic while appearing to fix a bug.

Asia-Pacific Angle

Chinese Android development shops frequently maintain brownfield apps with 5-10 year old architectures mixing RxJava, LiveData, and newer Kotlin Flow patterns in the same codebase. This template directly addresses that reality by requiring the analyst agent to explicitly trace Flow and coroutine chains before any change is made. Southeast Asian teams building super-apps or fintech products on Android face identical legacy constraints. The .ai/memory/ directory pattern for recording discovered hidden rules is especially valuable when onboarding junior developers in high-turnover environments common across the region. Teams using Cursor, Claude, or Gemini CLI can drop these files into any repo immediately without additional tooling.

Action Item This Week

Copy the three-file structure (AGENTS.md, code-analyst.md, code-implementer.md) into one existing project, then run your next bug fix task through the analyst-first sequence. Measure whether the AI touches fewer unrelated files compared to a prompt-only approach.