Agent Wranglers

AID-42Recommended

Show examples of good code

Point agents to one or two files that show the patterns to follow, and name them in the instructions file.

How to do it

Agents copy what they see more reliably than what they are told. Name a well-written feature folder as the model for new features. Remove or fix bad examples the agent might copy instead. Good examples keep new code in line, as Stay consistent with the codebase asks.

How to check

The instructions file names the example files, and each one exists. Ask an agent to add a small feature. It matches the structure and naming of the example files.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/context-and-memory/show-good-examples">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.