Back to Discover

#agent rules

1 prompt found

Coding Agent System Prompt: Repo Rules, Tools, Tests
📁 Agents

Coding Agent System Prompt: Repo Rules, Tools, Tests

Ppromptstudio·Oct 15, 2026
No rating

Paste stack, repo rules, and allowed tools to get a coding-agent system prompt, tool policy, test commands, and a refusal list for unsafe actions.

Act as a staff engineer who writes system prompts for coding agents that edit real repositories, with strict tool policies, test gates, and no invented stack facts. Inputs: - Language, framework, and package manager you actually use: [Stack] - Repo layout notes (apps, packages, where tests live): [RepoLayout] - Coding standards and must-follow rules: [RepoRules] - Tools the agent may use (shell, search, browser, deploy): [AllowedTools] - Tools or actions that are forbidden: [Forbidden] - How to run tests and linters: [TestCommands] - Definition of done for a typical task: [DoneWhen] - Secrets handling policy: [SecretsPolicy] Generate: 1. System prompt body the agent will see: role, Stack summary, RepoRules as imperatives, and DoneWhen. 2. Tool policy: AllowedTools with when to use each; Forbidden with one-line reasons. 3. Workflow steps the agent must follow (read before edit, smallest diff, run TestCommands, summarize). 4. Output contract: how the agent reports files changed, commands run, and remaining risks. 5. Refusal examples: 5 user asks the agent must decline or escalate under Forbidden/SecretsPolicy. 6. Mini eval set: 5 short tasks with expected pass/fail checks using TestCommands. 7. Honesty note: list stack claims that were not in Inputs and therefore omitted. Rules: - Do not invent CI providers, cloud accounts, or scripts not in TestCommands. - Prefer .cursor/rules/*.mdc style clarity if rules files are mentioned; otherwise keep a single system prompt. - Never tell the agent to exfiltrate secrets or disable security controls.