Workflow · Production

Tactical coding assistants: keeping AI on a short leash for maintainable code

The problem

State-of-the-art AI coding assistants are highly effective tactical programmers but lack strategic thinking — when given free-rein prompts they generate complex, duplicated, and increasingly unreadable code that accelerates technical debt.

First attempt

The 'no leash' approach — a simple, direct prompt focused only on the immediate requirement — produced a tactical implementation that appended to the existing if/elif structure without introducing abstraction or considering future extensibility.

Workflow diagram · grounded in source
1
Tactical prompt submitted
trigger
“Let's start with a simple, direct request that focuses on the immediate requirement.”
2
AI generates tactical code
ai_action
“the assistant, without a leash, simply went ahead and appended to the existing structure, without taking a step back to think about complexity”
3
Developer reviews every line
human_review
“it is critical that you don't blindly accept what's generated. You must be the ultimate gatekeeper, reviewing every line before it enters your codebase”
4
Strategic constrained re-prompt
trigger
“Apart from listing our initial requirement, we now provide some constraints on how the AI should implement the feature. We propose an abstraction, with an eye towards future maintainability.”
5
AI generates pattern-based code
ai_action
“I want to refactor this using the Strategy or Command pattern to make it extensible. Define a Record interface with a method process(report_context).”
Reported outcome

By using tightly constrained, strategic prompts that specify design patterns and architectural abstractions upfront, developers can harness AI's code-generation speed while remaining the strategic architect who keeps the codebase clean and maintainable.

Reported metrics
AI code generation success ratequite a high success rate
Reported stack
Gemini 2.5 ProClaude 3.7
Source
https://medium.com/booking-com-development/tactical-coding-assistants-9fee730fd734
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

By using tightly constrained, strategic prompts that specify design patterns and architectural abstractions upfront, developers can harness AI's code-generation speed while remaining the strategic architect who keeps…

What tools did this team use?

Gemini 2.5 Pro, Claude 3.7.

What results were reported?

AI code generation success rate: quite a high success rate (source-reported, not independently verified).

What failed first in this deployment?

The 'no leash' approach — a simple, direct prompt focused only on the immediate requirement — produced a tactical implementation that appended to the existing if/elif structure without introducing abstraction or consi…

How is this workflow AI workflow structured?

Tactical prompt submitted → AI generates tactical code → Developer reviews every line → Strategic constrained re-prompt → AI generates pattern-based code.