AI 令編碼成本下降,為何客戶項目仍然昂貴?一間開發公司的觀點
AI Made Coding Cheaper. Why Are Client Projects Still Expensive? (An Agency View)
AI 降低了編寫程式碼的成本,但 Lycore Development 指出,客戶項目仍有大量工時用於需求梳理、系統整合、數據處理、驗證、安全及上線後營運。以客戶 CSV 匯入為例,正式交付還要處理檔案格式差異、重複和無效資料、權限設定及測試;AI 能協助編寫程式,卻不能代替團隊確認業務規則。
TL;DR: Clients ask us some version of this a lot now: "If AI writes the code now, why does the project still cost what it costs?" It's a fair question, and the honest answer is that typing code was never most of the bill. AI made the first draft cheap. It did very little for discovery, integration, data, verification, security and running the thing afterwards, and it made one of those (review) more important. Below is an agency's view of where the time goes, a concrete example of a "done in five minutes" feature that took much longer, and what clients can do to make projects cheaper for real.
Let me start with the part that's true: AI coding tools have changed how we work. Our developers use assistants as a normal part of the job. First drafts of endpoints, forms, tests and scripts arrive faster than they did two years ago. If you measured a project by how long it takes to produce plausible-looking code, it would be cheaper than ever.
But nobody pays for plausible-looking code. They pay for software that does the right thing, with their real data, inside their real systems, and keeps doing it after launch. That's a different job.
Where the time on a client project actually goes
When we break down a typical custom build, writing new feature code is one slice among many. Here's the shape of the work, roughly in the order it happens:
- Discovery. Figuring out what the business actually needs, which is often not what the first brief says. Who uses it, what they do today, what happens when it goes wrong.
- Decisions. Architecture, hosting, auth, which third-party services to rely on, what to build versus buy. Each one is cheap to make and expensive to reverse.
- Integration. The payment provider, the CRM, the ERP from 2009, the shipping API with undocumented rate limits. This is where estimates go to die.
- Data. Importing, cleaning and migrating whatever exists today. Real data is always worse than the sample.
- Writing the feature code. The slice AI tools help with most.
- Verification. Testing, review, edge cases, accessibility, performance under real load.
- Security and compliance. Permissions, secrets, audit trails, privacy rules for the client's industry.
- Deployment and operations. CI, environments, monitoring, backups, incident response.
- Change. The client sees it working and (rightly) wants it to work differently.
AI helps a lot with step 5, somewhat with parts of 6 and 8, and occasionally with 4. Steps 1, 2, 3, 7 and 9 are mostly people talking to people and making judgment calls. If step 5 got dramatically cheaper and the rest didn't, the total moves less than the hype suggests.
AI is an amplifier, not a discount
The best summary I've seen comes from Google Cloud's DORA team. Their 2025 State of AI-assisted Software Development report describes AI's primary role as "an amplifier, magnifying an organization's existing strengths and weaknesses."
That matches what we see. On a project with clear requirements, good tests and a tidy codebase, assistants make a strong team faster. On a project with vague requirements and no tests, they produce more code, faster, in the wrong direction, and someone still has to find that out.
Example: the "five-minute" CSV import
Here's a request we hear all the time: "Let our staff upload a spreadsheet of customers." Ask an assistant and you'll get something like this in seconds:
# views.py: the first draft
import csv
import io
from django.http import HttpResponse
from .models import Customer
def import_customers(request):
f = request.FILES["file"]
reader = csv.DictReader(io.TextIOWrapper(f, encoding="utf-8"))
for row in reader:
Customer.objects.create(
name=row["name"],
email=row["email"],
phone=row["phone"],
)
return HttpResponse("Imported!")
It works on the demo file. Then real users show up with real spreadsheets, and here's what that code doesn't handle:
- Files exported from Excel with a byte-order mark, or saved in a legacy Windows encoding, so the first column header doesn't match
"name". - Columns called
Email Addressinstead ofemail. - Duplicate customers, both within the file and against existing records.
- Invalid emails, blank rows, phone numbers in five formats.
- Row 4,000 of 10,000 fails, and the first 3,999 are already saved.
- A file big enough to time out the request.
- Anyone who's logged in can call it, including staff who shouldn't.
- Nobody can tell afterwards who imported what.
A version you'd actually ship looks more like this:
# importers.py: closer to production
import csv
import io
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.db import transaction
from .models import Customer, ImportRun
HEADER_ALIASES = {
"name": {"name", "full name", "customer name"},
"email": {"email", "email address", "e-mail"},
"phone": {"phone", "phone number", "mobile"},
}
MAX_ROWS = 20_000
def normalise_headers(fieldnames):
mapping = {}
for raw in fieldnames or []:
key = raw.strip().lower()
for field, aliases in HEADER_ALIASES.items():
if key in aliases:
mapping[raw] = field
missing = set(HEADER_ALIASES) - set(mapping.values())
if missing:
raise ValidationError(f"Missing columns: {', '.join(sorted(missing))}")
return mapping
def decode(upload):
data = upload.read()
for encoding in ("utf-8-sig", "cp1252"):
try:
return data.decode(encoding)
except UnicodeDecodeError:
continue
raise ValidationError("Could not read the file. Please save it as CSV (UTF-8).")
def import_customers(upload, user):
reader = csv.DictReader(io.StringIO(decode(upload)))
mapping = normalise_headers(reader.fieldnames)
rows, errors, seen = [], [], set()
for line_no, raw in enumerate(reader, start=2):
if line_no - 1 > MAX_ROWS:
raise ValidationError(f"Files are limited to {MAX_ROWS} rows.")
row = {mapping[k]: (v or "").strip() for k, v in raw.items() if k in mapping}
if not any(row.values()):
continue # blank line
email = row["email"].lower()
try:
validate_email(email)
except ValidationError:
errors.append((line_no, f"Invalid email: {row['email']!r}"))
continue
if email in seen:
errors.append((line_no, f"Duplicate in file: {email}"))
continue
seen.add(email)
rows.append(Customer(name=row["name"], email=email, phone=row["phone"]))
if errors:
return ImportRun.objects.create(
user=user, status="rejected", errors=errors[:500], row_count=len(rows)
)
with transaction.atomic():
existing = set(
Customer.objects.filter(email__in=seen).values_list("email", flat=True)
)
new = [c for c in rows if c.email not in existing]
Customer.objects.bulk_create(new, batch_size=1000)
return ImportRun.objects.create(
user=user,
status="imported",
row_count=len(new),
skipped=len(rows) - len(new),
)
And that still leaves out the permission check on the view, running large files in a background job, a preview screen so staff can fix errors before importing, and tests for every one of those cases. (It also assumes email is the unique key, which is a business decision someone has to make, not a coding one.)
An assistant can help write every piece of the second version. What it can't do is know that your staff export from Excel, that your customers are keyed by email, that a partial import is worse than no import for your accounting team, or that only two people should be allowed to do this. Somebody has to ask those questions, and that conversation is part of the bill.
Where AI really does save money on our projects
To be fair to the tools, here's where we see real savings:
- Prototypes and spikes. Trying three approaches in a day instead of one. That makes the decisions in step 2 better informed.
- Unfamiliar code. Getting oriented in a client's existing codebase is much faster with an assistant that can explain it.
- Tests and test data. Especially the tedious cases once someone has written down what they should be.
- Glue and scripts. Migration scripts, one-off reports, admin tools.
Those savings are real. They tend to go into doing a better job (more tests, more edge cases handled, a cleaner migration) rather than appearing as a smaller invoice, because the old budget was usually already cutting corners somewhere.
Why some costs went up
A few things got more expensive in our experience:
- Review. More code arrives faster, and every line still needs someone accountable for it. Fluent, confident code that's subtly wrong is slower to review than obviously rough code.
- Expectations. Clients have seen impressive demos, so the first version they ask for is more ambitious than it used to be. That's not a bad thing, but it's more software.
- AI features themselves. When the product includes LLM features, there's new work: evals, prompt-injection defenses, cost monitoring, fallbacks when a model changes.
How to make a custom project genuinely cheaper
If you're a client (or a founder briefing your own team), here's what reduces cost more than any tool:
- Decide who decides. One person who can say yes or no on requirements saves more time than any assistant.
- Bring real data early. Send the ugly spreadsheet in week one, not week ten.
- Name the integrations up front, with access to sandboxes and the actual documentation.
- Cut scope before you cut quality. Ship fewer features properly instead of more features halfway.
- Budget for after launch. Hosting, monitoring, updates and changes are part of owning software, not a surprise.
We've written a longer breakdown of what actually drives the cost of building an app if you want to go deeper on the planning side.
The takeaway
AI made the cheapest part of software cheaper. The expensive parts were always understanding the problem, connecting to the real world, and taking responsibility for the result. Teams that use AI well spend the time it saves on those parts, and that's why the projects get better faster than they get cheaper.
Question for you: if you work at an agency or freelance, have your project budgets actually come down since you started using AI tools? And if you're on the client side, what did you expect to get cheaper that didn't?
來源:DEV Community · dev.to