Skip to content

feat(release-autopilot): launchdarkly-release-plans skill for environment and flag release plans; onboarding follows it - #261

Merged
fsaresh merged 11 commits into
mainfrom
fsaresh/flag-release-plans-skill
Nov 13, 2026
Merged

fsaresh merged 11 commits into
mainfrom
fsaresh/flag-release-plans-skill

Conversation

@fsaresh

@fsaresh fsaresh commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds launchdarkly-release-plans 1.0.0. It is one skill for both kinds of LaunchDarkly release plan. Onboarding 1.1.0 follows it to set up release plans for auto-releasing. When Release Autopilot proposes a release on a pull request, it uses the project's flag release plan, and it proposes none in a project without one. A rollout recorded for a flag (the flag-release skill, create-automated-rollout-config with policy) uses each environment's default release plan and does not need a flag release plan.

Operations

Plan Operation How
Environment List, or get one (with its default) MCP get-environment-release-plans
Environment Create (starter or custom) MCP create-environment-release-plan
Environment Set or clear the default MCP update-default-environment-release-plan (REST PUT / DELETE .../default-release-plan when the tool is missing)
Environment Edit MCP update-environment-release-plan (REST PUT .../release-plans/{releasePlanKey} when the tool is missing)
Environment Delete REST DELETE .../environments/{env}/release-plans/{releasePlanKey} (no MCP tool)
Flag List, get REST GET /api/v2/projects/{projectKey}/flag-release-plans[/{planKey}]
Flag Create REST POST .../flag-release-plans
Flag Update in place, make default REST PUT .../flag-release-plans/{planKey} (full replace, with version)
Flag Delete REST DELETE .../flag-release-plans/{planKey}
Flag Start a flag's release from a plan REST POST /api/v2/projects/{projectKey}/flags/{flagKey}/flag-releases

How REST commands run

  • The agent never runs a REST command and never uses a LaunchDarkly token.
  • For each REST operation, the skill shows the exact curl command, with LD-API-Version: beta.
  • The user runs the command in their own terminal with their own API access token, then pastes the output back. The skill reads that output to continue.
  • The skill never asks for a token in the chat. If the user pastes one, the skill tells them to delete it.
  • The commands use curl, because the MCP server has no flag release plan tools. ldcli 3.16.0 has no command for these endpoints and no raw request command.

Rules

  • Modes:
    • Apply: confirm every write first.
    • Read-only: reads only.
    • Record only: return the decisions and write nothing, for skills that confirm and write later (onboarding).
  • Check for a default first: before any create, the skill names the existing default (environment or project) with a short summary. It asks to use it, replace it, or create another plan. It also names incomplete plans.
  • Existing plans first: for a flag release plan, each environment uses its default release plan first. An environment with no complete plan gets a starter plan first. If the user declines, the environment is left out, and the skill says so. The skill never invents a key and never points at an incomplete plan.
  • Stored keys: a flag release plan stores each environment's release plan key. A later change to that environment's default release plan does not update the flag release plan.
  • Project default: a default that does not match is updated in place.
  • Starter plans:
    • The skill checks the randomization unit with search-contexts.
    • It keeps rollback metrics whose analysisUnits include the unit.
    • A guarded plan allows at most 50% per step.
    • Keys are unique in the project, so a second starter gets progressive-2.

Onboarding 1.1.0

  • Step 6 is still the wizard step: it picks environments and records decisions. It follows the new skill in Record only mode, and onboarding's references/release-plans.md is gone.
  • Step 7 lists every release plan write, notes the stored-key rule, and says: "Auto-releasing is on, but Release Autopilot proposes no release on pull requests until the flag release plan exists."
  • Step 8 writes the environment release plans and their defaults first. The flag release plan is then a step the user runs, like the browser steps: the agent shows the command, waits for the pasted output, and checks it. If the user skips it or it fails, it is a follow-up, and auto-releasing stays on as the user picked.
  • Step 9 verifies the flag release plan from the pasted output.
  • Preview asks the user to run nothing.
  • The environment release plan read failures (403, other errors, missing tools) still turn auto-releasing off, as before.

The settings skill (1.6.0-experimental) points to the new skill for release plans.

Evals

  • A scripted { command, text } answer stands for output the user pasted after running a command the agent showed. It answers only the "Run this command" step.
  • With builtins on, the built-in AskUserQuestion is blocked, so questions go through the harness's ask-question tool.
  • In CI, aggregate.js writes one warning annotation per failed test with its reasons.
  • The provider's scrub_ld_credentials option removes LaunchDarkly credentials from the agent's shell. The cases can then check that the agent never runs curl or reads a token. The local REST API mock from the first version is gone.
  • New launchdarkly-release-plans suite:
    • flag release plans: list, create, a pasted 409, change the default, a pasted token, preview, a pasted 403, and a default that exists
    • an environment with no release plan: create it first, or the user declines
    • an environment that has a default
    • moved from onboarding: starter, guarded starter, no stored contexts, custom phases, and a new key collision case
  • Onboarding cases for the flag release plan: user-run, skipped (auto-releasing on), Preview, and an update in place.
  • npm test (213 tests), validate_skills.py, unittest and generate_catalog.py --check pass. I did not run the LLM suites, because this box has no Anthropic key.

Questions for review

  • Listing flag release plans has its own gate (enable-list-flag-release-plans-api). An account can get 403 on the list but not on the create.
  • The REST spec says an edit to an environment release plan does not change a release that already started. The MCP tool description for update-environment-release-plan says that it does.
  • The spec has no request examples. The JSON examples come from the schemas and the releases service's validation rules.

Possible follow-up: require a flag release plan for every rollout, if Valerie wants that.

Versions: launchdarkly-release-plans 1.0.0, onboarding 1.1.0, settings 1.6.0-experimental, Claude Code plugin 1.0.8, Cursor plugin 1.0.9.

🤖 Generated with Claude Code

Opened from termag


Note

Overview
Introduces launchdarkly-release-plans 1.0.0, a single skill for environment release plans (MCP) and flag release plans (beta REST). Flag-plan operations are user-run only: the agent shows curl with LD-API-Version: beta, never executes API calls or handles tokens, and continues from pasted output.

Release Autopilot onboarding 1.1.0 now follows that skill in Record only mode for release setup, adds an explicit flag release plan step (same user-run REST pattern), and drops the old references/release-plans.md in favor of the new skill’s references. Settings 1.6.0 delegates release-plan work to the new skill and clarifies that PR release proposals use project flag release plans.

Ships a promptfoo suite (eval:release-plans), shared REST command assertions, and harness updates: scripted pasted-command answers, scrub_ld_credentials, inline skill references, and GitHub Actions failure annotations. Claude/Cursor plugin manifests and skills.json register the skill (plugins 1.0.8 / 1.0.9).

Reviewed by Cursor Bugbot for commit b077911. Bugbot is set up for automated code reviews on this repo. Configure here.

…lds the project's flag release plan

- New skill launchdarkly-flag-release-plans 0.1.0-experimental: list, get,
  create, replace, make default, and delete a project's flag release
  plans, and start a flag's release from one, through the REST API with
  curl and LD-API-Version: beta on every request. The hosted MCP has no
  flag release plan tools, and ldcli 3.16.0 has no command for these
  endpoints and no raw request command that sends the beta header. The
  token comes from LD_ACCESS_TOKEN in the user's shell; the skill never
  asks for it in the chat or runs a command that can print it. Confirm
  before every write; read-only requests send only GET; 400, 401, 403,
  404, and 409 each have a next step.
- Onboarding 1.1.0: Step 6 lists the project's flag release plans and
  records one to create, reuse, keep, or replace; Step 7 lists it; Step 8
  creates it after the environment release plans and their defaults and
  before the repo writes; Step 9 reads it back. Preview sends only the
  read. Without a shell or token, or on a failed request, the plan is a
  follow-up with the exact command and setup continues.
- Evals: the provider's ld_api_mock option starts a local REST API mock
  per test, points the agent's shell at it with a fake token, and records
  each request as an "ld-api" trajectory entry. New suite for the skill;
  three onboarding cases (with a shell, without one, Preview); unit tests
  for the mock and the new assertions.
- Claude Code plugin 1.0.8 (adds the skill), Cursor plugin 1.0.9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
@fsaresh
fsaresh marked this pull request as ready for review November 12, 2026 20:24
@fsaresh
fsaresh marked this pull request as draft November 12, 2026 20:25

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

…ironment and flag release plans

- Rename launchdarkly-flag-release-plans to launchdarkly-release-plans
  1.0.0. It covers environment release plans (read, choose, starter and
  custom plans, defaults and edits through the MCP tools; delete and
  clear the default through the REST API) and flag release plans (REST
  API with curl, LD-API-Version: beta, and LD_ACCESS_TOKEN). It has
  Apply, Read-only, and Record only modes. Starter definitions and the
  custom questions move here from onboarding's references/release-plans.md.
- A flag release plan uses existing environment release plans first. An
  environment with none gets a release plan first, or is left out when
  the user declines. The skill never invents a key or points at an
  incomplete plan. A plan stores each environment's release plan key.
- Onboarding 1.1.0 follows the skill in Record only mode. A default flag
  release plan that does not match is updated in place ("Update <name>"
  or "Keep <name>"). When the flag release plan is a follow-up,
  auto-releasing stays on, and the summary says it proposes no release
  until the plan exists.
- Settings 1.6.0-experimental points to the new skill.
- Evals: the starter, guarded, no-contexts, and custom plan cases move to
  the new suite, plus key collision, reuse, create-first, and decline
  cases. Onboarding adds the update-in-place and auto-releasing-on cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
@fsaresh fsaresh changed the title feat(release-autopilot): add flag release plans skill; onboarding builds the project's flag release plan feat(release-autopilot): launchdarkly-release-plans skill for environment and flag release plans; onboarding follows it Nov 12, 2026
@fsaresh
fsaresh marked this pull request as ready for review November 12, 2026 20:57
Before any create (a direct request, Create, Build, or Record only), the
skill reads the plans and, when a default exists, names it with a short
summary and asks "Default plan" (environment: use it, create and replace
it, or create and keep it) or "Flag release plan" (update, keep, or
create another). It also names incomplete plans. Onboarding keeps only
Update and Keep for the flag release plan. Evals: a create request when
the environment has a default and when the project has a default flag
release plan; both name the default first and write nothing when kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Skill eval results

Skill Before After Δ
agentcontrol/configs-create 100/100 (4/4) 100/100 (4/4) no change
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
aws-devops-agent/experiment-orchestration - 100/100 (9/9) new
experiments/launchdarkly-experiment-guide - 100/100 (5/5) new
experiments/launchdarkly-experiment-hypothesis-builder - 100/100 (13/13) new
experiments/launchdarkly-experiment-setup - 100/100 (8/8) new
feature-flags/flag-and-release-change - 100/100 (4/4) new
feature-flags/flag-release - 80/100 (4/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 (4/4) new
feature-flags/should-flag-change - 100/100 (17/17) new
onboarding - 86/100 (6/7) new
release-autopilot/launchdarkly-release-autopilot-onboarding - 79/100 (30/38) new
release-autopilot/launchdarkly-release-plans - 94/100 (16/17) new

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

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

… a token

For every REST operation (flag release plans, and environment release
plan changes without an MCP tool), the skill shows the exact curl
command with LD-API-Version: beta, the user runs it in their own
terminal with their own API access token and pastes the output, and the
skill reads that output to continue. The agent no longer checks for,
reads, or runs anything with LD_ACCESS_TOKEN or LD_BASE_URI. Onboarding
makes the flag release plan a user-run step after "Looks good", like the
browser steps; a skipped step is a follow-up with auto-releasing on.

Evals: remove the local REST API mock. A scripted { when, text } answer
stands for pasted output, and scrub_ld_credentials removes LaunchDarkly
credentials from the agent's shell. Cases check that each command shows
the beta header, that the agent never runs curl or reads a token, and
that it reads pasted lists, creates, 409s, 403s, and a pasted token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
@fsaresh
fsaresh marked this pull request as draft November 12, 2026 21:09
@fsaresh
fsaresh marked this pull request as ready for review November 12, 2026 21:14

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

…ns nothing; pick a default among complete plans

- Evals: a pasted answer is now { command, text } and answers a question
  only when no scripted option answer fits and the last REST command the
  agent showed (METHOD /api/v2/...) matches its regex, so pastes no longer
  take plan or confirm questions (Bugbot 4556463727). Unit test included.
- Read-only mode, and a caller's preview in Record only mode, use MCP
  reads only and ask the user to run nothing; REST reads become optional
  follow-ups. Onboarding Preview says the same (Bugbot 4556463741). New
  assertion asksToRunNothing on the preview case.
- An environment with complete plans but no default: show each plan and
  ask which one becomes the default (Bugbot 4556312137). New case and
  assertion picksDefaultAmongComplete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

fsaresh and others added 2 commits November 12, 2026 21:37
…onciles, pastes only answer the run step

- Settings: the description says "set up environment release plans and
  the project's flag release plan" instead of "review release policies",
  and points to launchdarkly-release-plans (skills.json regenerated).
- Onboarding Step 8: when Step 6 had no list, compare the pasted list
  with the recorded plan; if it shows a default flag release plan, ask
  Update or Keep, show the changed plan, and ask for "Looks good" again
  before any write command.
- Evals: a { command, text } paste answers only the "Run this command"
  step, so a retry confirmation after a 409 cannot take the next paste.
  Unit test included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
…iled tests in CI

- With allow_builtins and expose_ask_question, disallow the built-in
  AskUserQuestion, so structured questions go through the harness's
  ask-question tool and get the scripted answers. The release plans
  suite runs with builtins on (to check the agent never runs a REST
  command), and its first CI run scored 3/16.
- aggregate.js prints one GitHub warning annotation per failed test with
  the failed assertions' reasons, so a failure can be read from the check
  run's annotations when the job log cannot be downloaded. main() runs
  only when the script is run directly. Unit test included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d58ee33. Configure here.

Comment thread evals/scripts/aggregate.js Resolved
fsaresh and others added 4 commits November 12, 2026 22:11
…'s pull request proposals

Release Autopilot's release proposals on pull requests use the project's
flag release plans, and it proposes none without one. A rollout recorded
for a flag (the flag-release skill, create-automated-rollout-config with
policy) uses each environment's default release plan and does not need a
flag release plan. Matches #260. The onboarding note now says Release
Autopilot proposes no release on pull requests until the flag release
plan exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
…tions show what the agent did

- The release plans suite now runs with builtins off, like the onboarding
  suite. With builtins on, CI showed most cases never reached a create.
- Failure annotations add the agent's tool calls, a max-turns stop, and
  the start of its final reply.
- Preview case: Read-only lists write commands as optional commands, so
  the case checks that the user is asked to run nothing instead of that
  no write command is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
The title property now encodes ":" and "," as well as "%", CR, and LF;
the message keeps escapeData (%, CR, LF). Unit test with a description
that has a comma and a colon. Bugbot 4556926792.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
…te loads the skill inline

- CI annotations showed two causes for the release plans suite failures:
  - with force_skill_invocation, every MCP call was interrupted, and the
    agent reported the MCP server as unreachable. The suite now uses
    inline_skill with the new inline_references option, which also puts
    the skill's references into the instructions (builtins are off).
  - the agent showed the command and ended its turn without asking. The
    skill now says to ask "Run this command" with the question tool in
    the same message, so the user can paste the output as the answer.
- Unit tests for skillInstructions with references and readReferences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: termag
@fsaresh
fsaresh merged commit 3cd1606 into main Nov 13, 2026
24 checks passed
@fsaresh
fsaresh deleted the fsaresh/flag-release-plans-skill branch November 13, 2026 01:03
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