一键导入
feature-development
Architectural guidelines for developing new self-contained Features in StaticForge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Architectural guidelines for developing new self-contained Features in StaticForge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Protocols for handling content, shortcodes, YAML frontmatter, and Twig within StaticForge.
Critical security and deployment protocols for editing code, handling credentials, and publishing StaticForge.
Development workflow for StaticForge using strict PHP and the Lando environment wrapper.
| name | feature-development |
| description | Architectural guidelines for developing new self-contained Features in StaticForge. |
| applyTo | src/Features/**/*.php |
This skill defines the mandatory approach to writing new core capabilities inside the project.
Features over Core Modifications:
All new logic must be encapsulated in a Feature class within src/Features/{FeatureName}/Feature.php. Do not modify models, controllers, or logic in src/Core/ directly unless absolutely necessary.
Implementation Interface:
EICC\StaticForge\Core\FeatureInterface.EICC\StaticForge\Core\ConfigurableFeatureInterface.Event-Driven Hooking:
Features interact with the lifecycle via Event Mapping (priorities 0–999, lower runs earlier). Inside your register(EventManager $events) method, listen to the necessary events such as:
PRE_GLOB, POST_GLOB, PRE_LOOPPRE_RENDER, RENDER, POST_RENDERMARKDOWN_CONVERTED, COLLECT_MENU_ITEMS, or RSS_BUILDER_INIT.Self-Containment Strategy:
The src/Features/{FeatureName} directory must remain self-contained. The eventual goal for all core features is automated extraction into standalone Composer packages (via scripts/extract_feature.php).
Services/.Models/.Vendors & External Classes:
NEVER manually modify any package inside the vendor/ directory. All overrides must happen at the architecture level (overriding container bindings or listening to events with high priority).