← Wiki index← Home
Table of contents

AI-assisted engineering

I use Claude and Codex daily for backend and platform work—writing boilerplate tests, drafting Kustomize overlays, translating SQL migrations, and exploring unfamiliar call stacks.

Used carelessly, though, LLMs generate plausible-looking code that hides subtle concurrency bugs, swallows exceptions, or pulls in outdated libraries. The workflow that works for me treats the model like a fast pair programmer operating under strict constraints, never as an autopilot.

How I run AI-assisted tasks

Instead of asking a model to “build feature X” across twenty files at once, I keep the loop tight:

  1. Pin down the boundary first: Before opening a prompt, I decide where the change belongs and what is off-limits (for example: “Use our existing Spring Data Redis client; do not add new Maven dependencies or change the public controller signature”).
  2. Pass only the relevant context: Dumping an entire repo into context usually degrades output quality. I feed the specific interface, the data model, and an existing test file so the model matches our conventions.
  3. Review the diff like an untrusted PR: I read every line before running it—checking specifically for swallowed exceptions, missing timeouts, thread-safety issues, and hallucinated config properties.
  4. Verify with deterministic tools: The code doesn’t count until ./mvnw test, static analysis, and local container builds pass cleanly.

Example: scoping a task prompt

Vague prompts produce vague code. When I want help implementing a concrete component—like an idempotency filter—I structure the context and constraints explicitly:

### Task: Implement Idempotency Filter for Order POST Requests

- **Stack**: Java 21, Spring Boot 3.3, Redis.
- **Files in scope**:
  - `src/main/java/com/example/platform/order/OrderController.java`
  - `src/main/java/com/example/platform/idempotency/IdempotencyFilter.java`
- **Behavior**:
  Check incoming POST requests for header `X-Idempotency-Key`.
  1. Do NOT add new Maven dependencies; use existing `StringRedisTemplate`.
  2. Use atomic `SET NX EX` so concurrent duplicate requests don't race.
  3. If key status is `COMPLETED`, return the cached status and body.
  4. If key status is `IN_PROGRESS`, return HTTP 409 Conflict.
- **Verify with**:
  `./mvnw test -Dtest=IdempotencyFilterIntegrationTest`

What I check when reviewing AI-assisted PRs

When reviewing pull requests (including my own) where AI tools did heavy lifting, I look out for five common failure modes:

Where AI helps most vs. where it hurts

Where it saves real time:

Where it causes trouble:

Type a topic, technology, or question to search...
flappy-pod // prod-us-east-1
SCORE: 0BEST: 0