liveBook · Manning

Prompt

As explained in Crack Any Codebase with AI

A prompt is an instruction or input supplied to an AI model to elicit a particular response.

A prompt is an instruction or input supplied to an AI model. For codebase work, replace vague requests such as “Explain this code” with commands that force answers you can check. section 1.3.1 section 2.0

The useful mental model is constraint over prose: request a traceable diagram, a number, a named story, or a worked example instead of adjectives and generalities. section 2.3 section 2.6

Sharpen a prompt by demanding one of three concrete forms:

  • Ask for a story: trace one real request or user journey from beginning to end. section 2.3
  • Ask for numbers: require measurements or counts instead of descriptive adjectives. section 2.3
  • Ask for a toy example: make the model demonstrate an abstract claim with checkable inputs and outputs. section 2.3

From generic answer to checkable artifact

Weak: “What does this project do?” Better: “Explain what this does in one sentence, like a Y Combinator application.” Weak: “What happens when a user creates an order?” Better: “Generate a Mermaid sequence diagram for POST /api/orders.” Weak: “Is this database schema good?” Better: “The users table stores preferences in JSONB. Give one alternative and its trade-off.” section 1.3.1 section 1.3.1 section 1.3.1

Figure 1.3 Three panels, each showing a coder accepting fluff and an engineer issuing a command that forces a checkable answer: a one-sentence YC-style summary, a Mermaid diagram, and an alternative-with-trade-off.

Compare vague answers with commands requiring a one-sentence summary, a Mermaid diagram, or an alternative with trade-offs. section 1.3.1

Use a single file, ask one initial question, then follow up on the surprising line. Select only relevant code, document the answer immediately, and treat chat as a first learning pass rather than a scalable repository workflow. section 2.6

How Crack Any Codebase with AI covers it

How deep it goes
Defines prompt constraints and demonstrates them with code questions, but stops short of specifying a general prompt language or model internals.
Examples
Uses one-sentence summaries, Mermaid sequence diagrams, schema alternatives, toy examples, nanoGPT, Cal.com, and Ghost git history.
What it assumes
Assumes code to inspect and a question worth answering, while teaching prompt refinement from the failure of “Explain this code.”
What you can do after
Apply it via chat to interrogate selected files, trace flows, test claims, compare design alternatives, and record durable learning notes.
How it connects
Connects prompts to LLMs, chat, workflows, agents, sequence diagrams, product requirements documents, and git history.

Also explained in

Compare how 64 books explain prompt →

Related concepts

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