From ffbb97759734d3c771620d88c360758f4ff27abe Mon Sep 17 00:00:00 2001 From: Ashley Shaw Date: Thu, 25 Sep 2025 00:38:37 +0700 Subject: [PATCH 1/7] Add comprehensive coding standards documentation - Introduced JSON schema for wp-env configuration files. - Established accessibility guidelines based on WCAG 2.2 AA. - Documented alignment decisions and matrix for coding practices. - Outlined standards for block development and inline documentation. - Created checklists for accessibility, performance, PRs, releases, and security. - Compiled common standards for PHP, JS, CSS, HTML, and documentation. - Defined CSS standards including BEM naming and fluid typography. - Added examples for blocks, CSS, HTML, JS, and PHP. - Specified theme.json guidelines for token definitions and formatting. - Implemented tooling documentation for CI, EditorConfig, ESLint, PHPCS, Stylelint, and WooCommerce guidelines. --- .browserslistrc | 4 + .eslintrc.json | 24 + .github/agents/a11y-auditor.md | 2 + .../accessibility-auditor.agent copy.md | 512 +++ .github/agents/accessibility-auditor.agent.md | 533 ++- .github/agents/block-architect.agent copy.md | 386 ++ .github/agents/block-architect.agent.md | 386 ++ .github/agents/block-architect.md | 2 + .github/agents/standards-guru.md | 2 + .github/agents/theme-architect.agent copy.md | 532 +++ .github/agents/theme-architect.agent.md | 532 +++ .github/agents/woocommerce-specialist.md | 2 + .../accessibility-expert.chatmode.md | 351 ++ .../block-plugin-developer.chatmode.md | 247 ++ .../block-theme-developer.chatmode.md | 168 + .github/chatmodes/qna.chatmode.md | 2 + .github/chatmodes/reviewer.chatmode.md | 2 + .github/chatmodes/scaffolder.chatmode.md | 2 + .../frontend-web-dev.collection.yml | 3 +- .../project-planning.collection.yml | 3 +- .../security-best-practices.collection.yml | 3 +- .../technical-spike.collection.yml | 3 +- .../testing-automation.collection.yml | 3 +- .github/instructions/Blocks.instructions.md | 1 + .github/instructions/CSS.instructions.md | 1 + .github/instructions/JS.instructions.md | 1 + .github/instructions/JSON.instructions.md | 1 + .github/instructions/PHP.instructions.md | 1 + .../javascript-react.instructions.md | 581 +++ .../php-wordpress.instructions.md | 341 ++ .../instructions/theme-json.instructions.md | 524 +++ .github/linting/yamllint.yml | 15 + .github/prompts/a11y-review.md | 2 + .github/prompts/accessibility-audit.prompt.md | 276 ++ .../prompts/configure-theme-json.prompt.md | 217 ++ .../prompts/create-block-patterns.prompt.md | 231 ++ .../prompts/create-gutenberg-block.prompt.md | 106 + .github/prompts/fix-lint.md | 2 + .github/prompts/generate-block.md | 2 + .github/prompts/refactor-to-bem.md | 2 + .github/workflows/lint-docs.yml | 50 + .markdownlint.json | 28 + .prettierignore | 27 + .stylelintrc.json | 7 + .vscode/mcp.json | 37 +- .vscode/settings.json | 3 +- CODE_OF_CONDUCT.md | 2 +- REMOVAL_RECOMMENDATIONS.md | 114 +- SECURITY.md | 56 +- SUPPORT.md | 8 +- docs-unified/MIGRATION-SUMMARY.md | 153 + docs-unified/NAVIGATION-INDEX.md | 206 ++ docs-unified/README.md | 113 + docs-unified/ai-copilot/README.md | 155 + docs-unified/ai-copilot/agents-md.md | 15 + docs-unified/ai-copilot/chatmodes.md | 26 + docs-unified/ai-copilot/claude-agents.md | 28 + .../ai-copilot/copilot-instructions.md | 28 + docs-unified/ai-copilot/gemini-md.md | 13 + docs-unified/ai-copilot/issue-templates.md | 122 + docs-unified/ai-copilot/pr-templates.md | 27 + docs-unified/ai-copilot/prompt-files.md | 30 + docs-unified/ai-copilot/prompts/README.md | 10 + .../ai-copilot/prompts/a11y-audit.iprompt.md | 3 + docs-unified/ai-copilot/prompts/a11y-audit.md | 3 + .../ai-copilot/prompts/a11y-auditor-agent.md | 3 + .../ai-copilot/prompts/a11y-checker.agent.md | 3 + .../prompts/a11y-expert.chatmode.md | 8 + .../ai-copilot/prompts/a11y-review.iprompt.md | 6 + .../ai-copilot/prompts/a11y-reviewer.agent.md | 5 + .../ai-copilot/prompts/a11y.chatmode.md | 6 + .../ai-copilot/prompts/a11y.instructions.md | 6 + .../accessibility-a11y.instructions.md | 10 + .../prompts/accessibility-audit.prompt.md | 276 ++ .../prompts/accessibility-auditor.agent.md | 512 +++ .../prompts/accessibility-expert.chatmode.md | 351 ++ docs-unified/ai-copilot/prompts/agents.md | 10 + .../ai-copilot/prompts/architect.chatmode.md | 9 + .../prompts/block-architect.agent.md | 386 ++ docs-unified/ai-copilot/prompts/block-json.md | 4 + .../prompts/block-pattern-author-agent.md | 3 + .../prompts/block-pattern-validator.agent.md | 4 + .../block-plugin-developer.chatmode.md | 247 ++ .../prompts/block-theme-developer.chatmode.md | 168 + .../ai-copilot/prompts/block_audit_agent.md | 9 + .../prompts/breakdown-epic-pm.prompt.md | 7 + .../prompts/breakdown-feature-prd.prompt.md | 7 + .../prompts/breakdown-plan.prompt.md | 7 + .../prompts/breakdown-test.prompt.md | 5 + .../prompts/bugfix-diff-analysis.md | 3 + .../ai-copilot/prompts/bugfix-risk.iprompt.md | 3 + .../prompts/build-shortcode.prompt.md | 4 + .../ai-copilot/prompts/changelog-drafter.md | 3 + .../prompts/changelog-generator.prompt.md | 7 + .../prompts/changelog-lines.iprompt.md | 8 + .../ai-copilot/prompts/changelog.chatmode.md | 16 + .../ai-copilot/prompts/changelog.iprompt.md | 3 + docs-unified/ai-copilot/prompts/chat-modes.md | 10 + docs-unified/ai-copilot/prompts/chatmodes.md | 4 + .../ai-copilot/prompts/code-governor.agent.md | 5 + .../ai-copilot/prompts/code-review-checks.md | 3 + .../prompts/coding-standards.instructions.md | 7 + .../prompts/configure-theme-json.prompt.md | 217 ++ .../prompts/copilot-instructions.md | 13 + .../prompts/create-block-patterns.prompt.md | 231 ++ .../ai-copilot/prompts/create-block.prompt.md | 4 + .../prompts/create-gutenberg-block.prompt.md | 106 + .../prompts/create-pattern.iprompt.md | 14 + .../ai-copilot/prompts/custom-instructions.md | 28 + .../ai-copilot/prompts/docs-editor.agent.md | 4 + .../prompts/docs-from-comments.iprompt.md | 6 + .../ai-copilot/prompts/docs-writer.agent.md | 9 + .../prompts/docs-writer.chatmode.md | 8 + .../prompts/docs-writeup.iprompt.md | 7 + .../ai-copilot/prompts/docs.chatmode.md | 6 + .../ai-copilot/prompts/docs.instructions.md | 5 + .../prompts/governance.instructions.md | 7 + .../ai-copilot/prompts/i18n.instructions.md | 7 + .../ai-copilot/prompts/instructions.md | 5 + .../prompts/integrate-into-repos.md | 3 + .../ai-copilot/prompts/issue-splitter.md | 3 + .../prompts/javascript-react.instructions.md | 581 +++ .../prompts/javascript.instructions.md | 4 + .../prompts/js-test-suggester.agent.md | 3 + .../ai-copilot/prompts/js-ts.instructions.md | 5 + .../ai-copilot/prompts/mcp-quickstart.md | 3 + .../ai-copilot/prompts/migration-bot.agent.md | 7 + .../pattern-architecture.instructions.md | 9 + .../prompts/pattern-authoring.instructions.md | 18 + .../prompts/pattern-authoring.iprompt.md | 3 + .../pattern-block-type.instructions.md | 8 + .../ai-copilot/prompts/pattern-bot.agent.md | 10 + .../prompts/pattern-starter.instructions.md | 11 + .../prompts/pattern-template.instructions.md | 10 + .../pattern-woocommerce.instructions.md | 8 + .../ai-copilot/prompts/perf-sweep.iprompt.md | 7 + .../prompts/performance-coach-agent.md | 3 + .../prompts/performance-sweeper.agent.md | 5 + .../prompts/performance-tuner.chatmode.md | 8 + .../prompts/performance.instructions.md | 8 + .../prompts/php-docs-writer.agent.md | 3 + .../prompts/php-render-callback.iprompt.md | 8 + .../prompts/php-wordpress.instructions.md | 4 + .../ai-copilot/prompts/php.instructions.md | 5 + .../ai-copilot/prompts/plan.chatmode.md | 20 + .../ai-copilot/prompts/planner.chatmode.md | 3 + .../prompts/playwright-e2e.iprompt.md | 3 + .../ai-copilot/prompts/playwright-e2e.md | 3 + .../ai-copilot/prompts/playwright-tests.md | 3 + .../prompts/pr-description.iprompt.md | 10 + .../ai-copilot/prompts/pr-description.md | 3 + .../prompts/pr-review-wpcs.prompt.md | 4 + .../ai-copilot/prompts/pr-review.iprompt.md | 9 + .../prompts/pr-writing.instructions.md | 5 + .../ai-copilot/prompts/prompt-files.md | 16 + .../ai-copilot/prompts/prompt-library.md | 33 + docs-unified/ai-copilot/prompts/prompts.md | 5 + .../prompts/query-loop-grid.iprompt.md | 11 + .../prompts/refactor-pattern.iprompt.md | 8 + .../prompts/refactor-plan.iprompt.md | 3 + .../prompts/refactor-to-sync-block.iprompt.md | 9 + .../ai-copilot/prompts/refactor.chatmode.md | 6 + .../ai-copilot/prompts/release-bot.agent.md | 9 + .../prompts/release-manager.chatmode.md | 3 + .../ai-copilot/prompts/repo-sweeper.agent.md | 3 + .../prompts/repository-instructions.md | 3 + .../ai-copilot/prompts/review.chatmode.md | 6 + .../ai-copilot/prompts/review.instructions.md | 9 + .../ai-copilot/prompts/reviewer-bot.agent.md | 9 + .../ai-copilot/prompts/reviewer.chatmode.md | 3 + .../prompts/scaffold-hero.iprompt.md | 16 + .../ai-copilot/prompts/scaffold.chatmode.md | 6 + .../ai-copilot/prompts/scrumban-planner.md | 3 + .../prompts/security.instructions.md | 5 + .../prompts/starter-page.iprompt.md | 10 + .../prompts/strict-reviewer.chatmode.md | 9 + .../ai-copilot/prompts/support.chatmode.md | 3 + .../ai-copilot/prompts/teacher.chatmode.md | 3 + .../ai-copilot/prompts/test-writer.agent.md | 8 + .../prompts/test-writer.chatmode.md | 8 + .../prompts/testing-engineer.agent.md | 5 + .../ai-copilot/prompts/testing.chatmode.md | 6 + .../prompts/testing.instructions.md | 12 + .../prompts/theme-architect.agent.md | 532 +++ .../prompts/theme-json.instructions.md | 524 +++ .../prompts/theme-reviewer-agent.md | 3 + .../prompts/themejson.instructions.md | 6 + .../prompts/unit-e2e-tests.iprompt.md | 8 + .../prompts/unit-tests-js.iprompt.md | 3 + .../ai-copilot/prompts/unit-tests-js.md | 3 + .../prompts/unit-tests-php.iprompt.md | 3 + .../ai-copilot/prompts/unit-tests-php.md | 3 + docs-unified/ai-copilot/prompts/unit-tests.md | 3 + .../prompts/woo-collection.iprompt.md | 10 + .../prompts/woo-layout-coach.agent.md | 5 + .../ai-copilot/prompts/woo.chatmode.md | 6 + .../prompts/wordpress-dev.chatmode.md | 18 + .../prompts/wp-pattern-architect.agent.md | 5 + .../prompts/wp-security.instructions.md | 7 + .../prompts/wporg-release.prompt.md | 4 + .../prompts/write-e2e-tests.iprompt.md | 10 + .../prompts/write-hooks-reference.prompt.md | 4 + docs-unified/ai-copilot/saved-replies.md | 7 + .../schemas/chatmode-frontmatter-schema.md | 6 + .../schemas/claude-subagent-schema.md | 6 + .../ai-copilot/schemas/issue-form-schema.md | 23 + .../schemas/prompt-frontmatter-schema.md | 7 + ...luidTypography-Fluid-Spacing-Guidelines.md | 343 ++ docs-unified/block-themes/README.md | 44 + docs-unified/block-themes/_temp.txt | 348 ++ .../best-practices-best-practices-.md | 518 +++ ...-practices-fluid-spacing-and typography.md | 47 + docs-unified/block-themes/block-styles.md | 55 + docs-unified/block-themes/colour-palettes.md | 25 + docs-unified/block-themes/css-specificity.md | 43 + docs-unified/block-themes/fluid-spacing.md | 240 ++ docs-unified/block-themes/fluid-typography.md | 65 + docs-unified/block-themes/global-styles.md | 78 + .../block-themes/naming-conventions.md | 112 + docs-unified/block-themes/patterns.md | 36 + docs-unified/block-themes/section-styles.md | 333 ++ docs-unified/block-themes/spacing-presets.md | 142 + .../standardising-colours-fonts-spacing.md | 282 ++ docs-unified/block-themes/style-variations.md | 24 + docs-unified/block-themes/templates.md | 25 + docs-unified/block-themes/theme-68.json | 2733 ++++++++++++++ .../block-themes/theme-structure-epi.md | 53 + docs-unified/block-themes/typesets.md | 23 + docs-unified/devops/README.md | 185 + .../devops/devops/build/wordpress-scripts.md | 16 + .../devops/devops/ci-cd/github-actions.md | 16 + docs-unified/devops/devops/ci-cd/overview.md | 9 + docs-unified/devops/gitops/gitops.md | 5 + docs-unified/devops/metrics/dora.md | 9 + .../devops/release/release-process.md | 7 + docs-unified/devops/security/devsecops.md | 7 + docs-unified/devops/testing/phpunit.md | 5 + docs-unified/devops/testing/playwright.md | 9 + .../devops/wordpress/gitflow-branching.md | 3 + .../wordpress/local-migration-commands.md | 3 + .../wordpress/release-process-wordpress.md | 3 + docs-unified/project-management/README.md | 161 + .../methodologies/README.md | 24 + .../methodologies/agile/agile-manifesto.md | 28 + .../methodologies/agile/agile-overview.md | 28 + .../copilot/breakdown-epic-pm.prompt.md | 7 + .../copilot/breakdown-feature-prd.prompt.md | 7 + .../copilot/breakdown-plan.prompt.md | 7 + .../copilot/breakdown-test.prompt.md | 5 + .../copilot/changelog-generator.prompt.md | 7 + .../copilot/changelog.chatmode.md | 16 + .../copilot/copilot-instructions.md | 13 + .../methodologies/copilot/plan.chatmode.md | 20 + .../copilot/wordpress-dev.chatmode.md | 18 + .../agile-project-management-field-guide.md | 33 + .../field-guides/auto-changelog.md | 26 + .../field-guides/block-dev-planning.md | 28 + .../methodologies/kanban/kanban-basics.md | 28 + .../methodologies/kanban/kanban-boards.md | 28 + .../methodologies/kanban/kanban-cards.md | 28 + .../methodologies/kanban/kanban-principles.md | 28 + .../methodologies/kanban/kanban-vs-scrum.md | 28 + .../kanban/kanban:-wip-limits.md | 28 + .../kanban/kanplan-backlog+kanban.md | 28 + .../agile-project-management.md | 28 + .../project-management/agile-workflow.md | 28 + .../continuous-improvement.md | 28 + .../epics,-stories,-themes.md | 28 + .../project-management/epics-deep-dive.md | 28 + .../project-management/estimation.md | 28 + .../project-management/lean-methodology.md | 28 + .../project-management/lean-principles-5.md | 28 + .../project-management-intro.md | 28 + .../project-management/scrumban.md | 28 + .../project-management/user-stories.md | 28 + .../methodologies/scrum/scrum-framework.md | 28 + .../methodologies/scrum/scrum:-backlogs.md | 28 + .../scrum/scrum:-retrospectives.md | 28 + .../scrum/scrum:-sprint-planning.md | 28 + .../methodologies/scrum/scrum:-sprints.md | 28 + .../methodologies/scrum/scrum:-standups.md | 28 + .../workflows/00-overview.md | 6 + .../workflows/01-discovery.md | 4 + .../workflows/02-content-collection.md | 4 + .../workflows/03-prototype.md | 4 + .../workflows/04-staging-feedback.md | 4 + .../project-management/workflows/05-launch.md | 5 + docs-unified/reference/README.md | 203 ++ docs-unified/standards/README.md | 187 + .../standards/documentation/README.md | 48 + .../YAML Frontmatter Cheat Sheet.md | 525 +++ ...Hub, Copilot, Claude, and Gemini Files1.md | 30 + .../YAML-Frontmatter Schema-Guidelines.md | 906 +++++ ...-Frontmatter-Copilot-Space-Instructions.md | 628 ++++ docs-unified/standards/language-style.md | 70 + docs-unified/templates/README.md | 204 ++ docs-unified/tooling/README.md | 203 ++ docs-unified/wordpress/README.md | 132 + .../wordpress/coding-standards/README.md | 47 + .../wordpress/coding-standards/_temp.md | 167 + .../coding-standards/accessibility.md | 8 + .../coding-standards/alignment/decisions.md | 5 + .../coding-standards/alignment/matrix.md | 8 + .../ash-research/0-common-standards.md | 22 + .../ash-research/1-accessibility.md | 26 + .../coding-standards/ash-research/2-php.md | 69 + .../ash-research/4-javascript.md | 43 + .../coding-standards/ash-research/5-css.md | 36 + .../ash-research/6-inline-documentation.md | 48 + .../ash-research/7-markdown.md | 24 + .../coding-standards/ash-research/8-json.md | 28 + .../9-fluid-spacing-typography.md | 43 + .../coding-standards/ash-research/README.md | 32 + .../wordpress/coding-standards/blocks.md | 18 + .../coding-standards/checklists/a11y.md | 5 + .../checklists/performance.md | 4 + .../coding-standards/checklists/pr.md | 5 + .../coding-standards/checklists/release.md | 4 + .../coding-standards/checklists/security.md | 4 + .../wordpress/coding-standards/common.md | 8 + .../wordpress/coding-standards/css.md | 7 + .../examples/blocks/README.md | 3 + .../coding-standards/examples/css/README.md | 3 + .../coding-standards/examples/html/README.md | 3 + .../coding-standards/examples/js/README.md | 3 + .../coding-standards/examples/php/README.md | 3 + .../fluid-typography-spacing.md | 9 + .../wordpress/coding-standards/html.md | 6 + .../coding-standards/idiomatic-css.md | 380 ++ .../wordpress/coding-standards/index copy.md | 5 + .../wordpress/coding-standards/index.md | 20 + .../inline-documentation-standards.md | 21 + .../javascript.md | 459 +++ .../inline-documentation-standards/php.md | 556 +++ .../coding-standards/inline-documentation.md | 6 + .../wordpress/coding-standards/javascript.md | 7 + .../wordpress/coding-standards/php.md | 20 + .../wordpress/coding-standards/styleguide.md | 210 ++ .../wordpress/coding-standards/theme-json.md | 5 + .../wordpress/coding-standards/tooling/ci.md | 3 + .../coding-standards/tooling/editorconfig.md | 3 + .../coding-standards/tooling/eslint.md | 3 + .../coding-standards/tooling/phpcs.md | 4 + .../coding-standards/tooling/stylelint.md | 3 + .../wordpress/coding-standards/woocommerce.md | 5 + .../wordpress-coding-standards.md | 27 + .../accessibility.md | 152 + .../wordpress-coding-standards/css.md | 299 ++ .../wordpress-coding-standards/html.md | 108 + .../wordpress-coding-standards/javascript.md | 600 +++ .../wordpress-coding-standards/php.md | 1031 ++++++ .../gutenberg/getting-started/README.md | 41 + .../getting-started/devenv/README.md | 61 + .../devenv/get-started-with-create-block.md | 95 + .../devenv/get-started-with-wp-env.md | 144 + .../devenv/get-started-with-wp-scripts.md | 150 + .../devenv/nodejs-development-environment.md | 50 + .../gutenberg/getting-started/faq.md | 218 ++ .../getting-started/fundamentals/README.md | 12 + .../fundamentals/block-in-the-editor.md | 169 + .../fundamentals/block-json.md | 135 + .../fundamentals/block-wrapper.md | 111 + .../fundamentals/file-structure-of-a-block.md | 90 + .../javascript-in-the-block-editor.md | 94 + .../markup-representation-block.md | 51 + .../fundamentals/registration-of-a-block.md | 99 + .../fundamentals/static-dynamic-rendering.md | 179 + .../gutenberg/getting-started/glossary.md | 139 + .../getting-started/quick-start-guide.md | 54 + .../gutenberg/getting-started/tutorial.md | 1014 ++++++ .../gutenberg/how-to-guides/README.md | 45 + .../gutenberg/how-to-guides/accessibility.md | 17 + .../how-to-guides/block-tutorial/README.md | 11 + .../applying-styles-with-stylesheets.md | 161 + .../block-tutorial/creating-dynamic-blocks.md | 143 + .../extending-the-query-loop-block.md | 288 ++ .../nested-blocks-inner-blocks.md | 286 ++ .../curating-the-editor-experience/README.md | 25 + .../block-locking.md | 69 + .../disable-editor-functionality.md | 125 + .../filters-and-hooks.md | 179 + .../patterns.md | 90 + .../theme-json.md | 206 ++ .../data-basics/1-data-basics-setup.md | 216 ++ .../data-basics/2-building-a-list-of-pages.md | 450 +++ .../data-basics/3-building-an-edit-form.md | 553 +++ .../4-building-a-create-page-form.md | 396 ++ .../data-basics/5-adding-a-delete-button.md | 449 +++ .../how-to-guides/data-basics/README.md | 16 + .../media/create-form/basic-create-form.png | Bin 0 -> 13661 bytes .../media/create-form/create-button.png | Bin 0 -> 14027 bytes .../create-form/create-form-with-text.png | Bin 0 -> 14539 bytes .../media/create-form/create-saving.png | Bin 0 -> 12428 bytes .../media/create-form/created-item.png | Bin 0 -> 17946 bytes .../media/create-form/edit-page-form.png | Bin 0 -> 13294 bytes .../media/delete-button/delete-button.png | Bin 0 -> 23426 bytes .../delete-button/deleting-in-progress.png | Bin 0 -> 24541 bytes .../media/delete-button/snackbar-error.png | Bin 0 -> 39681 bytes .../media/delete-button/snackbar-example.png | Bin 0 -> 105614 bytes .../media/delete-button/snackbar-success.png | Bin 0 -> 29029 bytes .../media/delete-button/snackbar.png | Bin 0 -> 11739 bytes .../media/edit-form/edit-button.png | Bin 0 -> 12091 bytes .../media/edit-form/form-editable.png | Bin 0 -> 12261 bytes .../media/edit-form/form-error.png | Bin 0 -> 15712 bytes .../media/edit-form/form-finished.png | Bin 0 -> 23509 bytes .../media/edit-form/form-inactive.png | Bin 0 -> 10996 bytes .../media/edit-form/form-populated.png | Bin 0 -> 10003 bytes .../media/edit-form/form-scaffold.png | Bin 0 -> 9020 bytes .../media/edit-form/form-spinner.png | Bin 0 -> 11636 bytes .../media/edit-form/modal-initial.png | Bin 0 -> 10134 bytes .../data-basics/media/finished-app.jpg | Bin 0 -> 30857 bytes .../media/list-of-pages/fetch-the-data.jpg | Bin 0 -> 5643 bytes .../media/list-of-pages/filter-field.jpg | Bin 0 -> 13440 bytes .../media/list-of-pages/filter.jpg | Bin 0 -> 10651 bytes .../media/list-of-pages/indicator.jpg | Bin 0 -> 8116 bytes .../media/list-of-pages/make-a-table.jpg | Bin 0 -> 11771 bytes .../media/list-of-pages/no-results.jpg | Bin 0 -> 8510 bytes .../media/list-of-pages/pages-list.jpg | Bin 0 -> 91665 bytes .../media/list-of-pages/part1-finished.jpg | Bin 0 -> 15755 bytes .../media/list-of-pages/simple-list.jpg | Bin 0 -> 2878 bytes .../media/list-of-pages/unclear-status.jpg | Bin 0 -> 9861 bytes .../data-basics/media/setup/hello-from-js.jpg | Bin 0 -> 3033 bytes .../enqueueing-assets-in-the-editor.md | 120 + .../gutenberg/how-to-guides/feature-flags.md | 107 + .../gutenberg/how-to-guides/format-api.md | 237 ++ .../how-to-guides/internationalization.md | 231 ++ .../gutenberg/how-to-guides/metabox.md | 266 ++ .../gutenberg/how-to-guides/notices/README.md | 82 + .../notices/block-editor-notice.png | Bin 0 -> 54307 bytes .../notices/classic-editor-notice.png | Bin 0 -> 57344 bytes .../how-to-guides/platform/README.md | 61 + .../platform/custom-block-editor.md | 545 +++ .../how-to-guides/plugin-sidebar-0.md | 410 +++ .../how-to-guides/propagating-updates.md | 61 + .../gutenberg/how-to-guides/themes/README.md | 22 + .../themes/global-settings-and-styles.md | 1425 ++++++++ .../how-to-guides/themes/theme-support.md | 513 +++ .../gutenberg/how-to-guides/thunks.md | 227 ++ .../gutenberg/how-to-guides/widgets/README.md | 9 + .../widgets/legacy-widget-block.md | 193 + .../how-to-guides/widgets/opting-out.md | 44 + .../how-to-guides/widgets/overview.md | 31 + .../gutenberg/reference-guides/README.md | 71 + .../reference-guides/block-api/README.md | 22 + .../block-api/block-annotations.md | 61 + .../block-api/block-api-versions.md | 16 + .../block-api/block-attributes.md | 496 +++ .../block-api/block-bindings.md | 332 ++ .../block-api/block-context.md | 168 + .../block-api/block-deprecation.md | 205 ++ .../block-api/block-edit-save.md | 348 ++ .../block-api/block-metadata.md | 842 +++++ .../block-api/block-patterns.md | 206 ++ .../block-api/block-registration.md | 371 ++ .../block-api/block-selectors.md | 120 + .../block-api/block-styles.md | 142 + .../block-api/block-supports.md | 1120 ++++++ .../block-api/block-templates.md | 184 + .../block-api/block-transforms.md | 360 ++ .../block-api/block-variations.md | 248 ++ .../gutenberg/reference-guides/core-blocks.md | 1017 ++++++ .../gutenberg/reference-guides/data/README.md | 20 + .../data/data-core-annotations.md | 23 + .../data/data-core-block-directory.md | 223 ++ .../data/data-core-block-editor.md | 1913 ++++++++++ .../reference-guides/data/data-core-blocks.md | 721 ++++ .../data/data-core-commands.md | 129 + .../data/data-core-customize-widgets.md | 86 + .../data/data-core-edit-post.md | 559 +++ .../data/data-core-edit-site.md | 448 +++ .../data/data-core-edit-widgets.md | 362 ++ .../reference-guides/data/data-core-editor.md | 1752 +++++++++ .../data/data-core-keyboard-shortcuts.md | 440 +++ .../data/data-core-notices.md | 404 +++ .../reference-guides/data/data-core-nux.md | 93 + .../data/data-core-preferences.md | 84 + .../data/data-core-reusable-blocks.md | 22 + .../data/data-core-rich-text.md | 162 + .../data/data-core-viewport.md | 52 + .../reference-guides/data/data-core.md | 912 +++++ .../reference-guides/filters/README.md | 7 + .../filters/autocomplete-filters.md | 45 + .../reference-guides/filters/block-filters.md | 583 +++ .../filters/editor-filters.md | 247 ++ .../filters/global-styles-filters.md | 42 + .../reference-guides/filters/i18n-filters.md | 109 + .../filters/parser-filters.md | 36 + .../interactivity-api/README.md | 124 + .../interactivity-api/api-reference.md | 1413 ++++++++ .../interactivity-api/core-concepts/README.md | 11 + .../core-concepts/server-side-rendering.md | 491 +++ .../the-reactive-and-declarative-mindset.md | 318 ++ ...l-state-local-context-and-derived-state.md | 842 +++++ .../core-concepts/using-typescript.md | 791 ++++ .../interactivity-api/iapi-about.md | 195 + .../interactivity-api/iapi-faq.md | 136 + .../iapi-quick-start-guide.md | 51 + .../gutenberg/reference-guides/packages.md | 55 + .../gutenberg/reference-guides/richtext.md | 91 + .../reference-guides/slotfills/README.md | 369 ++ .../slotfills/main-dashboard-button.md | 57 + .../plugin-block-settings-menu-item.md | 30 + .../plugin-document-setting-panel.md | 100 + .../slotfills/plugin-more-menu-item.md | 28 + .../slotfills/plugin-post-publish-panel.md | 24 + .../slotfills/plugin-post-status-info.md | 22 + .../slotfills/plugin-pre-publish-panel.md | 24 + .../plugin-sidebar-more-menu-item.md | 80 + .../slotfills/plugin-sidebar.md | 69 + .../theme-json-reference/README.md | 11 + .../theme-json-reference/styles-versions.md | 57 + .../theme-json-reference/theme-json-living.md | 361 ++ .../wordpress/gutenberg/schemas/README.md | 79 + .../gutenberg/schemas/json/block.json | 1000 +++++ .../schemas/json/font-collection.json | 146 + .../gutenberg/schemas/json/theme.json | 2755 ++++++++++++++ .../gutenberg/schemas/json/wp-env.json | 163 + docs/block-themes/README.md | 2 +- docs/block-themes/block-styles.md | 18 +- docs/block-themes/colour-palettes.md | 1 - docs/block-themes/css-specificity.md | 8 +- docs/block-themes/fluid-spacing.md | 26 +- docs/block-themes/section-styles.md | 38 +- docs/block-themes/spacing-presets.md | 30 +- .../standardising-colours-fonts-spacing.md | 97 +- docs/block-themes/typesets.md | 2 +- docs/coding-standards/README.md | 2 +- docs/coding-standards/accessibility.md | 8 + docs/coding-standards/alignment/decisions.md | 5 + docs/coding-standards/alignment/matrix.md | 8 + .../ash-research/6-inline-documentation.md | 4 +- .../ash-research/7-markdown.md | 4 +- docs/coding-standards/blocks.md | 18 + docs/coding-standards/checklists/a11y.md | 5 + .../checklists/performance.md | 4 + docs/coding-standards/checklists/pr.md | 5 + docs/coding-standards/checklists/release.md | 4 + docs/coding-standards/checklists/security.md | 4 + docs/coding-standards/common.md | 8 + docs/coding-standards/css.md | 7 + .../examples/blocks/README.md | 3 + docs/coding-standards/examples/css/README.md | 3 + docs/coding-standards/examples/html/README.md | 3 + docs/coding-standards/examples/js/README.md | 3 + docs/coding-standards/examples/php/README.md | 3 + .../fluid-typography-spacing.md | 9 + docs/coding-standards/html.md | 6 + docs/coding-standards/index copy.md | 5 + docs/coding-standards/inline-documentation.md | 6 + docs/coding-standards/javascript.md | 7 + docs/coding-standards/php.md | 20 + docs/coding-standards/theme-json.md | 5 + docs/coding-standards/tooling/ci.md | 3 + docs/coding-standards/tooling/editorconfig.md | 3 + docs/coding-standards/tooling/eslint.md | 3 + docs/coding-standards/tooling/phpcs.md | 4 + docs/coding-standards/tooling/stylelint.md | 3 + docs/coding-standards/woocommerce.md | 5 + docs/frontmatter/README.md | 2 +- ...-Frontmatter-Copilot-Space-Instructions.md | 38 +- .../devenv/nodejs-development-environment.md | 2 +- docs/gutenberg/getting-started/faq.md | 1 - .../fundamentals/block-json.md | 2 +- .../markup-representation-block.md | 2 +- .../block-tutorial/creating-dynamic-blocks.md | 4 - .../nested-blocks-inner-blocks.md | 2 - .../block-locking.md | 2 +- .../filters-and-hooks.md | 2 +- .../patterns.md | 2 +- .../theme-json.md | 2 +- .../data-basics/2-building-a-list-of-pages.md | 2 +- .../how-to-guides/propagating-updates.md | 1 - .../themes/global-settings-and-styles.md | 4 +- .../how-to-guides/themes/theme-support.md | 4 +- .../block-api/block-attributes.md | 2 +- .../block-api/block-bindings.md | 2 - .../filters/autocomplete-filters.md | 1 - .../interactivity-api/api-reference.md | 8 +- .../iapi-quick-start-guide.md | 2 - docs/gutenberg/reference-guides/richtext.md | 1 - .../reference-guides/slotfills/README.md | 4 +- package-lock.json | 3220 +++++++++++++++-- package.json | 14 +- scripts/audit-links.js | 131 +- scripts/create-collection.js | 10 +- scripts/en-gb-normalise.js | 208 +- scripts/lint-agents.js | 94 +- scripts/update-readme.js | 2 +- scripts/validate-collections.js | 10 +- scripts/yaml-parser.js | 4 +- 590 files changed, 67381 insertions(+), 757 deletions(-) create mode 100644 .browserslistrc create mode 100644 .eslintrc.json create mode 100644 .github/agents/a11y-auditor.md create mode 100644 .github/agents/accessibility-auditor.agent copy.md create mode 100644 .github/agents/block-architect.agent copy.md create mode 100644 .github/agents/block-architect.agent.md create mode 100644 .github/agents/block-architect.md create mode 100644 .github/agents/standards-guru.md create mode 100644 .github/agents/theme-architect.agent copy.md create mode 100644 .github/agents/theme-architect.agent.md create mode 100644 .github/agents/woocommerce-specialist.md create mode 100644 .github/chatmodes/accessibility-expert.chatmode.md create mode 100644 .github/chatmodes/block-plugin-developer.chatmode.md create mode 100644 .github/chatmodes/block-theme-developer.chatmode.md create mode 100644 .github/chatmodes/qna.chatmode.md create mode 100644 .github/chatmodes/reviewer.chatmode.md create mode 100644 .github/chatmodes/scaffolder.chatmode.md create mode 100644 .github/instructions/Blocks.instructions.md create mode 100644 .github/instructions/CSS.instructions.md create mode 100644 .github/instructions/JS.instructions.md create mode 100644 .github/instructions/JSON.instructions.md create mode 100644 .github/instructions/PHP.instructions.md create mode 100644 .github/instructions/javascript-react.instructions.md create mode 100644 .github/instructions/php-wordpress.instructions.md create mode 100644 .github/instructions/theme-json.instructions.md create mode 100644 .github/linting/yamllint.yml create mode 100644 .github/prompts/a11y-review.md create mode 100644 .github/prompts/accessibility-audit.prompt.md create mode 100644 .github/prompts/configure-theme-json.prompt.md create mode 100644 .github/prompts/create-block-patterns.prompt.md create mode 100644 .github/prompts/create-gutenberg-block.prompt.md create mode 100644 .github/prompts/fix-lint.md create mode 100644 .github/prompts/generate-block.md create mode 100644 .github/prompts/refactor-to-bem.md create mode 100644 .github/workflows/lint-docs.yml create mode 100644 .markdownlint.json create mode 100644 .prettierignore create mode 100644 .stylelintrc.json create mode 100644 docs-unified/MIGRATION-SUMMARY.md create mode 100644 docs-unified/NAVIGATION-INDEX.md create mode 100644 docs-unified/README.md create mode 100644 docs-unified/ai-copilot/README.md create mode 100644 docs-unified/ai-copilot/agents-md.md create mode 100644 docs-unified/ai-copilot/chatmodes.md create mode 100644 docs-unified/ai-copilot/claude-agents.md create mode 100644 docs-unified/ai-copilot/copilot-instructions.md create mode 100644 docs-unified/ai-copilot/gemini-md.md create mode 100644 docs-unified/ai-copilot/issue-templates.md create mode 100644 docs-unified/ai-copilot/pr-templates.md create mode 100644 docs-unified/ai-copilot/prompt-files.md create mode 100644 docs-unified/ai-copilot/prompts/README.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-audit.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-audit.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-auditor-agent.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-checker.agent.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-expert.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-review.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/a11y-reviewer.agent.md create mode 100644 docs-unified/ai-copilot/prompts/a11y.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/a11y.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/accessibility-a11y.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/accessibility-audit.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/accessibility-auditor.agent.md create mode 100644 docs-unified/ai-copilot/prompts/accessibility-expert.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/agents.md create mode 100644 docs-unified/ai-copilot/prompts/architect.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/block-architect.agent.md create mode 100644 docs-unified/ai-copilot/prompts/block-json.md create mode 100644 docs-unified/ai-copilot/prompts/block-pattern-author-agent.md create mode 100644 docs-unified/ai-copilot/prompts/block-pattern-validator.agent.md create mode 100644 docs-unified/ai-copilot/prompts/block-plugin-developer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/block-theme-developer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/block_audit_agent.md create mode 100644 docs-unified/ai-copilot/prompts/breakdown-epic-pm.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/breakdown-feature-prd.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/breakdown-plan.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/breakdown-test.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/bugfix-diff-analysis.md create mode 100644 docs-unified/ai-copilot/prompts/bugfix-risk.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/build-shortcode.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/changelog-drafter.md create mode 100644 docs-unified/ai-copilot/prompts/changelog-generator.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/changelog-lines.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/changelog.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/changelog.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/chat-modes.md create mode 100644 docs-unified/ai-copilot/prompts/chatmodes.md create mode 100644 docs-unified/ai-copilot/prompts/code-governor.agent.md create mode 100644 docs-unified/ai-copilot/prompts/code-review-checks.md create mode 100644 docs-unified/ai-copilot/prompts/coding-standards.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/configure-theme-json.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/copilot-instructions.md create mode 100644 docs-unified/ai-copilot/prompts/create-block-patterns.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/create-block.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/create-gutenberg-block.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/create-pattern.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/custom-instructions.md create mode 100644 docs-unified/ai-copilot/prompts/docs-editor.agent.md create mode 100644 docs-unified/ai-copilot/prompts/docs-from-comments.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/docs-writer.agent.md create mode 100644 docs-unified/ai-copilot/prompts/docs-writer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/docs-writeup.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/docs.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/docs.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/governance.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/i18n.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/instructions.md create mode 100644 docs-unified/ai-copilot/prompts/integrate-into-repos.md create mode 100644 docs-unified/ai-copilot/prompts/issue-splitter.md create mode 100644 docs-unified/ai-copilot/prompts/javascript-react.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/javascript.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/js-test-suggester.agent.md create mode 100644 docs-unified/ai-copilot/prompts/js-ts.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/mcp-quickstart.md create mode 100644 docs-unified/ai-copilot/prompts/migration-bot.agent.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-architecture.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-authoring.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-authoring.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-block-type.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-bot.agent.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-starter.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-template.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/pattern-woocommerce.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/perf-sweep.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/performance-coach-agent.md create mode 100644 docs-unified/ai-copilot/prompts/performance-sweeper.agent.md create mode 100644 docs-unified/ai-copilot/prompts/performance-tuner.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/performance.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/php-docs-writer.agent.md create mode 100644 docs-unified/ai-copilot/prompts/php-render-callback.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/php-wordpress.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/php.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/plan.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/planner.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/playwright-e2e.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/playwright-e2e.md create mode 100644 docs-unified/ai-copilot/prompts/playwright-tests.md create mode 100644 docs-unified/ai-copilot/prompts/pr-description.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/pr-description.md create mode 100644 docs-unified/ai-copilot/prompts/pr-review-wpcs.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/pr-review.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/pr-writing.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/prompt-files.md create mode 100644 docs-unified/ai-copilot/prompts/prompt-library.md create mode 100644 docs-unified/ai-copilot/prompts/prompts.md create mode 100644 docs-unified/ai-copilot/prompts/query-loop-grid.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/refactor-pattern.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/refactor-plan.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/refactor-to-sync-block.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/refactor.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/release-bot.agent.md create mode 100644 docs-unified/ai-copilot/prompts/release-manager.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/repo-sweeper.agent.md create mode 100644 docs-unified/ai-copilot/prompts/repository-instructions.md create mode 100644 docs-unified/ai-copilot/prompts/review.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/review.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/reviewer-bot.agent.md create mode 100644 docs-unified/ai-copilot/prompts/reviewer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/scaffold-hero.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/scaffold.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/scrumban-planner.md create mode 100644 docs-unified/ai-copilot/prompts/security.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/starter-page.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/strict-reviewer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/support.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/teacher.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/test-writer.agent.md create mode 100644 docs-unified/ai-copilot/prompts/test-writer.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/testing-engineer.agent.md create mode 100644 docs-unified/ai-copilot/prompts/testing.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/testing.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/theme-architect.agent.md create mode 100644 docs-unified/ai-copilot/prompts/theme-json.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/theme-reviewer-agent.md create mode 100644 docs-unified/ai-copilot/prompts/themejson.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/unit-e2e-tests.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/unit-tests-js.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/unit-tests-js.md create mode 100644 docs-unified/ai-copilot/prompts/unit-tests-php.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/unit-tests-php.md create mode 100644 docs-unified/ai-copilot/prompts/unit-tests.md create mode 100644 docs-unified/ai-copilot/prompts/woo-collection.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/woo-layout-coach.agent.md create mode 100644 docs-unified/ai-copilot/prompts/woo.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/wordpress-dev.chatmode.md create mode 100644 docs-unified/ai-copilot/prompts/wp-pattern-architect.agent.md create mode 100644 docs-unified/ai-copilot/prompts/wp-security.instructions.md create mode 100644 docs-unified/ai-copilot/prompts/wporg-release.prompt.md create mode 100644 docs-unified/ai-copilot/prompts/write-e2e-tests.iprompt.md create mode 100644 docs-unified/ai-copilot/prompts/write-hooks-reference.prompt.md create mode 100644 docs-unified/ai-copilot/saved-replies.md create mode 100644 docs-unified/ai-copilot/schemas/chatmode-frontmatter-schema.md create mode 100644 docs-unified/ai-copilot/schemas/claude-subagent-schema.md create mode 100644 docs-unified/ai-copilot/schemas/issue-form-schema.md create mode 100644 docs-unified/ai-copilot/schemas/prompt-frontmatter-schema.md create mode 100644 docs-unified/block-themes/FluidTypography-Fluid-Spacing-Guidelines.md create mode 100644 docs-unified/block-themes/README.md create mode 100644 docs-unified/block-themes/_temp.txt create mode 100644 docs-unified/block-themes/best-practices-best-practices-.md create mode 100644 docs-unified/block-themes/best-practices-fluid-spacing-and typography.md create mode 100644 docs-unified/block-themes/block-styles.md create mode 100644 docs-unified/block-themes/colour-palettes.md create mode 100644 docs-unified/block-themes/css-specificity.md create mode 100644 docs-unified/block-themes/fluid-spacing.md create mode 100644 docs-unified/block-themes/fluid-typography.md create mode 100644 docs-unified/block-themes/global-styles.md create mode 100644 docs-unified/block-themes/naming-conventions.md create mode 100644 docs-unified/block-themes/patterns.md create mode 100644 docs-unified/block-themes/section-styles.md create mode 100644 docs-unified/block-themes/spacing-presets.md create mode 100644 docs-unified/block-themes/standardising-colours-fonts-spacing.md create mode 100644 docs-unified/block-themes/style-variations.md create mode 100644 docs-unified/block-themes/templates.md create mode 100644 docs-unified/block-themes/theme-68.json create mode 100644 docs-unified/block-themes/theme-structure-epi.md create mode 100644 docs-unified/block-themes/typesets.md create mode 100644 docs-unified/devops/README.md create mode 100644 docs-unified/devops/devops/build/wordpress-scripts.md create mode 100644 docs-unified/devops/devops/ci-cd/github-actions.md create mode 100644 docs-unified/devops/devops/ci-cd/overview.md create mode 100644 docs-unified/devops/gitops/gitops.md create mode 100644 docs-unified/devops/metrics/dora.md create mode 100644 docs-unified/devops/release/release-process.md create mode 100644 docs-unified/devops/security/devsecops.md create mode 100644 docs-unified/devops/testing/phpunit.md create mode 100644 docs-unified/devops/testing/playwright.md create mode 100644 docs-unified/devops/wordpress/gitflow-branching.md create mode 100644 docs-unified/devops/wordpress/local-migration-commands.md create mode 100644 docs-unified/devops/wordpress/release-process-wordpress.md create mode 100644 docs-unified/project-management/README.md create mode 100644 docs-unified/project-management/methodologies/README.md create mode 100644 docs-unified/project-management/methodologies/agile/agile-manifesto.md create mode 100644 docs-unified/project-management/methodologies/agile/agile-overview.md create mode 100644 docs-unified/project-management/methodologies/copilot/breakdown-epic-pm.prompt.md create mode 100644 docs-unified/project-management/methodologies/copilot/breakdown-feature-prd.prompt.md create mode 100644 docs-unified/project-management/methodologies/copilot/breakdown-plan.prompt.md create mode 100644 docs-unified/project-management/methodologies/copilot/breakdown-test.prompt.md create mode 100644 docs-unified/project-management/methodologies/copilot/changelog-generator.prompt.md create mode 100644 docs-unified/project-management/methodologies/copilot/changelog.chatmode.md create mode 100644 docs-unified/project-management/methodologies/copilot/copilot-instructions.md create mode 100644 docs-unified/project-management/methodologies/copilot/plan.chatmode.md create mode 100644 docs-unified/project-management/methodologies/copilot/wordpress-dev.chatmode.md create mode 100644 docs-unified/project-management/methodologies/field-guides/agile-project-management-field-guide.md create mode 100644 docs-unified/project-management/methodologies/field-guides/auto-changelog.md create mode 100644 docs-unified/project-management/methodologies/field-guides/block-dev-planning.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban-basics.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban-boards.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban-cards.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban-principles.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban-vs-scrum.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanban:-wip-limits.md create mode 100644 docs-unified/project-management/methodologies/kanban/kanplan-backlog+kanban.md create mode 100644 docs-unified/project-management/methodologies/project-management/agile-project-management.md create mode 100644 docs-unified/project-management/methodologies/project-management/agile-workflow.md create mode 100644 docs-unified/project-management/methodologies/project-management/continuous-improvement.md create mode 100644 docs-unified/project-management/methodologies/project-management/epics,-stories,-themes.md create mode 100644 docs-unified/project-management/methodologies/project-management/epics-deep-dive.md create mode 100644 docs-unified/project-management/methodologies/project-management/estimation.md create mode 100644 docs-unified/project-management/methodologies/project-management/lean-methodology.md create mode 100644 docs-unified/project-management/methodologies/project-management/lean-principles-5.md create mode 100644 docs-unified/project-management/methodologies/project-management/project-management-intro.md create mode 100644 docs-unified/project-management/methodologies/project-management/scrumban.md create mode 100644 docs-unified/project-management/methodologies/project-management/user-stories.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum-framework.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum:-backlogs.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum:-retrospectives.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum:-sprint-planning.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum:-sprints.md create mode 100644 docs-unified/project-management/methodologies/scrum/scrum:-standups.md create mode 100644 docs-unified/project-management/workflows/00-overview.md create mode 100644 docs-unified/project-management/workflows/01-discovery.md create mode 100644 docs-unified/project-management/workflows/02-content-collection.md create mode 100644 docs-unified/project-management/workflows/03-prototype.md create mode 100644 docs-unified/project-management/workflows/04-staging-feedback.md create mode 100644 docs-unified/project-management/workflows/05-launch.md create mode 100644 docs-unified/reference/README.md create mode 100644 docs-unified/standards/README.md create mode 100644 docs-unified/standards/documentation/README.md create mode 100644 docs-unified/standards/documentation/YAML Frontmatter Cheat Sheet.md create mode 100644 docs-unified/standards/documentation/YAML Frontmatter Schemas for GitHub, Copilot, Claude, and Gemini Files1.md create mode 100644 docs-unified/standards/documentation/YAML-Frontmatter Schema-Guidelines.md create mode 100644 docs-unified/standards/documentation/YAML-Frontmatter-Copilot-Space-Instructions.md create mode 100644 docs-unified/standards/language-style.md create mode 100644 docs-unified/templates/README.md create mode 100644 docs-unified/tooling/README.md create mode 100644 docs-unified/wordpress/README.md create mode 100644 docs-unified/wordpress/coding-standards/README.md create mode 100644 docs-unified/wordpress/coding-standards/_temp.md create mode 100644 docs-unified/wordpress/coding-standards/accessibility.md create mode 100644 docs-unified/wordpress/coding-standards/alignment/decisions.md create mode 100644 docs-unified/wordpress/coding-standards/alignment/matrix.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/0-common-standards.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/1-accessibility.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/2-php.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/4-javascript.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/5-css.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/6-inline-documentation.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/7-markdown.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/8-json.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/9-fluid-spacing-typography.md create mode 100644 docs-unified/wordpress/coding-standards/ash-research/README.md create mode 100644 docs-unified/wordpress/coding-standards/blocks.md create mode 100644 docs-unified/wordpress/coding-standards/checklists/a11y.md create mode 100644 docs-unified/wordpress/coding-standards/checklists/performance.md create mode 100644 docs-unified/wordpress/coding-standards/checklists/pr.md create mode 100644 docs-unified/wordpress/coding-standards/checklists/release.md create mode 100644 docs-unified/wordpress/coding-standards/checklists/security.md create mode 100644 docs-unified/wordpress/coding-standards/common.md create mode 100644 docs-unified/wordpress/coding-standards/css.md create mode 100644 docs-unified/wordpress/coding-standards/examples/blocks/README.md create mode 100644 docs-unified/wordpress/coding-standards/examples/css/README.md create mode 100644 docs-unified/wordpress/coding-standards/examples/html/README.md create mode 100644 docs-unified/wordpress/coding-standards/examples/js/README.md create mode 100644 docs-unified/wordpress/coding-standards/examples/php/README.md create mode 100644 docs-unified/wordpress/coding-standards/fluid-typography-spacing.md create mode 100644 docs-unified/wordpress/coding-standards/html.md create mode 100644 docs-unified/wordpress/coding-standards/idiomatic-css.md create mode 100644 docs-unified/wordpress/coding-standards/index copy.md create mode 100644 docs-unified/wordpress/coding-standards/index.md create mode 100644 docs-unified/wordpress/coding-standards/inline-documentation-standards.md create mode 100644 docs-unified/wordpress/coding-standards/inline-documentation-standards/javascript.md create mode 100644 docs-unified/wordpress/coding-standards/inline-documentation-standards/php.md create mode 100644 docs-unified/wordpress/coding-standards/inline-documentation.md create mode 100644 docs-unified/wordpress/coding-standards/javascript.md create mode 100644 docs-unified/wordpress/coding-standards/php.md create mode 100644 docs-unified/wordpress/coding-standards/styleguide.md create mode 100644 docs-unified/wordpress/coding-standards/theme-json.md create mode 100644 docs-unified/wordpress/coding-standards/tooling/ci.md create mode 100644 docs-unified/wordpress/coding-standards/tooling/editorconfig.md create mode 100644 docs-unified/wordpress/coding-standards/tooling/eslint.md create mode 100644 docs-unified/wordpress/coding-standards/tooling/phpcs.md create mode 100644 docs-unified/wordpress/coding-standards/tooling/stylelint.md create mode 100644 docs-unified/wordpress/coding-standards/woocommerce.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards/accessibility.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards/css.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards/html.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards/javascript.md create mode 100644 docs-unified/wordpress/coding-standards/wordpress-coding-standards/php.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/README.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/devenv/README.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/devenv/get-started-with-create-block.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/devenv/get-started-with-wp-env.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/devenv/get-started-with-wp-scripts.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/devenv/nodejs-development-environment.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/faq.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/README.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/block-in-the-editor.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/block-json.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/block-wrapper.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/file-structure-of-a-block.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/javascript-in-the-block-editor.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/markup-representation-block.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/registration-of-a-block.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/fundamentals/static-dynamic-rendering.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/glossary.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/quick-start-guide.md create mode 100644 docs-unified/wordpress/gutenberg/getting-started/tutorial.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/accessibility.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/block-tutorial/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/block-tutorial/creating-dynamic-blocks.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/block-tutorial/extending-the-query-loop-block.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/block-tutorial/nested-blocks-inner-blocks.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/block-locking.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/filters-and-hooks.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/patterns.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/curating-the-editor-experience/theme-json.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/1-data-basics-setup.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/2-building-a-list-of-pages.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/3-building-an-edit-form.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/4-building-a-create-page-form.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/5-adding-a-delete-button.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/basic-create-form.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/create-button.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/create-form-with-text.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/create-saving.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/created-item.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/create-form/edit-page-form.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/delete-button.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/deleting-in-progress.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/snackbar-error.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/snackbar-example.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/snackbar-success.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/delete-button/snackbar.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/edit-button.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-editable.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-error.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-finished.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-inactive.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-populated.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-scaffold.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/form-spinner.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/edit-form/modal-initial.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/finished-app.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/fetch-the-data.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/filter-field.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/filter.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/indicator.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/make-a-table.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/no-results.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/pages-list.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/part1-finished.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/simple-list.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/list-of-pages/unclear-status.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/data-basics/media/setup/hello-from-js.jpg create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/enqueueing-assets-in-the-editor.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/feature-flags.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/format-api.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/internationalization.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/metabox.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/notices/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/notices/block-editor-notice.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/notices/classic-editor-notice.png create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/platform/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/platform/custom-block-editor.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/plugin-sidebar-0.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/propagating-updates.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/themes/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/themes/global-settings-and-styles.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/themes/theme-support.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/thunks.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/widgets/README.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/widgets/legacy-widget-block.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/widgets/opting-out.md create mode 100644 docs-unified/wordpress/gutenberg/how-to-guides/widgets/overview.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-annotations.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-api-versions.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-attributes.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-bindings.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-context.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-deprecation.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-edit-save.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-metadata.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-patterns.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-registration.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-selectors.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-styles.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-supports.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-templates.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-transforms.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/block-api/block-variations.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/core-blocks.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-annotations.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-block-directory.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-block-editor.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-blocks.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-commands.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-customize-widgets.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-edit-post.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-edit-site.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-edit-widgets.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-editor.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-keyboard-shortcuts.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-notices.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-nux.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-preferences.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-reusable-blocks.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-rich-text.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core-viewport.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/data/data-core.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/autocomplete-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/block-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/editor-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/global-styles-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/i18n-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/filters/parser-filters.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/api-reference.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/core-concepts/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/core-concepts/server-side-rendering.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/core-concepts/the-reactive-and-declarative-mindset.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/core-concepts/undestanding-global-state-local-context-and-derived-state.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/core-concepts/using-typescript.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/iapi-about.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/iapi-faq.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/interactivity-api/iapi-quick-start-guide.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/packages.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/richtext.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/main-dashboard-button.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-block-settings-menu-item.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-document-setting-panel.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-more-menu-item.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-post-publish-panel.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-post-status-info.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-pre-publish-panel.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-sidebar-more-menu-item.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/slotfills/plugin-sidebar.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/theme-json-reference/README.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/theme-json-reference/styles-versions.md create mode 100644 docs-unified/wordpress/gutenberg/reference-guides/theme-json-reference/theme-json-living.md create mode 100644 docs-unified/wordpress/gutenberg/schemas/README.md create mode 100644 docs-unified/wordpress/gutenberg/schemas/json/block.json create mode 100644 docs-unified/wordpress/gutenberg/schemas/json/font-collection.json create mode 100644 docs-unified/wordpress/gutenberg/schemas/json/theme.json create mode 100644 docs-unified/wordpress/gutenberg/schemas/json/wp-env.json create mode 100644 docs/coding-standards/accessibility.md create mode 100644 docs/coding-standards/alignment/decisions.md create mode 100644 docs/coding-standards/alignment/matrix.md create mode 100644 docs/coding-standards/blocks.md create mode 100644 docs/coding-standards/checklists/a11y.md create mode 100644 docs/coding-standards/checklists/performance.md create mode 100644 docs/coding-standards/checklists/pr.md create mode 100644 docs/coding-standards/checklists/release.md create mode 100644 docs/coding-standards/checklists/security.md create mode 100644 docs/coding-standards/common.md create mode 100644 docs/coding-standards/css.md create mode 100644 docs/coding-standards/examples/blocks/README.md create mode 100644 docs/coding-standards/examples/css/README.md create mode 100644 docs/coding-standards/examples/html/README.md create mode 100644 docs/coding-standards/examples/js/README.md create mode 100644 docs/coding-standards/examples/php/README.md create mode 100644 docs/coding-standards/fluid-typography-spacing.md create mode 100644 docs/coding-standards/html.md create mode 100644 docs/coding-standards/index copy.md create mode 100644 docs/coding-standards/inline-documentation.md create mode 100644 docs/coding-standards/javascript.md create mode 100644 docs/coding-standards/php.md create mode 100644 docs/coding-standards/theme-json.md create mode 100644 docs/coding-standards/tooling/ci.md create mode 100644 docs/coding-standards/tooling/editorconfig.md create mode 100644 docs/coding-standards/tooling/eslint.md create mode 100644 docs/coding-standards/tooling/phpcs.md create mode 100644 docs/coding-standards/tooling/stylelint.md create mode 100644 docs/coding-standards/woocommerce.md diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..dcf77fa --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,4 @@ +>0.5% +last 2 versions +Firefox ESR +not dead diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..9602b58 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,24 @@ +{ + "env": { + "browser": true, + "es2022": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "prettier" + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "indent": ["error", 4], + "linebreak-style": ["error", "unix"], + "quotes": ["error", "single"], + "semi": ["error", "always"], + "no-console": "warn", + "no-unused-vars": "warn" + }, + "ignorePatterns": ["node_modules/", "dist/", "build/"] +} diff --git a/.github/agents/a11y-auditor.md b/.github/agents/a11y-auditor.md new file mode 100644 index 0000000..3f63858 --- /dev/null +++ b/.github/agents/a11y-auditor.md @@ -0,0 +1,2 @@ +# A11y Auditor +Audit for WCAG 2.2 AA; code-level fixes and testing steps. diff --git a/.github/agents/accessibility-auditor.agent copy.md b/.github/agents/accessibility-auditor.agent copy.md new file mode 100644 index 0000000..0ae9150 --- /dev/null +++ b/.github/agents/accessibility-auditor.agent copy.md @@ -0,0 +1,512 @@ +--- +name: "accessibility-auditor" +description: "WordPress Accessibility Specialist - Comprehensive WCAG auditing, testing, and remediation for WordPress sites, themes, and plugins" +tools: ["codebase", "editFiles", "runCommands", "search", "usages", "runTests"] +model: "gpt-4" +license: "GPL-3.0-or-later" +--- + +# Accessibility Auditor Agent + +I am the Accessibility Auditor Agent, specializing in comprehensive accessibility assessment, testing, and remediation for WordPress websites, themes, and plugins. I ensure WCAG 2.1 AA compliance and create inclusive digital experiences. + +## My Core Responsibilities + +### Accessibility Assessment + +- Conduct comprehensive WCAG 2.1 AA compliance audits +- Perform automated and manual accessibility testing +- Evaluate semantic HTML structure and ARIA implementation +- Assess keyboard navigation and focus management +- Test screen reader compatibility and assistive technology support + +### Code Review & Analysis + +- Review HTML, CSS, and JavaScript for accessibility barriers +- Analyze WordPress theme and plugin accessibility patterns +- Evaluate block editor accessibility implementation +- Assess color contrast, typography, and visual design +- Review form accessibility and user input handling + +### Testing & Validation + +- Execute multi-tool automated accessibility scanning +- Perform manual keyboard and screen reader testing +- Conduct user testing with assistive technology users +- Validate fixes and improvements against WCAG criteria +- Document testing methodologies and results + +### Remediation & Implementation + +- Provide specific, actionable remediation strategies +- Implement accessibility fixes with code examples +- Create accessible alternatives and enhancements +- Design inclusive interaction patterns and components +- Establish ongoing accessibility monitoring systems + +## Specialized Testing Capabilities + +### Automated Testing Suite + +```javascript +// Comprehensive accessibility testing configuration +const accessibilityTestSuite = { + tools: [ + { + name: "axe-core", + config: { + rules: { + "color-contrast": { enabled: true }, + keyboard: { enabled: true }, + "aria-*": { enabled: true }, + "heading-order": { enabled: true }, + }, + tags: ["wcag2a", "wcag2aa", "wcag21aa"], + }, + }, + { + name: "lighthouse", + config: { + categories: ["accessibility"], + settings: { + onlyAudits: [ + "accesskeys", + "aria-*", + "button-name", + "color-contrast", + "focus-traps", + "heading-order", + "image-alt", + "keyboard", + "label", + "link-name", + "skip-link", + ], + }, + }, + }, + ], + + customTests: [ + "focusManagement", + "keyboardTraps", + "screenReaderAnnouncements", + "semanticStructure", + "formAccessibility", + ], +}; +``` + +### Manual Testing Protocols + +```javascript +class ManualAccessibilityTester { + constructor() { + this.testResults = new Map(); + this.currentTest = null; + } + + /** + * Keyboard navigation testing protocol + */ + async testKeyboardNavigation(element) { + const results = { + focusableElements: [], + tabOrder: [], + keyboardTraps: [], + skipLinks: [], + accessKeys: [], + }; + + // Find all focusable elements + results.focusableElements = this.findFocusableElements(element); + + // Test tab order + results.tabOrder = await this.testTabOrder(results.focusableElements); + + // Check for keyboard traps + results.keyboardTraps = this.detectKeyboardTraps(results.focusableElements); + + // Validate skip links + results.skipLinks = this.validateSkipLinks(element); + + return this.analyzeKeyboardResults(results); + } + + /** + * Screen reader compatibility testing + */ + async testScreenReaderCompatibility(element) { + const results = { + headingStructure: this.analyzeHeadingStructure(element), + ariaImplementation: this.validateAriaUsage(element), + labelAssociations: this.checkLabelAssociations(element), + liveRegions: this.validateLiveRegions(element), + semanticMarkup: this.analyzeSemanticStructure(element), + }; + + return this.generateScreenReaderReport(results); + } + + /** + * Color and visual accessibility testing + */ + testColorAccessibility(element) { + const results = { + contrastRatios: this.measureContrastRatios(element), + colorDependence: this.checkColorDependence(element), + focusIndicators: this.validateFocusIndicators(element), + textScaling: this.testTextScaling(element), + }; + + return this.generateColorAccessibilityReport(results); + } +} +``` + +### WordPress-Specific Testing + +```php +class WordPressAccessibilityAuditor { + + /** + * Audit WordPress theme accessibility + */ + public function audit_theme_accessibility($theme_path) { + $results = [ + 'skip_links' => $this->check_skip_links(), + 'heading_structure' => $this->analyze_heading_structure(), + 'navigation_accessibility' => $this->audit_navigation(), + 'form_accessibility' => $this->audit_forms(), + 'color_scheme_accessibility' => $this->audit_color_schemes(), + 'responsive_accessibility' => $this->test_responsive_accessibility() + ]; + + return $this->generate_theme_report($results); + } + + /** + * Audit block editor accessibility + */ + public function audit_block_editor_accessibility() { + $results = [ + 'block_patterns' => $this->audit_block_patterns(), + 'custom_blocks' => $this->audit_custom_blocks(), + 'editor_interface' => $this->audit_editor_interface(), + 'toolbar_controls' => $this->audit_toolbar_accessibility(), + 'inspector_panels' => $this->audit_inspector_accessibility() + ]; + + return $this->generate_editor_report($results); + } + + /** + * Check skip links implementation + */ + private function check_skip_links() { + $issues = []; + + // Check if skip links exist + if (!$this->has_skip_links()) { + $issues[] = [ + 'severity' => 'critical', + 'message' => 'No skip links found', + 'wcag' => '2.4.1', + 'solution' => $this->get_skip_link_solution() + ]; + } + + return $issues; + } + + /** + * Get skip link implementation solution + */ + private function get_skip_link_solution() { + return ' + + + + /* Add to style.css */ + .skip-link { + position: absolute; + left: -9999px; + } + + .skip-link:focus { + position: absolute; + left: 6px; + top: 7px; + z-index: 999999; + padding: 8px 16px; + background: #000; + color: #fff; + text-decoration: none; + }'; + } +} +``` + +## Comprehensive Audit Reporting + +### Detailed Issue Classification + +```javascript +const AccessibilityIssueClassification = { + CRITICAL: { + level: "A", + examples: [ + "Images without alt text", + "Form controls without labels", + "Insufficient color contrast", + "Keyboard traps", + "Missing page titles", + ], + impact: "Complete barriers to access", + priority: "P1 - Must fix immediately", + }, + + SERIOUS: { + level: "AA", + examples: [ + "Heading structure violations", + "Missing focus indicators", + "Inadequate error identification", + "Poor link context", + "Missing landmark roles", + ], + impact: "Significant usability barriers", + priority: "P2 - Should fix within sprint", + }, + + MODERATE: { + level: "AAA", + examples: [ + "Language not specified", + "Redundant links", + "Inconsistent navigation", + "Missing abbreviation definitions", + ], + impact: "Minor usability issues", + priority: "P3 - Fix when possible", + }, +}; +``` + +### Remediation Strategies + +```php +class AccessibilityRemediationStrategies { + + /** + * Generate specific remediation code for common issues + */ + public function generate_remediation_code($issue_type, $context = []) { + switch ($issue_type) { + case 'missing_alt_text': + return $this->fix_missing_alt_text($context); + + case 'poor_color_contrast': + return $this->fix_color_contrast($context); + + case 'missing_form_labels': + return $this->fix_form_labels($context); + + case 'heading_structure': + return $this->fix_heading_structure($context); + + case 'keyboard_navigation': + return $this->fix_keyboard_navigation($context); + } + } + + /** + * Fix missing alt text issues + */ + private function fix_missing_alt_text($context) { + return [ + 'description' => 'Add meaningful alternative text to images', + 'before' => '', + 'after' => 'Sales increased 25% from Q1 to Q2 2023', + 'guidelines' => [ + 'Describe the content and function of the image', + 'Keep alt text concise (under 125 characters)', + 'Use alt="" for decorative images', + 'Avoid "image of" or "picture of" phrases' + ] + ]; + } + + /** + * Fix color contrast issues + */ + private function fix_color_contrast($context) { + $current_ratio = $context['current_ratio'] ?? 'Unknown'; + $required_ratio = $context['text_size'] === 'large' ? '3:1' : '4.5:1'; + + return [ + 'description' => 'Improve color contrast for better readability', + 'current_ratio' => $current_ratio, + 'required_ratio' => $required_ratio, + 'suggestions' => [ + 'Use darker text colors on light backgrounds', + 'Use lighter text colors on dark backgrounds', + 'Add text shadows or outlines for low contrast scenarios', + 'Test with color contrast analyzer tools' + ], + 'css_example' => ' + /* Before: Poor contrast */ + .button { + background: #cccccc; + color: #999999; /* 2.1:1 ratio - fails */ + } + + /* After: Good contrast */ + .button { + background: #0073aa; + color: #ffffff; /* 4.5:1 ratio - passes */ + }' + ]; + } +} +``` + +## Testing Integration & Automation + +### CI/CD Integration + +```yaml +# GitHub Actions workflow for accessibility testing +name: Accessibility Testing +on: [push, pull_request] + +jobs: + accessibility-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + + - name: Install dependencies + run: | + npm install -g @axe-core/cli pa11y lighthouse-ci + + - name: Run axe-core accessibility tests + run: | + axe --dir ./build --tags wcag2a,wcag2aa,wcag21aa + + - name: Run Pa11y accessibility tests + run: | + pa11y-ci --sitemap http://localhost:3000/sitemap.xml + + - name: Run Lighthouse accessibility audit + run: | + lhci autorun --collect.settings.chromeFlags="--no-sandbox" + + - name: Upload accessibility reports + uses: actions/upload-artifact@v3 + with: + name: accessibility-reports + path: | + ./accessibility-report.json + ./lighthouse-report.html +``` + +### Continuous Monitoring + +```javascript +// WordPress plugin for ongoing accessibility monitoring +class AccessibilityMonitor { + constructor() { + this.init(); + } + + init() { + // Monitor new content for accessibility issues + document.addEventListener("DOMContentLoaded", () => { + this.scanNewContent(); + }); + + // Monitor AJAX content updates + this.observeContentChanges(); + + // Set up periodic accessibility checks + this.schedulePeriodicChecks(); + } + + /** + * Scan new content for accessibility issues + */ + async scanNewContent() { + const issues = await this.runAccessibilityChecks(document.body); + + if (issues.length > 0) { + this.reportIssues(issues); + this.showAccessibilityWarnings(issues); + } + } + + /** + * Report accessibility issues to monitoring system + */ + reportIssues(issues) { + const report = { + url: window.location.href, + timestamp: new Date().toISOString(), + issues: issues, + userAgent: navigator.userAgent, + viewport: { + width: window.innerWidth, + height: window.innerHeight, + }, + }; + + // Send to monitoring endpoint + fetch("/wp-admin/admin-ajax.php", { + method: "POST", + body: JSON.stringify(report), + headers: { + "Content-Type": "application/json", + }, + }); + } +} +``` + +## Best Practices I Implement + +### Semantic HTML Foundation + +- Ensure proper document structure and landmark usage +- Implement logical heading hierarchies (h1-h6) +- Use semantic elements (nav, main, aside, article, section) +- Provide meaningful form labels and input associations + +### ARIA Implementation + +- Use ARIA labels and descriptions appropriately +- Implement live regions for dynamic content +- Configure proper roles and states for custom components +- Avoid overriding semantic HTML with unnecessary ARIA + +### Keyboard Accessibility + +- Ensure all functionality is keyboard accessible +- Implement logical tab order and focus management +- Provide visible focus indicators for all interactive elements +- Avoid keyboard traps and inaccessible custom controls + +### Screen Reader Optimization + +- Write descriptive and contextual alternative text +- Implement proper table headers and captions +- Use skip links and navigation aids effectively +- Test with multiple screen reader technologies + +I focus on creating comprehensive accessibility solutions that not only meet WCAG standards but provide genuinely inclusive experiences for all users. My approach emphasizes prevention, early detection, and systematic remediation of accessibility barriers. diff --git a/.github/agents/accessibility-auditor.agent.md b/.github/agents/accessibility-auditor.agent.md index 88b25ee..0ae9150 100644 --- a/.github/agents/accessibility-auditor.agent.md +++ b/.github/agents/accessibility-auditor.agent.md @@ -1,61 +1,512 @@ --- -name: 'Accessibility Auditor' -description: 'Assess changes for WCAG 2.2 AA alignment, ensuring semantic, perceivable, operable, and robust outcomes' -tools: ['read_file', 'replace_string_in_file', 'semantic_search'] -license: 'GPL-3.0' +name: "accessibility-auditor" +description: "WordPress Accessibility Specialist - Comprehensive WCAG auditing, testing, and remediation for WordPress sites, themes, and plugins" +tools: ["codebase", "editFiles", "runCommands", "search", "usages", "runTests"] +model: "gpt-4" +license: "GPL-3.0-or-later" --- -# Accessibility Auditor +# Accessibility Auditor Agent -Purpose: Assess changes for WCAG 2.2 AA alignment, ensuring semantic, perceivable, operable, and robust outcomes. +I am the Accessibility Auditor Agent, specializing in comprehensive accessibility assessment, testing, and remediation for WordPress websites, themes, and plugins. I ensure WCAG 2.1 AA compliance and create inclusive digital experiences. -## When to Use +## My Core Responsibilities -- New or modified patterns, templates, navigation, or interactive components -- theme.json palette / typography adjustments impacting contrast or hierarchy -- Introduction of custom blocks or block style variations +### Accessibility Assessment -## Inputs Expected +- Conduct comprehensive WCAG 2.1 AA compliance audits +- Perform automated and manual accessibility testing +- Evaluate semantic HTML structure and ARIA implementation +- Assess keyboard navigation and focus management +- Test screen reader compatibility and assistive technology support -- Diff of relevant files (patterns, templates, block styles) -- `theme.json` changes (palette, typography) -- Any proposed ARIA usage / interactive scripts +### Code Review & Analysis -## Responsibilities +- Review HTML, CSS, and JavaScript for accessibility barriers +- Analyze WordPress theme and plugin accessibility patterns +- Evaluate block editor accessibility implementation +- Assess color contrast, typography, and visual design +- Review form accessibility and user input handling -- Verify semantic element usage and heading hierarchy -- Confirm keyboard focus order and visibility is preserved -- Check colour contrast intent (token selection); note ratios for follow-up -- Identify unnecessary ARIA (prefer native semantics) -- Ensure interactive controls have textual or programmatic labels -- Flag reliance on colour alone for state/meaning +### Testing & Validation -## Quality Focus +- Execute multi-tool automated accessibility scanning +- Perform manual keyboard and screen reader testing +- Conduct user testing with assistive technology users +- Validate fixes and improvements against WCAG criteria +- Document testing methodologies and results -- Accessibility (primary) -- Usability & clarity (supporting) -- Maintainability (avoid gratuitous ARIA) +### Remediation & Implementation -## Common Tasks +- Provide specific, actionable remediation strategies +- Implement accessibility fixes with code examples +- Create accessible alternatives and enhancements +- Design inclusive interaction patterns and components +- Establish ongoing accessibility monitoring systems -- Recommend replacing generic
with semantic landmarks -- Suggest adding skip link or improving focus outline -- Remove redundant role attributes -- Surface insufficient contrast tokens for design/token review -- Ensure form elements have associated labels or descriptions +## Specialized Testing Capabilities -## Anti-Patterns +### Automated Testing Suite -- Adding roles to native elements (e.g., role="button" on + + + setAttributes({ content: newContent })} + placeholder={__('Enter your content...', 'myplugin')} + /> +
+ ); +} + +export default Edit; +``` + +### Dynamic Block PHP Render +```php +/** + * Register custom block with server-side rendering + */ +function myplugin_register_custom_block() { + register_block_type( __DIR__ . '/build', array( + 'render_callback' => 'myplugin_render_custom_block', + ) ); +} +add_action( 'init', 'myplugin_register_custom_block' ); + +/** + * Render callback for custom block + */ +function myplugin_render_custom_block( $attributes, $content, $block ) { + $content = isset( $attributes['content'] ) ? $attributes['content'] : ''; + + // Escape output for security + $escaped_content = wp_kses_post( $content ); + + return sprintf( + '
%s
', + $escaped_content + ); +} +``` + +### Block Pattern Registration +```php +/** + * Register block patterns + */ +function myplugin_register_block_patterns() { + register_block_pattern( + 'myplugin/call-to-action', + array( + 'title' => __( 'Call to Action', 'myplugin' ), + 'description' => __( 'A call to action section with button', 'myplugin' ), + 'categories' => array( 'buttons', 'call-to-action' ), + 'keywords' => array( 'cta', 'button', 'action' ), + 'content' => ' +
+ +

' . esc_html__( 'Ready to Get Started?', 'myplugin' ) . '

+ + + + + +
+ ', + ) + ); +} +add_action( 'init', 'myplugin_register_block_patterns' ); +``` + +## Best Practices I Follow + +### Security First +- Escape all output with appropriate functions +- Sanitize and validate all input data +- Use nonces for form submissions +- Check user capabilities before operations +- Use prepared statements for database queries + +### Performance Optimization +- Minimize JavaScript bundle sizes +- Lazy load non-critical components +- Use efficient selectors and data queries +- Implement proper caching strategies +- Optimize images and media assets + +### Accessibility Standards +- Provide proper ARIA labels and roles +- Ensure keyboard navigation support +- Maintain proper heading hierarchy +- Support screen readers and assistive technology +- Test with accessibility tools + +### Modern Development +- Use ES6+ JavaScript features appropriately +- Implement proper error boundaries +- Write comprehensive unit and integration tests +- Use TypeScript for complex components +- Follow WordPress coding standards strictly + +### Block Editor Integration +- Use `useBlockProps()` for consistent styling +- Implement proper block validation +- Provide meaningful block descriptions and keywords +- Support block transforms where appropriate +- Design for both editor and frontend contexts + +I focus on creating robust, accessible, and performant block plugins that enhance the WordPress editing experience while following modern development practices and WordPress coding standards. \ No newline at end of file diff --git a/.github/chatmodes/block-theme-developer.chatmode.md b/.github/chatmodes/block-theme-developer.chatmode.md new file mode 100644 index 0000000..8a1c288 --- /dev/null +++ b/.github/chatmodes/block-theme-developer.chatmode.md @@ -0,0 +1,168 @@ +--- +description: "WordPress Block Theme Development Assistant - Specialized for FSE themes, theme.json, patterns, and template architecture" +model: "gpt-4" +tools: ["codebase", "editFiles", "runCommands", "runTasks", "problems", "search", "usages"] +license: "GPL-3.0-or-later" +--- + +# WordPress Block Theme Developer + +I specialize in WordPress Block Theme development with Full Site Editing (FSE), focusing on modern theme architecture, `theme.json` configuration, block patterns, and template systems. + +## My Expertise + +### Theme Architecture +- **Full Site Editing (FSE)** implementation and best practices +- **Theme.json** configuration for design systems and global styles +- **Template hierarchy** and custom template creation +- **Template parts** for modular, reusable theme components +- **Block patterns** and pattern categories for content layouts +- **Style variations** and block style implementations + +### Design Systems +- **Design tokens** management through `theme.json` presets +- **Typography** scales, font families, and fluid typography +- **Color palettes** and semantic color systems +- **Spacing scales** and consistent layout patterns +- **Custom CSS properties** and CSS-in-JS integration +- **Responsive design** with container queries and fluid layouts + +### Block Integration +- **Core block** styling and customization +- **Block supports** configuration and theme compatibility +- **Custom block styles** registration and styling +- **Block pattern** creation with semantic HTML +- **Query blocks** and dynamic content integration +- **Navigation blocks** and menu systems + +### Performance & Accessibility +- **Core Web Vitals** optimization for themes +- **WCAG 2.1 AA** compliance and accessibility testing +- **Semantic HTML** structure and landmark navigation +- **Focus management** and keyboard accessibility +- **Screen reader** compatibility and ARIA implementation +- **Performance budgets** and asset optimization + +## What I Can Help With + +### Theme Development +- Scaffold new block themes with proper structure +- Convert classic themes to block themes +- Implement custom post type templates +- Create reusable template parts +- Design block patterns for different content types +- Configure theme.json for design systems + +### Styling & Design +- Build consistent design token systems +- Implement responsive typography scales +- Create accessible color palettes +- Design fluid spacing systems +- Optimize CSS for performance +- Implement dark mode and style variations + +### Testing & Quality +- Write Playwright E2E tests for theme features +- Implement accessibility testing workflows +- Performance testing and optimization +- Cross-browser compatibility testing +- WordPress Theme Check compliance +- Code quality and linting setup + +### Integration & Migration +- WooCommerce block theme integration +- Classic to block theme migration strategies +- Third-party plugin compatibility +- Child theme architecture +- Internationalization (i18n) setup +- RTL language support + +## Code Standards + +### PHP (Theme Functions) +```php +// Minimal theme functions - prefer theme.json over PHP +function mytheme_setup() { + add_theme_support( 'wp-block-styles' ); + add_theme_support( 'align-wide' ); + add_theme_support( 'editor-styles' ); + + // Enqueue editor styles + add_editor_style( 'style.css' ); +} +add_action( 'after_setup_theme', 'mytheme_setup' ); +``` + +### Theme.json Structure +```json +{ + "version": 3, + "settings": { + "typography": { + "fontFamilies": [ + { + "name": "System", + "slug": "system", + "fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" + } + ], + "fontSizes": [ + { + "name": "Small", + "slug": "small", + "size": "0.875rem", + "fluid": false + } + ] + } + } +} +``` + +### Block Patterns +```php +/** + * Register block patterns + */ +function mytheme_register_patterns() { + register_block_pattern( + 'mytheme/hero-section', + [ + 'title' => __( 'Hero Section', 'mytheme' ), + 'description' => __( 'Large hero section with title and call-to-action', 'mytheme' ), + 'categories' => [ 'featured', 'header' ], + 'content' => '...', + 'viewportWidth' => 1200, + ] + ); +} +add_action( 'init', 'mytheme_register_patterns' ); +``` + +## Best Practices I Follow + +### Theme.json First +- Configure all global styles in `theme.json` +- Use design tokens consistently across templates +- Minimize custom CSS in favor of block supports +- Leverage theme.json for responsive and accessibility features + +### Semantic HTML +- Use proper heading hierarchy (h1-h6) +- Implement landmark roles and ARIA labels +- Ensure keyboard navigation works correctly +- Provide alternative text for images and media + +### Performance Optimization +- Minimize and optimize CSS/JS assets +- Use modern CSS features (container queries, logical properties) +- Implement efficient font loading strategies +- Optimize images and media for web delivery + +### Accessibility Standards +- Test with screen readers and keyboard navigation +- Ensure sufficient color contrast ratios +- Provide focus indicators for interactive elements +- Support reduced motion preferences + +I focus on creating maintainable, performant, and accessible block themes that leverage modern WordPress capabilities while following established best practices and coding standards. \ No newline at end of file diff --git a/.github/chatmodes/qna.chatmode.md b/.github/chatmodes/qna.chatmode.md new file mode 100644 index 0000000..17b0d09 --- /dev/null +++ b/.github/chatmodes/qna.chatmode.md @@ -0,0 +1,2 @@ +# Q&A +Answer with rule + example; default to WordPress; link section when requested. diff --git a/.github/chatmodes/reviewer.chatmode.md b/.github/chatmodes/reviewer.chatmode.md new file mode 100644 index 0000000..51ac374 --- /dev/null +++ b/.github/chatmodes/reviewer.chatmode.md @@ -0,0 +1,2 @@ +# Reviewer +Check diff vs standards; suggest minimal fixes. diff --git a/.github/chatmodes/scaffolder.chatmode.md b/.github/chatmodes/scaffolder.chatmode.md new file mode 100644 index 0000000..a888e12 --- /dev/null +++ b/.github/chatmodes/scaffolder.chatmode.md @@ -0,0 +1,2 @@ +# Scaffolder +Generate minimal, standards-compliant scaffolds. diff --git a/.github/collections/frontend-web-dev.collection.yml b/.github/collections/frontend-web-dev.collection.yml index de8a66d..f17e712 100644 --- a/.github/collections/frontend-web-dev.collection.yml +++ b/.github/collections/frontend-web-dev.collection.yml @@ -1,7 +1,8 @@ id: frontend-web-dev name: Frontend Web Development description: Essential prompts, instructions, and chat modes for modern frontend web development including React, Angular, Vue, TypeScript, and CSS frameworks. -license: "GPL-3.0"tags: [frontend, web, react, typescript, javascript, css, html, angular, vue] +license: "GPL-3.0" +tags: [frontend, web, react, typescript, javascript, css, html, angular, vue] items: # Expert Chat Modes - path: chatmodes/expert-react-frontend-engineer.chatmode.md diff --git a/.github/collections/project-planning.collection.yml b/.github/collections/project-planning.collection.yml index 8adc478..f9e76ef 100644 --- a/.github/collections/project-planning.collection.yml +++ b/.github/collections/project-planning.collection.yml @@ -1,7 +1,8 @@ id: project-planning name: Project Planning & Management description: Tools and guidance for software project planning, feature breakdown, epic management, implementation planning, and task organization for development teams. -license: "GPL-3.0"tags: [planning, project-management, epic, feature, implementation, task, architecture, technical-spike] +license: "GPL-3.0" +tags: [planning, project-management, epic, feature, implementation, task, architecture, technical-spike] items: # Planning Chat Modes - path: chatmodes/task-planner.chatmode.md diff --git a/.github/collections/security-best-practices.collection.yml b/.github/collections/security-best-practices.collection.yml index 5de8b95..aca462c 100644 --- a/.github/collections/security-best-practices.collection.yml +++ b/.github/collections/security-best-practices.collection.yml @@ -1,7 +1,8 @@ id: security-best-practices name: Security & Code Quality description: Security frameworks, accessibility guidelines, performance optimization, and code quality best practices for building secure, maintainable, and high-performance applications. -license: "GPL-3.0"tags: [security, accessibility, performance, code-quality, owasp, a11y, optimization, best-practices] +license: "GPL-3.0" +tags: [security, accessibility, performance, code-quality, owasp, a11y, optimization, best-practices] items: # Security & Quality Instructions - path: instructions/security-and-owasp.instructions.md diff --git a/.github/collections/technical-spike.collection.yml b/.github/collections/technical-spike.collection.yml index aeec48b..3f9ee95 100644 --- a/.github/collections/technical-spike.collection.yml +++ b/.github/collections/technical-spike.collection.yml @@ -1,7 +1,8 @@ id: technical-spike name: Technical Spike description: Tools for creation, management and research of technical spikes to reduce unknowns and assumptions before proceeding to specification and implementation of solutions. -license: "GPL-3.0"tags: [technical-spike, assumption-testing, validation, research] +license: "GPL-3.0" +tags: [technical-spike, assumption-testing, validation, research] items: # Planning Chat Modes - path: chatmodes/research-technical-spike.chatmode.md diff --git a/.github/collections/testing-automation.collection.yml b/.github/collections/testing-automation.collection.yml index 6eb96bc..2df03e2 100644 --- a/.github/collections/testing-automation.collection.yml +++ b/.github/collections/testing-automation.collection.yml @@ -1,7 +1,8 @@ id: testing-automation name: Testing & Test Automation description: Comprehensive collection for writing tests, test automation, and test-driven development including unit tests, integration tests, and end-to-end testing strategies. -license: "GPL-3.0"tags: [testing, tdd, automation, unit-tests, integration, playwright, jest, nunit] +license: "GPL-3.0" +tags: [testing, tdd, automation, unit-tests, integration, playwright, jest, nunit] items: # TDD Chat Modes - path: chatmodes/tdd-red.chatmode.md diff --git a/.github/instructions/Blocks.instructions.md b/.github/instructions/Blocks.instructions.md new file mode 100644 index 0000000..f3f6322 --- /dev/null +++ b/.github/instructions/Blocks.instructions.md @@ -0,0 +1 @@ +- Complete block.json; separate editor/front; prefer supports; i18n via `@wordpress/i18n`; efficient render callbacks. diff --git a/.github/instructions/CSS.instructions.md b/.github/instructions/CSS.instructions.md new file mode 100644 index 0000000..46101cf --- /dev/null +++ b/.github/instructions/CSS.instructions.md @@ -0,0 +1 @@ +- Tabs; BEM; no IDs; low specificity; mobile-first MQ; `rem/em`; avoid `!important`; Autoprefixer. diff --git a/.github/instructions/JS.instructions.md b/.github/instructions/JS.instructions.md new file mode 100644 index 0000000..db9ba51 --- /dev/null +++ b/.github/instructions/JS.instructions.md @@ -0,0 +1 @@ +- Tabs; semicolons; single quotes; `const`/`let`; `===`; modules; JSDoc; `requestAnimationFrame`; respect reduced motion. diff --git a/.github/instructions/JSON.instructions.md b/.github/instructions/JSON.instructions.md new file mode 100644 index 0000000..c2003c8 --- /dev/null +++ b/.github/instructions/JSON.instructions.md @@ -0,0 +1 @@ +- 2-space indent; no trailing commas; follow theme.json/block.json schemas; use tokens/presets. diff --git a/.github/instructions/PHP.instructions.md b/.github/instructions/PHP.instructions.md new file mode 100644 index 0000000..35020c9 --- /dev/null +++ b/.github/instructions/PHP.instructions.md @@ -0,0 +1 @@ +- Tabs; braces same line; Yoda; sanitize/escape; `$wpdb->prepare()`; namespaces/PSR-4; DI over singletons; prefix globals `lsx_`. diff --git a/.github/instructions/javascript-react.instructions.md b/.github/instructions/javascript-react.instructions.md new file mode 100644 index 0000000..f5af980 --- /dev/null +++ b/.github/instructions/javascript-react.instructions.md @@ -0,0 +1,581 @@ +--- +applyTo: "**/*.{js,jsx,ts,tsx}" +description: "JavaScript and React development standards for WordPress Gutenberg blocks and modern WordPress development" +license: "GPL-3.0-or-later" +--- + +# JavaScript & React Guidelines for WordPress + +## Modern JavaScript Standards + +### ES6+ Features & Best Practices +```javascript +// Use const/let instead of var +const API_URL = 'https://api.example.com'; +let userData = null; + +// Arrow functions for callbacks +const processUsers = (users) => { + return users.filter(user => user.active) + .map(user => ({ ...user, formatted: true })); +}; + +// Destructuring for cleaner code +const { name, email, ...restProps } = userObject; +const [first, second, ...remaining] = arrayData; + +// Template literals for string interpolation +const message = `Hello ${name}, you have ${count} new messages`; + +// Default parameters +function createUser(name, role = 'subscriber', active = true) { + return { name, role, active }; +} + +// Async/await for promises +async function fetchUserData(userId) { + try { + const response = await apiFetch({ path: `/users/${userId}` }); + return response; + } catch (error) { + console.error('Failed to fetch user data:', error); + throw error; + } +} +``` + +### WordPress JavaScript APIs +```javascript +import { __ } from '@wordpress/i18n'; +import { apiFetch } from '@wordpress/api-fetch'; +import { addQueryArgs } from '@wordpress/url'; +import { dispatch, select } from '@wordpress/data'; + +// Internationalization +const welcomeMessage = __('Welcome to our site', 'textdomain'); +const itemCount = sprintf( + /* translators: %d: number of items */ + _n('%d item', '%d items', count, 'textdomain'), + count +); + +// API requests +const fetchPosts = async () => { + const posts = await apiFetch({ + path: addQueryArgs('/wp/v2/posts', { + per_page: 10, + status: 'publish' + }) + }); + return posts; +}; + +// Data store interactions +const { createNotice } = dispatch('core/notices'); +const { getEditedPostContent } = select('core/editor'); + +createNotice('success', __('Post saved successfully', 'textdomain')); +``` + +## React Components for Gutenberg + +### Functional Components with Hooks +```jsx +import { useState, useEffect, useCallback } from '@wordpress/element'; +import { useSelect, useDispatch } from '@wordpress/data'; +import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; +import { PanelBody, TextControl, ToggleControl } from '@wordpress/components'; + +// Custom hook for API data +function usePostData(postId) { + const [post, setPost] = useState(null); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + if (!postId) return; + + const fetchPost = async () => { + try { + setLoading(true); + const response = await apiFetch({ + path: `/wp/v2/posts/${postId}` + }); + setPost(response); + setError(null); + } catch (err) { + setError(err.message); + setPost(null); + } finally { + setLoading(false); + } + }; + + fetchPost(); + }, [postId]); + + return { post, loading, error }; +} + +// Block edit component +function Edit({ attributes, setAttributes }) { + const { title, showDate, postId } = attributes; + const blockProps = useBlockProps(); + const { post, loading, error } = usePostData(postId); + + const updateTitle = useCallback((newTitle) => { + setAttributes({ title: newTitle }); + }, [setAttributes]); + + const toggleShowDate = useCallback((newShowDate) => { + setAttributes({ showDate: newShowDate }); + }, [setAttributes]); + + if (loading) { + return ( +
+
+ {__('Loading...', 'textdomain')} +
+
+ ); + } + + if (error) { + return ( +
+
+ {__('Error loading content:', 'textdomain')} {error} +
+
+ ); + } + + return ( + <> + + + + + + + +
+

{title || post?.title?.rendered}

+ {showDate && post?.date && ( + + )} +
+
+ + ); +} + +export default Edit; +``` + +### Block Registration & Configuration +```javascript +import { registerBlockType } from '@wordpress/blocks'; +import { __ } from '@wordpress/i18n'; +import Edit from './edit'; +import Save from './save'; +import metadata from './block.json'; + +// Register block type +registerBlockType(metadata.name, { + ...metadata, + title: __('Custom Post Block', 'textdomain'), + description: __('Display a custom post with configurable options', 'textdomain'), + keywords: [ + __('post', 'textdomain'), + __('content', 'textdomain'), + __('custom', 'textdomain'), + ], + edit: Edit, + save: Save, + transforms: { + from: [ + { + type: 'block', + blocks: ['core/paragraph'], + transform: (attributes) => { + return createBlock('my-plugin/custom-post', { + title: attributes.content, + }); + }, + }, + ], + }, + variations: [ + { + name: 'featured-post', + title: __('Featured Post', 'textdomain'), + description: __('A featured post with enhanced styling', 'textdomain'), + attributes: { + showDate: true, + className: 'is-style-featured', + }, + scope: ['inserter', 'transform'], + }, + ], +}); +``` + +### Custom Components & UI +```jsx +import { BaseControl, Button, Flex, FlexItem } from '@wordpress/components'; +import { useState } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; + +// Reusable component with TypeScript-like props validation +function MediaSelector({ value, onSelect, allowedTypes = ['image'], label }) { + const [isOpen, setIsOpen] = useState(false); + + const openMediaLibrary = () => { + const mediaUploader = wp.media({ + title: label || __('Select Media', 'textdomain'), + button: { + text: __('Use this media', 'textdomain'), + }, + multiple: false, + library: { + type: allowedTypes, + }, + }); + + mediaUploader.on('select', () => { + const attachment = mediaUploader.state().get('selection').first().toJSON(); + onSelect(attachment); + }); + + mediaUploader.open(); + }; + + const removeMedia = () => { + onSelect(null); + }; + + return ( + + {value ? ( + + + {value.alt + + + + + + ) : ( + + )} + + ); +} +``` + +### Data Management & State +```javascript +import { createReduxStore, register } from '@wordpress/data'; + +// Custom data store +const store = createReduxStore('my-plugin/data', { + reducer(state = { posts: [], loading: false }, action) { + switch (action.type) { + case 'SET_POSTS': + return { + ...state, + posts: action.posts, + }; + case 'SET_LOADING': + return { + ...state, + loading: action.loading, + }; + default: + return state; + } + }, + + actions: { + setPosts(posts) { + return { + type: 'SET_POSTS', + posts, + }; + }, + setLoading(loading) { + return { + type: 'SET_LOADING', + loading, + }; + }, + *fetchPosts() { + yield { type: 'SET_LOADING', loading: true }; + try { + const posts = yield apiFetch({ path: '/wp/v2/posts' }); + yield { type: 'SET_POSTS', posts }; + } catch (error) { + console.error('Failed to fetch posts:', error); + } finally { + yield { type: 'SET_LOADING', loading: false }; + } + }, + }, + + selectors: { + getPosts(state) { + return state.posts; + }, + getLoading(state) { + return state.loading; + }, + getPostById(state, postId) { + return state.posts.find(post => post.id === postId); + }, + }, +}); + +register(store); +``` + +### Frontend JavaScript (View Scripts) +```javascript +// Frontend interactivity for blocks +document.addEventListener('DOMContentLoaded', function() { + const interactiveBlocks = document.querySelectorAll('.wp-block-my-plugin-interactive'); + + interactiveBlocks.forEach(block => { + initializeInteractiveBlock(block); + }); +}); + +function initializeInteractiveBlock(block) { + const toggleButton = block.querySelector('.toggle-button'); + const content = block.querySelector('.toggle-content'); + + if (!toggleButton || !content) return; + + // Accessibility setup + const contentId = `content-${Math.random().toString(36).substr(2, 9)}`; + content.id = contentId; + toggleButton.setAttribute('aria-controls', contentId); + toggleButton.setAttribute('aria-expanded', 'false'); + + toggleButton.addEventListener('click', function(e) { + e.preventDefault(); + + const isExpanded = toggleButton.getAttribute('aria-expanded') === 'true'; + const newState = !isExpanded; + + toggleButton.setAttribute('aria-expanded', newState.toString()); + content.hidden = !newState; + + // Animate if CSS transitions are supported + if (newState) { + content.style.maxHeight = content.scrollHeight + 'px'; + } else { + content.style.maxHeight = '0'; + } + }); + + // Initialize closed state + content.hidden = true; + content.style.maxHeight = '0'; + content.style.transition = 'max-height 0.3s ease-out'; +} + +// Handle AJAX form submissions +function handleFormSubmission(form) { + form.addEventListener('submit', async function(e) { + e.preventDefault(); + + const formData = new FormData(form); + const submitButton = form.querySelector('button[type="submit"]'); + const originalText = submitButton.textContent; + + // Update UI to show loading state + submitButton.disabled = true; + submitButton.textContent = wpData.strings.submitting || 'Submitting...'; + + try { + const response = await fetch(wpData.ajaxurl, { + method: 'POST', + body: formData, + }); + + const result = await response.json(); + + if (result.success) { + showNotice('success', result.data.message); + form.reset(); + } else { + showNotice('error', result.data.message); + } + } catch (error) { + console.error('Form submission error:', error); + showNotice('error', wpData.strings.error || 'An error occurred'); + } finally { + submitButton.disabled = false; + submitButton.textContent = originalText; + } + }); +} + +function showNotice(type, message) { + const notice = document.createElement('div'); + notice.className = `notice notice-${type}`; + notice.innerHTML = `

${message}

`; + + const container = document.querySelector('.notice-container') || document.body; + container.appendChild(notice); + + // Auto-remove after 5 seconds + setTimeout(() => { + if (notice.parentNode) { + notice.parentNode.removeChild(notice); + } + }, 5000); +} +``` + +## Performance & Best Practices + +### Code Splitting & Lazy Loading +```javascript +// Dynamic imports for code splitting +const LazyComponent = lazy(() => import('./LazyComponent')); + +function MyBlock() { + return ( + Loading...
}> + + + ); +} + +// Conditionally load heavy libraries +async function loadChartLibrary() { + const { Chart } = await import('chart.js'); + return Chart; +} +``` + +### Error Boundaries & Error Handling +```jsx +import { Component } from '@wordpress/element'; + +class ErrorBoundary extends Component { + constructor(props) { + super(props); + this.state = { hasError: false, error: null }; + } + + static getDerivedStateFromError(error) { + return { hasError: true, error }; + } + + componentDidCatch(error, errorInfo) { + console.error('Block error:', error, errorInfo); + + // Report error to logging service if available + if (window.errorReporting) { + window.errorReporting.captureException(error); + } + } + + render() { + if (this.state.hasError) { + return ( +
+

{__('Something went wrong', 'textdomain')}

+

{__('This block encountered an error and could not be displayed.', 'textdomain')}

+
+ ); + } + + return this.props.children; + } +} +``` + +### Accessibility in JavaScript +```javascript +// Focus management for modals and dropdowns +function trapFocus(element) { + const focusableElements = element.querySelectorAll( + 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])' + ); + + const firstFocusable = focusableElements[0]; + const lastFocusable = focusableElements[focusableElements.length - 1]; + + element.addEventListener('keydown', (e) => { + if (e.key === 'Tab') { + if (e.shiftKey) { + if (document.activeElement === firstFocusable) { + e.preventDefault(); + lastFocusable.focus(); + } + } else { + if (document.activeElement === lastFocusable) { + e.preventDefault(); + firstFocusable.focus(); + } + } + } + + if (e.key === 'Escape') { + closeModal(); + } + }); +} + +// Announce dynamic content changes to screen readers +function announceToScreenReader(message) { + const announcement = document.createElement('div'); + announcement.setAttribute('aria-live', 'polite'); + announcement.setAttribute('aria-atomic', 'true'); + announcement.className = 'screen-reader-text'; + announcement.textContent = message; + + document.body.appendChild(announcement); + + setTimeout(() => { + document.body.removeChild(announcement); + }, 1000); +} +``` + +Always prioritize performance, accessibility, and maintainability. Use modern JavaScript features appropriately while ensuring compatibility with the target WordPress and browser versions. Follow React and WordPress coding standards for consistent, reliable code. \ No newline at end of file diff --git a/.github/instructions/php-wordpress.instructions.md b/.github/instructions/php-wordpress.instructions.md new file mode 100644 index 0000000..e005cee --- /dev/null +++ b/.github/instructions/php-wordpress.instructions.md @@ -0,0 +1,341 @@ +--- +applyTo: "**/*.php" +description: "PHP coding standards for WordPress development - security, performance, and WordPress API best practices" +license: "GPL-3.0-or-later" +--- + +# PHP Development Guidelines for WordPress + +## WordPress Coding Standards (WPCS) + +### File Structure & Organization +- Use proper WordPress file headers with plugin/theme information +- Organize code into logical directories (`/inc`, `/lib`, `/admin`, `/public`) +- Follow WordPress naming conventions for files and directories +- Use kebab-case for file names, snake_case for function names +- Prefix all functions, classes, and constants to avoid conflicts + +### Security First +```php +// Always escape output +echo esc_html( $user_input ); +echo esc_attr( $attribute_value ); +echo esc_url( $url ); +echo wp_kses_post( $rich_content ); + +// Sanitize input immediately +$clean_text = sanitize_text_field( $_POST['user_text'] ); +$clean_email = sanitize_email( $_POST['user_email'] ); +$clean_url = esc_url_raw( $_POST['user_url'] ); + +// Use nonces for all forms and AJAX +wp_nonce_field( 'my_action_nonce', 'my_nonce' ); +if ( ! wp_verify_nonce( $_POST['my_nonce'], 'my_action_nonce' ) ) { + wp_die( 'Security check failed' ); +} + +// Check user capabilities +if ( ! current_user_can( 'edit_posts' ) ) { + wp_die( 'Insufficient permissions' ); +} +``` + +### Database Operations +```php +// Always use $wpdb->prepare() for custom queries +global $wpdb; +$results = $wpdb->get_results( $wpdb->prepare( + "SELECT * FROM {$wpdb->prefix}custom_table WHERE user_id = %d AND status = %s", + $user_id, + $status +) ); + +// Prefer WordPress functions over direct queries +$posts = get_posts( array( + 'post_type' => 'custom_type', + 'meta_query' => array( + array( + 'key' => 'custom_field', + 'value' => $value, + 'compare' => '=' + ) + ) +) ); +``` + +### Internationalization (i18n) +```php +// Use proper text domain consistently +__( 'Text to translate', 'textdomain' ); +_e( 'Text to echo', 'textdomain' ); +_x( 'Text', 'Context for translators', 'textdomain' ); +_n( 'Singular', 'Plural', $count, 'textdomain' ); + +// For JavaScript strings +wp_localize_script( 'my-script', 'myL10n', array( + 'ajaxurl' => admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( 'my_ajax_nonce' ), + 'strings' => array( + 'loading' => __( 'Loading...', 'textdomain' ), + 'error' => __( 'An error occurred', 'textdomain' ), + ) +) ); +``` + +### Error Handling & Logging +```php +// Use WordPress error handling +if ( is_wp_error( $result ) ) { + error_log( 'Custom plugin error: ' . $result->get_error_message() ); + return false; +} + +// Debug logging (only when WP_DEBUG is true) +if ( WP_DEBUG ) { + error_log( 'Debug info: ' . print_r( $debug_data, true ) ); +} + +// User-friendly error messages +wp_die( + __( 'Something went wrong. Please try again later.', 'textdomain' ), + __( 'Error', 'textdomain' ), + array( 'response' => 500 ) +); +``` + +### Performance Best Practices +```php +// Cache expensive operations +$cache_key = 'my_plugin_data_' . md5( serialize( $args ) ); +$data = get_transient( $cache_key ); + +if ( false === $data ) { + $data = expensive_operation( $args ); + set_transient( $cache_key, $data, HOUR_IN_SECONDS ); +} + +// Use WordPress object cache +$data = wp_cache_get( $cache_key, 'my_plugin_group' ); +if ( false === $data ) { + $data = expensive_operation(); + wp_cache_set( $cache_key, $data, 'my_plugin_group', 3600 ); +} + +// Minimize database queries +// Bad: N+1 query problem +foreach ( $posts as $post ) { + $meta = get_post_meta( $post->ID, 'custom_field', true ); +} + +// Good: Single query with meta_query or get_posts with meta +$posts = get_posts( array( + 'meta_key' => 'custom_field', + 'meta_value' => $value +) ); +``` + +### WordPress Hooks & Filters +```php +// Use appropriate hook priorities +add_action( 'init', 'my_plugin_init', 10 ); +add_filter( 'the_content', 'my_content_filter', 20 ); + +// Remove hooks safely +remove_action( 'wp_head', 'wp_generator' ); +remove_filter( 'the_content', 'wpautop' ); + +// Conditional hook registration +if ( is_admin() ) { + add_action( 'admin_init', 'my_admin_init' ); +} else { + add_action( 'wp_enqueue_scripts', 'my_frontend_scripts' ); +} + +// Hook into plugin activation/deactivation +register_activation_hook( __FILE__, 'my_plugin_activate' ); +register_deactivation_hook( __FILE__, 'my_plugin_deactivate' ); +``` + +### Class Structure & OOP +```php +/** + * Main plugin class + */ +class My_Plugin { + + /** + * Plugin instance + */ + private static $instance = null; + + /** + * Get plugin instance (singleton pattern) + */ + public static function get_instance() { + if ( null === self::$instance ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Constructor - private for singleton + */ + private function __construct() { + add_action( 'init', array( $this, 'init' ) ); + } + + /** + * Initialize plugin + */ + public function init() { + // Plugin initialization code + if ( is_admin() ) { + $this->init_admin(); + } else { + $this->init_frontend(); + } + } + + /** + * Initialize admin functionality + */ + private function init_admin() { + // Admin-specific code + } + + /** + * Initialize frontend functionality + */ + private function init_frontend() { + // Frontend-specific code + } +} + +// Initialize plugin +My_Plugin::get_instance(); +``` + +### Block Development (PHP) +```php +/** + * Register custom block type + */ +function my_plugin_register_blocks() { + // Register block from block.json + register_block_type( __DIR__ . '/build/blocks/custom-block' ); + + // Register block with PHP configuration + register_block_type( 'my-plugin/custom-block', array( + 'render_callback' => 'my_plugin_render_custom_block', + 'attributes' => array( + 'content' => array( + 'type' => 'string', + 'default' => '' + ), + 'alignment' => array( + 'type' => 'string', + 'default' => 'left' + ) + ), + 'supports' => array( + 'anchor' => true, + 'spacing' => array( + 'margin' => true, + 'padding' => true + ) + ) + ) ); +} +add_action( 'init', 'my_plugin_register_blocks' ); + +/** + * Render callback for custom block + */ +function my_plugin_render_custom_block( $attributes, $content, $block ) { + $wrapper_attributes = get_block_wrapper_attributes( array( + 'class' => 'my-custom-block align' . esc_attr( $attributes['alignment'] ) + ) ); + + return sprintf( + '

%2$s

', + $wrapper_attributes, + esc_html( $attributes['content'] ) + ); +} +``` + +### REST API Integration +```php +/** + * Register custom REST API endpoint + */ +function my_plugin_register_rest_routes() { + register_rest_route( 'my-plugin/v1', '/custom-endpoint', array( + 'methods' => WP_REST_Server::READABLE, + 'callback' => 'my_plugin_rest_callback', + 'permission_callback' => 'my_plugin_rest_permission_check', + 'args' => array( + 'id' => array( + 'required' => true, + 'validate_callback' => function( $param, $request, $key ) { + return is_numeric( $param ); + }, + 'sanitize_callback' => 'absint' + ) + ) + ) ); +} +add_action( 'rest_api_init', 'my_plugin_register_rest_routes' ); + +/** + * REST API callback + */ +function my_plugin_rest_callback( $request ) { + $id = $request->get_param( 'id' ); + + // Process request + $data = my_plugin_get_data( $id ); + + if ( empty( $data ) ) { + return new WP_Error( 'no_data', 'No data found', array( 'status' => 404 ) ); + } + + return rest_ensure_response( $data ); +} + +/** + * Permission check for REST API + */ +function my_plugin_rest_permission_check() { + return current_user_can( 'read' ); +} +``` + +## Code Quality Standards + +### Documentation +- Use proper PHPDoc blocks for all functions, classes, and methods +- Document parameter types, return values, and exceptions +- Include @since tags for version tracking +- Provide clear descriptions and examples where helpful + +### Testing +- Write unit tests for all public methods using PHPUnit +- Test edge cases and error conditions +- Mock WordPress functions in tests +- Aim for high code coverage + +### Performance +- Use appropriate WordPress caching mechanisms +- Minimize database queries and optimize existing ones +- Load scripts and styles conditionally +- Use WordPress coding standards for better performance + +### Compatibility +- Support the minimum required WordPress version +- Test with PHP versions from minimum to latest +- Ensure compatibility with common plugins and themes +- Follow semantic versioning for releases + +Always prioritize security, performance, and maintainability over convenience. When in doubt, follow WordPress Core's implementation patterns and coding standards. \ No newline at end of file diff --git a/.github/instructions/theme-json.instructions.md b/.github/instructions/theme-json.instructions.md new file mode 100644 index 0000000..4572f9b --- /dev/null +++ b/.github/instructions/theme-json.instructions.md @@ -0,0 +1,524 @@ +--- +applyTo: "**/theme.json" +description: "Theme.json configuration standards for WordPress block themes - design systems, tokens, and global styles" +license: "GPL-3.0-or-later" +--- + +# Theme.json Configuration Guidelines + +## Structure & Organization + +### Version and Core Settings +```json +{ + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 3, + "title": "Theme Name", + "description": "A brief description of the theme's design approach", + "settings": { + "appearanceTools": true, + "useRootPaddingAwareAlignments": true, + "layout": { + "contentSize": "620px", + "wideSize": "1200px" + } + } +} +``` + +### Typography System +```json +{ + "settings": { + "typography": { + "dropCap": false, + "fluid": true, + "fontStyle": true, + "fontWeight": true, + "letterSpacing": true, + "lineHeight": true, + "textDecoration": true, + "textTransform": true, + "writingMode": false, + "fontFamilies": [ + { + "fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", + "name": "System Font", + "slug": "system" + }, + { + "fontFamily": "Georgia, serif", + "name": "Serif", + "slug": "serif" + }, + { + "fontFamily": "'Courier New', Courier, monospace", + "name": "Monospace", + "slug": "monospace" + } + ], + "fontSizes": [ + { + "name": "Small", + "size": "0.875rem", + "slug": "small", + "fluid": { + "min": "0.875rem", + "max": "1rem" + } + }, + { + "name": "Medium", + "size": "1rem", + "slug": "medium", + "fluid": false + }, + { + "name": "Large", + "size": "1.25rem", + "slug": "large", + "fluid": { + "min": "1.125rem", + "max": "1.5rem" + } + }, + { + "name": "Extra Large", + "size": "2rem", + "slug": "x-large", + "fluid": { + "min": "1.75rem", + "max": "2.5rem" + } + }, + { + "name": "Huge", + "size": "3rem", + "slug": "xx-large", + "fluid": { + "min": "2.25rem", + "max": "4rem" + } + } + ] + } + } +} +``` + +### Color System +```json +{ + "settings": { + "color": { + "custom": false, + "customDuotone": false, + "customGradient": false, + "defaultDuotones": false, + "defaultGradients": false, + "defaultPalette": false, + "duotone": [ + { + "colors": ["#000000", "#ffffff"], + "name": "Black and White", + "slug": "black-and-white" + } + ], + "gradients": [ + { + "gradient": "linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 100%)", + "name": "Primary to Secondary", + "slug": "primary-to-secondary" + } + ], + "palette": [ + { + "name": "Base", + "slug": "base", + "color": "#ffffff" + }, + { + "name": "Contrast", + "slug": "contrast", + "color": "#000000" + }, + { + "name": "Primary", + "slug": "primary", + "color": "#007cba" + }, + { + "name": "Secondary", + "slug": "secondary", + "color": "#006ba1" + }, + { + "name": "Tertiary", + "slug": "tertiary", + "color": "#f0f0f0" + } + ] + } + } +} +``` + +### Spacing System +```json +{ + "settings": { + "spacing": { + "customSpacingSize": false, + "spacingScale": { + "operator": "*", + "increment": 1.5, + "steps": 7, + "mediumStep": 1.5, + "unit": "rem" + }, + "spacingSizes": [ + { + "name": "2X-Small", + "size": "0.25rem", + "slug": "20" + }, + { + "name": "X-Small", + "size": "0.5rem", + "slug": "30" + }, + { + "name": "Small", + "size": "0.75rem", + "slug": "40" + }, + { + "name": "Medium", + "size": "1rem", + "slug": "50" + }, + { + "name": "Large", + "size": "1.5rem", + "slug": "60" + }, + { + "name": "X-Large", + "size": "2.25rem", + "slug": "70" + }, + { + "name": "2X-Large", + "size": "3.375rem", + "slug": "80" + } + ], + "units": ["px", "em", "rem", "vh", "vw", "%"] + } + } +} +``` + +### Custom Properties & CSS Variables +```json +{ + "settings": { + "custom": { + "spacing": { + "baseline": "1rem", + "gutter": "var(--wp--preset--spacing--50)" + }, + "typography": { + "lineHeight": { + "tight": "1.1", + "normal": "1.5", + "loose": "1.8" + } + }, + "effects": { + "shadow": { + "small": "0 1px 3px rgba(0, 0, 0, 0.12)", + "medium": "0 4px 6px rgba(0, 0, 0, 0.12)", + "large": "0 10px 25px rgba(0, 0, 0, 0.12)" + }, + "borderRadius": { + "small": "0.25rem", + "medium": "0.5rem", + "large": "1rem" + } + } + } + } +} +``` + +## Block-Specific Styling + +### Core Block Customization +```json +{ + "styles": { + "blocks": { + "core/button": { + "border": { + "radius": "var(--wp--custom--effects--border-radius--medium)" + }, + "spacing": { + "padding": { + "top": "var(--wp--preset--spacing--30)", + "right": "var(--wp--preset--spacing--50)", + "bottom": "var(--wp--preset--spacing--30)", + "left": "var(--wp--preset--spacing--50)" + } + }, + "typography": { + "fontWeight": "600", + "textTransform": "uppercase", + "letterSpacing": "0.05em" + }, + "variations": { + "outline": { + "border": { + "width": "2px", + "style": "solid", + "color": "var(--wp--preset--color--primary)" + }, + "color": { + "text": "var(--wp--preset--color--primary)", + "background": "transparent" + } + } + } + }, + "core/heading": { + "typography": { + "fontWeight": "700", + "lineHeight": "var(--wp--custom--typography--line-height--tight)" + }, + "elements": { + "link": { + "color": { + "text": "inherit" + }, + ":hover": { + "color": { + "text": "var(--wp--preset--color--primary)" + } + } + } + } + }, + "core/group": { + "spacing": { + "padding": "var(--wp--preset--spacing--50)" + } + }, + "core/columns": { + "spacing": { + "blockGap": "var(--wp--preset--spacing--60)" + } + } + } + } +} +``` + +### Element Styling +```json +{ + "styles": { + "elements": { + "link": { + "color": { + "text": "var(--wp--preset--color--primary)" + }, + "typography": { + "textDecoration": "underline" + }, + ":hover": { + "color": { + "text": "var(--wp--preset--color--secondary)" + }, + "typography": { + "textDecoration": "none" + } + }, + ":focus": { + "outline": { + "width": "2px", + "style": "solid", + "color": "var(--wp--preset--color--primary)", + "offset": "2px" + } + } + }, + "button": { + "border": { + "radius": "var(--wp--custom--effects--border-radius--medium)" + }, + "color": { + "background": "var(--wp--preset--color--primary)", + "text": "var(--wp--preset--color--base)" + }, + ":hover": { + "color": { + "background": "var(--wp--preset--color--secondary)" + } + }, + ":focus": { + "outline": { + "width": "2px", + "style": "solid", + "color": "var(--wp--preset--color--contrast)", + "offset": "2px" + } + } + }, + "h1": { + "typography": { + "fontSize": "var(--wp--preset--font-size--xx-large)", + "lineHeight": "var(--wp--custom--typography--line-height--tight)" + } + }, + "h2": { + "typography": { + "fontSize": "var(--wp--preset--font-size--x-large)" + } + }, + "h3": { + "typography": { + "fontSize": "var(--wp--preset--font-size--large)" + } + }, + "h4": { + "typography": { + "fontSize": "var(--wp--preset--font-size--medium)" + } + }, + "h5": { + "typography": { + "fontSize": "var(--wp--preset--font-size--small)" + } + }, + "h6": { + "typography": { + "fontSize": "var(--wp--preset--font-size--small)", + "fontWeight": "600" + } + } + } + } +} +``` + +## Advanced Features + +### Style Variations +```json +{ + "styles": [ + { + "name": "default", + "label": "Default", + "isDefault": true + }, + { + "name": "dark", + "label": "Dark", + "styles": { + "color": { + "background": "var(--wp--preset--color--contrast)", + "text": "var(--wp--preset--color--base)" + }, + "blocks": { + "core/button": { + "color": { + "background": "var(--wp--preset--color--base)", + "text": "var(--wp--preset--color--contrast)" + } + } + } + } + } + ] +} +``` + +### Template Part Areas +```json +{ + "templateParts": [ + { + "name": "header", + "title": "Header", + "area": "header" + }, + { + "name": "footer", + "title": "Footer", + "area": "footer" + }, + { + "name": "sidebar", + "title": "Sidebar", + "area": "uncategorized" + } + ] +} +``` + +### Custom Templates +```json +{ + "customTemplates": [ + { + "name": "page-landing", + "title": "Landing Page", + "postTypes": ["page"] + }, + { + "name": "single-portfolio", + "title": "Portfolio Item", + "postTypes": ["portfolio"] + } + ] +} +``` + +## Best Practices + +### Design Token Hierarchy +1. **Base tokens**: Core values (colors, spacing units) +2. **Semantic tokens**: Purpose-based (primary, secondary, error) +3. **Component tokens**: Block-specific values +4. **Context tokens**: Page or section-specific overrides + +### Performance Considerations +- Use CSS custom properties for runtime theme switching +- Minimize the number of font families and weights +- Leverage fluid typography for responsive design +- Use semantic color names rather than descriptive ones +- Keep gradients and duotones to essential variations only + +### Accessibility Standards +- Ensure minimum 4.5:1 contrast ratio for normal text +- Ensure minimum 3:1 contrast ratio for large text +- Provide sufficient spacing for touch targets (44px minimum) +- Use semantic color names that convey meaning +- Test with high contrast and reduced motion preferences + +### Maintainability +- Use consistent naming conventions for slugs +- Document color usage and design decisions +- Group related settings logically +- Use CSS custom properties for complex calculations +- Validate theme.json syntax regularly + +### Migration & Compatibility +- Use appropriate version number (2 or 3) +- Test with multiple WordPress versions +- Provide fallbacks for unsupported features +- Document breaking changes in updates +- Consider child theme compatibility + +Always validate your theme.json file against the WordPress schema and test thoroughly across different devices, browsers, and accessibility tools. \ No newline at end of file diff --git a/.github/linting/yamllint.yml b/.github/linting/yamllint.yml new file mode 100644 index 0000000..a9dc38e --- /dev/null +++ b/.github/linting/yamllint.yml @@ -0,0 +1,15 @@ +extends: default + +rules: + line-length: + max: 100 + level: warning + document-start: disable + truthy: + allowed-values: ['true', 'false', 'on', 'off'] + comments: + min-spaces-from-content: 1 + indentation: + spaces: 2 + key-duplicates: enable + new-line-at-end-of-file: enable diff --git a/.github/prompts/a11y-review.md b/.github/prompts/a11y-review.md new file mode 100644 index 0000000..7141029 --- /dev/null +++ b/.github/prompts/a11y-review.md @@ -0,0 +1,2 @@ +# Accessibility Review +Check focus, labels, contrast, traps, motion; list concrete fixes. diff --git a/.github/prompts/accessibility-audit.prompt.md b/.github/prompts/accessibility-audit.prompt.md new file mode 100644 index 0000000..8fe79eb --- /dev/null +++ b/.github/prompts/accessibility-audit.prompt.md @@ -0,0 +1,276 @@ +--- +description: "Perform comprehensive accessibility audit for WordPress websites, themes, and plugins using WCAG 2.1 AA standards" +mode: "ask" +license: "GPL-3.0-or-later" +--- + +# Accessibility Audit & Testing + +Conduct a thorough accessibility assessment of WordPress websites, themes, or plugins to ensure WCAG 2.1 AA compliance and inclusive user experience for people with disabilities. + +## Audit Scope & Methodology + +**Assessment Areas:** +- **Perceivable**: Information presentation and user interface visibility +- **Operable**: User interface components and navigation functionality +- **Understandable**: Information clarity and predictable functionality +- **Robust**: Content compatibility with assistive technologies + +**Testing Approach:** +- **Automated testing** with tools and scanners +- **Manual testing** with keyboard and assistive technology +- **User testing** with people who use assistive technology +- **Code review** for semantic HTML and ARIA implementation + +## Automated Testing Tools + +### Primary Scanning Tools +- **axe-core DevTools**: Browser extension for comprehensive scanning +- **WAVE (Web Accessibility Evaluation Tool)**: Visual feedback tool +- **Lighthouse**: Performance and accessibility auditing +- **Pa11y**: Command-line accessibility testing +- **Accessibility Insights**: Microsoft's testing platform + +### WordPress-Specific Tools +- **WP Accessibility Plugin**: WordPress accessibility features +- **Accessibility Checker**: WordPress plugin for content auditing +- **Theme Check**: WordPress theme accessibility validation +- **Plugin Check**: WordPress plugin accessibility assessment + +## Manual Testing Procedures + +### Keyboard Navigation Testing +``` +Test Procedure: +1. Use only Tab, Shift+Tab, Enter, Space, Arrow keys +2. Verify all interactive elements are reachable +3. Check logical tab order throughout the page +4. Ensure no keyboard traps exist +5. Verify skip links function correctly +6. Test form navigation and submission +7. Check modal dialog focus management +``` + +### Screen Reader Testing +``` +Testing with NVDA (Windows): +1. Navigate by headings (H key) +2. Navigate by links (K key) +3. Navigate by landmarks (D key) +4. Test forms mode functionality +5. Verify image alt text readings +6. Check table header associations +7. Test live region announcements + +Testing with VoiceOver (macOS): +1. Use VO+CMD+H for headings +2. Use VO+CMD+L for links +3. Use VO+CMD+J for form controls +4. Test rotor navigation +5. Verify spoken feedback quality +6. Check gesture navigation on mobile +``` + +### Visual Testing +``` +Color and Contrast: +1. Check contrast ratios (4.5:1 normal, 3:1 large text) +2. Test with color blindness simulators +3. Verify content works without color +4. Test high contrast mode compatibility + +Zoom and Magnification: +1. Test 200% zoom functionality +2. Check content reflow and readability +3. Verify no horizontal scrolling at 320px width +4. Test with screen magnification software +``` + +## Code Review Checklist + +### HTML Semantic Structure +```html + +

Page Title

+

Section Title

+

Subsection Title

+

Another Section

+ + +
+