Skip to content

Commit bf56ab8

Browse files
committed
clean up repo and improve theme generation
1 parent d548d21 commit bf56ab8

File tree

7 files changed

+52
-42
lines changed

7 files changed

+52
-42
lines changed

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

Lines changed: 51 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,41 @@ To start generating a new theme, simply say:
3535

3636
### Stage 1: Core Identity (Required)
3737

38-
| Question | Variable | Example | Validation |
39-
|----------|----------|---------|------------|
40-
| Theme display name | `{{theme_name}}` | "Tour Starter" | Min 2 chars |
41-
| Theme slug | `{{theme_slug}}` | "tour-starter" | Lowercase, hyphens, min 2 chars |
42-
| Description | `{{description}}` | "A modern block theme" | Any text |
43-
| Author name | `{{author}}` | "LightSpeed" | Min 2 chars |
44-
| Author website | `{{author_uri}}` | "https://example.com" | Valid URL |
38+
| Question | Variable | Example | Validation |
39+
| ------------------ | ----------------- | ---------------------- | ------------------------------- |
40+
| Theme display name | `{{theme_name}}` | "Tour Starter" | Min 2 chars |
41+
| Theme slug | `{{theme_slug}}` | "tour-starter" | Lowercase, hyphens, min 2 chars |
42+
| Description | `{{description}}` | "A modern block theme" | Any text |
43+
| Author name | `{{author}}` | "LightSpeed" | Min 2 chars |
44+
| Author website | `{{author_uri}}` | "https://example.com" | Valid URL |
4545

4646
### Stage 2: Versioning (Has Defaults)
4747

48-
| Question | Variable | Default | Notes |
49-
|----------|----------|---------|-------|
50-
| Initial version | `{{version}}` | "1.0.0" | Semver format |
51-
| Minimum WordPress | `{{min_wp_version}}` | "6.5" | Block theme requires 6.0+ |
52-
| Tested WordPress | `{{tested_wp_version}}` | "6.7" | Latest stable |
53-
| Minimum PHP | `{{min_php_version}}` | "8.0" | PHP 8.0+ recommended |
48+
| Question | Variable | Default | Notes |
49+
| ----------------- | ----------------------- | ------- | ------------------------- |
50+
| Initial version | `{{version}}` | "1.0.0" | Semver format |
51+
| Minimum WordPress | `{{min_wp_version}}` | "6.5" | Block theme requires 6.0+ |
52+
| Tested WordPress | `{{tested_wp_version}}` | "6.7" | Latest stable |
53+
| Minimum PHP | `{{min_php_version}}` | "8.0" | PHP 8.0+ recommended |
5454

5555
### Stage 3: Design Tokens (Optional)
5656

57-
| Question | Variable | Default | Format |
58-
|----------|----------|---------|--------|
59-
| Primary colour | `{{primary_color}}` | "#0073aa" | Hex colour |
60-
| Secondary colour | `{{secondary_color}}` | "#005177" | Hex colour |
61-
| Background colour | `{{background_color}}` | "#ffffff" | Hex colour |
62-
| Text colour | `{{text_color}}` | "#1a1a1a" | Hex colour |
63-
| Body font family | `{{font_family}}` | "system-ui" | CSS font-family |
64-
| Heading font | `{{heading_font}}` | "inherit" | CSS font-family |
57+
| Question | Variable | Default | Format |
58+
| ----------------- | ---------------------- | ----------- | --------------- |
59+
| Primary colour | `{{primary_color}}` | "#0073aa" | Hex colour |
60+
| Secondary colour | `{{secondary_color}}` | "#005177" | Hex colour |
61+
| Background colour | `{{background_color}}` | "#ffffff" | Hex colour |
62+
| Text colour | `{{text_color}}` | "#1a1a1a" | Hex colour |
63+
| Body font family | `{{font_family}}` | "system-ui" | CSS font-family |
64+
| Heading font | `{{heading_font}}` | "inherit" | CSS font-family |
6565

6666
### Stage 4: Initial Content (Optional)
6767

68-
| Question | Variable | Default |
69-
|----------|----------|---------|
70-
| Homepage hero title | `{{hero_title}}` | "Welcome" |
71-
| Call-to-action text | `{{cta_text}}` | "Get Started" |
72-
| Footer copyright | `{{footer_text}}` | "© {{author}}" |
68+
| Question | Variable | Default |
69+
| ------------------- | ----------------- | -------------- |
70+
| Homepage hero title | `{{hero_title}}` | "Welcome" |
71+
| Call-to-action text | `{{cta_text}}` | "Get Started" |
72+
| Footer copyright | `{{footer_text}}` | "© {{author}}" |
7373

7474
---
7575

@@ -84,42 +84,45 @@ To start generating a new theme, simply say:
8484
**Stage 1: Core Identity**
8585

8686
Please provide:
87+
8788
1. **Theme Name** — The display name (e.g., 'Tour Starter Theme')
8889
2. **Theme Slug** — URL-safe identifier (e.g., 'tour-starter')
8990
3. **Description** — What does your theme do?
9091
4. **Author Name** — Who is creating this?
9192
5. **Author URI** — Your website URL
9293

93-
*You can answer all at once or one by one.*"
94+
_You can answer all at once or one by one._"
9495

9596
### Confirming Responses
9697

9798
**User**: "
99+
98100
1. Safari Lodge Theme
99101
2. safari-lodge
100102
3. A luxurious WordPress theme for safari lodges and eco-tourism
101103
4. LightSpeed
102-
5. https://developer.lsdev.biz"
104+
5. https://lightspeedwp.agency/"
103105

104106
**Me**: "Perfect! I've captured your Stage 1 answers:
105107

106-
| Field | Value |
107-
|-------|-------|
108-
| Theme Name | Safari Lodge Theme |
109-
| Theme Slug | safari-lodge |
108+
| Field | Value |
109+
| ----------- | ------------------------------------------------------------- |
110+
| Theme Name | Safari Lodge Theme |
111+
| Theme Slug | safari-lodge |
110112
| Description | A luxurious WordPress theme for safari lodges and eco-tourism |
111-
| Author | LightSpeed |
112-
| Author URI | https://developer.lsdev.biz |
113+
| Author | LightSpeed |
114+
| Author URI | https://lightspeedwp.agency/ |
113115

114116
**Stage 2: Versioning**
115117

116118
Would you like to use defaults?
119+
117120
- Version: 1.0.0
118121
- Min WP: 6.5
119122
- Tested WP: 6.7
120123
- Min PHP: 8.0
121124

122-
*Say 'yes' for defaults, or provide custom values.*"
125+
_Say 'yes' for defaults, or provide custom values._"
123126

124127
### Proceeding with Defaults
125128

@@ -131,7 +134,7 @@ Would you like to use defaults?
131134

132135
Would you like to configure custom colours and fonts now, or skip to generation?
133136

134-
*Say 'skip' to use defaults, or provide your brand colours.*"
137+
_Say 'skip' to use defaults, or provide your brand colours._"
135138

136139
### Skipping Optional Stages
137140

@@ -140,6 +143,7 @@ Would you like to configure custom colours and fonts now, or skip to generation?
140143
**Me**: "Ready to generate!
141144

142145
**Summary:**
146+
143147
```
144148
Theme Name: Safari Lodge Theme
145149
Theme Slug: safari-lodge
@@ -158,15 +162,15 @@ Min PHP: 8.0
158162

159163
**User**: "yes"
160164

161-
**Me**: *Runs the generation script:*
165+
**Me**: _Runs the generation script:_
162166

163167
```bash
164168
cd /path/to/block-theme-scaffold && node bin/generate-theme.js \
165169
--slug "safari-lodge" \
166170
--name "Safari Lodge Theme" \
167171
--description "A luxurious WordPress theme for safari lodges and eco-tourism" \
168172
--author "LightSpeed" \
169-
--author_uri "https://developer.lsdev.biz" \
173+
--author_uri "https://lightspeedwp.agency/" \
170174
--version "1.0.0" \
171175
--min_wp_version "6.5" \
172176
--tested_wp_version "6.7" \
@@ -178,6 +182,7 @@ cd /path/to/block-theme-scaffold && node bin/generate-theme.js \
178182
Your new theme is at: `./output-theme/`
179183

180184
**Next Steps:**
185+
181186
1. Move the theme to your WordPress themes directory
182187
2. Run `npm install` to install dependencies
183188
3. Run `npm run start` to begin development
@@ -190,20 +195,24 @@ Would you like me to help you with any of these steps?"
190195
## Validation Rules
191196

192197
### Slug Validation
198+
193199
- Lowercase letters, numbers, hyphens only
194200
- Minimum 2 characters
195201
- No path traversal characters
196202
- No spaces or special characters
197203

198204
### URL Validation
205+
199206
- Must be http:// or https://
200207
- Must be a valid URL format
201208

202209
### Version Validation
210+
203211
- Must follow semver (X.Y.Z or X.Y)
204212
- Examples: 1.0.0, 2.1, 1.0.0-beta.1
205213

206214
### Colour Validation
215+
207216
- Must be valid hex colour (#RGB or #RRGGBB)
208217
- Examples: #fff, #ffffff, #0073aa
209218

@@ -218,6 +227,7 @@ If validation fails, I'll explain the issue and ask for a corrected value:
218227
> ❌ "my theme!" is not a valid slug.
219228
>
220229
> Slugs must:
230+
>
221231
> - Use only lowercase letters, numbers, and hyphens
222232
> - Be at least 2 characters long
223233
>
@@ -231,6 +241,8 @@ If validation fails, I'll explain the issue and ask for a corrected value:
231241

232242
- [Generate Theme Script](../../bin/generate-theme.js)
233243
- [Generate Theme Prompt](../prompts/generate-theme.prompt.md)
244+
- [Generate Theme Instructions](../instructions/generate-theme.instructions.md)
234245
- [Development Assistant](./development-assistant.agent.md)
246+
- [Development Assistant](./block-theme-build.agent.md)
235247
- [Theme JSON Instructions](../instructions/theme-json.instructions.md)
236-
- [Coding Standards](../instructions/coding-standards.instructions.md)
248+
- [PHP Coding Standards](../instructions/php-wordpress.instructions.md)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ Text color (default: #1a1a1a):
228228
| `{{heading_font_name}}` | `"System Font"` | Display name for headings font |
229229
| `{{body_font_family}}` | `"system-ui, sans-serif"` | CSS font stack for body |
230230
| `{{body_font_name}}` | `"System Font"` | Display name for body font |
231-
| `{{mono_font_family}}` | `"monospace"` | CSS font stack for code |
232-
| `{{mono_font_name}}` | `"Monospace"` | Display name for mono font |
233231

234232
**Font family format:**
235233

docs/standardising-colours-fonts-spacing.md renamed to docs/STYLES.md

File renamed without changes.

docs/generate-theme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ node bin/generate-theme.js \
562562
--name "Tour Starter Theme" \
563563
--description "A modern WordPress block theme designed for tour operators and travel agencies" \
564564
--author "LightSpeed" \
565-
--author_uri "https://developer.lsdev.biz" \
565+
--author_uri "https://developer.lightspeedwp.agency/" \
566566
--version "1.0.0"
567567
```
568568

File renamed without changes.

0 commit comments

Comments
 (0)