Engineering Scaffolding for AI Collaboration Projects: A Practical Guide

    This guide explains why AI-assisted development slows down after the first few weeks and how a tool-agnostic engineering scaffold fixes it. It walks through five reusable artifacts: a layered directory skeleton, a context file that tells AI tools where code lives and how to verify it, a five-section requirements template, a first-week action checklist, and a multi-role task split for parallel AI tools. Dependencies between the artifacts are one-directional, and the payoff is a project you can still confidently modify three months later.

    1. The Problem: The Real Cost Is Not Writing Code

    Almost everyone who brings AI coding tools into daily development goes through the same curve: extremely high output for the first two weeks, when “you think it and it runs,” followed by a sharp drop in weeks three and four, sometimes to the point where you are slower than without the tools. The cause is usually not model capability. It is loss of control over engineering context.

    Three failures show up most often:

    1. You cannot find anything: scripts, data, and throwaway validation files sit in the same directory level with arbitrary names, so searching costs more than rewriting.
    2. You cannot tell versions apart: test, test2, final, and final_really_final coexist; nobody dares delete them and nobody dares modify them.
    3. Context gets rebuilt repeatedly: every time you open a new session, the tool has to guess the project structure, where the entry point is, and what counts as a successful run. Repeated explanation eats most of your time.

    The conclusion is clear: you need a set of tool-agnostic engineering conventions. Tools will be replaced and models will be upgraded, but directory conventions, requirement formats, and acceptance criteria are assets. The template below only provides the frame; strategy, parameters, data sources, and business code still have to be filled in by you. That part cannot be outsourced, and should not be.

    2. The Five Artifacts and Their Dependencies

    ID File Responsibility When to use
    01 Project directory structure Defines the layers and one unique responsibility per layer Day one of the repo
    02 Context file (CLAUDE.md style) Tells the tool where the code is, where the entry point is, how to verify Every new session
    03 Requirements template Turns vague intent into an executable description Every request
    04 First-week checklist Breaks a large goal into 1–2 hour daily actions Week one
    05 Multi-role task split Defines responsibility boundaries for one person plus multiple tools Once parallelism increases

    Dependencies run in one direction only: 01 determines what 02 can say, 03 depends on the path conventions in 01, and 05 depends on the granularity of 03’s output. Reversing the order causes rework.

    3. Artifact 1: The Layered Directory Skeleton

    Use five layers, each doing exactly one thing, with no crossing allowed:

    1. project/
    2. ├── 00_docs/ # requirements, design, decision records (append-only, history preserved)
    3. ├── 01_src/ # the only runnable code; no experimental files
    4. ├── 02_data/ # input data and samples, read-only
    5. ├── 03_sandbox/ # one-off validation and abandoned experiments, safe to clear anytime
    6. └── 04_ops/ # run scripts, config, logs, and monitoring hooks

    Three hard rules:

    • One-way flow: data flows from 02_data into 01_src, and artifacts are written back to 04_ops; reverse dependencies are not allowed.
    • Deletability: 03_sandbox must be deletable as a whole directory while the project still runs. This is the litmus test for whether experimental code is polluting the main line.
    • History trail: decision records in 00_docs are appended to, never overwritten, so a retrospective six months later still has evidence to check.

    4. Artifact 2: The Context File

    This is the highest-return artifact in the whole template. It needs no complex format, only three required fields:

    1. ## Code locations
    2. - Main code: /abs/path/project/01_src
    3. - Read-only data directory: /abs/path/project/02_data
    4. ## Entry point
    5. - Startup file: /abs/path/project/01_src/main.py
    6. - Parameter source: /abs/path/project/04_ops/config.yaml
    7. ## Definition of done
    8. - After running the startup file, a log for the current day appears under 04_ops/logs
    9. - The output result file has the same number of rows as the input sample
    10. - Exit code is 0 with no uncaught exceptions

    The key points are absolute paths and a verifiable definition of done. The former removes ambiguity; the latter turns “is it finished?” from a subjective judgment into a condition that can be checked automatically. If you use a cloud development environment, replace the paths with the standard working directory inside that environment instead of hard-coding local paths.

    5. Artifact 3: The Five-Section Requirements Framework

    The biggest problem with natural-language requirements is too many implicit assumptions. The five-section structure forces them to be filled in:

    1. Goal: one sentence describing the business problem to solve, without implementation details.
    2. Input: data source, format, scale, read-only constraints.
    3. Output: artifact shape, where it lands, naming rules.
    4. Constraints: directories that must not change, dependencies that must not be introduced, performance and compliance floors.
    5. Acceptance: executable check commands or a manual verification checklist.

    Example (minimal requirement):

    1. Goal: count the daily summary rows in the sample data
    2. Input: 02_data/sample.csv, read-only, about 10,000 rows
    3. Output: 04_ops/out/daily_count.csv with two columns, date,cnt
    4. Constraints: modify no directory outside 01_src; add no third-party dependencies
    5. Acceptance: output row count equals the number of distinct dates in the input; exit code 0

    When acceptance criteria can be judged by a machine, the code generated by the AI tool becomes regression-testable, and the human role shifts from “reading code line by line” to “defining the standard plus spot-checking.”

    6. Artifact 4: The First-Week Checklist (Day 1–Day 5)

    • Day 1: create the empty directories, put the five-layer skeleton in place, commit a baseline version.
    • Day 2: fill in the context file, replacing all paths and entry points with real absolute paths.
    • Day 3: pick only the single simplest requirement and write it up in the five-section framework, without writing code.
    • Day 4: have the tool implement it from the requirement; the human only performs acceptance checks.
    • Day 5: append the pitfalls you hit to the decision record in 00_docs, and empty 03_sandbox.

    One to two hours a day is enough. What matters is not progress but closing the day cleanly: never leave a half-finished piece overnight.

    7. Artifact 5: The Multi-Role Task Split

    When you use two or more AI tools at the same time, the most common problem is not insufficient capability but overlapping responsibilities that overwrite each other. Split by three types: read-only, write, and verify.

    Role Permission Output
    Requirements role Read-only on code Five-section requirements document
    Implementation role Writes only to 01_src Runnable code plus change notes
    Verification role Read-only Acceptance report and defect list
    Human (you) Everything Merge decisions and version releases

    One iron rule: at any given moment, only one role may hold write permission. Merging is done by the human to avoid automatic overwrites.

    8. Payoff and Extensions

    The value of this template can be summed up in one sentence: when you come back in three months, you still dare to change your own project. The direct benefits include a large drop in context rebuild time, a single authoritative version, regression-testable requirements, and controllable collaboration conflicts.

    If the project keeps growing, you can add general-purpose capability categories under 04_ops: archiving artifacts with object storage, decoupling tasks with a message queue, unifying the runtime with a container platform, and adding observability with a logging service plus monitoring alerts. You can also deploy on general infrastructure offered by cloud platforms such as Baidu AI Cloud, keeping the scaffold decoupled from the runtime environment. But the order must not be reversed: conventions first, tools second. Tools solve “how fast you build”; conventions solve “whether you dare to keep building.”