fme-rollout-pipeline
Skill115 starsChanged 59 days agoApache-2.0View on GitHub
Design and wire Harness FME pipeline stages and native FmeFlag* steps for feature-flag rollout patterns — progressive percentage, environment promotion, approval gates, and downstream gating. Composes FeatureFlag, Approval, and Custom stages rather than a single canned template. Use when asked to build a flag rollout pipeline, promote a flag across environments, add approval before prod, or gate prod until staging is at 100%. Do not use for direct flag CRUD (manage-feature-flags), code cleanup (cleanup-feature-flags), or generic CI/CD without FME steps (create-pipeline). Trigger phrases: FME pipeline, flag rollout pipeline, progressive rollout, environment promotion, approval before prod, feature flag stage, canary rollout, FME rollout.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/harness.mdcCursor rule
- ai-operationsSkill
- analyze-costsSkill
- approve-exemptSkill
- audit-reportSkill
- chaos-dr-testSkill
- chaos-experimentSkill
- configure-agent-pr-attestationSkill
- configure-container-scanSkill
- configure-dast-scanSkill
- configure-repo-scanSkill
- configure-secret-scanSkill
- create-agentSkill
- create-agent-templateSkill
- create-connectorSkill
- create-environmentSkill
- create-infrastructureSkill
- create-pipelineSkill
- create-pipeline-v1Skill
- create-policySkill
- create-sbomSkill
- create-secretSkill
- create-serviceSkill
- create-templateSkill
- create-triggerSkill
- dbops-changesetSkill
- debug-pipelineSkill
- deployment-readinessSkill
- dora-metricsSkill
- enforce-sbomSkill
- enforce-slsaSkill
- exempt-vulnSkill
- generate-slsaSkill
- gitops-statusSkill
- incident-responseSkill
- manage-artifactsSkill
- manage-cdeSkill
- manage-delegatesSkill
- manage-feature-flagsSkill
- manage-freeze-windowsSkill
- manage-iacmSkill
- manage-idpSkill
- manage-pull-requestsSkill
- manage-rolesSkill
- manage-slosSkill
- manage-supply-chainSkill
- manage-usersSkill
- migrate-pipelineSkill
- optimize-pipelineSkill
- pr-analysisSkill
- run-pipelineSkill
- scorecard-reviewSkill
- security-reportSkill
- sei-analyticsSkill
- sign-artifactSkill
- template-usageSkill
- verify-signSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 7 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Prefer
org_id+project_id: Do not require deprecated workspace_id. - Very specific: line 42
Stop before mutating: Do not harness_create / harness_update a pipeline until the user confirms the rollout plan.
- Distinctive: line 72
Do not guess environment names, treatments, or approver groups.
- Distinctive: line 85
If MCP is unavailable, skip discovery, say so, and ask the user for environment names and treatments — do not guess.
- Very specific: line 139
Do not use classic FlagConfiguration steps (legacy Feature Flags).
- Distinctive: line 164
Before any pipeline write, show:
- Very specific: line 182
Every FeatureFlag and Custom stage that mutates flags needs failureStrategies
- Distinctive: line 190
If update mode, fetch current pipeline YAML before merging:
- Very specific: line 246
Do not run the pipeline in this skill.
- Distinctive: line 256
Follow-up: further % increases may need another run or additional stages
- Very specific: line 257
After full launch everywhere: /cleanup-feature-flags for code removal
- Very specific: line 262
Call MCP tools other than harness_list / harness_get / harness_create / harness_update
- Very specific: line 266
Use Run steps to call FME APIs when a native FmeFlag* step exists
- Very specific: line 267
Use classic FlagConfiguration steps for FME
- Very specific: line 269
Create/delete flags as the main rollout mechanism — use pipeline steps or /manage-feature-flags
- Distinctive: line 271
Put a README inside this skill folder
- Very specific: line 289
Keep SKILL.md focused; load step catalog and YAML examples from references.
- Very specific: line 296
Do not generate prod steps that contradict staging without calling it out.
- Distinctive: line 312
Always fetch current YAML, merge surgically, show diff.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
FME Rollout Pipeline
Help users pick and wire Harness FME pipeline steps for rollout use cases. Compose FeatureFlag stages, native FmeFlag* steps, Approval gates, and optional Custom / Wait stages tailored to the user's rollout scenario, rather than outputting a single fixed template.
Direct flag kill/restore/create via MCP is /manage-feature-flags. Post-launch code removal is /cleanup-feature-flags. General CI/CD structure is /create-pipeline.
Instructions
Load references on demand:
- rollout-patterns.md — pattern catalog and plan checklist
- fme-pipeline-steps.md — step types and evaluation order
- pipeline-examples.md — composable YAML snippets
Allowed MCP tools only: harness_list, harness_get, harness_create, harness_update.
Allowed resource types only: pipeline, fme_environment, fme_feature_flag, fme_feature_flag_definition, and project (pre-create existence check only — do not create projects).
Prefer org_id + project_id. Do not require deprecated workspace_id.
Stop before mutating. Do not harness_create / harness_update a pipeline until the user confirms the rollout plan.
No automatic metric rollback. Harness does not auto-rollback a flag on metric regression. Use Approval, Wait, Custom verification, or FmeMetricCheck (fails the step). Rollback is an explicit FmeFlagKill stage or failure path.
Phase 1: Establish scope
Reuse scope-establishment.md. Ask for org_id and project_id if missing.
Restate: Working in org=..., project=...
Phase 2: Choose mode
| Mode | User signal | Outcome |
| Design (default if ambiguous) | "How should we roll out…?", "What steps do we need?" | Pattern + stage plan only; no YAML write |
| New pipeline | "Create a rollout pipeline for…" | Plan + YAML draft on first turn; harness_create only after explicit confirm |
| Update existing | "Add FME stages to pipeline X" | Fetch pipeline, merge stages, show diff; harness_update only after explicit confirm |
Phase 3: Gather rollout intent
Collect (ask only for missing items):
- Flag name (
feature_flag_name, case-sensitive) - Test treatment and control treatment (or boolean on/off)
- Target environments and whether any are held (not released yet)
- Pattern — progressive %, env promotion, staging gate, approval, kill-switch rollback (see rollout-patterns.md)
- Existing pipeline URL/identifier (update mode)
- Approvers for
HarnessApproval(user groups, minimum count) - Soak / gate between % increases —
Wait,Approval,FmeMetricCheck, or Custom tests (do not invent auto-rollback)
Do not guess environment names, treatments, or approver groups.
Phase 4: Discover FME context
MCP v2 identifier nesting — required; bare top-level FME field names are stripped by the tool schema:
| Call | Where identifiers go |
harness_list with required list filters | filters: { feature_flag_name: "..." } |
harness_get for fme_feature_flag / fme_feature_flag_definition | params: { feature_flag_name: "...", environment_id: "..." } (environment_id when per-env) |
harness_get / harness_update for pipeline | top-level resource_id |
harness_list project verify (pre-create only) | top-level resource_type: "project", org_id |
If MCP is unavailable, skip discovery, say so, and ask the user for environment names and treatments — do not guess.
Call MCP tool: harness_list
Parameters:
resource_type: "fme_environment"
org_id: "<org>"
project_id: "<project>"Build a promotion-order proposal: non-production first, production last. Use isProduction when present. Confirm order with the user.
Call MCP tool: harness_get
Parameters:
resource_type: "fme_feature_flag"
org_id: "<org>"
project_id: "<project>"
params: { feature_flag_name: "<flag_name>" }Call MCP tool: harness_list
Parameters:
resource_type: "fme_feature_flag_definition"
org_id: "<org>"
project_id: "<project>"
filters: { feature_flag_name: "<flag_name>" }Note per environment: isKilled, defaultTreatment, defaultRule (treatment % split), trafficAllocation (experiment participation only), rules, treatment targeting lists. Use this to avoid contradicting live state.
A killed flag cannot take traffic — plan FmeFlagRestore before allocation.
Phase 5: Select pattern and wire stages
Using rollout-patterns.md and fme-pipeline-steps.md:
- Map intent → pattern (mix patterns; do not force one canned pipeline)
- List stages in execution order with step types per stage
- Insert
Approvalwhere the user wants human gates - Insert
Wait(Custom stage),FmeMetricCheck, or Custom tests between percentage or env promotions when soak or checks are needed - Define hold environments (omit stage or
FmeFlagKillonly) - Define rollback (
FmeFlagKillstage)
Stage types:
Stage type | Default use |
FeatureFlag | Dedicated FME FmeFlag* steps (schema allows the same steps here as in Custom) |
Approval | Human gate between percentages or environments |
Custom | Mix FME steps with Wait, tests, or other non-FME work in one stage |
Pipeline | Chain an existing CI/CD pipeline |
Do not use classic FlagConfiguration steps (legacy Feature Flags). Prefer native FmeFlag*.
Step selection:
| Goal | Steps |
| Turn flag on in env | FmeFlagRestore |
| Set percentage split | FmeFlagDefaultAllocation (amounts sum to 100) |
| Cap exposure | FmeFlagLimitExposure |
| Emergency off | FmeFlagKill |
| Beta cohort | FmeFlagAddRemoveIndividualTargets or FmeFlagSetTargetingRules |
| Sync targeting across envs | FmeFlagPatchDefinition or replay allocation/rules steps |
| Attach flag to a flagset | FmeFlagsetCreate (if needed) + FmeFlagAddRemoveFlagsets |
| Multiple definition fields in one env | FmeFlagDefinitionInstructions (prefer single-purpose steps when one field changes) |
| Full launch | FmeFlagRestore + 100% allocation on test treatment |
| Metric gate (no auto-kill) | FmeMetricCheck — fails the step when JEXL failureCriteria is true |
Pair FmeFlagRestore with allocation when enabling traffic. Restore alone does not change percentages.
Recommend starting small (for example 5 → 25 → 50 → 100) unless the user specified otherwise.
For HarnessApproval, always set approvers.disallowPipelineExecutor: true (API requirement — see /create-pipeline).
Phase 6: Present plan and wait
Before any pipeline write, show:
- Pattern name and rationale
- Environment promotion order
- Stage diagram (ordered list: stage type, env, steps)
- Per-env: held vs released on pipeline run
- Approval / Wait / metric gates
- Rollback path (
FmeFlagKill) - Current FME state vs planned end state (from definitions)
- New vs update, and MCP action if any
Do not proceed until the user explicitly confirms.
Phase 7: Generate YAML
Compose from pipeline-examples.md. Rules:
- Dedicated FME stages:
type: FeatureFlag. Mixed FME + Wait/tests:type: Custom - Every
FeatureFlagandCustomstage that mutates flags needsfailureStrategies - Stage names:
^[a-zA-Z_0-9-.][-0-9a-zA-Z_\s.]{0,127}$(no commas) - Step identifiers:
^[a-zA-Z_][0-9a-zA-Z_]{0,127}$ environmentin step spec = FME environment name or ID (case-sensitive); confirm fromfme_environmentlist- Allocation amounts are integers 0–100 summing to 100. Quote treatment names that YAML treats as booleans (
"on","off","yes","no") - Stage
when.pipelineStatusisSuccess,Failure, orAll— notFailed - Pipeline YAML must include the
pipeline:root key
If update mode, fetch current pipeline YAML before merging:
Call MCP tool: harness_get
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<org>"
project_id: "<project>"Merge new FME stages surgically; show diff. Never replace unrelated stages unless the user asked.
Show the YAML (or diff) to the user before MCP write.
Phase 8: Create or update pipeline (after confirmation)
- Verify the project exists —
harness_listwithresource_type: "project"andorg_id. If missing, stop and ask (do not create a project in this skill). - Create or update using
yamlPipelineas a string. Do not pass a nested JSONpipelineobject.
New pipeline:
Call MCP tool: harness_create
Parameters:
resource_type: "pipeline"
org_id: "<organization>"
project_id: "<project>"
body: { yamlPipeline: "<full pipeline YAML string, including 'pipeline:' root key>" }Update existing:
Call MCP tool: harness_update
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<organization>"
project_id: "<project>"
body: { yamlPipeline: "<full updated pipeline YAML string>" }Verify:
Call MCP tool: harness_get
Parameters:
resource_type: "pipeline"
resource_id: "<pipeline_identifier>"
org_id: "<organization>"
project_id: "<project>"On validation errors, read the API message, fix fields, retry.
Do not run the pipeline in this skill. Point the user to /run-pipeline.
Phase 9: Handoff
Summarize following templates/operation-summary.md:
- Operation, scope, pipeline identifier, and what each stage does
- What was confirmed (environments, treatments, current definition state)
- How to run (
/run-pipeline) - How to rollback (
FmeFlagKillstage) - Follow-up: further % increases may need another run or additional stages
- After full launch everywhere:
/cleanup-feature-flagsfor code removal
What NOT to do
- Ship one canned pipeline for every request — compose from patterns
- Call MCP tools other than
harness_list/harness_get/harness_create/harness_update - Wire rollouts via direct flag MCP — do not use
harness_updateonfme_feature_flag_definition,harness_execute(kill/restore/reallocate), orharness_deletefor rollout wiring; use pipelineFmeFlag*stages (one-off ops →/manage-feature-flags) - Assume automatic metric auto-rollback exists —
FmeMetricCheckfails a step; it does not kill the flag - Push pipeline YAML or call
harness_create/harness_updatebefore the user confirms the plan (including on "create pipeline" first turn) - Use
Runsteps to call FME APIs when a nativeFmeFlag*step exists - Use classic
FlagConfigurationsteps for FME - Omit
disallowPipelineExecutor: trueonHarnessApproval - Create/delete flags as the main rollout mechanism — use pipeline steps or
/manage-feature-flags - Require deprecated
workspace_id - Put a README inside this skill folder
Examples
- "Build a pipeline to roll out
new-checkout-flow10% at a time in staging with approval before each increase" — Progressive % + approval gates. - "Promote
dark_modefrom dev to staging to prod; prod needs approval" — Environment promotion pattern. - "Gate production until staging is at 100%" — Staging gate + approval + prod stage.
- "What FME steps should we use for a canary rollout?" — Design mode only.
- "Add a FeatureFlag stage to pipeline
payments_deployto restore the flag in prod" — Update mode. - "Kill the flag if the pipeline fails" — Rollback stage with
FmeFlagKill. - "Canary rollout with metric checks" — Design Approval + Wait/
FmeMetricCheck+FmeFlagKill; explain no auto-rollback. - "Create a dark mode flag" — Use
/manage-feature-flags, not this skill. - "Remove the flag from code" — Use
/cleanup-feature-flags.
Performance Notes
- One
fme_feature_flag_definitionlist viaharness_listwithfilters: { feature_flag_name: "..." }returns all envs — prefer over N gets during planning. Per-env detail:harness_getwithparams: { feature_flag_name, environment_id }. - Design mode avoids pipeline API writes entirely.
- Keep SKILL.md focused; load step catalog and YAML examples from references.
- Large multi-env pipelines: propose incremental delivery (staging first, prod in a follow-up) when the user has not committed to full promotion.
Troubleshooting
Environments disagree on targeting
Do not generate prod steps that contradict staging without calling it out. Offer config promotion (FmeFlagPatchDefinition) or manual alignment first.
Flag is killed in target environment
Plan must include FmeFlagRestore before allocation. Mention current isKilled state in the plan.
User wants metric-based auto-rollback
Explain Harness does not auto-kill on metric regression. Offer FmeMetricCheck or Custom checks that fail the step, plus an explicit FmeFlagKill rollback stage.
HarnessApproval validation error
Add approvers.disallowPipelineExecutor: true.
Pipeline update overwrote unrelated stages
Always fetch current YAML, merge surgically, show diff. Never replace the full pipeline unless the user asked.
FME environment name mismatch
FME environment names are case-sensitive and distinct from Harness CD environment identifiers. List fme_environment and confirm with the user.
YAML rejected for FeatureFlag vs Custom
FmeFlag* steps are valid on both FeatureFlag and Custom stages. If the UI only offers FME in Custom, use Custom. Do not fall back to FlagConfiguration.
Step type naming traps
Step YAML type: strings are strict and can differ from colloquial names or UI display labels. Always use the exact step type: strings from fme-pipeline-steps.md (e.g. FmeFlagSetIndividualTargets not FmeFlagSetTargets, FmeFlagAddRemoveIndividualTargets not FmeFlagAddRemoveTargets, FmeSegmentAddRemoveTargets not FmeSegmentAddRemoveKeys). Do not "correct" these to UI-only or shorthand names.
References
- rollout-patterns.md — pattern catalog
- fme-pipeline-steps.md —
FmeFlag*step reference - pipeline-examples.md — YAML snippets
- scope-establishment.md — account, org, and project scope rules
- operation-summary.md — structured completion summary contract
/manage-feature-flags— direct MCP flag operations/cleanup-feature-flags— post-launch code removal/create-pipeline— CI/CD stages,HarnessApprovalrequirements/run-pipeline— execute after pipeline exists
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

