Auto vs. Craft vs. Builder: How to Choose the Right AI Coding Mode for Your Team
AI coding assistants typically offer three working modes: fully automated generation, human-in-the-loop collaboration, and specialized task automation. This guide defines the boundaries of each mode, provides a risk-based framework for choosing automation levels, walks through a practical example of building a user dashboard with the Builder mode, and outlines the privacy checks that should apply before any code is sent to a model.
Key Takeaways First
This article makes three claims. First, the Auto mode should not be used directly for delivering production business code. Second, the Craft mode is well suited to core logic and architecture changes, with quality controlled through task decomposition and section-by-section review. Third, the Builder mode fits repetitive work with fixed structures that can be automatically verified, and it can noticeably reduce hand-written boilerplate. Regardless of the mode you choose, all code sent to the model must pass a sanitization check first, and you should confirm the vendor’s data handling terms.
What Each Mode Is Good For
| Dimension | Auto (fully automated) | Craft (collaborative) | Builder (specialized) |
|---|---|---|---|
| Typical tasks | Prototypes, one-off scripts | Core business logic, architecture changes, complex bug fixes | Standard CRUD pages, API skeletons, test cases, API documentation |
| Human involvement | Requirement input and final acceptance | Task decomposition, reviewing each step after generation | Parameter setup, spot checks |
| Main risk | Missed implicit business rules; black-box code is hard to review | Over-splitting tasks slows progress | Templated output masks missing edge cases |
| Quality gates | Run in an isolated environment with full test coverage | Unit tests plus two-person code review | Static analysis and API contract tests |
Auto mode’s problems in enterprise settings concentrate in two areas. First, business logic contains many implicit rules—for example, a certain order type may be non-refundable on public holidays, which a model can rarely infer from a short requirement description alone. Second, when generated code is structurally complex, the review cost may exceed the cost of rewriting it. Auto mode is therefore better suited to prototypes and one-off scripts.
Craft mode requires developers to break large tasks into small steps. After each step is generated, read the code, run the tests, and only then move on. Because it demands continuous human involvement, it fits high-value core modules where the investment pays off.
Builder mode targets a specific class of engineering tasks, such as building frontend pages, generating API skeletons, or writing test cases. Since outputs have a relatively fixed structure and can be verified automatically with static analysis and contract tests, this mode works well for efficiency gains.
Choosing an Automation Level Based on Task Risk
Four questions help you pick the right mode:
- How large is the blast radius? Does the task involve money, permissions, or personal data? The larger the impact, the more human involvement is needed.
- Can the output be verified? If you can validate correctness with automated tests or reference data, higher automation is viable. Unverifiable output should only use Craft mode with section-by-section review.
- Is the work repetitive? High-frequency, rule-based tasks suit the Builder mode.
- Is the data sensitive? Code involving secrets, customer data, or core algorithms must be sanitized before deciding whether it can be sent to the model at all.
Applying these questions leads to typical choices like these:
| Task type | Recommended mode | Human review points | Quality gates | Security requirements |
|---|---|---|---|---|
| Core logic: payments, permissions | Craft | Humans design key branches; review section by section | Unit tests plus two-person review | Never send real secrets or customer data |
| Standard CRUD pages | Builder | Spot-check field and permission configuration | API contract tests, page smoke tests | Keep database credentials out of prompts |
| Test cases and API docs | Builder | Verify assertions cover boundary values | Test pass rate; consistency check between docs and APIs | All sample data must be sanitized |
| One-off scripts or prototypes | Auto | Check commands and paths before running | Run in an isolated environment | No access to production data |
Using the Builder Mode to Build a User Center Dashboard
A user center dashboard typically includes data charts, user permission management, and status transitions. Page data comes from multiple services, and different roles see different content. The example below uses an activity statistics endpoint to illustrate the Builder mode workflow.
API Layer: Specify Constraints First, Then Let the Tool Generate
The prompt must spell out the date format, range limit, permission points, error codes, and time zone. Below is a human-reviewed reference implementation. It requires Python 3.9+ and uses only the standard library.
from datetime import date, timedeltafrom typing import Any, CallableMAX_RANGE_DAYS = 90PERMISSION_STATS_READ = "stats:read"ERR_INVALID_PARAM = 40001ERR_FORBIDDEN = 40301ERR_INTERNAL = 50001class ApiError(Exception):def __init__(self, code: int, msg: str) -> None:super().__init__(msg)self.code = codeself.msg = msgdef parse_date_range(start: str, end: str) -> tuple[date, date]:"""Dates use the YYYY-MM-DD format, parsed as Asia/Shanghai local dates."""try:start_day = date.fromisoformat(start)end_day = date.fromisoformat(end)except ValueError:raise ApiError(ERR_INVALID_PARAM, "Date format must be YYYY-MM-DD")if start_day > end_day:raise ApiError(ERR_INVALID_PARAM, "Start date cannot be later than end date")if (end_day - start_day).days + 1 > MAX_RANGE_DAYS:raise ApiError(ERR_INVALID_PARAM, f"Query range cannot exceed {MAX_RANGE_DAYS} days")return start_day, end_daydef get_user_activity_stats(operator: dict[str, Any],start: str,end: str,fetch_daily_counts: Callable[[date, date], list[dict[str, Any]]],) -> dict[str, Any]:"""Returns daily active user counts between start and end, filling missing days with 0."""if PERMISSION_STATS_READ not in operator.get("permissions", []):raise ApiError(ERR_FORBIDDEN, "Not authorized to view activity statistics")start_day, end_day = parse_date_range(start, end)try:rows = fetch_daily_counts(start_day, end_day)except Exception:# Log the full exception with a trace_id; never return it to the frontendraise ApiError(ERR_INTERNAL, "Statistics service is temporarily unavailable, please retry later")counts = {row["day"]: int(row["active_users"]) for row in rows}series = []current = start_daywhile current <= end_day:series.append({"day": current.isoformat(),"active_users": counts.get(current, 0),})current = current + timedelta(days=1)return {"code": 0, "msg": "ok", "data": series}
The range limit is 90 days, so the endpoint returns at most 90 records and needs no pagination. fetch_daily_counts is implemented by the data access layer and must return only data belonging to the operator‘s tenant—tenant filtering must not rely on frontend parameters. Timestamps in the database must be converted to Asia/Shanghai local dates before aggregation. If you group by UTC dates directly, records between 00:00 and 08:00 local time get attributed to the previous day.
Compared with a typical directly generated example, this version includes three deliberate changes. Empty data returns the full date series rather than an empty array, so the chart’s x-axis stays continuous. Permission and parameter errors return explicit error codes. Database exceptions are logged only—internal details are never exposed to the frontend.
Frontend: Keep the Last Successful Data
The frontend can be built with React or Vue. Given the API response structure in the prompt, the tool can generate a request hook and a chart component. The hook should return three states at once: loading, error, and data. If a request fails, the page must keep the last successful data and show an error message—it must not clear the chart.
The endpoint for updating user status must complete both the status change and the audit log write within a single database transaction. If either step fails, the transaction rolls back, the user’s status stays unchanged, and the API returns an error code. Logic like this should not be handed wholesale to Auto mode—use Craft mode and write it section by section, with tests.
Acceptance Checklist
- An account without the
stats:readpermission gets 40301. - Invalid date format, start date after end date, and range exceeding 90 days all return 40001.
- Simulating a database timeout returns 50001, with no stack trace in the response body.
- When there is no data in the range, the full date series is returned with all counts set to 0.
- Querying from another tenant’s account never exposes data outside that tenant.
- Records near 00:00 and 23:59 local time are attributed to the correct date.
- If the status update endpoint fails midway, the database state remains unchanged.
Privacy Baselines for Code and Data
Code is a core corporate asset. Before sending business code to a third-party service, verify how the vendor handles data. Check these five items one by one:
| Clause | How to verify |
|---|---|
| No data retention | The contract specifies how long request content is kept and promises it will not be used for model training. Request a data processing agreement. |
| Encrypted transport | Confirm TLS 1.2 or above, verified via packet capture or server-side configuration. |
| Sanitization rules | Before sending, use regex and dictionary matching to detect secrets, database connection strings, phone numbers, and similar fields; sample-check the results. |
| Usage auditing | Log call timestamps, operator identity, data byte counts, and content hashes—never plain-text code. |
| Vendor credentials | Review certifications such as ISO 27001, and verify they are still valid. |
Self-hosting keeps code inside your network but carries real costs: the inference service needs GPU servers with sufficient VRAM, and model upgrades and security patches require dedicated maintenance. To verify isolation, monitor the inference service’s network segment at the egress firewall and confirm there are no outbound connections.
Sanitization rules themselves can fail. Rules that are too loose miss secrets; rules that are too strict may strip ordinary strings like UUIDs or hash values, leaving the model unable to understand the code. Rules need to be paired with allowlists and reviewed manually on a regular basis.
Common Mistakes
- Merging Auto-generated code directly. Unreviewed deviations in business rules end up in production.
- Splitting Craft-mode tasks too finely. Reviewing every small step can cost more human effort than writing the code by hand.
- Relying on Builder templates for everything. Generated CRUD pages often lack concurrency control and permission checks—add tests to cover them.
- Sanitizing only once, right before sending the prompt. Logs, error messages, and debug output can still contain secrets; those paths need the same treatment.
