agentleFS
thehelpfultipperthehelpfultipper/wp-agent-mcp/.cursor/rules/40-wp-introspection-guidelines.mdc

wp-agent-mcp / rules

Cursor rule1 starsChanged 33 days agoMITView on GitHub

WordPress-specific heuristics for identifying blocks/patterns/templates and variant mechanisms generically.

The file

We split this 40-wp-introspection-guidelines.mdc into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the user asks about active theme tokens, helpers, or design system details, use get_theme_profile.

    line 15
  2. Very specific:

    Before creating new presentation code from a mock, run the design bridge workflow and reconcile tokens against get_theme_profile / bridge …

    line 26
  3. Distinctive:

    Never paste raw Figma hex, px spacing, or font stacks into theme files when preset CSS variables exist.

    line 27
  4. Very specific:

    When suggesting reuse/extend/create, include:

    line 30

≈ “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
40-wp-introspection-guidelines.mdc
---
description: WordPress-specific heuristics for identifying blocks/patterns/templates and variant mechanisms generically.
globs: "**/*.php,**/*.html,**/*.json,**/*.js,**/*.ts,**/*.css,**/*.scss"
alwaysApply: false
---

# WP Introspection (Generic Component Rules)

## Component surfaces to scan
- Runtime: registered blocks, styles, variations (if helper plugin installed)
- Files: block.json, patterns, templates, template parts, partials/components, CSS/JS
- Content DB: post_content block markup, known builder meta (best-effort)

## Intent-based theme routing
- If the user asks about active theme tokens, helpers, or design system details, use `get_theme_profile`.

## Variant mechanisms (generic)
- block styles (is-style-*)
- block variations
- pattern variants (multiple similar patterns)
- template part variants (header-compact, footer-legal)
- CSS modifiers (component--compact, is-variant-x)
- theme mods/options controlling rendering

## Design bridge (Figma / screenshot → repo conventions)
- Before creating new presentation code from a mock, run the design bridge workflow and reconcile tokens against `get_theme_profile` / bridge output.
- Never paste raw Figma hex, px spacing, or font stacks into theme files when preset CSS variables exist.

## Always output "why"
When suggesting reuse/extend/create, include:
- what exists
- where it lives
- how enabled
- why the recommended mechanism matches project conventions

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.