liveBook · Manning

Prompt structure

As explained in Coding with AI

An organization of a prompt into labeled sections that specify a goal, relevant semantics, requirements, and process flow.

Prompt structure organizes a request around the desired outcome and the conditions that must hold. For code changes, state what already works, name the defect, and give concrete acceptance criteria rather than asking for a vague improvement. section 10.8

Specify observable gameplay constraints

A log-movement request preserves the successful behavior—crossing the river—then identifies overlap and requires spacing, equal speed, and no collisions. Those details give the tool a testable target for its proposed changes. section 10.8

Treat the generated implementation as a proposal. Review the diff before accepting changes, and check the running game to confirm that the requested behavior actually appears. section 10.8

Figure 10.10 There is a diff interface that comes up in Cursor. You can accept individual changes or accept the entire file if you like.
A screenshot of a computer program

AI-generated content may be incorrect.

Use the diff interface to inspect and accept individual generated changes or the whole file. section 10.8

How Coding with AI covers it

How deep it goes
Demonstrates a concrete request with behavioral constraints and generated implementation feedback, without defining a formal prompt template.
Examples
Uses overlapping river logs that must remain spaced apart and move at equal lane speeds.
What you can do after
Apply it via Cursor to request constrained changes and review the proposed diff.
How it connects
Connects plain-English prompting with Cursor and diff review.

This explainer was generated by Manning's knowledge graph from the text of Coding with AI. The section links point to the parts of the book it draws on.