Skip to content

Commit 3f9903a

Browse files
committed
Refactor plugin classes and update namespaces
- Updated class namespaces to use dynamic placeholders for better flexibility. - Refactored SCF JSON Validator and SCF JSON classes to align with new namespace structure. - Enhanced taxonomies class to utilize dynamic slugs and improved documentation. - Updated PHPCS configuration to exclude additional scaffold files and patterns. - Improved JavaScript scanning script with detailed JSDoc comments for better maintainability. - Modified block JSON files to reflect new naming conventions and dynamic placeholders. - Enhanced uninstall script to ensure proper cleanup of custom post types and taxonomies. - Created a comprehensive scaffold review and alignment task list in the documentation. - Added a README index for better navigation of documentation files.
1 parent d702e15 commit 3f9903a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2084
-513
lines changed

.github/instructions/a11y.instructions.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
file_type: "instructions"
3-
description: "Accessibility standards and practices for WordPress block plugin development"
4-
applyTo: "**"
5-
version: "v2.0"
6-
last_updated: "2025-12-07"
2+
file_type: instructions
3+
description: Accessibility standards and practices for WordPress block plugin development
4+
applyTo: '**'
5+
version: v2.0
6+
last_updated: '2025-12-07'
7+
references:
8+
- ../custom-instructions.md
79
---
810

911
# Accessibility Instructions for WordPress Block Plugins
@@ -75,15 +77,6 @@ Avoid custom keyboard handlers that override native focus behaviour unless there
7577
- Smoke-test with a screen reader (NVDA/VoiceOver) for labels, announcements, and focus.
7678
- Use `npm run lint` for lintable accessibility rules where configured.
7779

78-
## References
79-
80-
- .github/instructions/wpcs-accessibility.instructions.md
81-
- .github/instructions/wpcs-html.instructions.md
82-
- .github/instructions/javascript-react-development.instructions.md
83-
- README.md
84-
85-
---
86-
8780
## Block Editor Accessibility
8881

8982
### Block Controls
@@ -681,3 +674,10 @@ Tables should be used for static information that is best represented in a tabul
681674
#### Use grids for dynamic information
682675

683676
Grids should be used for dynamic information that is best represented in a grid format. This includes data that is organized into rows and columns, such as date pickers, interactive calendars, spreadsheets, etc.
677+
678+
## See Also
679+
680+
- .github/instructions/wpcs-accessibility.instructions.md
681+
- .github/instructions/wpcs-html.instructions.md
682+
- .github/instructions/javascript-react-development.instructions.md
683+
- README.md

.github/instructions/agent-spec.instructions.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
2-
description: "How to author, format, and review agent specification files for the LightSpeed multi-block plugin scaffold"
3-
applyTo: ".github/agents/*.agent.md"
4-
version: 1.0
5-
lastUpdated: 2025-12-11
2+
description: >-
3+
How to author, format, and review agent specification files for the LightSpeed
4+
multi-block plugin scaffold
5+
applyTo: .github/agents/*.agent.md
6+
version: 1
7+
lastUpdated: 2025-12-11T00:00:00.000Z
8+
references:
9+
- ../custom-instructions.md
610
---
711

812
# Agent Specification Instructions

.github/instructions/block-json.instructions.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
file_type: "instructions"
3-
applyTo: "**/block.json"
4-
description: "Comprehensive block.json configuration standards for WordPress block plugins"
5-
license: "GPL-3.0-or-later"
2+
file_type: instructions
3+
applyTo: '**/block.json'
4+
description: Comprehensive block.json configuration standards for WordPress block plugins
5+
license: GPL-3.0-or-later
6+
references:
7+
- ../custom-instructions.md
68
---
79

810
> ⚠️ **Scope Notice**: These instructions are intended for **WordPress block plugin repositories** within the `lightspeedwp` GitHub organisation. They should **not** be applied to the `lightspeedwp/.github` community health repository, as that repository does not contain WordPress code.

.github/instructions/blocks-development.instructions.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
---
2-
file_type: "instructions"
3-
title: "WordPress Block Development Guidelines"
4-
description: "Comprehensive guide for developing WordPress blocks using modern patterns, block.json-first approach, and WordPress best practices"
5-
applyTo: "**/*.{js,jsx,ts,tsx,php}"
6-
version: "v3.0"
7-
last_updated: "2025-12-10"
8-
owners: ["LightSpeedWP Team"]
9-
tags: ["wordpress", "blocks", "gutenberg", "plugin", "development", "react"]
10-
domain: "wp-core"
11-
stability: "stable"
2+
file_type: instructions
3+
title: WordPress Block Development Guidelines
4+
description: >-
5+
Comprehensive guide for developing WordPress blocks using modern patterns,
6+
block.json-first approach, and WordPress best practices
7+
applyTo: '**/*.{js,jsx,ts,tsx,php}'
8+
version: v3.0
9+
last_updated: '2025-12-10'
10+
owners:
11+
- LightSpeedWP Team
12+
tags:
13+
- wordpress
14+
- blocks
15+
- gutenberg
16+
- plugin
17+
- development
18+
- react
19+
domain: wp-core
20+
stability: stable
21+
references:
22+
- ../custom-instructions.md
1223
---
1324

1425
> ⚠️ **Scope Notice**: These instructions are intended for **WordPress block plugin repositories** within the `lightspeedwp` GitHub organisation. They should **not** be applied to the `lightspeedwp/.github` community health repository, as that repository does not contain WordPress plugin code.
@@ -735,16 +746,6 @@ See [security.instructions.md](./security.instructions.md) for comprehensive sec
735746

736747
---
737748

738-
## References
739-
740-
- [Block Editor Handbook](https://developer.wordpress.org/block-editor/)
741-
- [@wordpress/scripts](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/)
742-
- [Block API Reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/)
743-
- [Block Supports](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/)
744-
- [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/)
745-
746-
---
747-
748749
## ⚠️ Important Reminders
749750

750751
- **Never edit built files directly** — Always keep source and build output separate
@@ -805,3 +806,11 @@ import { useState, useEffect, useCallback, useMemo } from '@wordpress/element';
805806
- For dynamic blocks, hit render endpoints or E2E tests to confirm server output.
806807

807808
---
809+
810+
## See Also
811+
812+
- [Block Editor Handbook](https://developer.wordpress.org/block-editor/)
813+
- [@wordpress/scripts](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/)
814+
- [Block API Reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/)
815+
- [Block Supports](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/)
816+
- [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/)

.github/instructions/folder-structure.instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name: Folder Structure Instructions
33
description: Repository folder organization and file placement rules
44
applyTo: '**'
5+
references:
6+
- ../custom-instructions.md
57
---
68

79
# Folder Structure Instructions

.github/instructions/generate-plugin.instructions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
name: Plugin Generator Instructions
3-
description: Rules and standards for using mustache template values in scaffold plugin generation
3+
description: >-
4+
Rules and standards for using mustache template values in scaffold plugin
5+
generation
46
applyTo: '**'
7+
references:
8+
- ../custom-instructions.md
59
---
610

711
# Plugin Generator Instructions

.github/instructions/i18n.instructions.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
---
2-
file_type: "instructions"
3-
description: "Internationalisation and localisation best practices for WordPress development"
4-
applyTo: "**/*.{php,js,jsx,ts,tsx}"
5-
version: "v1.0"
6-
last_updated: "2025-11-27"
7-
owners: ["LightSpeedWP Team"]
8-
tags: ["i18n", "l10n", "translation", "wordpress"]
2+
file_type: instructions
3+
description: Internationalisation and localisation best practices for WordPress development
4+
applyTo: '**/*.{php,js,jsx,ts,tsx}'
5+
version: v1.0
6+
last_updated: '2025-11-27'
7+
owners:
8+
- LightSpeedWP Team
9+
tags:
10+
- i18n
11+
- l10n
12+
- translation
13+
- wordpress
14+
references:
15+
- ../custom-instructions.md
916
---
1017

1118
# Instruction: Internationalisation

.github/instructions/instructions.instructions.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
2-
description: "Guidelines for writing Copilot instruction files for the LightSpeed multi-block plugin scaffold, focused on block plugin development"
3-
applyTo: "**/.github/instructions/*.instructions.md"
4-
version: 1.0
5-
lastUpdated: 2025-12-11
2+
description: >-
3+
Guidelines for writing Copilot instruction files for the LightSpeed
4+
multi-block plugin scaffold, focused on block plugin development
5+
applyTo: '**/.github/instructions/*.instructions.md'
6+
version: 1
7+
lastUpdated: 2025-12-11T00:00:00.000Z
8+
references:
9+
- ../custom-instructions.md
610
---
711

812
# Block Plugin Instruction Authoring

.github/instructions/javascript-react-development.instructions.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
---
2-
file_type: "instructions"
3-
title: "WordPress JavaScript/React Development Standards"
4-
description: "Comprehensive standards for WordPress JavaScript and React block development following WordPress and LightSpeed conventions."
5-
version: "v2.1"
6-
last_updated: "2025-11-27"
7-
author: "LightSpeedWP Team"
8-
maintainer: "Engineering Team"
9-
owners: ["lightspeedwp/maintainers"]
10-
tags: ["javascript", "react", "wordpress", "blocks", "jsx", "tsx"]
11-
applyTo: "**/*.{js,jsx,ts,tsx}"
12-
domain: "wp-core"
13-
stability: "stable"
2+
file_type: instructions
3+
title: WordPress JavaScript/React Development Standards
4+
description: >-
5+
Comprehensive standards for WordPress JavaScript and React block development
6+
following WordPress and LightSpeed conventions.
7+
version: v2.1
8+
last_updated: '2025-11-27'
9+
author: LightSpeedWP Team
10+
maintainer: Engineering Team
11+
owners:
12+
- lightspeedwp/maintainers
13+
tags:
14+
- javascript
15+
- react
16+
- wordpress
17+
- blocks
18+
- jsx
19+
- tsx
20+
applyTo: '**/*.{js,jsx,ts,tsx}'
21+
domain: wp-core
22+
stability: stable
23+
references:
24+
- ../custom-instructions.md
1425
---
1526

1627
# WordPress JavaScript/React Development Standards
@@ -226,12 +237,6 @@ Avoid anonymous default exports and keep props typed (`EditProps`) when using Ty
226237
- Run `npm run build` to ensure code compiles with the shared pipeline.
227238
- For TypeScript, run `npm run typecheck` if available; otherwise configure `tsc --noEmit`.
228239

229-
## References
230-
231-
- wpcs-javascript.instructions.md
232-
- wpcs-js-docs.instructions.md
233-
- README.md
234-
235240
### Block Component Template
236241

237242
```javascript
@@ -790,3 +795,9 @@ const MyComponent = ({ isActive, isDisabled }) => {
790795
- [React Hooks Documentation](https://react.dev/reference/react/hooks)
791796
- [ESLint Configuration](https://eslint.org/docs/latest/)
792797
- [Testing React Components](https://testing-library.com/docs/react-testing-library/intro/)
798+
799+
## See Also
800+
801+
- wpcs-javascript.instructions.md
802+
- wpcs-js-docs.instructions.md
803+
- README.md

0 commit comments

Comments
 (0)