Skip to main content

Prompting Guide

Good prompting is the fastest way to get accurate results.

Prompt template

Use this structure:

  1. Objective: what outcome you need.
  2. Context: relevant files, constraints, and environment.
  3. Scope: what to include/exclude.
  4. Output format: exact expected structure.
  5. Acceptance criteria: how success is measured.

Example

Objective: Create a docs page for AI quickstart.
Context: Docusaurus project in this repository.
Scope: Include setup, commands, and best practices.
Output format: Markdown file under docs/.
Acceptance criteria: Builds successfully with npm run build.

Quality tips

  • Be specific about files and paths.
  • State non-goals explicitly.
  • Ask for assumptions to be listed.
  • Require validation steps (build/tests).
  • Prefer iterative prompts over one giant prompt.

Reusable prompt templates in this repo

  • prompts/api-design.md
  • prompts/typescript-quality.md
  • prompts/docs-update.md