Skip to content

Commit 151cdd7

Browse files
committed
Update ai ops index files, agents, files
1 parent efefdf3 commit 151cdd7

File tree

11 files changed

+1485
-1578
lines changed

11 files changed

+1485
-1578
lines changed

.github/agents/agent.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ This file documents the primary automation agent(s) for this repository, their p
3333
- **Usage:** Say "Generate a new multi-block plugin" or "Create CPT plugin from scaffold"
3434
- **Related Prompt:** [generate-plugin.prompt.md](../prompts/generate-plugin.prompt.md)
3535

36+
### WP Block Build Agent
37+
38+
- **Agent Spec:** `.github/agents/wp-block-build.agent.md`
39+
- **Purpose:** Details the build process for the multi-block plugin agent, covering compilation, asset handling, and packaging.
40+
- **Usage:** Reference for understanding and troubleshooting the plugin build process.
41+
42+
### Development Assistant Agent
43+
44+
- **Agent Spec:** `.github/agents/development-assistant.agent.md`
45+
- **Purpose:** Provides context-specific assistance for development tasks, with different modes for various needs.
46+
- **Usage:** Invoke for help with coding, debugging, and adhering to project standards.
47+
48+
---
49+
3650
### General Automation Agent
3751

3852
- **Agent Script:** `.github/agents/agent-script.js`

.github/agents/generate-plugin.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ Requires Plugins: secure-custom-fields
520520

521521
## Implementation
522522

523-
This agent is implemented in [`scaffold-generator.agent.js`](./scaffold-generator.agent.js).
523+
This agent is implemented in [`generate-plugin.agent.js`](../../scripts/generate-plugin.agent.js).
524524

525525
**Direct Usage:**
526526
```bash

.github/custom-instructions.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,56 @@ When creating project tracking files, task lists, or multi-week project plans:
8181

8282
---
8383

84+
## Instruction File Index
85+
86+
Reference the following instruction files based on your task. For a complete map, see the Master Instructions Index.
87+
88+
### WordPress Coding Standards (WPCS)
89+
90+
| File | Purpose |
91+
|------|---------|
92+
| wpcs-php.instructions.md | PHP coding standards, formatting, naming, security, i18n |
93+
| wpcs-javascript.instructions.md | JavaScript coding standards and patterns |
94+
| wpcs-php-docs.instructions.md | PHP inline documentation (DocBlocks) |
95+
| wpcs-js-docs.instructions.md | JavaScript inline documentation (JSDoc) |
96+
| wpcs-css.instructions.md | CSS/SCSS coding standards |
97+
| wpcs-html.instructions.md | HTML markup standards and semantics |
98+
| wpcs-accessibility.instructions.md | Accessibility standards (WCAG 2.2 AA) |
99+
100+
### Block Development
101+
102+
| File | Purpose |
103+
|------|---------|
104+
| blocks-development.instructions.md | Comprehensive block development guide |
105+
| block-json.instructions.md | Block.json schema reference |
106+
| patterns-and-templates.instructions.md | Pattern development, registration, and template usage |
107+
| javascript-react-development.instructions.md | React/JS development patterns for blocks |
108+
109+
### Testing & Quality Assurance
110+
111+
| File | Purpose |
112+
|------|---------|
113+
| testing-e2e.instructions.md | End-to-end testing with Playwright/TypeScript |
114+
| security.instructions.md | Block plugin security best practices |
115+
116+
### Plugin Scaffolding & Organization
117+
118+
| File | Purpose |
119+
|------|---------|
120+
| generate-plugin.instructions.md | Mustache template scaffolding standards |
121+
| scaffold-extensions.instructions.md | Extending the scaffold with new features |
122+
| folder-structure.instructions.md | Project organization and file structure standards |
123+
124+
### Special Topics
125+
126+
| File | Purpose |
127+
|------|---------|
128+
| a11y.instructions.md | Advanced accessibility standards for block plugins |
129+
| i18n.instructions.md | Internationalization guidelines |
130+
| scf-fields.instructions.md | Custom field development with SCF |
131+
132+
---
133+
84134
# {{name}} Multi-Block Plugin Instructions
85135

86136
You are an expert WordPress multi-block plugin developer working on {{name}}, a modern WordPress multi-block plugin scaffold with custom post types, taxonomies, and SCF field integration.

.github/instructions/_index.instructions.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This index maps every instruction file in the repository and when to use it. Use
4242
- Check links resolve to existing files after renames.
4343

4444
**Last Updated:** 2025-12-10
45-
**Total Files:** 19 instruction files
45+
**Total Files:** 22 instruction files
4646

4747
---
4848

@@ -147,7 +147,7 @@ All `wpcs-*` files in the [WordPress Coding Standards](#wordpress-coding-standar
147147
| [a11y.instructions.md](./a11y.instructions.md) | 27.8KB | Accessibility standards for block plugins (WCAG 2.2 AA) | When developing block controls, editor UX, or block output |
148148
| [i18n.instructions.md](./i18n.instructions.md) | 550 bytes | Internationalization guidelines | When adding translatable strings |
149149
| [scf-fields.instructions.md](./scf-fields.instructions.md) | 19.8KB | Custom field development | When creating custom fields functionality |
150-
| [reporting.instructions.md](./reporting.instructions.md) | 19.0KB | Reporting and documentation standards | When creating reports or documentation |
150+
| [reporting.instructions.md](./reporting.instructions.md) | 19.0KB | Reporting and analysis documentation standards | When creating reports or documentation |
151151

152152
**Total Special Topics:** 4 files (~67KB)
153153

@@ -348,28 +348,28 @@ Found an issue with an instruction file?
348348
<summary>Click to expand full alphabetical listing</summary>
349349

350350
1. [_index.instructions.md](./_index.instructions.md) — This file
351-
2. [a11y.instructions.md](./a11y.instructions.md) — Accessibility standards
352-
3. [block-json.instructions.md](./block-json.instructions.md) — Block.json reference
353-
4. [blocks-development.instructions.md](./blocks-development.instructions.md)**NEW** Block development guide
354-
5. [folder-structure.instructions.md](./folder-structure.instructions.md) — Project organization
355-
6. [generate-plugin.instructions.md](./generate-plugin.instructions.md) — Plugin generator
356-
7. [i18n.instructions.md](./i18n.instructions.md) — Internationalization
357-
8. [javascript-react-development.instructions.md](./javascript-react-development.instructions.md)**CONSOLIDATED** React/JS patterns
358-
9. [patterns-and-templates.instructions.md](./patterns-and-templates.instructions.md)**NEW** Pattern development
359-
10. [reporting.instructions.md](./reporting.instructions.md) — Reporting standards
360-
11. [scaffold-extensions.instructions.md](./scaffold-extensions.instructions.md)**RENAMED** Scaffold extensions
361-
12. [scf-fields.instructions.md](./scf-fields.instructions.md) — Custom fields
362-
13. [schema-files.instructions.md](./schema-files.instructions.md) — Schema organization
363-
14. [security.instructions.md](./security.instructions.md) — Security best practices
364-
15. [temp-files.instructions.md](./temp-files.instructions.md) — Temporary files
365-
16. [testing-e2e.instructions.md](./testing-e2e.instructions.md)**RENAMED** E2E testing
366-
17. [wpcs-accessibility.instructions.md](./wpcs-accessibility.instructions.md) — WPCS Accessibility
367-
18. [wpcs-css.instructions.md](./wpcs-css.instructions.md) — WPCS CSS
368-
19. [wpcs-html.instructions.md](./wpcs-html.instructions.md) — WPCS HTML
369-
20. [wpcs-javascript.instructions.md](./wpcs-javascript.instructions.md) — WPCS JavaScript
370-
21. [wpcs-js-docs.instructions.md](./wpcs-js-docs.instructions.md) — WPCS JS Docs
371-
22. [wpcs-php.instructions.md](./wpcs-php.instructions.md) — WPCS PHP
372-
23. [wpcs-php-docs.instructions.md](./wpcs-php-docs.instructions.md) — WPCS PHP Docs
351+
2. [a11y.instructions.md](./a11y.instructions.md)
352+
3. [block-json.instructions.md](./block-json.instructions.md)
353+
4. [blocks-development.instructions.md](./blocks-development.instructions.md)
354+
5. [folder-structure.instructions.md](./folder-structure.instructions.md)
355+
6. [generate-plugin.instructions.md](./generate-plugin.instructions.md)
356+
7. [i18n.instructions.md](./i18n.instructions.md)
357+
8. [javascript-react-development.instructions.md](./javascript-react-development.instructions.md)
358+
9. [patterns-and-templates.instructions.md](./patterns-and-templates.instructions.md)
359+
10. [reporting.instructions.md](./reporting.instructions.md)
360+
11. [scaffold-extensions.instructions.md](./scaffold-extensions.instructions.md)
361+
12. [scf-fields.instructions.md](./scf-fields.instructions.md)
362+
13. [schema-files.instructions.md](./schema-files.instructions.md)
363+
14. [security.instructions.md](./security.instructions.md)
364+
15. [temp-files.instructions.md](./temp-files.instructions.md)
365+
16. [testing-e2e.instructions.md](./testing-e2e.instructions.md)
366+
17. [wpcs-accessibility.instructions.md](./wpcs-accessibility.instructions.md)
367+
18. [wpcs-css.instructions.md](./wpcs-css.instructions.md)
368+
19. [wpcs-html.instructions.md](./wpcs-html.instructions.md)
369+
20. [wpcs-javascript.instructions.md](./wpcs-javascript.instructions.md)
370+
21. [wpcs-js-docs.instructions.md](./wpcs-js-docs.instructions.md)
371+
22. [wpcs-php.instructions.md](./wpcs-php.instructions.md)
372+
23. [wpcs-php-docs.instructions.md](./wpcs-php-docs.instructions.md)
373373

374374
</details>
375375

.github/prompts/generate-plugin.prompt.md

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,59 @@ description: Interactive WordPress multi-block plugin generator with CPT, taxono
66

77
I'll help you generate a new WordPress multi-block plugin with custom post types, taxonomies, and Secure Custom Fields integration. This is a comprehensive scaffold for complex WordPress applications.
88

9-
## 🔍 Repository Context Detection
9+
## 🔍 Step 1: Repository Context Detection
1010

1111
**First, I need to understand your setup:**
1212

1313
Are you running this generator:
1414

1515
1. **In the `lightspeedwp/multi-block-plugin-scaffold` repository?**
16-
- If YES → The plugin will be generated in an `output-plugin/` folder (excluded from git)
16+
- If YES → The plugin will be generated in `generated-plugins/<slug>/` folder (excluded from git)
1717
- This folder is for testing and development only
1818
- You'll manually move the generated plugin to where you need it
19+
- Use **Generator Mode** (default)
1920

2021
2. **In a NEW repository (created from the scaffold template)?**
2122
- If YES → The generator will replace all mustache variables IN-PLACE in your current repository
2223
- This will transform the scaffold INTO your actual plugin
23-
- This action modifies your repository permanently (use `--in-place` mode)
24+
- This action modifies your repository permanently
25+
- Use **Template Mode** (`--in-place` flag)
2426

2527
**Please indicate which scenario applies to you before we proceed.**
2628

27-
## Quick Start Options
29+
---
30+
31+
## 📋 Step 2: Configuration File Check
32+
33+
**Do you have a plugin configuration file?**
34+
35+
### ✅ YES - I Have a Config File
36+
37+
If you have a `plugin-config.json` file (or similar), I'll help you validate and use it:
2838

29-
### Option 1: Use Configuration File (Fastest)
39+
1. **Provide the file path** to your configuration file
40+
2. **I will validate it** against the schema (`.github/schemas/plugin-config.schema.json`)
41+
3. **Review validation results:**
42+
- ✅ If valid → Ask if you want to override any values → Generate plugin
43+
- ❌ If invalid → Show errors → Offer to fix or use wizard
3044

31-
If you already have a configuration file that follows the schema (`.github/schemas/plugin-config.schema.json`), you can bypass the wizard entirely:
45+
**Would you like to override any configuration values?**
46+
- If YES → I'll ask which values you want to change
47+
- If NO → I'll generate using your config file as-is
3248

49+
**Example validation workflow:**
3350
```bash
34-
node scripts/generate-plugin.js --config path/to/your-config.json
51+
# Step 1: Validate your config
52+
node scripts/generate-plugin.js --validate plugin-config.json
53+
54+
# Step 2: Generate (if validation passed)
55+
node scripts/generate-plugin.js --config plugin-config.json
56+
57+
# Step 3: (Template mode only) Add --in-place flag
58+
node scripts/generate-plugin.js --config plugin-config.json --in-place
3559
```
3660

37-
**Example configuration file:**
61+
**Example configuration file structure:**
3862
```json
3963
{
4064
"slug": "tour-operator",
@@ -45,6 +69,7 @@ node scripts/generate-plugin.js --config path/to/your-config.json
4569
"version": "1.0.0",
4670
"name_singular": "Tour",
4771
"name_plural": "Tours",
72+
"cpt_slug": "tour",
4873
"cpt_icon": "dashicons-palmtree",
4974
"cpt_supports": ["title", "editor", "thumbnail", "custom-fields"],
5075
"cpt_has_archive": true,
@@ -66,17 +91,43 @@ node scripts/generate-plugin.js --config path/to/your-config.json
6691
}
6792
```
6893

69-
See `.github/schemas/plugin-config.example.json` for a complete example.
94+
**See complete example:** `.github/schemas/examples/plugin-config.example.json`
95+
96+
**See schema reference:** `.github/schemas/plugin-config.schema.json`
97+
98+
---
99+
100+
### ❌ NO - I Don't Have a Config File
101+
102+
No problem! I'll guide you through creating your plugin configuration using one of these wizards:
103+
104+
#### Option A: Simple Wizard (Recommended for Most Users)
105+
- Asks **only required** questions
106+
- Uses **smart defaults** for optional values
107+
- **Faster** and easier to complete
108+
- Best for standard use cases
70109

71-
### Option 2: Interactive Wizard (Guided)
110+
#### Option B: Advanced Wizard (Complete Configuration)
111+
- Asks about **all 100+ mustache variables**
112+
- Full control over every aspect
113+
- Takes longer but offers maximum customization
114+
- Best for complex or highly customized plugins
72115

73-
If you prefer step-by-step guidance, continue with the information gathering process below.
116+
**Which wizard would you prefer?**
117+
- Type **"simple"** for Simple Wizard
118+
- Type **"advanced"** for Advanced Wizard
74119

75120
---
76121

77-
## Information Gathering Process
122+
## 🧙 Interactive Wizard: Information Gathering
123+
124+
*(This section applies when using the Simple or Advanced Wizard)*
125+
126+
This scaffold requires detailed planning due to its complexity. I'll gather information in multiple stages to ensure your plugin is properly configured.
78127

79-
This scaffold requires more detailed planning due to its complexity. I'll gather information in multiple stages to ensure your plugin is properly configured.
128+
**Wizard Types:**
129+
- **Simple Wizard**: Covers Stages 1-5 with smart defaults
130+
- **Advanced Wizard**: Covers all stages + additional variables (100+ total)
80131

81132
---
82133

@@ -243,9 +294,21 @@ Which blocks should be created?
243294

244295
---
245296

246-
## Let's Begin!
297+
## 🚀 Let's Begin!
298+
299+
**First, answer these two questions:**
300+
301+
1. **Repository Context**: Are you in the scaffold repo or a new repo?
302+
- Type **"scaffold"** for Generator Mode (creates `generated-plugins/<slug>/`)
303+
- Type **"new"** for Template Mode (modifies current directory with `--in-place`)
304+
305+
2. **Configuration File**: Do you have a plugin-config.json file?
306+
- Type **"yes"** and provide the file path
307+
- Type **"no"** to use the wizard
308+
309+
---
247310

248-
**Please provide your answers for Stage 1:**
311+
**If using the wizard, provide your answers for Stage 1:**
249312

250313
1. Plugin Name:
251314
2. Plugin Slug:
@@ -370,7 +433,6 @@ The plugin will automatically declare SCF as a dependency using the WordPress 6.
370433

371434
## Related Resources
372435

373-
- [Multi-Block Plugin Scaffold Reference](multi-block-plugin-scaffold.prompt.md)
374436
- [Plugin Generator Agent](../agents/generate-plugin.agent.md)
375-
- [Development Assistant](../agents/development-assistant.agent.md)
437+
- [Plugin Generator Instructions](../instructions/generate-plugin.instructions.md)
376438
- [SCF Fields Reference](../instructions/scf-fields.instructions.md)

.github/schemas/mustache-variables.schema.json

Whitespace-only changes.

0 commit comments

Comments
 (0)