DEV Community

Cover image for I thought I needed a smarter coding prompt but I actually needed my agent to interrogate me for an hour
Lars Winstand
Lars Winstand

Posted on • Originally published at standardcompute.com

I thought I needed a smarter coding prompt but I actually needed my agent to interrogate me for an hour

I kept blaming the model.

If GPT-5 built the wrong thing, I assumed my prompt was weak.
If Claude Opus 4.6 missed an edge case, I added more constraints.
If an OpenClaw workflow drifted, I rewrote the system message.

The prompt got longer.
The output got more expensive.
The product was still wrong.

What finally changed my mind was watching an agent build a perfectly reasonable admin dashboard that I would never ship.

I asked for:

  • a simple internal dashboard
  • user management
  • CSV import
  • role-based access

The code looked good. Components rendered. Tests mostly passed.

But the product decisions were nonsense:

  • admins could edit every field
  • malformed CSV rows were skipped silently
  • role changes had no approval flow
  • suspended users still showed up in search
  • mobile behavior was basically undefined
  • there was no audit trail for sensitive changes

None of that was a coding failure.

The agent made product decisions I never made.

That was the moment I stopped believing that the fix was a smarter coding prompt.

The real problem: implementation agents are being forced to do product design

While digging through better OpenClaw workflows, I found a thread on r/openclaw where someone asked for the most advanced “grill me” skill for producing a near one-shot build plan.

That framing is dead right.

Most bad coding agent output is not bad coding.
It is unresolved product ambiguity getting silently filled in by the model.

If you tell an agent:

build user invites

it has to invent answers to questions like:

  • Do invites expire?
  • Are emails unique across workspaces?
  • Can invited users be assigned roles before they accept?
  • What happens if the link is opened on mobile?
  • If an invite is revoked, does it stay in the audit log?

If you do not answer those questions, GPT-5, Claude, Grok, or whatever agent stack you use will answer them for you.

That is why so much AI-generated code looks impressive in a demo and painful in production.

Bigger prompts are overrated

I think “just write a better prompt” is some of the worst advice in AI coding right now.

A giant prompt tries to do two jobs at once:

  1. figure out what should be built
  2. build it

That is a bad split.

The same agent that should be interrogating your requirements is usually eager to move on and start generating files.
It asks two shallow clarifying questions, gets partial answers, then charges into implementation with fake confidence.

What works better is much less glamorous:

  • Agent 1: interviewer
  • Agent 2: planner/coder
  • Agent 3: reviewer

Separate the jobs.

The workflow that actually helped

This is the coding-agent orchestration pattern I trust now:

  1. Run an interviewer agent first
  2. Force it to keep asking questions until the dangerous ambiguity is gone
  3. Turn the answers into a spec artifact
  4. Hand that spec to the coding agent
  5. Have a reviewer agent check implementation against the spec

That is it.

Not magical. Just operationally sane.

What the interviewer agent should actually ask

This is the part people usually hand-wave away.

“Ask clarifying questions” sounds nice, but unless the questions are sharp, you just get a longer conversation and the same bad output.

A useful interviewer agent should push on areas like:

  • auth and session behavior
  • permissions and role boundaries
  • import/export rules
  • retries and backoff
  • empty states and error states
  • mobile constraints
  • auditability and approvals
  • failure modes and rollback behavior

For example:

Auth

  • Can suspended users refresh existing sessions?
  • Do magic links expire after first use or after a time window?
  • If SSO is enabled for one workspace, what happens in another?

Imports

  • Are CSV headers strict or flexible?
  • Do we accept XLSX too?
  • What happens on partial failure?
  • Are duplicate rows merged, rejected, or imported twice?

Permissions

  • Can support staff impersonate users?
  • Can managers export but not delete?
  • Which actions require audit logs?
  • Which actions require approval?

Reliability

  • Which failures should retry automatically?
  • Exponential backoff or fixed delay?
  • When do we page a human?
  • What counts as user error vs upstream outage?

That is not overkill.
That is the spec.

A practical prompt for the interviewer agent

Here is a stripped-down version of the interviewer role I would actually use.

You are a requirements interviewer for a coding workflow.

Your job is NOT to propose code yet.
Your job is to identify ambiguity, contradictions, missing edge cases, and risky product decisions.

You must keep asking focused questions until:
- roles/permissions are clear
- happy path and failure path are clear
- data contracts are clear
- retry/timeout behavior is clear
- empty states and error states are clear
- device constraints are clear
- audit/approval/rollback expectations are clear

Rules:
- Ask one tight batch of questions at a time
- Prefer concrete tradeoffs over open-ended brainstorming
- Call out assumptions explicitly
- Do not start implementation planning until unresolved decisions are low-risk
- If the user says “just pick something,” record that as an explicit decision

Output format when done:
1. Assumptions
2. Decisions made
3. Open risks
4. Structured implementation spec
Enter fullscreen mode Exit fullscreen mode

That alone is better than dumping a paragraph into a coding model and hoping for the best.

Example: vague request vs interrogated request

Here is the kind of input that causes trouble:

Build an internal dashboard with user management, CSV import, and role-based access.
Enter fullscreen mode Exit fullscreen mode

That sounds clear.
It is not clear.

After a decent interviewer pass, it should look more like this:

feature: internal admin dashboard
users:
  - super_admin
  - workspace_admin
  - support_agent
permissions:
  super_admin:
    - manage_users
    - edit_billing
    - export_data
    - change_roles
  workspace_admin:
    - invite_users
    - suspend_users
    - export_data
  support_agent:
    - view_users
    - impersonate_users_with_audit_log
imports:
  accepted_formats:
    - csv
  header_mode: strict
  duplicate_rows: reject
  partial_failures: allowed_with_error_report
  invalid_encoding: fail_import
role_changes:
  approval_required: true
  audit_log_required: true
search:
  include_suspended_users: false
mobile:
  supported: responsive_read_only
retries:
  import_processing:
    strategy: exponential_backoff
    max_attempts: 5
errors:
  user_visible: normalized_messages
  internal_logging: structured_with_request_id
Enter fullscreen mode Exit fullscreen mode

Now the coding agent has something real to work from.

This matters even more in automation workflows

This is not only a coding-agent problem.

I see the same failure pattern in n8n, Make, and Zapier.

An agent can generate a workflow that technically runs while still baking in terrible assumptions:

  • no retry policy for flaky APIs
  • no dead-letter path
  • no idempotency key
  • no distinction between user error and provider outage
  • no handling for empty fields or malformed payloads

The workflow “works” until it meets reality.

If you are generating automations from natural language, interviewer-first orchestration matters even more because workflow bugs tend to hide until production traffic hits.

Why pricing changes the way teams design agent workflows

This is the part people skip, but it matters.

Under per-token billing, teams get weirdly reluctant to let an interviewer agent do its job.

Every extra clarification round feels like spend.
So people cut the questioning phase short, then pay for it later in rework.

That creates a terrible incentive:

  • save money on questions
  • waste time on rewrites
  • burn more tokens fixing avoidable mistakes

If you run agents continuously in n8n, Make, Zapier, OpenClaw, or a custom OpenAI-compatible stack, interviewer-first workflows are much easier to justify when compute is predictable.

That is one reason Standard Compute is interesting for this style of orchestration.
It is a drop-in OpenAI API replacement with flat monthly pricing, so you can afford to let agents ask more questions before they start coding.

Instead of optimizing every workflow around token anxiety, you can optimize for better specs and fewer rebuilds.

If your stack already speaks the OpenAI API, the swap is simple.

export OPENAI_BASE_URL="https://api.standardcompute.com/v1"
export OPENAI_API_KEY="your_standard_compute_key"
Enter fullscreen mode Exit fullscreen mode

Or in JavaScript:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: "https://api.standardcompute.com/v1",
});
Enter fullscreen mode Exit fullscreen mode

That matters when your workflow is not “one prompt, one response” but:

  • interview
  • refine
  • spec generation
  • implementation
  • review
  • retry
  • patch

That loop gets expensive fast under token billing.

A clean multi-agent layout

If I were wiring this into a real pipeline, I would do something like this:

User request
  -> Interviewer agent
  -> Spec generator
  -> Coding agent
  -> Reviewer agent
  -> Patch agent (if needed)
  -> Final artifact
Enter fullscreen mode Exit fullscreen mode

Or in pseudo-code:

const request = getUserRequest();

const interview = await interviewer.run(request);
const spec = await specWriter.run(interview);
const implementation = await coder.run(spec);
const review = await reviewer.run({ spec, implementation });

if (!review.passed) {
  const patched = await patcher.run({ spec, implementation, review });
  return patched;
}

return implementation;
Enter fullscreen mode Exit fullscreen mode

The key is that the coder does not receive a fuzzy paragraph.
The coder receives a spec.

When should the interviewer stop?

Not when the conversation feels long.

Stop when the unresolved decisions are no longer dangerous.

For me, that usually means these are explicit:

  • user roles and permission boundaries
  • happy path and failure path
  • import/export behavior
  • retry and timeout policy
  • empty states and error states
  • device constraints
  • audit and approval requirements

For a tiny script, this might take five minutes.
For a real feature involving auth, imports, notifications, and admin controls, yes, it can take close to an hour.

That hour is usually cheaper than five cycles of “almost right” code.

What changed after I split interviewing from coding

The code got less magical and much more useful.

I saw:

  • fewer rewrites
  • fewer hidden assumptions
  • cleaner handoffs between planning and implementation
  • better review outcomes
  • fewer “looks good in the PR, fails in production” moments

The biggest shift was mental.

I stopped judging agents by how fast they produced files.
I started judging them by how aggressively they exposed ambiguity.

That turned out to be the better metric.

My take

The future is probably not one giant genius prompt.

It is multiple specialized agents with narrow jobs and stricter handoffs.

Model choice still matters.
GPT-5 might be best for one repo.
Claude Opus 4.6 might be better for another.
Grok 4.20 might fit a different generation style.
OpenClaw might be the orchestration layer tying everything together.

But if the requirements are mush, model selection is downstream of the real problem.

The real upgrade was making the agent slow down and interrogate me before it earned the right to code.

If you are building agent workflows right now, I would strongly recommend trying this once:

  • keep your coding prompt small
  • move ambiguity-hunting into a separate interviewer agent
  • make the output a structured spec
  • only then let the coding agent touch the repo

That change helped me more than any “ultimate coding prompt” ever did.

Top comments (0)