Skip to content

Commit 54a354f

Browse files
committed
chore: run husky pre-commit, stage and commit all mustache and doc updates
1 parent 80fabea commit 54a354f

File tree

11 files changed

+187
-149
lines changed

11 files changed

+187
-149
lines changed

.github/agents/release-scaffold.agent.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,18 @@ metadata:
2424

2525
## Wizard Integration & Advanced Features
2626

27-
This agent supports an interactive and automated wizard for release preparation:
28-
29-
- **Conditional Logic:**
30-
- Only prompts for advanced checks (e.g., smoke test, schema validation) if user opts in or config enables them.
31-
- **Config File Automation:**
32-
- Accepts a config file to automate release checks and reporting:
33-
- `node scripts/agents/release-scaffold.agent.js --config path/to/release-config.json`
34-
- Config can specify which checks to run, custom version, or skip optional steps.
35-
- **Dry-Run/Mock Mode:**
36-
- Use `WIZARD_MODE=mock` or `--dry-run` to simulate all checks and reporting without modifying files.
37-
- Useful for CI, validation, and pre-release rehearsal.
38-
- **Validation & Error Recovery:**
39-
- Each step validates its outcome (e.g., placeholder integrity, version alignment).
40-
- If a check fails, the wizard reports the error, suggests fixes, and can re-run after correction.
41-
- **Explicit Mapping:**
42-
- Each wizard step maps to a config schema field and release check (see below).
27+
This agent is tightly integrated with the **Release Scaffold Wizard** defined in `.github/prompts/create-release-scaffold.prompt.md` and implemented via `scripts/lib/wizard.js`.
28+
29+
- **Wizard Prompt:** All release-scaffold processes must use the wizard steps and config schema defined in `.github/prompts/create-release-scaffold.prompt.md`.
30+
- **Wizard Interface:** Supports CLI, JSON, ENV, mock, and other interfaces as defined in `scripts/lib/wizard.js`.
31+
- **Mustache Placeholder Protection:** Never strip or replace `{{mustache}}` placeholders in the scaffold repository. Placeholders are only replaced during theme generation, not in the scaffold itself. Validate placeholder presence before every release.
32+
- **Conditional Logic:** Prompts for advanced checks (e.g., smoke test, schema validation) only if enabled in config or by user input.
33+
- **Config File Automation:** Accepts a config file to automate release checks and reporting. See wizard prompt for schema.
34+
- **Dry-Run/Mock Mode:** Use `WIZARD_MODE=mock` or `--dry-run` to simulate all checks and reporting without modifying files. Useful for CI, validation, and pre-release rehearsal.
35+
- **Validation & Error Recovery:** Each step validates its outcome (e.g., placeholder integrity, version alignment). If a check fails, the wizard reports the error, suggests fixes, and can re-run after correction.
36+
- **Explicit Mapping:** Each wizard step maps to a config schema field and release check (see wizard prompt).
37+
38+
See `.github/prompts/create-release-scaffold.prompt.md` for the canonical wizard steps and config schema.
4339

4440
### Example: Using a Config File
4541

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

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ applyTo: "**"
66

77
# Folder Structure Instructions
88

9+
> **Critical Rule:**
10+
> Never strip or replace `{{mustache}}` placeholders in the scaffold repository. Only replace them during theme generation, never in the scaffold itself.
11+
912
## Overview
1013

1114
This document provides a comprehensive reference for the block-theme-scaffold project's folder structure, naming conventions, and organization principles.
@@ -66,23 +69,27 @@ block-theme-scaffold/
6669
Contains all GitHub-specific and AI agent configuration files.
6770

6871
#### .github/agents/
72+
6973
- **Purpose:** AI agent specification documents
7074
- **Naming:** `[agent-name].agent.md`
7175
- **Contents:** Agent behavior, capabilities, and constraints
7276
- **Mustache:** Contains `{{variables}}` in scaffold, replaced in generated themes
7377

7478
**Files:**
79+
7580
- `generate-theme.agent.md` - Theme generator agent spec
7681
- `release.agent.md` - Release preparation agent (templated)
7782
- `release-scaffold.agent.md` - Scaffold release agent (deleted in generated themes)
7883

7984
#### .github/instructions/
85+
8086
- **Purpose:** Detailed instructions for AI agents
8187
- **Naming:** `[topic].instructions.md`
8288
- **Contents:** How-to guides for specific tasks
8389
- **Mustache:** May contain `{{variables}}` where appropriate
8490

8591
**Key Files:**
92+
8693
- `reporting.instructions.md` - Report generation and storage
8794
- `release.instructions.md` - Release process (templated)
8895
- `generate-theme.instructions.md` - Theme generation guide
@@ -92,6 +99,7 @@ Contains all GitHub-specific and AI agent configuration files.
9299
- `temp-files.instructions.md` - Temporary file handling
93100

94101
#### .github/projects/
102+
95103
- **Purpose:** Project management and planning
96104
- **Structure:**
97105
```
@@ -102,12 +110,14 @@ Contains all GitHub-specific and AI agent configuration files.
102110
```
103111

104112
#### .github/prompts/
113+
105114
- **Purpose:** AI prompt templates
106115
- **Naming:** `[prompt-name].prompt.md`
107116
- **Contents:** Structured prompts for AI assistants
108117
- **Mustache:** Contains `{{variables}}` in scaffold
109118

110119
#### .github/reports/
120+
111121
- **Purpose:** Generated reports and analysis outputs
112122
- **Structure:**
113123
```
@@ -126,32 +136,39 @@ Contains all GitHub-specific and AI agent configuration files.
126136
- **Gitignored:** Yes (except README and .gitkeep)
127137

128138
#### .github/schemas/
139+
129140
- **Purpose:** JSON schemas for validation
130141
- **Naming:** `[schema-name].schema.json`
131142

132143
**Files:**
144+
133145
- `theme-config.schema.json` - Theme configuration schema
134146
- `frontmatter.schema.json` - Agent frontmatter schema
135147
- `mustache-variables-registry.schema.json` - Mustache variable registry
136148

137149
### scripts/ - Build and Automation Scripts
138150

139151
#### scripts/agents/
152+
140153
- **Purpose:** Agent implementation scripts
141154
- **Naming:** `[agent-name].agent.js`
142155

143156
#### scripts/lib/
157+
144158
- **Purpose:** Shared libraries and utilities
145159
- **Naming:** Descriptive names with action prefix
146160

147161
**Files:**
162+
148163
- `define-config-schema.js` - Theme configuration schema definition
149164

150165
#### scripts/validation/
166+
151167
- **Purpose:** Validation scripts
152168
- **Naming:** `validate-[what].js` or `audit-[what].js`
153169

154170
**Files:**
171+
155172
- `validate-mustache-schema.js` - Mustache variable validation
156173
- `validate-agent-frontmatter.js` - Agent frontmatter validation
157174
- `validate-config-schema.js` - Configuration validation wrapper
@@ -164,6 +181,7 @@ User-facing documentation and guides.
164181
**Naming:** `[TOPIC_NAME].md` (uppercase with underscores)
165182

166183
**Files:**
184+
167185
- `GENERATE_THEME.md` - Theme generation guide
168186
- `RELEASE_PROCESS.md` - Release process (templated)
169187
- `RELEASE_PROCESS_SCAFFOLD.md` - Scaffold release (deleted in generated themes)
@@ -176,6 +194,7 @@ User-facing documentation and guides.
176194
Runtime logs from scripts and agents.
177195

178196
**Structure:**
197+
179198
```
180199
logs/
181200
├── agents/ # Agent execution logs
@@ -198,16 +217,16 @@ logs/
198217

199218
### Files
200219

201-
| Type | Convention | Example |
202-
|------|------------|---------|
203-
| Documentation | `UPPERCASE_WITH_UNDERSCORES.md` | `GENERATE_THEME.md` |
204-
| Instructions | `kebab-case.instructions.md` | `release.instructions.md` |
205-
| Agents | `kebab-case.agent.md/js` | `generate-theme.agent.js` |
206-
| Schemas | `kebab-case.schema.json` | `theme-config.schema.json` |
207-
| Reports | `YYYY-MM-DD-kebab-case.ext` | `2025-12-17-coverage.html` |
208-
| Logs | `YYYY-MM-DD-kebab-case.log` | `2025-12-17-build.log` |
209-
| Plans | `YYYY-MM-DD-kebab-case.md` | `2025-12-17-feature-plan.md` |
210-
| Scripts | `action-subject.js` | `validate-mustache-schema.js` |
220+
| Type | Convention | Example |
221+
| ------------- | ------------------------------- | ----------------------------- |
222+
| Documentation | `UPPERCASE_WITH_UNDERSCORES.md` | `GENERATE_THEME.md` |
223+
| Instructions | `kebab-case.instructions.md` | `release.instructions.md` |
224+
| Agents | `kebab-case.agent.md/js` | `generate-theme.agent.js` |
225+
| Schemas | `kebab-case.schema.json` | `theme-config.schema.json` |
226+
| Reports | `YYYY-MM-DD-kebab-case.ext` | `2025-12-17-coverage.html` |
227+
| Logs | `YYYY-MM-DD-kebab-case.log` | `2025-12-17-build.log` |
228+
| Plans | `YYYY-MM-DD-kebab-case.md` | `2025-12-17-feature-plan.md` |
229+
| Scripts | `action-subject.js` | `validate-mustache-schema.js` |
211230

212231
### Script Naming Actions
213232

@@ -218,9 +237,9 @@ logs/
218237

219238
### Directories
220239

221-
| Type | Convention | Example |
222-
|------|------------|---------|
223-
| Standard | `kebab-case` | `.github/instructions/` |
240+
| Type | Convention | Example |
241+
| ---------- | ----------------------- | ------------------------------ |
242+
| Standard | `kebab-case` | `.github/instructions/` |
224243
| Namespaced | `category/subcategory/` | `.github/reports/coverage/js/` |
225244

226245
## Gitignore Rules
@@ -268,6 +287,7 @@ output-theme/
268287
### In Scaffold Repository
269288

270289
Files containing mustache variables:
290+
271291
- `style.css`
272292
- `functions.php`
273293
- `theme.json`
@@ -279,22 +299,26 @@ Files containing mustache variables:
279299
### After Generation
280300

281301
All `{{variables}}` replaced except in:
302+
282303
- Documentation examples (intentional)
283304
- Archived/deleted scaffold-specific files
284305

285306
## Workflow Integration
286307

287308
### Build Process
309+
288310
```
289311
src/ → (webpack/sass) → build/ → (package) → dist/
290312
```
291313

292314
### Generation Process
315+
293316
```
294317
scaffold/ → (generate-theme.js) → output-theme/
295318
```
296319

297320
### Testing Process
321+
298322
```
299323
src/ + tests/ → (jest/phpunit/playwright) → .github/reports/coverage/
300324
```

.github/instructions/generate-theme.instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ applyTo: ".github/prompts/generate-theme.prompt.md"
66

77
# Generate Theme Instructions
88

9+
> **Critical Rule:**
10+
> Never strip or replace `{{mustache}}` placeholders in the scaffold repository. Only replace them during theme generation, never in the scaffold itself.
11+
912
You are a theme generation assistant. Follow our mustache-driven scaffold patterns to collect inputs, validate them, and drive the generator scripts. Avoid hard-coding defaults, skipping validation, or leaving scaffold-only files in the generated output.
1013

1114
This file provides comprehensive instructions for AI agents using the `generate-theme.prompt.md` prompt to guide users through WordPress block theme generation using the mustache template system.

.github/prompts/create-release-scaffold.prompt.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ This prompt defines the interactive **Release Scaffold Wizard** for the block th
88

99
---
1010

11+
## Integration with Wizard Library
12+
13+
- The wizard steps and config schema defined here are implemented in `scripts/lib/wizard.js`.
14+
- Supported interfaces: CLI, JSON, ENV, mock, HTTP, YAML, stdin (see wizard.js for details).
15+
- Each wizard step maps to a config schema field and is used by the release-scaffold agent and scripts.
16+
17+
## Mustache Placeholder Protection
18+
19+
- **Never strip or replace `{{mustache}}` placeholders in the scaffold repository.**
20+
- Placeholders are only replaced during theme generation, not in the scaffold itself.
21+
- The wizard and all release-scaffold processes must validate that placeholders are present before release.
22+
23+
---
24+
1125
## 🚀 Block Theme Scaffold Release Interactive Wizard
1226

1327
The Release Scaffold Wizard guides you step-by-step through preparing and publishing a new block theme scaffold release. Use this wizard for all release-scaffold.\* processes, including automation and manual runs.

0 commit comments

Comments
 (0)