Back to library

System Prompt Craft

A system prompt is the PM's primary lever for controlling AI behaviour. Most prompts fail not because the model is wrong but because the instruction is ambiguous, the persona is undefined, or the output format is left to chance. This skill diagnoses and rewrites prompts for consistent, reliable output.

---

Context

Two modes:

  • Mode 1 — Write from scratch: PM has a task, needs a prompt built for it
  • Mode 2 — Diagnose and fix: PM has a prompt that isn't working
  • ---

    Mode 1: Write from Scratch

    Step 1 — Understand the task

    Ask: what task, what input, what output (format/length/structure/tone), AI's role, hard constraints, one-time vs. repeated use.

    Step 2 — Apply the five-layer prompt architecture

    Layer 1 — Persona: Specific role with domain expertise and behavioural adjective. Not "helpful assistant" but "senior product manager with 10 years B2B SaaS experience, direct and specific." Layer 2 — Task definition: Single imperative action verb. State what NOT to do. Number steps if sequential. Layer 3 — Input specification: What the model receives, how to interpret it, edge case handling (short input, jargon, ambiguity). Layer 4 — Output format: Exact structure with section headers. Include a filled example. Length constraints per section. Layer 5 — Edge case and refusal handling: What to do when task can't be completed. Specific refusal messages. Out-of-scope handling.

    Step 3 — Assemble and test

    Three tests: Happy path (format compliance), Edge case (handler fires), Adversarial (correct refusal).

    ---

    Mode 2: Diagnose and Fix

    Step 1 — Receive the failing prompt, example input, actual output, expected output.

    Step 2 — Diagnose: Persona drift, Task ambiguity, Input misinterpretation, Format non-compliance, Edge case failure, Constraint violation, or Hallucination.

    Step 3 — Rewrite only the failing layers. Show before/after with reasoning.

    Prompt quality checklist

    Persona is specific — domain, expertise, behavioural trait
    Task is a single imperative action
    Input specification covers edge cases
    Output format includes an example
    Refusal behaviour is explicitly defined
    No vague instructions
    Prompt is version-labelled
    Suggested next step: If this prompt will be used in a product feature, run aipm-prompt-spec to package it as a versioned engineering handoff artefact.