Skip to content

feat: add launchdarkly-flag-drift skill#119

Open
nieblara wants to merge 2 commits into
mainfrom
add-flag-drift-skill
Open

feat: add launchdarkly-flag-drift skill#119
nieblara wants to merge 2 commits into
mainfrom
add-flag-drift-skill

Conversation

@nieblara

Copy link
Copy Markdown
Contributor

Summary

Adds a new LaunchDarkly agent skill, launchdarkly-flag-drift, under skills/feature-flags/, following the repo's SKILL.md + README.md + references convention. Updates the repo README.md skill table and regenerates skills.json.

The skill detects and reconciles drift between a feature flag's in-code SDK fallback default and its LaunchDarkly default rule (fallthrough):

  • Resolves the expected value via get-flag
  • Locates the fallback default argument at every evaluation/declaration (patterns in references/sdk-default-patterns.md)
  • Updates only the default argument on drift, without removing the flag or changing its evaluation logic
  • Documents the change with references/pr-template.md

Isolated PR containing only this skill (branched from main).

Validation

  • python3 scripts/validate_skills.py passes
  • python3 scripts/generate_catalog.py --check reports skills.json up to date
  • python3 -m unittest tests.test_validate_skills passes

Test plan

  • Confirm the skill loads in the agent client from skills/feature-flags/launchdarkly-flag-drift/
  • Trigger on a flag whose fallthrough differs from the in-code default; verify only the default argument changes
  • Trigger on a flag with no drift; verify it reports drift_detected: false and opens no PR

Made with Cursor

Detect and reconcile drift between a feature flag's in-code SDK fallback
default and its LaunchDarkly default rule (fallthrough), updating only the
default argument without removing the flag or changing its evaluation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Skill eval results

Skill Before After Δ
agentcontrol/configs-create 100/100 (4/4) 75/100 (3/4) -25
agentcontrol/configs-update 80/100 (4/5) 80/100 (4/5) no change
agentcontrol/configs-variations 80/100 (4/5) 80/100 (4/5) no change
agentcontrol/tools 75/100 (3/4) 75/100 (3/4) no change
feature-flags/flag-and-release-change - 100/100 (4/4) new
feature-flags/flag-release - 100/100 (5/5) new
feature-flags/launchdarkly-flag-command - 100/100 (3/3) new
feature-flags/launchdarkly-flag-create 100/100 (3/3) 100/100 (4/4) no change
feature-flags/launchdarkly-flag-drift - 100/100 (3/3) new
feature-flags/should-flag-change - 100/100 (10/10) new

Only suites whose source actually changed since their last recorded score were re-run. Soft-failing while we stabilise the baseline.

Add a promptfoo suite covering drift reconciliation, the no-drift
(no code change, no PR) case, and a registry-declared default, asserting
the agent resolves the fallthrough via get-flag and never mutates the flag.
Register the suite in the manifest and add npm scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nieblara
nieblara marked this pull request as ready for review July 22, 2026 20:01
@nieblara
nieblara requested a review from a team as a code owner July 22, 2026 20:01

@ldhenry ldhenry left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool Though do we need the skill to check the default variation across all critical environments in LD? What happens if those are different (e.g. EU differs from Federal)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants