Software Engineering 2026

Project planning

Planning is where staff engineers add the most value. Agents make implementation cheap, which makes over-building cheap too. The plan's job is to cut scope to the smallest slice that proves the riskiest assumption, and to surface one-way-door decisions before code exists.

Classify decisions first:

Decision typeExamplesProcess
One-way doorData model, public API, vendor lock-in, auth designADR plus a reviewer outside the team
Two-way doorInternal module layout, library choice behind an interfaceDecide and ship. Revisit if wrong

Documents to create

DocumentContentWho must read it
USER_STORIES.md"As a [ROLE], I should be able to [feature]"Product, team
DATA_MODELS.mdSchema, endpoint contractsEvery consuming team
TECH_STACK.mdChoices and the reasons for themFuture maintainers
DEVELOPMENT_PLAN.mdPhases, with the riskiest assumption firstTeam, stakeholders
SECURITY_PLAN.mdThreats, data classification, controlsSecurity reviewer

Example prompts:

USER_STORIES:   "User stories for food delivery. Roles: customer, driver, restaurant, admin"
DATA_MODELS:    "PostgreSQL schema from these stories. snake_case, timestamps, indexes"
TECH_STACK:     "Tech stack for food delivery. Needs: real-time, payments, push, 10K users. Justify each choice"
DEV_PLAN:       "3-phase plan. MVP: ordering+payment. Phase 2: tracking. Phase 3: analytics"
SECURITY_PLAN:  "Security requirements: auth, PCI scope, location privacy, API security"

Planning steps

  1. Describe the product and constraints to the agent. Ask what's unclear
  2. Generate user stories for every role
  3. Derive the schema from the stories
  4. Plan security early. Implement it with the feature
  5. Share the plan with dependent teams before implementation starts
  6. Generate the framework scaffolding
  7. Write the README and set up the repo

Example planning prompts:

Step 1: "SaaS invoicing for freelancers. Invoices, payments, reminders, reports. What's unclear?"
Step 2: "User stories: freelancer, client, accountant. Include partial payments, disputes"
Step 3: "DB schema for invoicing. Multi-currency, recurring, payment tracking. Show ERD"
Step 6: "Bootstrap Next.js + TS + Tailwind + Prisma + NextAuth. Feature-based folders"
Step 7: "README: overview, setup, env vars, contributing"

Never ship an unreviewed AI plan. A plausible plan with a wrong premise costs more than no plan, because everyone builds on it.

Avoid premature optimization

Agents optimize early: retries, caching, rate limiting, and abstraction layers appear before the basics work. For each one ask "is this necessary for launch?" If not, add it to a FUTURE IMPROVEMENTS list with the trigger that would justify it.

Testing AI-generated code

AI-generated code needs more testing, not less, because it fails in ways human code usually doesn't.

What AI gets wrong:

IssueExampleHow to catch
Hallucinated APIsfs.readFileAsync() (doesn't exist)Type check, run tests
Wrong assumptionsAssuming the user is always authenticatedEdge case tests
Incomplete logicMissing null checksTests with null inputs
Off-by-one errorsi <= arr.lengthBoundary tests
Race conditionsAsync operations in the wrong orderIntegration tests
Tests that assert nothingexpect(fn).not.toThrow()Mutation testing, review

Testing strategy:

1. Type check first (catches hallucinated APIs)
   tsc --noEmit

2. Run existing tests (catches regressions)
   bun test

3. Add tests for new behavior
   "Write tests for the function you just created"

4. Smoke test by hand
   Use the feature in the browser or CLI

5. Edge case sweep
   "What edge cases could break this? Write tests for them."

Testing prompts:

Before implementation:
"Write failing tests for this feature first. Cover the happy path, error cases,
and edge cases (empty input, null, very large values)."

Mutation check:
"If I changed this condition from < to <=, would any test fail?
If not, add a test that would."

Integration:
"Write an integration test covering the API call, the database write,
and the response."

Measure what matters: coverage percent is easy for agents to inflate with weak assertions. Mutation score and the defects that reach production tell you whether the tests work.

On this page