Skip to content

Commit f58d13b

Browse files
authored
Merge pull request #4 from lightspeedwp/feature/markdown-reference-guardrail
PR: Feature/markdown reference guardrail
2 parents 78adf5f + 990f556 commit f58d13b

File tree

497 files changed

+69332
-10756
lines changed

Some content is hidden

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

497 files changed

+69332
-10756
lines changed

.babelrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["@wordpress/babel-preset-default"]
2+
"presets": [ "@wordpress/babel-preset-default" ]
33
}

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"[php]": {
3535
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
3636
},
37-
"eslint.validate": ["javascript", "javascriptreact"],
38-
"stylelint.validate": ["css", "scss", "postcss"],
37+
"eslint.validate": [ "javascript", "javascriptreact" ],
38+
"stylelint.validate": [ "css", "scss", "postcss" ],
3939
"files.associations": {
4040
"*.php": "php",
4141
"*.html": "html"
@@ -49,7 +49,7 @@
4949
}
5050
},
5151

52-
"forwardPorts": [8080, 8443, 3306],
52+
"forwardPorts": [ 8080, 8443, 3306 ],
5353

5454
"postCreateCommand": "npm ci && composer install",
5555

.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true,
6+
es2021: true,
7+
jest: true, // Add Jest global variables
8+
},
9+
extends: [
10+
'plugin:jest/recommended',
11+
'plugin:jest/style',
12+
'eslint:recommended',
13+
'prettier',
14+
],
15+
plugins: [ 'jest' ],
16+
overrides: [
17+
{
18+
files: [ 'tests/**/*.js' ],
19+
env: {
20+
jest: true,
21+
},
22+
globals: {
23+
jest: 'readonly',
24+
describe: 'readonly',
25+
it: 'readonly',
26+
test: 'readonly',
27+
beforeAll: 'readonly',
28+
afterAll: 'readonly',
29+
beforeEach: 'readonly',
30+
afterEach: 'readonly',
31+
expect: 'readonly',
32+
},
33+
},
34+
],
35+
};
File renamed without changes.

.github/__tests__/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# README for Test Helpers
2+
3+
This folder contains shared test helpers for Jest and Playwright.
4+
5+
- Place all shared test helpers here.
6+
- Add new helpers as needed for test consistency.
7+
8+
See `.github/instructions/jest-tests.instructions.md` for Jest usage and conventions.

.github/__tests__/test-helper.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Shared test helpers for Jest and Playwright
3+
*
4+
* Use for common setup, teardown, and utility functions across JS and E2E tests.
5+
*
6+
* - Use TestLogger for consistent logging
7+
* - Use retryOperation for async retries
8+
* - Add Playwright helpers for block theme E2E
9+
*/
10+
11+
const TestLogger = require('../.github/tests/test-logger');
12+
const { retryOperation } = require('../scripts/utils/test-utils');
13+
14+
// Example: Playwright helper for theme activation
15+
async function activateTheme(page, themeSlug) {
16+
await page.goto('/wp-admin/themes.php');
17+
await page.click(`button[aria-label="Activate ${themeSlug}"]`);
18+
}
19+
20+
// Example: Playwright helper for block rendering
21+
async function renderBlock(page, blockName) {
22+
await page.goto('/wp-admin/post-new.php');
23+
await page.click('button[aria-label="Add block"]');
24+
await page.type('input[placeholder="Search for a block"]', blockName);
25+
await page.click(`button[aria-label="${blockName}"]`);
26+
}
27+
28+
module.exports = {
29+
TestLogger,
30+
retryOperation,
31+
activateTheme,
32+
renderBlock,
33+
};

.github/agents/a11y.agent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ description: "Block Theme Accessibility Expert — WCAG-aligned guidance and act
33
name: "Block Theme Accessibility Expert"
44
model: GPT-4.1
55
tools: ["vscode", "execute/testFailure", "execute/getTerminalOutput", "execute/runTask", "execute/getTaskOutput", "execute/createAndRunTask", "execute/runInTerminal", "execute/runTests", "read/problems", "read/readFile", "read/terminalSelection", "read/terminalLastCommand", "edit/editFiles", "search", "web"]
6+
permissions: ["read", "write", "execute", "filesystem", "shell"]
7+
metadata:
8+
guardrails: |
9+
Only apply types/labels from canonical configs. Never overwrite without warning. Validate all content. Log all actions. Preserve user data integrity.
610
---
711

812
# Block Theme Accessibility Expert (WCAG & WordPress)

.github/agents/block-theme-build.agent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ audience: "Developers, AI Agents"
77
model: "GPT-4.1"
88
date: 2025-12-01
99
tools: ["search", "edit", "fetch"]
10+
permissions: ["read", "write", "execute", "filesystem", "network", "shell"]
11+
metadata:
12+
guardrails: |
13+
Only apply types/labels from canonical configs. Never overwrite without warning. Validate all content. Log all actions. Preserve user data integrity.
1014
---
1115

1216
# Block Theme Build Agent Spec

.github/agents/development-assistant.agent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
name: Block Theme Development Assistant
33
description: AI development assistant for WordPress block theme development
44
tools: ["search", "edit", "fetch", "semantic_search", "read_file", "grep_search", "file_search", "run_in_terminal", "grep_search", "file_search", "run_in_terminal", file_search, run_in_terminal]
5+
permissions: ["read", "write", "execute", "filesystem", "network", "shell"]
6+
metadata:
7+
guardrails: |
8+
Only apply types/labels from canonical configs. Never overwrite without warning. Validate all content. Log all actions. Preserve user data integrity.
59
---
610

711
# Block Theme Development Assistant

.github/agents/gemini.agent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ category: Project
55
type: Reference
66
audience: AI Assistants, Developers
77
date: 2025-12-01
8+
tools: ["search", "edit", "fetch", "web"]
9+
permissions: ["read", "write", "network", "shell", "filesystem"]
10+
metadata:
11+
guardrails: |
12+
Only apply types/labels from canonical configs. Never overwrite without warning. Validate all content. Log all actions. Preserve user data integrity.
813
---
914

1015
## Overview

0 commit comments

Comments
 (0)