manage-flag-lifecycle
Manage metadata and lifecycle for a Harness FME feature flag: update description, tags, owners, rollout status; assess archive readiness (usage, experiments, dependents); archive/unarchive; delete definitions in one environment; delete the flag. Supports single flags or explicit small lists (≤ 20). Use when asked to change flag metadata, archive a flag, check if a flag is safe to archive, unarchive a flag, or delete a flag/definition. Do not use for targeting changes (update-flag-targeting), creating flags (create-feature-flag), discovering stale flags across a project (discover-feature-flags), removing flag code (cleanup-feature-flags), or rollout pipelines (fme-pipeline). Trigger phrases: update flag description, flag metadata, archive flag, unarchive flag, delete flag, archive readiness, is flag safe to archive, flag lifecycle.
Harness · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add harness/harness-skills --skill manage-flag-lifecycle技能说明
name: manage-flag-lifecycle description: >- Manage metadata and lifecycle for a Harness FME feature flag: update description, tags, owners, rollout status; assess archive readiness (usage, experiments, dependents); archive/unarchive; delete definitions in one environment; delete the flag. Supports single flags or explicit small lists (≤ 20). Use when asked to change flag metadata, archive a flag, check if a flag is safe to archive, unarchive a flag, or delete a flag/definition. Do not use for targeting changes (update-flag-targeting), creating flags (create-feature-flag), discovering stale flags across a project (discover-feature-flags), removing flag code (cleanup-feature-flags), or rollout pipelines (fme-pipeline). Trigger phrases: update flag description, flag metadata, archive flag, unarchive flag, delete flag, archive readiness, is flag safe to archive, flag lifecycle. metadata: author: Harness version: 1.2.1 mcp-server: harness-mcp license: Apache-2.0 compatibility: Requires the Harness MCP server or the Harness CLI
Manage Flag Lifecycle
Manage metadata, archive readiness, archive/unarchive, and deletion for Harness FME feature flags. Related: update-flag-targeting (targeting), discover-feature-flags (stale flags), cleanup-feature-flags (code removal).
Tools
Works through the Harness MCP server or the Harness CLI; names are from tool-map.md.
| Operation | MCP | CLI |
|---|---|---|
| List environments | harness_list · fme_environment · compact: false | harness list fme_environment --json |
| List flags | harness_list · fme_feature_flag · size: 50 · filters: { name?, tags?, rollout_status_id?, offset? } · compact: false | harness list feature_flag --search <name> --status <ACTIVE|ARCHIVED> --json (CLI has no --tags/--rollout-status-id; filter client-side on the full JSON, which MCP's tags/rollout_status_id filters do server-side) |
| Get flag | harness_get · fme_feature_flag · params.feature_flag_name | harness get feature_flag <name> --json |
| Update flag | harness_update · fme_feature_flag · params.feature_flag_name · body: { description?, tags?, owners?, rolloutStatus? } | harness update feature_flag <name> --set description="..." --set rollout_status=<uuid> (CLI field id is rollout_status; --set rolloutStatus.id= doesn't match the spec's mutable field id and fails) |
| List definitions | harness_list · fme_feature_flag_definition · params.feature_flag_name · filters: { offset: 0, limit: 100 } (advance offset through every page) · compact: false | harness list feature_flag:definition <flag> --json |
| Get definition | harness_get · fme_feature_flag_definition · params: { feature_flag_name, environment_id } | harness get feature_flag:definition <flag> --env <env-id> --json |
| Delete definition | harness_delete · fme_feature_flag_definition · params: { feature_flag_name, environment_id } | harness delete feature_flag:definition <flag> --env <env-id> |
| Archive flag | harness_execute · fme_feature_flag · action="archive" · params.feature_flag_name · body: { comment?, title? } | harness execute feature_flag:archive <name> --comment "..." --title "..." |
| Unarchive flag | harness_execute · fme_feature_flag · action="unarchive" · params.feature_flag_name · body: { comment?, title? } | harness execute feature_flag:unarchive <name> --comment "..." |
| Delete flag | harness_delete · fme_feature_flag · params.feature_flag_name | harness delete feature_flag <name> |
| List experiments | harness_list · fme_experiment · filters: { parent_type: "FEATURE_FLAG", parent_name, environment_id?, status: ["ACTIVE", "PAUSED"], offset: 0, limit: 100 } (apply pagination completeness checks) · compact: false | harness list experiment --parent-type FEATURE_FLAG --parent-name <name> --status ACTIVE --json, then again with --status PAUSED |
| List rollout statuses | harness_list · fme_rollout_status · compact: false | harness list rollout_status --json |
Output
Structured summary per operation-summary.md:
- Metadata: before → after for changed fields
- Archive readiness: verdict (ready / caution / blocked), per-env
impressions.lastImpressionAt, active experiments, dependents (if checked) - Archive/unarchive/delete: verification result (status or 404), per-env impact
- Next steps or follow-up actions
Instructions
Follow write-safety.md for all writes. Concepts are in concepts.md.
Phase 1: Establish scope
Follow scope-establishment.md. Restate scope before proceeding.
Phase 2: Collect inputs
Ask for flag name(s) and the operation. For metadata updates, ask which fields to change. For delete definition, ask for the target environment ID. If the user asks "is this flag safe to archive", run the archive readiness gate (Phase 5) and stop there.
Phase 3: Read current state
Get flag metadata. For archive/unarchive/delete operations, also list definitions through every page using explicit MCP filters.limit: 100; size does not control this list. Follow pagination for definitions, environments and experiments; incomplete inventories stop readiness/deletion checks. Report current metadata (description, tags, owners, rolloutStatus, status) and per-env definition summary (environment ID/name, impressions.lastImpressionAt, isKilled, defaultTreatment).
Phase 4: Metadata update
If updating rollout status, list rollout statuses first, resolve the user's name to the UUID, then show the resolved name. Tags and owners are arrays and replaced whole in a merge patch. Read first, merge th
阅读完整来源 ↗