1 min lesson
Encode the team's standards
Put yourself in this case. "A customer complains the agent keeps using the wrong logging library and ignoring their error-handling pattern across many tasks. What's the most durable fix?" Give the clearest next step.
Step 1 of 2
Encode the team's standardsproject rules in .cursor/rules as a workflow artifact
A customer's conventions are part of the spec. Cursor lets you commit project rules as .mdc files in .cursor/rules, or an AGENTS.md file, so every agent run inherits the team's standards without you restating them in each prompt.
# Stack & conventions - Backend: Python 3.12, FastAPI. Frontend: TypeScript, React. - Use the repo's `Result` type for fallible calls; never raise across module boundaries. - All new endpoints get a pytest test and an OpenAPI entry. # Editing rules - Match existing import ordering; do not reformat untouched lines. - Prefer small, anchored edits over rewriting whole files. - If a public type changes, update its callers in the same change.
Conventions in a committed rules file are reviewable, diff-able and shared across the whole team's agent runs.
That turns "the model keeps using the wrong logger" from a recurring prompt fix into a one-line PR.
Learn more
Full explanation
Pin behavior with golden examples
Pin behavior with golden examplesmaking prompts evaluable
A few in-context examples of a correct edit do more than paragraphs of instruction. They also make the workflow measurable: when behavior is pinned by concrete examples, you can build an eval set from those same cases. An eval set is a fixed list of cases you re-run to catch regressions.
- Show one or two golden examples: input code, the exact edit you'd accept and why.
- Keep examples close to the real task distribution, not toy snippets.
- If your workflow calls the model API directly, hold the temperature low for code edits so the same context yields stable output you can evaluate.