fusion-framework-feature-toggling

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Deprecated — This skill has been merged into
fusion-app-react-dev
. Use
fusion-app-react-dev
and its reference
references/using-feature-flags.md
for all Fusion Framework feature-flag guidance. This skill is retained for historical context only and will be removed in a future release.
Deprecated — 此技能已合并至
fusion-app-react-dev
。 所有Fusion Framework功能标志相关指导请使用
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

操作步骤

  1. Confirm the request is really about Fusion Framework feature toggling.
    • If the request is generic flag-platform work, do not force this skill.
  2. Use Fusion MCP first when it is available.
    • Query
      mcp_fusion_search_framework
      with the user's wording plus feature-toggle terms such as
      feature flag
      ,
      feature toggling
      ,
      useFeature
      ,
      enableFeatureFlag
      , or
      enableFeatureFlagging
      .
    • If the first result set is weak, do one refinement pass.
    • Use
      mcp_fusion_search_docs
      only when broader product guidance is needed beyond framework implementation details.
  3. 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.
  4. Identify which help shape the user needs.
    • New flag setup: explain the configuration surface and show a minimal example.
    • Component usage: explain
      useFeature
      , toggle behavior, and value handling.
    • 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.
  5. Prefer the currently evidenced Fusion Framework entry points.
    • App-level example:
      enableFeatureFlag(appConfigurator, [...])
      from
      @equinor/fusion-framework-react-app/feature-flag
      .
    • Framework-level example:
      enableFeatureFlagging(config, builder => ...)
      from
      @equinor/fusion-framework-module-feature-flag
      .
    • Plugin examples:
      createLocalStoragePlugin
      and
      createUrlPlugin
      .
    • Hook usage:
      useFeature(key)
      in the app package, or the provider-based
      useFeature(provider, key)
      variant in the framework package.
  6. Call out public-source ambiguity instead of guessing.
    • Public sources currently show both
      readonly
      and
      readOnly
      ; tell the user to verify the local type before finalizing code.
    • 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.
  7. Give practical guidance, not just API names.
    • Prefer stable enum or constant keys over ad hoc string literals.
    • Include
      title
      and
      description
      when the flag is surfaced to users or reviewers.
    • Use
      value
      only when behavior needs configuration in addition to on/off state.
    • 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.
  8. 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.
  1. 确认请求确实是关于Fusion Framework功能切换的。
    • 若请求是通用标志平台相关工作,请勿强制使用此技能。
  2. 优先使用可用的Fusion MCP。
    • 使用用户的表述加上
      feature flag
      feature toggling
      useFeature
      enableFeatureFlag
      enableFeatureFlagging
      等功能切换术语,查询
      mcp_fusion_search_framework
    • 若初始结果集质量不佳,进行一次优化查询。
    • 仅当需要超出框架实现细节的更广泛产品指导时,才使用
      mcp_fusion_search_docs
  3. 若Fusion MCP不可用或结果不明确,需明确告知并切换至捆绑备用资源。
    • references/public-framework-reference.md作为备用事实来源。
    • 对于无服务器访问权限的用户,使用assets/offline-feature-toggle-checklist.mdassets/offline-prompt-template.md
  4. 确定用户所需的帮助类型。
    • 新标志配置:解释配置接口并展示最简示例。
    • 组件使用:解释
      useFeature
      、切换行为及值处理方式。
    • 审核或推出:应用检查清单,指出缺失的所有权、测试或清理项。
    • 移除:识别标志定义、使用者及应一并删除的无用分支。
  5. 优先使用当前已验证的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)
      变体。
  6. 若开源资源存在歧义,需明确指出而非猜测。
    • 当前开源资源同时显示
      readonly
      readOnly
      ;告知用户在最终确定代码前需验证本地类型。
    • 开源文档提到功能标志未来将采用API服务方向;除非实时MCP或本地代码确认,否则请勿将其作为当前默认方案。
  7. 提供实用指导,而非仅罗列API名称。
    • 优先使用稳定枚举或常量键,而非临时字符串字面量。
    • 当标志面向用户或审核者时,需包含
      title
      description
    • 仅当行为除开关状态外还需配置时,才使用
      value
    • 确保标志易于移除,明确所有者,并指出清理触发条件。
    • 区分本地应用切换与框架级或插件支持的切换。
  8. 返回简洁、有依据的答案。
    • 说明指导来自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或版本歧义
  • 示例需简洁且易于适配