agentleFS
imMamdouhaboammarimMamdouhaboammar/agentic-workflow/.cursor/rules/agentic-hooks.mdc

agentic-workflow / rules

Cursor rule0 starsChanged 2 months agoMITView on GitHub

Universal Agentic Hooks & Policy Governance Rule

  • Pipes a download into a shell
  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

The file

We split this agentic-hooks.mdc into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    All agent actions, terminal commands, tool executions, and file edits within Cursor must strictly adhere to the project's governance …

    line 9
  2. Distinctive:

    Never execute destructive git operations (git push --force, git push -f, git reset --hard, git checkout ., git clean -f, git branch -D).

    line 12
  3. Very specific:

    Never execute catastrophic deletions (rm -rf /, rm -rf ~, rm -rf $HOME).

    line 13
  4. Very specific:

    Never execute raw disk writes (dd if=) or filesystem formatting (mkfs).

    line 14
  5. Very specific:

    Never pipe unverified remote scripts to a shell (curl | sh, wget | bash).

    line 15
  6. Very specific:

    Never commit or print secrets, tokens, or API keys (sk-*, AKIA*, ghp_*).

    line 22
  7. Very specific:

    Do not overwrite or tamper with .env, private keys (id_rsa, *.pem), or credentials files.

    line 23
  8. Very specific:

    If .tdd-guard is active, test files cannot be modified.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agentic-hooks.mdc
---
description: Universal Agentic Hooks & Policy Governance Rule
globs: *
alwaysApply: true
---

# Universal Agentic Hooks Framework (UAHF) — Cursor Governance Rule

All agent actions, terminal commands, tool executions, and file edits within Cursor must strictly adhere to the project's governance policies:

1. **Destructive Command Ban**:
   - Never execute destructive git operations (`git push --force`, `git push -f`, `git reset --hard`, `git checkout .`, `git clean -f`, `git branch -D`).
   - Never execute catastrophic deletions (`rm -rf /`, `rm -rf ~`, `rm -rf $HOME`).
   - Never execute raw disk writes (`dd if=`) or filesystem formatting (`mkfs`).
   - Never pipe unverified remote scripts to a shell (`curl | sh`, `wget | bash`).

2. **Package & Container Governance**:
   - **Never install or use Colima** under any circumstances (prohibited per project constitution due to large footprint).
   - Never execute `sudo brew`.

3. **Secrets & Sensitive Files**:
   - Never commit or print secrets, tokens, or API keys (`sk-*`, `AKIA*`, `ghp_*`).
   - Do not overwrite or tamper with `.env`, private keys (`id_rsa`, `*.pem`), or credentials files.

4. **TDD Integrity & Single Source of Truth**:
   - If `.tdd-guard` is active, test files cannot be modified; implement the required logic in source code.
   - SOT state is managed via `state.yaml`.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.