agentleFS
thehelpfultipperthehelpfultipper/wp-agent-mcp/.cursor/rules/10-architecture-and-safety.mdc

wp-agent-mcp / rules

Cursor rule1 starsChanged 33 days agoMITView on GitHub

Safety and architecture constraints for local WP introspection and patching.

The file

We split this 10-architecture-and-safety.mdc into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always show a preview diff before applying.

    line 11
  2. Very specific:

    Run php -l on any changed PHP file (or equivalent lint step).

    line 12
  3. Very specific:

    Never modify wp-config.php or server config files unless the user explicitly requests it.

    line 13
  4. Very specific:

    Never run arbitrary shell commands.

    line 14
  5. Very specific:

    If the user wants to apply a prepared diff/patch, use apply_patch.

    line 15
  6. Very specific:

    Prefer wp db query over direct DB connections.

    line 18
  7. Distinctive:

    All filesystem access must be restricted to the configured WP root.

    line 19
  8. Distinctive:

    Before creating a new block/component:

    line 23
  9. Distinctive:

    check block styles/variations

    line 25
  10. Distinctive:

    only then scaffold a new block

    line 27

≈ “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
10-architecture-and-safety.mdc
---
description: Safety and architecture constraints for local WP introspection and patching.
globs:
alwaysApply: true
---

# Architecture & Safety Constraints

## Safety
- Patch-only file writes (unified diff). Never overwrite entire files unless explicitly requested.
- Always show a preview diff before applying.
- Run `php -l` on any changed PHP file (or equivalent lint step).
- Never modify `wp-config.php` or server config files unless the user explicitly requests it.
- Never run arbitrary shell commands; use only whitelisted `wp`/tooling commands.
- If the user wants to apply a prepared diff/patch, use `apply_patch`.

## Local-first design
- Prefer `wp db query` over direct DB connections.
- All filesystem access must be restricted to the configured WP root.
- Store index in `.cursor-wp-index/` with a stable schema version.

## Reuse > Extend > Create
Before creating a new block/component:
1) check patterns
2) check block styles/variations
3) check template parts
4) only then scaffold a new block

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.