fusion-framework-feature-toggling
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeprecated — This skill has been merged into. Usefusion-app-react-devand its referencefusion-app-react-devfor all Fusion Framework feature-flag guidance. This skill is retained for historical context only and will be removed in a future release.references/using-feature-flags.md
Deprecated — 此技能已合并至。 所有Fusion Framework功能标志相关指导请使用fusion-app-react-dev及其参考文档fusion-app-react-dev。 保留此技能仅作历史参考,未来版本中将移除。references/using-feature-flags.md
Fusion Framework Feature Toggling
Fusion Framework 功能切换
When to use
适用场景
Use this skill when a developer needs grounded help with feature toggling in Fusion Framework.
Typical triggers:
- "Help me add a feature flag to a Fusion Framework app"
- "How do I use useFeature in Fusion Framework?"
- "Which Fusion Framework feature-flag API should I use here?"
- "Review this Fusion feature toggle setup"
- "How should I roll out and later remove this Fusion feature flag?"
当开发者需要Fusion Framework中功能切换的可靠指导时,可使用此技能。
典型触发场景:
- "帮我给Fusion Framework应用添加功能标志"
- "如何在Fusion Framework中使用useFeature?"
- "这里应该使用Fusion Framework的哪个功能标志API?"
- "帮我审核这个Fusion功能切换的配置"
- "我应该如何推出并后续移除这个Fusion功能标志?"
When not to use
不适用场景
Do not use this skill for:
- generic LaunchDarkly or SaaS flag-platform setup
- backend-only rollout systems outside Fusion Framework
- inventing a new feature-toggle architecture without framework evidence
- non-Fusion React or frontend flagging guidance
请勿将此技能用于:
- 通用LaunchDarkly或SaaS标志平台配置
- Fusion Framework之外的仅后端推出系统
- 无框架依据的全新功能切换架构设计
- 非Fusion的React或前端标志相关指导
Required inputs
必要输入
Collect before responding:
- whether the work is app-level or framework-level
- the developer's goal: add, review, debug, roll out, or remove a flag
- the intended feature key or feature description
- whether the flag needs persistence, URL control, or a typed value
- any current code context that should be adapted
If important inputs are missing, ask only the smallest question needed to choose the right framework surface.
回复前需收集:
- 工作是应用级还是框架级
- 开发者的目标:添加、审核、调试、推出或移除标志
- 目标功能键或功能描述
- 标志是否需要持久化、URL控制或类型化值
- 任何需要适配的现有代码上下文
若缺少重要输入,仅询问选择合适框架接口所需的最精简问题。
Instructions
操作步骤
-
Confirm the request is really about Fusion Framework feature toggling.
- If the request is generic flag-platform work, do not force this skill.
-
Use Fusion MCP first when it is available.
- Query with the user's wording plus feature-toggle terms such as
mcp_fusion_search_framework,feature flag,feature toggling,useFeature, orenableFeatureFlag.enableFeatureFlagging - If the first result set is weak, do one refinement pass.
- Use only when broader product guidance is needed beyond framework implementation details.
mcp_fusion_search_docs
- Query
-
If Fusion MCP is unavailable or inconclusive, say so clearly and switch to the bundled fallback.
- Use references/public-framework-reference.md as the fallback source of truth.
- Use assets/offline-feature-toggle-checklist.md and assets/offline-prompt-template.md for users who do not have the server.
-
Identify which help shape the user needs.
- New flag setup: explain the configuration surface and show a minimal example.
- Component usage: explain , toggle behavior, and value handling.
useFeature - Review or rollout: apply the checklist and point out missing ownership, testing, or cleanup.
- Removal: identify the flag definition, consumers, and dead branches that should be deleted together.
-
Prefer the currently evidenced Fusion Framework entry points.
- App-level example: from
enableFeatureFlag(appConfigurator, [...]).@equinor/fusion-framework-react-app/feature-flag - Framework-level example: from
enableFeatureFlagging(config, builder => ...).@equinor/fusion-framework-module-feature-flag - Plugin examples: and
createLocalStoragePlugin.createUrlPlugin - Hook usage: in the app package, or the provider-based
useFeature(key)variant in the framework package.useFeature(provider, key)
- App-level example:
-
Call out public-source ambiguity instead of guessing.
- Public sources currently show both and
readonly; tell the user to verify the local type before finalizing code.readOnly - Public docs mention a future API-service direction for feature flags; do not present that as the current default unless live MCP or local code confirms it.
- Public sources currently show both
-
Give practical guidance, not just API names.
- Prefer stable enum or constant keys over ad hoc string literals.
- Include and
titlewhen the flag is surfaced to users or reviewers.description - Use only when behavior needs configuration in addition to on/off state.
value - Keep flags easy to remove, define an owner, and call out the cleanup trigger.
- Distinguish local app toggles from framework-wide or plugin-backed toggles.
-
Return a concise, evidence-backed answer.
- State whether the guidance came from Fusion MCP or the bundled fallback.
- Include the relevant package names and one concrete snippet or source path.
- Include rollout, testing, and cleanup guidance.
- End with any explicit uncertainty or verification step that still remains.
-
确认请求确实是关于Fusion Framework功能切换的。
- 若请求是通用标志平台相关工作,请勿强制使用此技能。
-
优先使用可用的Fusion MCP。
- 使用用户的表述加上、
feature flag、feature toggling、useFeature或enableFeatureFlag等功能切换术语,查询enableFeatureFlagging。mcp_fusion_search_framework - 若初始结果集质量不佳,进行一次优化查询。
- 仅当需要超出框架实现细节的更广泛产品指导时,才使用。
mcp_fusion_search_docs
- 使用用户的表述加上
-
若Fusion MCP不可用或结果不明确,需明确告知并切换至捆绑备用资源。
- 将references/public-framework-reference.md作为备用事实来源。
- 对于无服务器访问权限的用户,使用assets/offline-feature-toggle-checklist.md和assets/offline-prompt-template.md。
-
确定用户所需的帮助类型。
- 新标志配置:解释配置接口并展示最简示例。
- 组件使用:解释、切换行为及值处理方式。
useFeature - 审核或推出:应用检查清单,指出缺失的所有权、测试或清理项。
- 移除:识别标志定义、使用者及应一并删除的无用分支。
-
优先使用当前已验证的Fusion Framework入口点。
- 应用级示例:来自的
@equinor/fusion-framework-react-app/feature-flag。enableFeatureFlag(appConfigurator, [...]) - 框架级示例:来自的
@equinor/fusion-framework-module-feature-flag。enableFeatureFlagging(config, builder => ...) - 插件示例:和
createLocalStoragePlugin。createUrlPlugin - Hook使用:应用包中的,或框架包中基于提供者的
useFeature(key)变体。useFeature(provider, key)
- 应用级示例:来自
-
若开源资源存在歧义,需明确指出而非猜测。
- 当前开源资源同时显示和
readonly;告知用户在最终确定代码前需验证本地类型。readOnly - 开源文档提到功能标志未来将采用API服务方向;除非实时MCP或本地代码确认,否则请勿将其作为当前默认方案。
- 当前开源资源同时显示
-
提供实用指导,而非仅罗列API名称。
- 优先使用稳定枚举或常量键,而非临时字符串字面量。
- 当标志面向用户或审核者时,需包含和
title。description - 仅当行为除开关状态外还需配置时,才使用。
value - 确保标志易于移除,明确所有者,并指出清理触发条件。
- 区分本地应用切换与框架级或插件支持的切换。
-
返回简洁、有依据的答案。
- 说明指导来自Fusion MCP还是捆绑备用资源。
- 包含相关包名及一个具体代码片段或源路径。
- 包含推出、测试及清理指导。
- 结尾说明仍存在的明确不确定性或需验证的步骤。
Representative requests
典型请求示例
- "Help me add a feature flag to a Fusion Framework app."
- "How do I use useFeature in Fusion Framework?"
- "Review this Fusion Framework feature toggle setup and tell me what cleanup I am missing."
- "帮我给Fusion Framework应用添加功能标志。"
- "如何在Fusion Framework中使用useFeature?"
- "帮我审核这个Fusion Framework功能切换配置,告诉我遗漏了哪些清理项。"
Expected output
预期输出
Return:
- whether the guidance came from Fusion MCP or the bundled fallback
- the relevant Fusion Framework entry points and packages
- one concrete example snippet or source path to adapt
- a short implementation, rollout, and cleanup checklist
- explicit verification notes for any ambiguous API detail
返回内容需包含:
- 指导来源是Fusion MCP还是捆绑备用资源
- 相关Fusion Framework入口点及包
- 一个可适配的具体示例代码片段或源路径
- 简短的实现、推出及清理检查清单
- 对任何模糊API细节的明确验证说明
References
参考文档
- references/public-framework-reference.md
- references/public-framework-reference.md
Assets
资源文件
- assets/offline-feature-toggle-checklist.md
- assets/offline-prompt-template.md
- assets/offline-feature-toggle-checklist.md
- assets/offline-prompt-template.md
Safety & constraints
安全与约束
Never:
- invent Fusion Framework packages, hooks, or module names
- pretend Fusion MCP results exist when the server is unavailable
- generalize SaaS feature-flag advice as if it were Fusion Framework behavior
- keep flags alive without calling out ownership and cleanup
Always:
- prefer Fusion MCP first, then the bundled public-source fallback
- separate confirmed framework APIs from general rollout guidance
- call out API or version ambiguity when public sources disagree
- keep examples small and easy to adapt
严禁:
- 虚构Fusion Framework包、Hook或模块名称
- 服务器不可用时谎称存在Fusion MCP结果
- 将通用SaaS功能标志建议当作Fusion Framework行为
- 未明确所有者及清理方案的情况下保留标志
必须:
- 优先使用Fusion MCP,其次使用捆绑开源备用资源
- 将已确认的框架API与通用推出指导区分开
- 当开源资源存在分歧时,指出API或版本歧义
- 示例需简洁且易于适配