zmime.com
Category · Software

Software prompts

Coding agents fail on missing context, not missing intelligence. Give them the constraints a new teammate would need.

  • Feature specs
  • Debugging
  • Code review
  • Tests
  • Refactoring
  • Agents
01 — Overview

Why these prompts look the way they do

The best software prompts read like a well-written ticket. They name the stack, point at the files that matter, state the acceptance criteria and say what must not change. Where a human teammate would ask a clarifying question, a model will guess — so pre-answer the obvious ones.

For agentic tools such as Kiro or Antigravity, add process: how to verify, which commands to run, and when to stop and ask. Those instructions do more for output quality than any amount of prompt cleverness.

02 — Anatomy

A software prompt that a model can actually execute

  • Goal The user-visible outcome in one sentence, not the implementation.
  • Stack + versions Language, framework, runtime, package manager, test runner.
  • Context Relevant files, schemas, error output, existing patterns to follow.
  • Constraints No new dependencies, keep the public API, match existing style, performance budget.
  • Acceptance criteria Checkable statements, including edge cases and failure modes.
  • Verification Exact commands to build, lint and test, plus what a pass looks like.
  • Out of scope What to leave alone. Prevents drive-by refactors.
03 — The prompts

6 copy-ready software prompts

Replace everything in [brackets]. Keep the constraint lines — they do more work than the descriptive ones.

Nothing matches that word. Clear the field to see every prompt.

Prompt 01

Feature implementation request

Any non-trivial change you want done in one pass.

  • feature
  • implementation
Template · plain text
TASK: Implement [feature] in [repository/module].

STACK: [language + version], [framework], [package manager], [test runner].
RELEVANT FILES: [paths — read these before writing code]
EXISTING PATTERN TO FOLLOW: [file that shows the convention]

BEHAVIOUR
- [Requirement 1, phrased as observable behaviour]
- [Requirement 2]
- Edge cases: [empty input], [permission denied], [network timeout]

CONSTRAINTS
- No new dependencies without asking first.
- Do not change the public API of [module].
- Match existing error-handling and logging conventions.
- Keep functions under [n] lines; no clever one-liners.

ACCEPTANCE CRITERIA
1. [Checkable statement]
2. [Checkable statement]
3. Existing tests still pass.

VERIFY WITH: `[build command]`, `[lint command]`, `[test command]`

OUT OF SCOPE: [files/areas to leave untouched]

Plan first, list the files you will change, then implement.
Prompt 02

Debugging with evidence

When you have a stack trace and a reproduction.

  • debugging
  • bug
Template · plain text
Help me find the root cause of this bug. Do not suggest fixes until you have named the cause.

EXPECTED: [what should happen]
ACTUAL: [what happens]
REPRODUCTION: [exact steps, including inputs and environment]
FREQUENCY: [always / intermittent — how often]
WHEN IT STARTED: [after which change or version, if known]

ERROR OUTPUT:
"""
[paste full stack trace / logs]
"""

RELEVANT CODE:
"""
[paste the smallest code that includes the failure path]
"""

ALREADY RULED OUT: [what you have checked and why it is not the cause]

DELIVER
1. Most likely root cause, with the reasoning and the specific line.
2. Two alternative hypotheses, and a cheap way to test each.
3. The minimal fix, plus a regression test that fails before it and passes after.
Prompt 03

Code review with severity levels

Getting a review that separates real problems from nitpicks.

  • review
  • quality
Template · plain text
Review this change as a senior [language] engineer on the team that owns it.

CONTEXT: [what the change is meant to do]
CONVENTIONS: [link or summary of the team's style rules]
RISK AREAS: [auth / data migration / concurrency / anything user-facing]

REVIEW FOR, IN THIS ORDER
1. Correctness — logic errors, off-by-one, unhandled null, race conditions.
2. Security — input validation, injection, secret handling, authorisation gaps.
3. Failure behaviour — what happens on timeout, partial write, or retry.
4. Performance — obvious N+1 queries, unbounded loops, unnecessary allocations.
5. Maintainability — naming, duplication, missing tests.
6. Style — last, and clearly labelled as optional.

FORMAT: for each finding give severity (blocking / should-fix / nit), file and line, why it matters, and a suggested change. Skip praise. If a section has no findings, say "none".

DIFF:
"""
[paste diff]
"""
Prompt 04

Test generation from behaviour

Filling coverage gaps with tests that mean something.

  • tests
  • coverage
Template · plain text
Write tests for the code below using [test framework] and the conventions in [example test file].

WHAT THIS CODE IS RESPONSIBLE FOR: [one or two sentences]
CURRENT COVERAGE GAPS: [what is untested, if known]

COVER
- Happy path with typical input.
- Boundaries: empty, single item, maximum size, zero, negative.
- Invalid input and the exact errors expected.
- External failures: [timeout], [500 response], [malformed payload] — mocked, not live.
- Idempotency / repeated calls, if relevant.

RULES
- One behaviour per test, named so a failure explains itself.
- Arrange-act-assert, no shared mutable state between tests.
- No assertions on implementation details or private methods.
- No snapshot tests for logic.
- Deterministic: fix time and randomness.

CODE:
"""
[paste code]
"""

List anything untestable as written, with the smallest refactor that would fix it.
Prompt 05

Safe refactor brief

Restructuring code without changing behaviour.

  • refactor
  • legacy
Template · plain text
Refactor [file/module] with zero behaviour change.

WHY: [the specific pain — e.g. this function is 400 lines and untestable]
DEFINITION OF DONE: same inputs produce same outputs, all existing tests pass unchanged.

DO
- Extract [x] into [y] following the pattern in [reference file].
- Keep the public interface identical.
- Preserve existing error messages and log lines verbatim.
- Work in small steps, and after each step tell me what to run to verify.

DO NOT
- Rename public methods or change signatures.
- Add dependencies, change formatting wholesale, or touch unrelated files.
- "Improve" behaviour you think is a bug — list it separately instead.

DELIVER
1. Step plan with the order of changes.
2. The refactored code, step by step.
3. A list of behaviours you noticed that look wrong but were left alone.

CODE:
"""
[paste code]
"""
Prompt 06

Agent instruction file (project rules)

Standing context for agentic IDEs so you stop repeating yourself.

  • agents
  • steering
Template · plain text
Write the project rules file an AI coding agent should read before every task.

PROJECT: [name] — [one-line purpose]
STACK: [languages, frameworks, versions]
STRUCTURE: [top-level directories and what belongs in each]

COMMANDS
- Install: `[cmd]`
- Dev: `[cmd]`
- Build: `[cmd]`
- Test: `[cmd]`  (single test: `[cmd]`)
- Lint / format: `[cmd]`

CONVENTIONS
- [Naming, file layout, error handling, logging]
- [State management / data access pattern]
- [Testing philosophy: what must have tests]

GUARDRAILS
- Never edit [generated files / migrations already applied / vendored code].
- Never commit secrets; config comes from [source].
- Ask before adding a dependency or changing a schema.
- Always run build and tests before reporting a task complete.

Output as a concise Markdown file, imperative voice, no filler sections.
04 — Craft notes

What separates a good prompt from a wasted run

Do this 05

  • Name the stack and versions; behaviour differs across majors.
  • Paste the real error output rather than describing it.
  • Write acceptance criteria you can actually check.
  • Say explicitly what is out of scope.
  • Ask for a plan before code on anything non-trivial.

Not this 05

  • "Fix my code" with no reproduction or expected behaviour.
  • Letting an agent add dependencies without approval.
  • Requesting a refactor and a feature in the same prompt.
  • Accepting generated tests without reading them.
  • Trusting output that was never built or run.
05 — Questions

Asked often, answered plainly

Why do coding agents write code that does not fit my project?

They have not seen your conventions. Point at a reference file that demonstrates the pattern you want, and keep a standing rules file (Kiro steering, AGENTS.md, or similar) with commands and guardrails.

Should I ask for a plan first?

For anything spanning more than one file, yes. Reviewing a five-line plan is much cheaper than reviewing a 400-line diff that took the wrong approach.

How do I stop unwanted extra changes?

Add an explicit out-of-scope list and a "no drive-by refactors" rule, and ask for behaviours that look wrong to be reported separately instead of fixed.

06 — Sources

Read the primary documentation

Vendors change flags, limits and defaults often. Where this site disagrees with official docs, the docs win.