Rule.prompt
---
mode: "agent"
description: "Add a hard rule to the project's always-on prompt. Lightweight, no ceremony. Use any time."
---
<!-- Auto-generated by promptherder from .promptherder/agent/workflows/rule.md — do not edit -->
# Rule
Append the user's rule to `.promptherder/hard-rules.md`.
**What this does:** Adds a rule that the AI must always follow in this project. Hard rules are injected into every session automatically. Use this for project-specific standards, constraints, or guardrails (e.g., "never use eval", "all API routes require auth", "prefer composition over inheritance").
## Steps
1. If the user didn't provide a rule (e.g. just typed `/rule` with nothing after), prompt them:
> **What rule should always be enforced in this project?** Describe it as a clear, actionable statement.
2. Read `.promptherder/hard-rules.md` if it exists.
3. If it doesn't exist, create it with a header:when to use it
Community prompt sourced from the open-source GitHub repo shermanhuman/promptherder (MIT). A "Rule.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
shermanhuman/promptherder · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar