Agent Skillszerx-lab/zap › promote-feature

promote-feature

GitHub

指导将FeatureFlag特性逐步推广至Dogfood、Preview或Stable环境,包括配置运行时与编译时桥接,并安排后续清理任务。

.agents/skills/promote-feature/SKILL.md zerx-lab/zap

Trigger Scenarios

需要将功能从测试环境推向更广泛用户群体 准备发布新特性到稳定版本

Install

npx skills add zerx-lab/zap --skill promote-feature -g -y
More Options

Non-standard path

npx skills add https://github.com/zerx-lab/zap/tree/main/.agents/skills/promote-feature -g -y

Use without installing

npx skills use zerx-lab/zap@promote-feature

指定 Agent (Claude Code)

npx skills add zerx-lab/zap --skill promote-feature -a claude-code -g -y

安装 repo 全部 skill

npx skills add zerx-lab/zap --all -g -y

预览 repo 内 skill

npx skills add zerx-lab/zap --list

SKILL.md

Frontmatter
{
    "name": "promote-feature",
    "description": "Promote a feature-flagged feature to Dogfood, Preview, or Stable in the Warp codebase. Use when a feature behind a FeatureFlag is ready to roll out to a broader audience, including wiring up the compile-time\/runtime bridge and deferring flag cleanup safely."
}

promote-feature

Guides the staged promotion of a gated FeatureFlag variant to Dogfood, Preview, or Stable, and schedules the follow-up cleanup.

Overview

Feature flags have two interacting layers:

  • Runtime (warp_core/src/features.rs): DOGFOOD_FLAGS, PREVIEW_FLAGS, RELEASE_FLAGS — enabled per-channel at startup.
  • Compile-time (app/Cargo.toml + app/src/lib.rs): Cargo features in [features]. The default = [...] array enables a feature for all builds. enabled_features() in app/src/lib.rs bridges each Cargo feature to its FeatureFlag variant via #[cfg(feature = "...")].

Do not remove the flag immediately after promoting to Stable. Keep it for at least 1–2 release cycles so a rollback is a one-line PR (remove the entry from default). Use the remove-feature-flag skill for the cleanup step later.

Promote to Dogfood

Add the flag to DOGFOOD_FLAGS in warp_core/src/features.rs:

pub const DOGFOOD_FLAGS: &[FeatureFlag] = &[
    // ...
    FeatureFlag::YourFeature,
];

No other file changes needed.

Promote to Preview

  1. Add to PREVIEW_FLAGS in warp_core/src/features.rs.
  2. Remove from DOGFOOD_FLAGS if present — Preview flags are automatically included in Dogfood builds.
pub const PREVIEW_FLAGS: &[FeatureFlag] = &[
    // ...
    FeatureFlag::YourFeature,
];

Promote to Stable

This requires changes in three files.

1. app/Cargo.toml — add to default

Add the snake_case feature name to the default = [...] array:

default = [
    # ...
    "your_feature_name",
]

Prefer this over adding to RELEASE_FLAGS (see comment at warp_core/src/features.rs:787-790). It compiles the feature into all builds and enables a one-line rollback.

2. app/src/lib.rs — add to enabled_features() bridge

Add a #[cfg(...)] entry inside the flags.extend([...]) block in enabled_features(), following the existing pattern:

#[cfg(feature = "your_feature_name")]
FeatureFlag::YourFeature,

Place it near logically related entries.

3. warp_core/src/features.rs — remove from PREVIEW_FLAGS / DOGFOOD_FLAGS

Remove the variant from whichever arrays it currently lives in:

pub const PREVIEW_FLAGS: &[FeatureFlag] = &[
    // Remove FeatureFlag::YourFeature,
];

Validate

cargo fmt
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings

Create a follow-up Linear issue

After the PR lands, create a Linear issue to remind the team to remove the flag. Use the Linear MCP tool:

save_issue(
  title: "Remove FeatureFlag::YourFeature after stabilization",
  team: <your team>,
  assignee: "me",
  description: "FeatureFlag::YourFeature was promoted to Stable in <PR link>. Remove the flag and dead code branches after 1–2 release cycles. Follow the `remove-feature-flag` skill.",
  labels: ["tech-debt"],
  priority: 4  // Low
)

Version History

  • 5d87445 Current 2026-07-24 17:35

Same Skill Collection

.agents/skills/add-feature-flag/SKILL.md
.agents/skills/add-telemetry/SKILL.md
.agents/skills/dedupe-issue-local/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/fix-errors/SKILL.md
.agents/skills/implement-specs/SKILL.md
.agents/skills/remove-feature-flag/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-pr/SKILL.md
.agents/skills/rust-unit-tests/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/triage-issue-local/SKILL.md
.agents/skills/update-skill/SKILL.md
.agents/skills/warp-integration-test/SKILL.md
.agents/skills/warp-ui-guidelines/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
resources/bundled/mcp_skills/figma/figma-code-connect-components/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-design-system-rules/SKILL.md
resources/bundled/mcp_skills/figma/figma-create-new-file/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-library/SKILL.md
resources/bundled/mcp_skills/figma/figma-implement-design/SKILL.md
resources/bundled/skills/add-mcp-server/SKILL.md
resources/bundled/skills/create-skill/SKILL.md
resources/bundled/skills/create-tab-config/SKILL.md
resources/bundled/skills/feedback/SKILL.md
resources/bundled/skills/modify-settings/SKILL.md
resources/bundled/skills/pr-comments/SKILL.md
resources/bundled/skills/tab-configs/SKILL.md
resources/bundled/skills/update-tab-config/SKILL.md
resources/channel-gated-skills/dogfood/triage-vulnerabilities/SKILL.md
resources/bundled/mcp_skills/figma/edit-figma-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-generate-design/SKILL.md
resources/bundled/mcp_skills/figma/figma-use/SKILL.md
resources/bundled/skills/claude-api/SKILL.md

Metadata

Files
0
Version
5d87445
Hash
4144688a
Indexed
2026-07-24 17:35

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-17 01:27
浙ICP备14020137号-1 $mapa de visitantes$