PluginProbe
SimpleTOC – Table of Contents Block / 7.0.9
SimpleTOC – Table of Contents Block v7.0.9
7.2.0 7.3.0 7.1.1 7.1.0 7.0.10 7.0.9 7.0.8 7.0.7 7.0.6 7.0.4 7.0.5 5.0.21.1 5.0.22 5.0.23 5.0.24 5.0.25 5.0.25.1 5.0.27 5.0.28 5.0.29 5.0.3 5.0.30 5.0.31 5.0.32 5.0.33 All 159 releases
simpletoc / AGENTS.md

AGENTS.md in SimpleTOC – Table of Contents Block 7.0.9, at AGENTS.md

56 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Repository Instructions
2
3 Follow these rules for all changes in this WordPress plugin repository.
4
5 ## Core Rules
6
7 - Stay close to WordPress core and Gutenberg standards.
8 - Keep it simple.
9 - Prefer existing Gutenberg elements, WordPress functions, official APIs, block metadata, block-editor components, and the WordPress Settings API.
10 - Write as little custom code as possible. Less is more.
11 - Avoid hacks, CSS tricks, hidden coupling, and one-off workarounds.
12 - Avoid inline styles unless a user-selected value must be output dynamically and there is no cleaner standard path.
13 - Keep layout and reusable presentation rules in SCSS/CSS, not in PHP strings.
14 - Sanitize all dynamic PHP output with the appropriate WordPress escaping helpers.
15
16 ## Documentation Workflow
17
18 - Update `readme.txt` only when changing plugin documentation.
19 - Do not edit `README.md` by hand. It is generated automatically from `readme.txt` by the GitHub Actions workflow.
20 - Keep `readme.txt` valid for WordPress.org first; the generated Markdown README is secondary.
21
22 ## Deployment Workflow
23
24 - Read and understand the repository's GitHub Actions workflows before changing deployment behavior.
25 - Check `.github/workflows/` to see which branch, tag, path, or manual triggers deploy plugin code, WordPress.org assets, generated documentation, or release artifacts.
26 - Check `.distignore` before adding project-only files. Claude skills, local tooling, generated GitHub-only files, and development metadata must not be shipped to WordPress.org.
27 - Keep deployment changes conservative and explicit. Do not add a new deployment path when an existing workflow already covers the job.
28
29 ## Block Workflow
30
31 - Treat `src/block.json` as the source of truth for block attributes and asset registration.
32 - Treat `src/edit.js` as editor configuration only.
33 - For dynamic blocks, render frontend markup in the PHP render path, not in `save.js`.
34 - When adding a new editor option, wire it through block attributes first, then implement the frontend effect in the existing PHP render path or registered frontend styles.
35 - Rebuild generated files after source changes so `build/` stays in sync.
36
37 ## Styling Workflow
38
39 - Prefer wrapper classes and registered block stylesheets over hard-coded CSS in PHP.
40 - Reuse Gutenberg conventions such as palette-driven colors, `has-background`, and block wrapper attributes when they fit.
41 - For optional styling features, expose explicit settings instead of baking in fixed presets unless the requirement is truly global.
42 - For global styling behavior, add the option to the plugin settings page and store it via the existing options flow.
43
44 ## Settings Workflow
45
46 - Add global options in the plugin's existing settings module.
47 - Register options with `register_setting()`, render them with `add_settings_field()`, and keep labels/help text concise.
48 - Respect existing filter overrides when the settings page already follows that pattern.
49 - If a global option forces behavior, keep block-level UI simple and make the server-side precedence explicit.
50
51 ## Project Preferences
52
53 - Prefer maintainable, standard-compliant solutions over fast shortcuts.
54 - If a request appears to require a workaround, stop and look for the clean WordPress-native approach first.
55 - If a compromise is unavoidable, state the tradeoff explicitly before implementing it.
56