@mytechtoday/augment-extensions 0.1.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +614 -39
- package/augment-extensions/coding-standards/bash/README.md +196 -0
- package/augment-extensions/coding-standards/bash/module.json +163 -0
- package/augment-extensions/coding-standards/bash/rules/naming-conventions.md +336 -0
- package/augment-extensions/coding-standards/bash/rules/universal-standards.md +289 -0
- package/augment-extensions/coding-standards/css/README.md +40 -0
- package/augment-extensions/coding-standards/css/examples/css-examples.css +550 -0
- package/augment-extensions/coding-standards/css/module.json +44 -0
- package/augment-extensions/coding-standards/css/rules/css-modern-features.md +448 -0
- package/augment-extensions/coding-standards/css/rules/css-standards.md +492 -0
- package/augment-extensions/coding-standards/html/README.md +40 -0
- package/augment-extensions/coding-standards/html/examples/html-examples.html +267 -0
- package/augment-extensions/coding-standards/html/examples/responsive-layout.html +505 -0
- package/augment-extensions/coding-standards/html/module.json +44 -0
- package/augment-extensions/coding-standards/html/rules/html-standards.md +349 -0
- package/augment-extensions/coding-standards/html-css-js/README.md +194 -0
- package/augment-extensions/coding-standards/html-css-js/examples/async-examples.js +487 -0
- package/augment-extensions/coding-standards/html-css-js/examples/css-examples.css +550 -0
- package/augment-extensions/coding-standards/html-css-js/examples/dom-examples.js +667 -0
- package/augment-extensions/coding-standards/html-css-js/examples/html-examples.html +267 -0
- package/augment-extensions/coding-standards/html-css-js/examples/javascript-examples.js +612 -0
- package/augment-extensions/coding-standards/html-css-js/examples/responsive-layout.html +505 -0
- package/augment-extensions/coding-standards/html-css-js/module.json +48 -0
- package/augment-extensions/coding-standards/html-css-js/rules/async-patterns.md +515 -0
- package/augment-extensions/coding-standards/html-css-js/rules/css-modern-features.md +448 -0
- package/augment-extensions/coding-standards/html-css-js/rules/css-standards.md +492 -0
- package/augment-extensions/coding-standards/html-css-js/rules/dom-manipulation.md +439 -0
- package/augment-extensions/coding-standards/html-css-js/rules/html-standards.md +349 -0
- package/augment-extensions/coding-standards/html-css-js/rules/javascript-standards.md +486 -0
- package/augment-extensions/coding-standards/html-css-js/rules/performance.md +463 -0
- package/augment-extensions/coding-standards/html-css-js/rules/tooling.md +543 -0
- package/augment-extensions/coding-standards/js/README.md +46 -0
- package/augment-extensions/coding-standards/js/examples/async-examples.js +487 -0
- package/augment-extensions/coding-standards/js/examples/dom-examples.js +667 -0
- package/augment-extensions/coding-standards/js/examples/javascript-examples.js +612 -0
- package/augment-extensions/coding-standards/js/module.json +49 -0
- package/augment-extensions/coding-standards/js/rules/async-patterns.md +515 -0
- package/augment-extensions/coding-standards/js/rules/dom-manipulation.md +439 -0
- package/augment-extensions/coding-standards/js/rules/javascript-standards.md +486 -0
- package/augment-extensions/coding-standards/js/rules/performance.md +463 -0
- package/augment-extensions/coding-standards/js/rules/tooling.md +543 -0
- package/augment-extensions/coding-standards/php/README.md +248 -0
- package/augment-extensions/coding-standards/php/examples/api-endpoint-example.php +204 -0
- package/augment-extensions/coding-standards/php/examples/cli-command-example.php +206 -0
- package/augment-extensions/coding-standards/php/examples/legacy-refactoring-example.php +234 -0
- package/augment-extensions/coding-standards/php/examples/web-application-example.php +211 -0
- package/augment-extensions/coding-standards/php/examples/woocommerce-extension-example.php +215 -0
- package/augment-extensions/coding-standards/php/examples/wordpress-plugin-example.php +189 -0
- package/augment-extensions/coding-standards/php/module.json +166 -0
- package/augment-extensions/coding-standards/php/rules/api-development.md +480 -0
- package/augment-extensions/coding-standards/php/rules/category-configuration.md +332 -0
- package/augment-extensions/coding-standards/php/rules/cli-tools.md +472 -0
- package/augment-extensions/coding-standards/php/rules/cms-integration.md +561 -0
- package/augment-extensions/coding-standards/php/rules/code-quality.md +402 -0
- package/augment-extensions/coding-standards/php/rules/documentation.md +425 -0
- package/augment-extensions/coding-standards/php/rules/ecommerce.md +627 -0
- package/augment-extensions/coding-standards/php/rules/error-handling.md +336 -0
- package/augment-extensions/coding-standards/php/rules/legacy-migration.md +677 -0
- package/augment-extensions/coding-standards/php/rules/naming-conventions.md +279 -0
- package/augment-extensions/coding-standards/php/rules/performance.md +392 -0
- package/augment-extensions/coding-standards/php/rules/psr-standards.md +186 -0
- package/augment-extensions/coding-standards/php/rules/security.md +358 -0
- package/augment-extensions/coding-standards/php/rules/testing.md +403 -0
- package/augment-extensions/coding-standards/php/rules/type-declarations.md +331 -0
- package/augment-extensions/coding-standards/php/rules/web-applications.md +426 -0
- package/augment-extensions/coding-standards/powershell/README.md +154 -0
- package/augment-extensions/coding-standards/powershell/examples/admin-example.ps1 +272 -0
- package/augment-extensions/coding-standards/powershell/examples/automation-example.ps1 +173 -0
- package/augment-extensions/coding-standards/powershell/examples/cloud-example.ps1 +243 -0
- package/augment-extensions/coding-standards/powershell/examples/cross-platform-example.ps1 +297 -0
- package/augment-extensions/coding-standards/powershell/examples/dsc-example.ps1 +224 -0
- package/augment-extensions/coding-standards/powershell/examples/legacy-migration-example.ps1 +340 -0
- package/augment-extensions/coding-standards/powershell/examples/module-example.psm1 +255 -0
- package/augment-extensions/coding-standards/powershell/module.json +165 -0
- package/augment-extensions/coding-standards/powershell/rules/administrative-tools.md +439 -0
- package/augment-extensions/coding-standards/powershell/rules/automation-scripts.md +240 -0
- package/augment-extensions/coding-standards/powershell/rules/cloud-orchestration.md +384 -0
- package/augment-extensions/coding-standards/powershell/rules/configuration-schema.md +383 -0
- package/augment-extensions/coding-standards/powershell/rules/cross-platform-scripts.md +482 -0
- package/augment-extensions/coding-standards/powershell/rules/dsc-configurations.md +296 -0
- package/augment-extensions/coding-standards/powershell/rules/error-handling.md +314 -0
- package/augment-extensions/coding-standards/powershell/rules/legacy-migrations.md +466 -0
- package/augment-extensions/coding-standards/powershell/rules/modules-functions.md +244 -0
- package/augment-extensions/coding-standards/powershell/rules/naming-conventions.md +266 -0
- package/augment-extensions/coding-standards/powershell/rules/performance-optimization.md +209 -0
- package/augment-extensions/coding-standards/powershell/rules/security-practices.md +314 -0
- package/augment-extensions/coding-standards/powershell/rules/testing-guidelines.md +268 -0
- package/augment-extensions/coding-standards/powershell/rules/universal-standards.md +197 -0
- package/augment-extensions/coding-standards/python/README.md +12 -8
- package/augment-extensions/coding-standards/python/examples/best-practices.py +373 -0
- package/augment-extensions/coding-standards/python/module.json +8 -4
- package/augment-extensions/coding-standards/python/rules/async-patterns.md +884 -0
- package/augment-extensions/coding-standards/python/rules/documentation.md +831 -0
- package/augment-extensions/coding-standards/python/rules/error-handling.md +855 -68
- package/augment-extensions/coding-standards/python/rules/testing.md +409 -0
- package/augment-extensions/coding-standards/python/rules/tooling.md +446 -0
- package/augment-extensions/coding-standards/python/rules/type-hints.md +115 -50
- package/augment-extensions/collections/html-css-js/README.md +82 -0
- package/augment-extensions/collections/html-css-js/collection.json +41 -0
- package/augment-extensions/domain-rules/database/README.md +161 -0
- package/augment-extensions/domain-rules/database/examples/flat-database-example.md +793 -0
- package/augment-extensions/domain-rules/database/examples/hybrid-database-example.md +1132 -0
- package/augment-extensions/domain-rules/database/examples/nosql-document-example.md +868 -0
- package/augment-extensions/domain-rules/database/examples/nosql-graph-example.md +805 -0
- package/augment-extensions/domain-rules/database/examples/relational-schema-example.md +621 -0
- package/augment-extensions/domain-rules/database/examples/vector-database-example.md +965 -0
- package/augment-extensions/domain-rules/database/module.json +28 -0
- package/augment-extensions/domain-rules/database/rules/flat-databases.md +624 -0
- package/augment-extensions/domain-rules/database/rules/nosql-databases.md +588 -0
- package/augment-extensions/domain-rules/database/rules/nosql-document-stores.md +856 -0
- package/augment-extensions/domain-rules/database/rules/nosql-graph-databases.md +778 -0
- package/augment-extensions/domain-rules/database/rules/nosql-key-value-stores.md +963 -0
- package/augment-extensions/domain-rules/database/rules/performance-optimization.md +1076 -0
- package/augment-extensions/domain-rules/database/rules/relational-databases.md +697 -0
- package/augment-extensions/domain-rules/database/rules/relational-indexing.md +671 -0
- package/augment-extensions/domain-rules/database/rules/relational-query-optimization.md +607 -0
- package/augment-extensions/domain-rules/database/rules/relational-schema-design.md +907 -0
- package/augment-extensions/domain-rules/database/rules/relational-transactions.md +783 -0
- package/augment-extensions/domain-rules/database/rules/security-standards.md +980 -0
- package/augment-extensions/domain-rules/database/rules/universal-best-practices.md +485 -0
- package/augment-extensions/domain-rules/database/rules/vector-databases.md +521 -0
- package/augment-extensions/domain-rules/database/rules/vector-embeddings.md +858 -0
- package/augment-extensions/domain-rules/database/rules/vector-indexing.md +934 -0
- package/augment-extensions/domain-rules/mcp/README.md +150 -0
- package/augment-extensions/domain-rules/mcp/examples/compressed-example.md +522 -0
- package/augment-extensions/domain-rules/mcp/examples/graph-augmented-example.md +520 -0
- package/augment-extensions/domain-rules/mcp/examples/hybrid-example.md +570 -0
- package/augment-extensions/domain-rules/mcp/examples/state-based-example.md +427 -0
- package/augment-extensions/domain-rules/mcp/examples/token-based-example.md +435 -0
- package/augment-extensions/domain-rules/mcp/examples/vector-based-example.md +502 -0
- package/augment-extensions/domain-rules/mcp/module.json +49 -0
- package/augment-extensions/domain-rules/mcp/rules/compressed-mcp.md +595 -0
- package/augment-extensions/domain-rules/mcp/rules/configuration.md +345 -0
- package/augment-extensions/domain-rules/mcp/rules/graph-augmented-mcp.md +687 -0
- package/augment-extensions/domain-rules/mcp/rules/hybrid-mcp.md +636 -0
- package/augment-extensions/domain-rules/mcp/rules/state-based-mcp.md +484 -0
- package/augment-extensions/domain-rules/mcp/rules/testing-validation.md +360 -0
- package/augment-extensions/domain-rules/mcp/rules/token-based-mcp.md +393 -0
- package/augment-extensions/domain-rules/mcp/rules/universal-rules.md +194 -0
- package/augment-extensions/domain-rules/mcp/rules/vector-based-mcp.md +625 -0
- package/augment-extensions/domain-rules/wordpress/README.md +163 -0
- package/augment-extensions/domain-rules/wordpress/module.json +32 -0
- package/augment-extensions/domain-rules/wordpress/rules/coding-standards.md +617 -0
- package/augment-extensions/domain-rules/wordpress/rules/directory-structure.md +270 -0
- package/augment-extensions/domain-rules/wordpress/rules/file-patterns.md +423 -0
- package/augment-extensions/domain-rules/wordpress/rules/gutenberg-blocks.md +493 -0
- package/augment-extensions/domain-rules/wordpress/rules/performance.md +568 -0
- package/augment-extensions/domain-rules/wordpress/rules/plugin-development.md +510 -0
- package/augment-extensions/domain-rules/wordpress/rules/project-detection.md +251 -0
- package/augment-extensions/domain-rules/wordpress/rules/rest-api.md +501 -0
- package/augment-extensions/domain-rules/wordpress/rules/security.md +564 -0
- package/augment-extensions/domain-rules/wordpress/rules/theme-development.md +388 -0
- package/augment-extensions/domain-rules/wordpress/rules/woocommerce.md +441 -0
- package/augment-extensions/domain-rules/wordpress-plugin/README.md +139 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/ajax-plugin.md +1599 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/custom-post-type-plugin.md +1727 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block-plugin.md +428 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block.md +422 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/mvc-plugin.md +1623 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/object-oriented-plugin.md +1343 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/rest-endpoint.md +734 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/settings-page-plugin.md +1350 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/simple-procedural-plugin.md +503 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/singleton-plugin.md +971 -0
- package/augment-extensions/domain-rules/wordpress-plugin/module.json +53 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/activation-hooks.md +770 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/admin-interface.md +874 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/ajax-handlers.md +629 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/asset-management.md +559 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/context-providers.md +709 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/cron-jobs.md +736 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/database-management.md +1057 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/documentation-standards.md +463 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/frontend-functionality.md +478 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/gutenberg-blocks.md +818 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/internationalization.md +416 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/migration.md +667 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/performance-optimization.md +878 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-architecture.md +693 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-structure.md +352 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/rest-api.md +818 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/scaffolding-workflow.md +624 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/security-best-practices.md +866 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/testing-patterns.md +1165 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/testing.md +414 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/vscode-integration.md +751 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/woocommerce-integration.md +949 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/wordpress-org-submission.md +458 -0
- package/augment-extensions/examples/gutenberg-block-plugin/README.md +101 -0
- package/augment-extensions/examples/gutenberg-block-plugin/examples/testimonial-block.md +428 -0
- package/augment-extensions/examples/gutenberg-block-plugin/module.json +40 -0
- package/augment-extensions/examples/rest-api-plugin/README.md +98 -0
- package/augment-extensions/examples/rest-api-plugin/examples/task-manager-api.md +1299 -0
- package/augment-extensions/examples/rest-api-plugin/module.json +40 -0
- package/augment-extensions/examples/woocommerce-extension/README.md +98 -0
- package/augment-extensions/examples/woocommerce-extension/examples/product-customizer.md +763 -0
- package/augment-extensions/examples/woocommerce-extension/module.json +40 -0
- package/augment-extensions/workflows/beads/module.json +4 -3
- package/augment-extensions/workflows/database/README.md +195 -0
- package/augment-extensions/workflows/database/ai-prompt-testing.md +295 -0
- package/augment-extensions/workflows/database/examples/migration-example.md +498 -0
- package/augment-extensions/workflows/database/examples/optimization-example.md +496 -0
- package/augment-extensions/workflows/database/examples/schema-design-example.md +444 -0
- package/augment-extensions/workflows/database/module.json +42 -0
- package/augment-extensions/workflows/database/rules/data-migration.md +249 -0
- package/augment-extensions/workflows/database/rules/documentation-standards.md +339 -0
- package/augment-extensions/workflows/database/rules/migration-workflow.md +352 -0
- package/augment-extensions/workflows/database/rules/optimization-workflow.md +435 -0
- package/augment-extensions/workflows/database/rules/schema-design-workflow.md +535 -0
- package/augment-extensions/workflows/database/rules/testing-patterns.md +305 -0
- package/augment-extensions/workflows/database/rules/workflow.md +458 -0
- package/augment-extensions/workflows/openspec/module.json +4 -3
- package/augment-extensions/workflows/wordpress-plugin/README.md +232 -0
- package/augment-extensions/workflows/wordpress-plugin/ai-prompts.md +839 -0
- package/augment-extensions/workflows/wordpress-plugin/bead-decomposition-patterns.md +854 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/complete-plugin-example.md +540 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/custom-post-type-example.md +1083 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/feature-addition-workflow.md +669 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/plugin-creation-workflow.md +597 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/secure-form-handler-example.md +925 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/security-audit-workflow.md +752 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/wordpress-org-submission-workflow.md +773 -0
- package/augment-extensions/workflows/wordpress-plugin/module.json +49 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/best-practices.md +942 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/development-workflow.md +702 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/submission-workflow.md +728 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/testing-workflow.md +775 -0
- package/augment-extensions/writing-standards/screenplay/README.md +171 -0
- package/augment-extensions/writing-standards/screenplay/examples/aaa-hollywood-scene.fountain +164 -0
- package/augment-extensions/writing-standards/screenplay/module.json +124 -0
- package/augment-extensions/writing-standards/screenplay/rules/universal-formatting.md +339 -0
- package/cli/MODULES.md +302 -0
- package/cli/dist/cli.js +142 -9
- package/cli/dist/cli.js.map +1 -1
- package/cli/dist/commands/catalog.d.ts +13 -0
- package/cli/dist/commands/catalog.d.ts.map +1 -0
- package/cli/dist/commands/catalog.js +104 -0
- package/cli/dist/commands/catalog.js.map +1 -0
- package/cli/dist/commands/gui.d.ts +6 -0
- package/cli/dist/commands/gui.d.ts.map +1 -0
- package/cli/dist/commands/gui.js +211 -0
- package/cli/dist/commands/gui.js.map +1 -0
- package/cli/dist/commands/init.d.ts.map +1 -1
- package/cli/dist/commands/init.js +12 -0
- package/cli/dist/commands/init.js.map +1 -1
- package/cli/dist/commands/install-rules.d.ts +14 -0
- package/cli/dist/commands/install-rules.d.ts.map +1 -0
- package/cli/dist/commands/install-rules.js +127 -0
- package/cli/dist/commands/install-rules.js.map +1 -0
- package/cli/dist/commands/link.d.ts.map +1 -1
- package/cli/dist/commands/link.js +9 -11
- package/cli/dist/commands/link.js.map +1 -1
- package/cli/dist/commands/list.d.ts.map +1 -1
- package/cli/dist/commands/list.js +11 -28
- package/cli/dist/commands/list.js.map +1 -1
- package/cli/dist/commands/mcp.d.ts +48 -0
- package/cli/dist/commands/mcp.d.ts.map +1 -0
- package/cli/dist/commands/mcp.js +229 -0
- package/cli/dist/commands/mcp.js.map +1 -0
- package/cli/dist/commands/self-remove.d.ts +7 -0
- package/cli/dist/commands/self-remove.d.ts.map +1 -0
- package/cli/dist/commands/self-remove.js +179 -0
- package/cli/dist/commands/self-remove.js.map +1 -0
- package/cli/dist/commands/show.d.ts.map +1 -1
- package/cli/dist/commands/show.js +42 -71
- package/cli/dist/commands/show.js.map +1 -1
- package/cli/dist/commands/skill.d.ts +67 -0
- package/cli/dist/commands/skill.d.ts.map +1 -0
- package/cli/dist/commands/skill.js +513 -0
- package/cli/dist/commands/skill.js.map +1 -0
- package/cli/dist/commands/unlink.d.ts +6 -0
- package/cli/dist/commands/unlink.d.ts.map +1 -0
- package/cli/dist/commands/unlink.js +115 -0
- package/cli/dist/commands/unlink.js.map +1 -0
- package/cli/dist/commands/validate.d.ts +6 -0
- package/cli/dist/commands/validate.d.ts.map +1 -0
- package/cli/dist/commands/validate.js +159 -0
- package/cli/dist/commands/validate.js.map +1 -0
- package/cli/dist/utils/catalog-sync.d.ts +22 -0
- package/cli/dist/utils/catalog-sync.d.ts.map +1 -0
- package/cli/dist/utils/catalog-sync.js +157 -0
- package/cli/dist/utils/catalog-sync.js.map +1 -0
- package/cli/dist/utils/character-count.d.ts +56 -0
- package/cli/dist/utils/character-count.d.ts.map +1 -0
- package/cli/dist/utils/character-count.js +190 -0
- package/cli/dist/utils/character-count.js.map +1 -0
- package/cli/dist/utils/documentation-validator.d.ts +18 -0
- package/cli/dist/utils/documentation-validator.d.ts.map +1 -0
- package/cli/dist/utils/documentation-validator.js +233 -0
- package/cli/dist/utils/documentation-validator.js.map +1 -0
- package/cli/dist/utils/install-rules.d.ts +32 -0
- package/cli/dist/utils/install-rules.d.ts.map +1 -0
- package/cli/dist/utils/install-rules.js +375 -0
- package/cli/dist/utils/install-rules.js.map +1 -0
- package/cli/dist/utils/mcp-integration.d.ts +70 -0
- package/cli/dist/utils/mcp-integration.d.ts.map +1 -0
- package/cli/dist/utils/mcp-integration.js +292 -0
- package/cli/dist/utils/mcp-integration.js.map +1 -0
- package/cli/dist/utils/module-system.d.ts +153 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -0
- package/cli/dist/utils/module-system.js +528 -0
- package/cli/dist/utils/module-system.js.map +1 -0
- package/cli/dist/utils/modules-catalog.d.ts +33 -0
- package/cli/dist/utils/modules-catalog.d.ts.map +1 -0
- package/cli/dist/utils/modules-catalog.js +163 -0
- package/cli/dist/utils/modules-catalog.js.map +1 -0
- package/cli/dist/utils/rule-install-hooks.d.ts +19 -0
- package/cli/dist/utils/rule-install-hooks.d.ts.map +1 -0
- package/cli/dist/utils/rule-install-hooks.js +224 -0
- package/cli/dist/utils/rule-install-hooks.js.map +1 -0
- package/cli/dist/utils/skill-system.d.ts +95 -0
- package/cli/dist/utils/skill-system.d.ts.map +1 -0
- package/cli/dist/utils/skill-system.js +313 -0
- package/cli/dist/utils/skill-system.js.map +1 -0
- package/modules.md +534 -70
- package/package.json +12 -3
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
# Gutenberg Block Development Workflow
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document provides step-by-step workflows for developing custom Gutenberg blocks using modern WordPress block development tools.
|
|
6
|
+
|
|
7
|
+
## Workflow 1: Create New Block with @wordpress/create-block
|
|
8
|
+
|
|
9
|
+
### Step 1: Initialize Block
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Navigate to plugins directory
|
|
13
|
+
cd wp-content/plugins
|
|
14
|
+
|
|
15
|
+
# Create new block (interactive)
|
|
16
|
+
npx @wordpress/create-block my-custom-block
|
|
17
|
+
|
|
18
|
+
# Or with options
|
|
19
|
+
npx @wordpress/create-block my-custom-block \
|
|
20
|
+
--namespace="my-company" \
|
|
21
|
+
--title="My Custom Block" \
|
|
22
|
+
--category="widgets" \
|
|
23
|
+
--template="@wordpress/create-block/block-template"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This creates:
|
|
27
|
+
```
|
|
28
|
+
my-custom-block/
|
|
29
|
+
├── build/ # Compiled files (gitignored)
|
|
30
|
+
├── src/ # Source files
|
|
31
|
+
│ ├── index.js # Block registration
|
|
32
|
+
│ ├── edit.js # Editor component
|
|
33
|
+
│ ├── save.js # Save function
|
|
34
|
+
│ ├── style.scss # Frontend styles
|
|
35
|
+
│ └── editor.scss # Editor styles
|
|
36
|
+
├── block.json # Block metadata
|
|
37
|
+
├── my-custom-block.php # Main plugin file
|
|
38
|
+
├── package.json # Dependencies
|
|
39
|
+
└── readme.txt # Plugin readme
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 2: Configure block.json
|
|
43
|
+
|
|
44
|
+
**block.json**:
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
48
|
+
"apiVersion": 2,
|
|
49
|
+
"name": "my-company/my-custom-block",
|
|
50
|
+
"version": "1.0.0",
|
|
51
|
+
"title": "My Custom Block",
|
|
52
|
+
"category": "widgets",
|
|
53
|
+
"icon": "smiley",
|
|
54
|
+
"description": "A custom Gutenberg block",
|
|
55
|
+
"keywords": ["custom", "block"],
|
|
56
|
+
"supports": {
|
|
57
|
+
"html": false,
|
|
58
|
+
"align": true,
|
|
59
|
+
"color": {
|
|
60
|
+
"background": true,
|
|
61
|
+
"text": true
|
|
62
|
+
},
|
|
63
|
+
"spacing": {
|
|
64
|
+
"padding": true,
|
|
65
|
+
"margin": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"attributes": {
|
|
69
|
+
"content": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"source": "html",
|
|
72
|
+
"selector": "p"
|
|
73
|
+
},
|
|
74
|
+
"alignment": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"default": "left"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"example": {
|
|
80
|
+
"attributes": {
|
|
81
|
+
"content": "This is example content"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"textdomain": "my-custom-block",
|
|
85
|
+
"editorScript": "file:./index.js",
|
|
86
|
+
"editorStyle": "file:./index.css",
|
|
87
|
+
"style": "file:./style-index.css"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 3: Implement Edit Component
|
|
92
|
+
|
|
93
|
+
**src/edit.js**:
|
|
94
|
+
```jsx
|
|
95
|
+
import { __ } from '@wordpress/i18n';
|
|
96
|
+
import { useBlockProps, RichText, AlignmentToolbar, BlockControls } from '@wordpress/block-editor';
|
|
97
|
+
import './editor.scss';
|
|
98
|
+
|
|
99
|
+
export default function Edit({ attributes, setAttributes }) {
|
|
100
|
+
const { content, alignment } = attributes;
|
|
101
|
+
|
|
102
|
+
const blockProps = useBlockProps({
|
|
103
|
+
className: `has-text-align-${alignment}`,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<>
|
|
108
|
+
<BlockControls>
|
|
109
|
+
<AlignmentToolbar
|
|
110
|
+
value={alignment}
|
|
111
|
+
onChange={(newAlignment) => setAttributes({ alignment: newAlignment })}
|
|
112
|
+
/>
|
|
113
|
+
</BlockControls>
|
|
114
|
+
|
|
115
|
+
<div {...blockProps}>
|
|
116
|
+
<RichText
|
|
117
|
+
tagName="p"
|
|
118
|
+
value={content}
|
|
119
|
+
onChange={(newContent) => setAttributes({ content: newContent })}
|
|
120
|
+
placeholder={__('Enter your content...', 'my-custom-block')}
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Step 4: Implement Save Function
|
|
129
|
+
|
|
130
|
+
**src/save.js**:
|
|
131
|
+
```jsx
|
|
132
|
+
import { useBlockProps, RichText } from '@wordpress/block-editor';
|
|
133
|
+
|
|
134
|
+
export default function save({ attributes }) {
|
|
135
|
+
const { content, alignment } = attributes;
|
|
136
|
+
|
|
137
|
+
const blockProps = useBlockProps.save({
|
|
138
|
+
className: `has-text-align-${alignment}`,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<div {...blockProps}>
|
|
143
|
+
<RichText.Content tagName="p" value={content} />
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Step 5: Register Block
|
|
150
|
+
|
|
151
|
+
**src/index.js**:
|
|
152
|
+
```js
|
|
153
|
+
import { registerBlockType } from '@wordpress/blocks';
|
|
154
|
+
import './style.scss';
|
|
155
|
+
import Edit from './edit';
|
|
156
|
+
import save from './save';
|
|
157
|
+
import metadata from './block.json';
|
|
158
|
+
|
|
159
|
+
registerBlockType(metadata.name, {
|
|
160
|
+
edit: Edit,
|
|
161
|
+
save,
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Step 6: Build and Test
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Development mode (watch for changes)
|
|
169
|
+
npm start
|
|
170
|
+
|
|
171
|
+
# Production build
|
|
172
|
+
npm run build
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Activate the plugin in WordPress admin and test the block in the editor.
|
|
176
|
+
|
|
177
|
+
## Workflow 2: Add Block Controls and Settings
|
|
178
|
+
|
|
179
|
+
### Inspector Controls (Sidebar)
|
|
180
|
+
|
|
181
|
+
**src/edit.js**:
|
|
182
|
+
```jsx
|
|
183
|
+
import { InspectorControls } from '@wordpress/block-editor';
|
|
184
|
+
import { PanelBody, TextControl, ToggleControl, RangeControl } from '@wordpress/components';
|
|
185
|
+
|
|
186
|
+
export default function Edit({ attributes, setAttributes }) {
|
|
187
|
+
const { content, showIcon, iconSize } = attributes;
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<>
|
|
191
|
+
<InspectorControls>
|
|
192
|
+
<PanelBody title={__('Settings', 'my-custom-block')}>
|
|
193
|
+
<ToggleControl
|
|
194
|
+
label={__('Show Icon', 'my-custom-block')}
|
|
195
|
+
checked={showIcon}
|
|
196
|
+
onChange={(value) => setAttributes({ showIcon: value })}
|
|
197
|
+
/>
|
|
198
|
+
|
|
199
|
+
{showIcon && (
|
|
200
|
+
<RangeControl
|
|
201
|
+
label={__('Icon Size', 'my-custom-block')}
|
|
202
|
+
value={iconSize}
|
|
203
|
+
onChange={(value) => setAttributes({ iconSize: value })}
|
|
204
|
+
min={10}
|
|
205
|
+
max={100}
|
|
206
|
+
/>
|
|
207
|
+
)}
|
|
208
|
+
|
|
209
|
+
<TextControl
|
|
210
|
+
label={__('Custom Class', 'my-custom-block')}
|
|
211
|
+
value={attributes.customClass}
|
|
212
|
+
onChange={(value) => setAttributes({ customClass: value })}
|
|
213
|
+
/>
|
|
214
|
+
</PanelBody>
|
|
215
|
+
</InspectorControls>
|
|
216
|
+
|
|
217
|
+
{/* Block content */}
|
|
218
|
+
</>
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Block Toolbar Controls
|
|
224
|
+
|
|
225
|
+
```jsx
|
|
226
|
+
import { BlockControls, AlignmentToolbar } from '@wordpress/block-editor';
|
|
227
|
+
import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
|
|
228
|
+
|
|
229
|
+
<BlockControls>
|
|
230
|
+
<AlignmentToolbar
|
|
231
|
+
value={alignment}
|
|
232
|
+
onChange={(newAlignment) => setAttributes({ alignment: newAlignment })}
|
|
233
|
+
/>
|
|
234
|
+
|
|
235
|
+
<ToolbarGroup>
|
|
236
|
+
<ToolbarButton
|
|
237
|
+
icon="admin-links"
|
|
238
|
+
label={__('Add Link', 'my-custom-block')}
|
|
239
|
+
onClick={() => setAttributes({ hasLink: !hasLink })}
|
|
240
|
+
isActive={hasLink}
|
|
241
|
+
/>
|
|
242
|
+
</ToolbarGroup>
|
|
243
|
+
</BlockControls>
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Workflow 3: Dynamic Blocks (Server-Side Rendering)
|
|
247
|
+
|
|
248
|
+
### Step 1: Configure block.json for Dynamic Block
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"apiVersion": 2,
|
|
253
|
+
"name": "my-company/dynamic-block",
|
|
254
|
+
"title": "Dynamic Block",
|
|
255
|
+
"category": "widgets",
|
|
256
|
+
"attributes": {
|
|
257
|
+
"numberOfPosts": {
|
|
258
|
+
"type": "number",
|
|
259
|
+
"default": 5
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"editorScript": "file:./index.js",
|
|
263
|
+
"render": "file:./render.php"
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Step 2: Create Render Template
|
|
268
|
+
|
|
269
|
+
**src/render.php**:
|
|
270
|
+
```php
|
|
271
|
+
<?php
|
|
272
|
+
/**
|
|
273
|
+
* Server-side rendering for dynamic block
|
|
274
|
+
*
|
|
275
|
+
* @param array $attributes Block attributes
|
|
276
|
+
* @param string $content Block content
|
|
277
|
+
* @param WP_Block $block Block instance
|
|
278
|
+
*/
|
|
279
|
+
|
|
280
|
+
$number_of_posts = isset( $attributes['numberOfPosts'] ) ? absint( $attributes['numberOfPosts'] ) : 5;
|
|
281
|
+
|
|
282
|
+
$args = array(
|
|
283
|
+
'posts_per_page' => $number_of_posts,
|
|
284
|
+
'post_status' => 'publish',
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
$query = new WP_Query( $args );
|
|
288
|
+
|
|
289
|
+
if ( ! $query->have_posts() ) {
|
|
290
|
+
return '<p>' . __( 'No posts found.', 'my-custom-block' ) . '</p>';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
$output = '<div ' . get_block_wrapper_attributes() . '>';
|
|
294
|
+
$output .= '<ul class="dynamic-block-list">';
|
|
295
|
+
|
|
296
|
+
while ( $query->have_posts() ) {
|
|
297
|
+
$query->the_post();
|
|
298
|
+
$output .= '<li>';
|
|
299
|
+
$output .= '<a href="' . esc_url( get_permalink() ) . '">';
|
|
300
|
+
$output .= esc_html( get_the_title() );
|
|
301
|
+
$output .= '</a>';
|
|
302
|
+
$output .= '</li>';
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
$output .= '</ul>';
|
|
306
|
+
$output .= '</div>';
|
|
307
|
+
|
|
308
|
+
wp_reset_postdata();
|
|
309
|
+
|
|
310
|
+
echo $output;
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Step 3: Create Edit Component for Dynamic Block
|
|
314
|
+
|
|
315
|
+
**src/edit.js**:
|
|
316
|
+
```jsx
|
|
317
|
+
import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
|
|
318
|
+
import { PanelBody, RangeControl } from '@wordpress/components';
|
|
319
|
+
import { useSelect } from '@wordpress/data';
|
|
320
|
+
import { __ } from '@wordpress/i18n';
|
|
321
|
+
|
|
322
|
+
export default function Edit({ attributes, setAttributes }) {
|
|
323
|
+
const { numberOfPosts } = attributes;
|
|
324
|
+
|
|
325
|
+
const posts = useSelect((select) => {
|
|
326
|
+
return select('core').getEntityRecords('postType', 'post', {
|
|
327
|
+
per_page: numberOfPosts,
|
|
328
|
+
});
|
|
329
|
+
}, [numberOfPosts]);
|
|
330
|
+
|
|
331
|
+
const blockProps = useBlockProps();
|
|
332
|
+
|
|
333
|
+
return (
|
|
334
|
+
<>
|
|
335
|
+
<InspectorControls>
|
|
336
|
+
<PanelBody title={__('Settings', 'my-custom-block')}>
|
|
337
|
+
<RangeControl
|
|
338
|
+
label={__('Number of Posts', 'my-custom-block')}
|
|
339
|
+
value={numberOfPosts}
|
|
340
|
+
onChange={(value) => setAttributes({ numberOfPosts: value })}
|
|
341
|
+
min={1}
|
|
342
|
+
max={10}
|
|
343
|
+
/>
|
|
344
|
+
</PanelBody>
|
|
345
|
+
</InspectorControls>
|
|
346
|
+
|
|
347
|
+
<div {...blockProps}>
|
|
348
|
+
{!posts && <p>{__('Loading...', 'my-custom-block')}</p>}
|
|
349
|
+
|
|
350
|
+
{posts && posts.length === 0 && (
|
|
351
|
+
<p>{__('No posts found.', 'my-custom-block')}</p>
|
|
352
|
+
)}
|
|
353
|
+
|
|
354
|
+
{posts && posts.length > 0 && (
|
|
355
|
+
<ul className="dynamic-block-list">
|
|
356
|
+
{posts.map((post) => (
|
|
357
|
+
<li key={post.id}>
|
|
358
|
+
<a href={post.link}>{post.title.rendered}</a>
|
|
359
|
+
</li>
|
|
360
|
+
))}
|
|
361
|
+
</ul>
|
|
362
|
+
)}
|
|
363
|
+
</div>
|
|
364
|
+
</>
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Step 4: No Save Function for Dynamic Blocks
|
|
370
|
+
|
|
371
|
+
**src/save.js**:
|
|
372
|
+
```jsx
|
|
373
|
+
// Dynamic blocks don't need a save function
|
|
374
|
+
export default function save() {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
## Workflow 4: Block Variations and Styles
|
|
380
|
+
|
|
381
|
+
### Block Variations
|
|
382
|
+
|
|
383
|
+
**src/index.js**:
|
|
384
|
+
```js
|
|
385
|
+
import { registerBlockType, registerBlockVariation } from '@wordpress/blocks';
|
|
386
|
+
|
|
387
|
+
registerBlockType(metadata.name, {
|
|
388
|
+
edit: Edit,
|
|
389
|
+
save,
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
// Register variations
|
|
393
|
+
registerBlockVariation('my-company/my-custom-block', {
|
|
394
|
+
name: 'highlighted',
|
|
395
|
+
title: __('Highlighted Block', 'my-custom-block'),
|
|
396
|
+
description: __('A highlighted version of the block', 'my-custom-block'),
|
|
397
|
+
icon: 'star-filled',
|
|
398
|
+
attributes: {
|
|
399
|
+
className: 'is-style-highlighted',
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Block Styles
|
|
405
|
+
|
|
406
|
+
**src/index.js**:
|
|
407
|
+
```js
|
|
408
|
+
import { registerBlockStyle } from '@wordpress/blocks';
|
|
409
|
+
|
|
410
|
+
registerBlockStyle('my-company/my-custom-block', {
|
|
411
|
+
name: 'rounded',
|
|
412
|
+
label: __('Rounded', 'my-custom-block'),
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
registerBlockStyle('my-company/my-custom-block', {
|
|
416
|
+
name: 'shadow',
|
|
417
|
+
label: __('Shadow', 'my-custom-block'),
|
|
418
|
+
});
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**src/style.scss**:
|
|
422
|
+
```scss
|
|
423
|
+
.wp-block-my-company-my-custom-block {
|
|
424
|
+
&.is-style-rounded {
|
|
425
|
+
border-radius: 10px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
&.is-style-shadow {
|
|
429
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## Testing and Production
|
|
435
|
+
|
|
436
|
+
### Development Workflow
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
# Start development server
|
|
440
|
+
npm start
|
|
441
|
+
|
|
442
|
+
# This watches for changes and rebuilds automatically
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Production Build
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
# Build for production
|
|
449
|
+
npm run build
|
|
450
|
+
|
|
451
|
+
# This creates optimized files in build/ directory
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### Testing Checklist
|
|
455
|
+
|
|
456
|
+
✅ Block appears in inserter
|
|
457
|
+
✅ Block can be inserted into editor
|
|
458
|
+
✅ All controls work correctly
|
|
459
|
+
✅ Block saves and loads correctly
|
|
460
|
+
✅ Frontend display matches editor
|
|
461
|
+
✅ Styles load correctly
|
|
462
|
+
✅ Block works in different contexts (posts, pages, widgets)
|
|
463
|
+
✅ Block is accessible (keyboard navigation, screen readers)
|
|
464
|
+
✅ Block works with different themes
|
|
465
|
+
✅ No console errors
|
|
466
|
+
|
|
467
|
+
## Best Practices
|
|
468
|
+
|
|
469
|
+
### DO
|
|
470
|
+
|
|
471
|
+
✅ Use `block.json` for metadata
|
|
472
|
+
✅ Use `@wordpress/scripts` for building
|
|
473
|
+
✅ Follow WordPress coding standards
|
|
474
|
+
✅ Use translation functions
|
|
475
|
+
✅ Provide block examples
|
|
476
|
+
✅ Support common block features (align, color, spacing)
|
|
477
|
+
✅ Test with different themes
|
|
478
|
+
✅ Optimize for performance
|
|
479
|
+
✅ Document block usage
|
|
480
|
+
✅ Version control source files, not build files
|
|
481
|
+
|
|
482
|
+
### DON'T
|
|
483
|
+
|
|
484
|
+
❌ Hardcode values that should be configurable
|
|
485
|
+
❌ Use inline styles
|
|
486
|
+
❌ Ignore accessibility
|
|
487
|
+
❌ Skip error handling
|
|
488
|
+
❌ Commit build files to version control
|
|
489
|
+
❌ Use deprecated WordPress functions
|
|
490
|
+
❌ Forget to sanitize/escape data
|
|
491
|
+
❌ Create overly complex blocks
|
|
492
|
+
❌ Ignore mobile responsiveness
|
|
493
|
+
|