1. ai
  2. /prompting

Prompting and Context

Good prompts are specific. Good projects give the model persistent context so you stop repeating yourself.

This section covers what you say (prompt structure), what you attach (files, search, MCP), and what the repo remembers (rules and AGENTS.md). Together they reduce hallucinations and scope creep more than switching models alone.

How the Pages Relate

PageSolves
Prompting for CodeOne-off tasks — spec, plan, implement, test templates
Context EngineeringToken budgets, @ references, search vs paste
Project RulesPersistent conventions — AGENTS.md, .cursor/rules
Rules vs AGENTS.md vs SkillsWhich mechanism to use when

Order: Write Project Rules once, then use Prompting for Code daily and tune attachments with Context Engineering.

Learning Paths

Solo developer

  1. Prompting for Code — learn the four-step pattern
  2. Project Rules — encode your stack once
  3. Context Engineering — when the model misses files
  4. AI Prompting cheat sheet — keep open while coding

Team lead

  1. Project Rules — team rollout and CODEOWNERS
  2. Team AI Policy — what may be pasted into prompts
  3. Context Engineering.cursorignore and secret boundaries
  4. Verifying AI Output — required review gates

Start Here If…

Your problemStart with
Model writes essays instead of diffsPrompting for Code
Model ignores your stack (App Router vs Pages)Project Rules
Context window full / wrong files attachedContext Engineering
Team repeats the same instructions in SlackProject Rules (team section)
Need copy-paste prompt templatesAI Prompting cheat sheet

Guides

Prompting for Code

Spec → plan → implement → test prompt structure.

Context Engineering

What to attach, token budgets, and codebase search.

Project Rules

AGENTS.md, .cursor/rules, and team conventions.

Rules vs Skills

When to use AGENTS.md, Cursor rules, or SKILL.md.

Quick References