Skip to content

feat: add the experimentation-orchestration skill to the agent space in setup - #970

Merged
cchu-ld merged 12 commits into
mainfrom
cchu/experiment-skill
Oct 28, 2026
Merged

cchu-ld merged 12 commits into
mainfrom
cchu/experiment-skill

Conversation

@cchu-ld

@cchu-ld cchu-ld commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Describe the solution you've provided

ldcli aws-devops-agent setup now adds the experiment-orchestration skill to the agent space. A skill is a set of instructions that the agent loads for a related task. This skill tells the agent how to move a goal through an experiment, a guarded rollout, and a report.

Details
The skill text is in internal/awsdevops/skills/experiment-orchestration/SKILL.md, and the binary embeds it. The text is the skill from the setup guide, with a small number of fixes. The skill runs in one long chat, as an orchestrator that moves a goal through Steps 1 to 8. These are the fixes:

  • The flag serves false when it is on (defaults of 1 and 1). In the guide, Step 6 turns the flag on before the experiment starts, so every user got the treatment.
  • The flag is available to every SDK (usingEnvironmentId and usingMobileKey). Without this, a browser or mobile app cannot read the flag, and the experiment collects no data.
  • The flag key follows the naming conventions of the project.
  • Each stop of an iteration uses control as the winner. Stopping serves the winner to everyone that the rule matches, so a treatment winner reached 100% of users and skipped the guarded rollout. A loss or an inconclusive result now stops the iteration too, so 5% of users do not keep the treatment.
  • The experiment is inconclusive after 4 weeks with no significance. The guide used 30 minutes.
  • A loss or a rollback turns the flag off. The skill does not archive a flag that the code still evaluates.
  • The report template is in a code fence, so its headings do not mix with the headings of the skill.
  • If the environment needs approval for a change, such as a flag toggle or an experiment start, the agent creates an approval request. After a reviewer approves it, the agent applies it with apply-approval-request.

The allowlist also adds update-flag-settings, create-metric, and apply-approval-request. With create-metric, the agent can add a missing metric on an event that the app already sends. With apply-approval-request, the agent can apply an approved request. The skill no longer uses update-flag-settings.

A space that reuses an MCP server keeps its allowlist, so it can miss tools that this version allows, such as these tools. Setup names the missing tools in the plan and warns. With the new --add-mcp-tools flag, it adds them with UpdateAssociation. Setup cannot tell an older ldcli allowlist from one that someone trimmed, so the update needs the flag. AWS replaces the whole configuration on an update and does not send back each tool's classification or the capabilities, so:

  • Setup rewrites the allowlist only if every tool on it is an ldcli tool. Otherwise it warns, because an unclassified tool runs as read-only, without approval.
  • The rewrite gives every tool the ldcli classification. A customer who made an ldcli read-only tool mutative loses that, and the flag help says so.
  • The run skips the rewrite if the allowlist changed after the plan.

Setup reads the name and the description from the front matter of the file.

Setup adds the skill in a full setup and in a run that only connects the MCP server. The plan has a new Skill: line. Setup does one of these actions:

  • If the space has no skill with the name, setup creates the skill with agent_types set to ["GENERIC"]. With this value, every agent type in the space can load the skill. The agent loads a skill when its description matches the task. The plan line and the help text say this.
  • If the space has the skill with the same SKILL.md text, setup keeps it.
  • If the text matches a version that ldcli sent before, or the file is empty, setup updates it. shippedSkillHashes holds the SHA-256 of each shipped SKILL.md. A test fails if the current text is not in the list.
  • If the text matches no shipped version, someone edited it, and setup does not change it. A skill with no SKILL.md gets the same action with its own plan line. The guide tells users to edit the skill if they do not have Guarded Releases.
  • If someone edited the text and you pass the new --replace-skill flag, setup overwrites the text and the description. AWS changes only the metadata keys in the request, so the status and the agent types stay the same.

The skill is optional. Setup does the skill step after the MCP server step. If the skill step fails, setup shows one warning at the end, puts the error in skillError, and ends with no error. The warning keeps the full AWS error, so it names the denied action. If AWS denies access, the warning also names the permissions that the step needs. If setup cannot read the skills of the space, the plan skips the skill.

The result has skillAction with one of these values: created, kept, updated, left, overwritten, skipped, or failed. A JSON run can use it to find a skill that is not the ldcli version.

The plan keeps the asset ID and the version of the skill. If the skill appears, goes away, or gets a new version before the write, setup does not change it and shows a warning.

The skill step needs these permissions: aidevops:ListAssets, aidevops:GetAssetFile, aidevops:CreateAsset, and aidevops:UpdateAsset. Without them, setup does the other steps and warns about the skill.

Describe alternatives you've considered

Setup can always replace the skill text. I did not do this, because a run of setup will then remove changes that the user made.

A skill failure can stop setup. I did not do this, because the MCP server is the main step and the skill is optional.

Additional context

The custom agent of Part 4 will come in a different pull request. The asset API can create it as a custom_agent asset that refers to this skill by asset ID. CreateTrigger can run it on a schedule. The setup result now includes skillAssetId for that step.

The status command does not show the skill yet.

The code reads the skill name from the JSON of the metadata document. This works the same for AWS responses and for the documents that the tests make with NewLazyDocument. UnmarshalSmithyDocument returns an error on a NewLazyDocument document.

🤖 Generated with Claude Code


Note

Overview
ldcli aws-devops-agent setup now provisions the embedded experiment-orchestration skill (create, keep, auto-update from shipped hashes, or leave user edits unless --replace-skill). The plan adds a Skill: line; JSON/plain output expose skillAssetId, skillAction, and skillError. Skill failures are optional—setup still finishes and prints a single warning (stderr in JSON mode).

Connect and full setup runs also sync LaunchDarkly MCP tool allowlists when reusing a server: new tools include update-flag-settings, create-metric, and apply-approval-request. Missing ldcli-only tools are called out in the plan; --add-mcp-tools rewrites the association with ldcli classifications (skipped if foreign tools or post-plan drift). mcpToolsAdded / mcpToolsError capture outcomes without failing setup.

Help text and tests cover plan/cancel behavior, permission denials, and allowlist edge cases.

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

@cchu-ld cchu-ld changed the title feat: add the experimentation skill to the agent space in setup feat: add the experimentation-orchestration skill to the agent space in setup Oct 26, 2026
@cchu-ld
cchu-ld marked this pull request as ready for review October 26, 2026 20:42
@cchu-ld
cchu-ld requested a review from a team as a code owner October 26, 2026 20:42
@cchu-ld
cchu-ld requested review from davidbrackbill and removed request for a team October 26, 2026 20:42
@cchu-ld

cchu-ld commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Test run results - first time sets up the skill, second time is a no-op and re-uses the existing skill, which is expected.

First run:

Setup plan:
  AWS account:   506919356135
  Region:        us-east-1
  AWS profile:   launchdarkly-development_Administrator
  IAM role:      Leave role DevOpsAgentRole-AgentSpace unchanged because it has no ldcli:managed tag
  IAM role:      Leave role DevOpsAgentRole-WebappAdmin unchanged because it has no ldcli:managed tag
  Agent space:   Create agent space cchu-test-skill
  Association:   Associate AWS account 506919356135 with the agent space
  Operator app:  Enable the operator app with IAM sign-in
  MCP server:    Reuse MCP server LaunchDarkly (9f4fc339-80ea-42a9-8b0c-daa49b9b420a)
  Skill:         Create skill experiment-orchestration for every agent type in the space

Second:

Setup plan:
  AWS account:   506919356135
  Region:        us-east-1
  AWS profile:   launchdarkly-development_Administrator
  IAM role:      Leave role DevOpsAgentRole-AgentSpace unchanged because it has no ldcli:managed tag
  IAM role:      Leave role DevOpsAgentRole-WebappAdmin unchanged because it has no ldcli:managed tag
  Agent space:   Reuse agent space cchu-test-skill (dc00f70b-461c-496c-a320-b3ad0071798d)
  Association:   Keep the AWS account 506919356135 association
  Operator app:  Keep the operator app and its sign-in
  MCP server:    Reuse MCP server LaunchDarkly (9f4fc339-80ea-42a9-8b0c-daa49b9b420a)
  Skill:         Keep skill experiment-orchestration (ki-a4a4922b-0a7e-409b-a731-05907da92975)

AWS DevOps Agent skill panel:
Screenshot 2026-10-26 at 1 51 15 PM

@cchu-ld
cchu-ld requested a review from a team October 26, 2026 20:52
@@ -0,0 +1,167 @@
---
name: "experiment-orchestration"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this skill aws specific?
we've defined a lot of public facing skills in our ai-tooling repo
wondering if there's a way we can consolidate

@cchu-ld cchu-ld Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not AWS specific, but it does more orchestration than either of the experimentation skills in ai-tooling. For example this skill covers implementation, deploy, and rollout, whereas the other skill stop after experiment setup.

Edit: Also ai-tooling assumes it's run in something like claude or cursor, but AWS DevOps doesn't make code changes themselves and has to hand it that part back to the user.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess my question, can this be defined in our ai-tooling repo, and imported in? or does it have to be defined in this repo

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also some robot generated feedback on this skill:

1. Report template headings still collide with the skill's own structure. ## Experiment Report: [Goal] and ### Hypothesis… sit at the same level as ## Step 6: Report and ## Safety rules, and the skill now has # Start an experiment / # Check on experiments H1s too. Put the whole template in a fenced ```markdown block so the skill's own outline isn't interleaved with the report's.
2. "Metric change: [before] → [after]" in the report template is still before/after. An A/B result is control vs treatment — before/after invites confounding. Rename the line: Metric change: [control] → [treatment] ([+/-]%).
3. State-machine gap: "design shown, awaiting confirmation" is not a record state. Step 4.3 ends the turn showing the design and waiting for confirmation, but the record still says "waiting for deployment". If that chat dies, the next check-in has no way to know a design was already drafted and needs confirming, not restarting. Add that record state (or fold design-confirmation into Step 4's entry condition in Step 5).
4. Sequential-testing tension. Step 4 enables sequentialTestingEnabled precisely so early reads don't inflate false positives — then Step 5 says never act on significance before 2 full weeks. The 2-week floor is defensible (weekday/weekly cycles), but say that's why, or you've enabled a feature and then forbidden its main benefit. One sentence fixes it.
5. Winner cleanup is missing. Next steps only recommends removing the flag for non-winners. After a rollout reaches 100%, the flag is dead weight too — recommend the cleanup PR (remove flag, keep the winning path) for winners as well.

@cchu-ld cchu-ld Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Re: ai-tooling - In this sense it is a AWS-specific issue - the AWS DevOps Agent has to have a GitHub connection to import a file from a Github URL. However we don't control what connections our users would have in their space. So a local copy is the only guaranteed way for us to script the skill install.

We could also make ai-tooling the source of truth and sync it into ldcli at build time - that could be a follow-up PR.

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

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

Comment thread internal/awsdevops/setup.go Resolved
@cchu-ld
cchu-ld added this pull request to stack #973 October 26, 2026 23:32
@@ -0,0 +1,167 @@
---
name: "experiment-orchestration"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess my question, can this be defined in our ai-tooling repo, and imported in? or does it have to be defined in this repo

@@ -0,0 +1,167 @@
---
name: "experiment-orchestration"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also some robot generated feedback on this skill:

1. Report template headings still collide with the skill's own structure. ## Experiment Report: [Goal] and ### Hypothesis… sit at the same level as ## Step 6: Report and ## Safety rules, and the skill now has # Start an experiment / # Check on experiments H1s too. Put the whole template in a fenced ```markdown block so the skill's own outline isn't interleaved with the report's.
2. "Metric change: [before] → [after]" in the report template is still before/after. An A/B result is control vs treatment — before/after invites confounding. Rename the line: Metric change: [control] → [treatment] ([+/-]%).
3. State-machine gap: "design shown, awaiting confirmation" is not a record state. Step 4.3 ends the turn showing the design and waiting for confirmation, but the record still says "waiting for deployment". If that chat dies, the next check-in has no way to know a design was already drafted and needs confirming, not restarting. Add that record state (or fold design-confirmation into Step 4's entry condition in Step 5).
4. Sequential-testing tension. Step 4 enables sequentialTestingEnabled precisely so early reads don't inflate false positives — then Step 5 says never act on significance before 2 full weeks. The 2-week floor is defensible (weekday/weekly cycles), but say that's why, or you've enabled a feature and then forbidden its main benefit. One sentence fixes it.
5. Winner cleanup is missing. Next steps only recommends removing the flag for non-winners. After a rollout reaches 100%, the flag is dead weight too — recommend the cleanup PR (remove flag, keep the winning path) for winners as well.

Comment thread internal/awsdevops/skill.go Resolved

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

cchu-ld and others added 8 commits October 27, 2026 10:32
Setup now adds the experiment-orchestration skill to the agent space. The
skill tells the agent how to move a goal through an experiment, a guarded
rollout, and a report. The skill text comes from the setup guide.

If the space has a skill with the same name and other instructions, setup
does not change it. Pass --replace-skill to replace the instructions. The
status and agent types of the skill stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup now does the skill step after the MCP server step. If the skill step
fails, setup shows a warning and puts the error in skillError. The other
steps still run. If setup cannot read the skills of the space, the plan
skips the skill.

Setup keeps the SHA-256 of each SKILL.md that it sent. If a space has one
of these texts, setup updates it without --replace-skill. Other text is a
customer edit.

The plan keeps the version of the skill asset. If the version changes
before the write, setup does not change the skill.

The plan line and the help text say that every agent type in the space can
load the skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The skill warning now keeps the full AWS error, so it names the denied
action. If AWS denies access, the warning also names the permissions that
the skill step needs. The warning shows one time, at the end of the run.

An empty SKILL.md now gets an update without --replace-skill. A skill with
no SKILL.md gets its own plan line. A SKILL.md that AWS sends as bytes is
compared as text.

The setup result now has skillAction, so a JSON run shows if setup kept,
updated, or left the skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ON runs

If the skill changes between the plan and the write, skillAction is now
skipped, because setup tried no write.

The warning for a denied GetAssetFile now names the skill one time. The
plan line for a skipped skill starts with "Skip skill".

A JSON run now also writes the skill warning to stderr.

If someone deletes the skill after the list, the plan now creates a new
skill. Before, the plan said that the skill had no SKILL.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a result

A scheduled run of the agent has no memory of the run that started the
experiment. The skill now keeps an experiment record, tags the flags that it
owns, and resumes in-flight work before it starts a new goal.

The experiment now runs at least 2 weeks before a decision, not 30 minutes.
A result that is not a win stops the iteration with control as the winner and
turns the flag off. Guarded rollout stages stay at or below 50%, as
LaunchDarkly requires. If no coding agent is available, the skill waits for a
person to confirm the deployment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In AWS DevOps Agent, every LaunchDarkly write needs a person to approve it in
chat, and no coding agent or CI/CD is connected. The skill now runs as two
chats: one that starts an experiment and one that checks on experiments. A
person implements and deploys the change, and the agent stops at each wait.

- The flag serves false when it is on, so turning it on before the
  experiment starts does not give everyone the treatment.
- The experiment uses 10% of traffic through 5% and 5% treatments and
  notInExperimentVariationId, with sequential testing.
- The agent shows the draft experiment and waits for a confirmation before
  it starts it, as the create-experiment tool asks.
- The record in the flag description holds the project and environment.
- The release review, merge, and deploy steps are gone.

The allowlist adds update-flag-settings, for the record, and create-metric.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eep the win out of the 100% path

Stopping an experiment iteration serves the chosen winner to everyone that the
rule matches. The skill now stops a won experiment with control as the winner,
records the win first, makes sure that the default rule serves control, and
then ramps the treatment with the guarded rollout.

A space that reuses an MCP server kept its old allowlist, so the tools that
the skill now uses were missing. Setup now names the missing tools in the plan
and warns. With --add-mcp-tools it adds them. It rewrites the allowlist only
if every tool on it is an ldcli tool, because AWS replaces the whole
configuration and does not send back each tool's classification, and an
unclassified tool runs without approval. The run skips the rewrite if the
allowlist changed after the plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The report template is in a fenced markdown block, so its headings stay
  out of the skill's outline.
- The report compares control with treatment, not before with after.
- "Design waiting for confirmation" is a record state, so a later chat
  resumes the draft experiment instead of making another one.
- The skill says why the 2-week minimum holds with sequential testing on:
  sequential testing lets a guardrail regression end the experiment early,
  and the minimum covers weekly cycles and novelty effects.
- The report recommends a flag cleanup for a winner too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cchu-ld
cchu-ld force-pushed the cchu/experiment-skill branch from 8d6ffb4 to 3b93320 Compare October 27, 2026 17:36
Use the skill from the setup guide again. The skill runs in one long chat,
so the two-chat design and the flag description record are gone.

The skill keeps the original text, with these fixes:

- The flag serves false when it is on, and every SDK can read it.
- The flag key follows the project naming conventions.
- Each stop of an iteration uses control as the winner, so a win does not
  skip the guarded rollout.
- An experiment runs at least 2 weeks, and is inconclusive after 4 weeks.
- A loss or a rollback turns the flag off instead of archiving it.
- The report template is in a code fence.
- In an environment that needs approval, the agent creates an approval
  request and applies it after a reviewer approves it.

The MCP allowlist adds apply-approval-request as a mutative tool.

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

@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 58b1055. Configure here.

cchu-ld and others added 2 commits October 28, 2026 10:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	cmd/aws_devops_agent/plan_print_test.go
#	cmd/aws_devops_agent/setup.go
#	internal/awsdevops/awsdevops.go
#	internal/awsdevops/export_test.go
#	internal/awsdevops/setup.go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cchu-ld
cchu-ld merged commit 7f64717 into main Oct 28, 2026
10 checks passed
@cchu-ld
cchu-ld deleted the cchu/experiment-skill branch October 28, 2026 18:27
cchu-ld added a commit that referenced this pull request Oct 28, 2026
The prompt now loads the experiment-orchestration skill from #970 and
follows it as is. It adds only the LaunchDarkly MCP tools and one rule:
never start a goal that a person did not ask for. The old prompt never
shipped, so its hash is replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cchu-ld added a commit that referenced this pull request Oct 29, 2026
…t setup (#972)

* feat: add the experimentation skill to the agent space in setup

Setup now adds the experiment-orchestration skill to the agent space. The
skill tells the agent how to move a goal through an experiment, a guarded
rollout, and a report. The skill text comes from the setup guide.

If the space has a skill with the same name and other instructions, setup
does not change it. Pass --replace-skill to replace the instructions. The
status and agent types of the skill stay the same.

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

* fix: make the skill step optional and update copies from older versions

Setup now does the skill step after the MCP server step. If the skill step
fails, setup shows a warning and puts the error in skillError. The other
steps still run. If setup cannot read the skills of the space, the plan
skips the skill.

Setup keeps the SHA-256 of each SKILL.md that it sent. If a space has one
of these texts, setup updates it without --replace-skill. Other text is a
customer edit.

The plan keeps the version of the skill asset. If the version changes
before the write, setup does not change the skill.

The plan line and the help text say that every agent type in the space can
load the skill.

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

* fix: keep the AWS message in skill warnings and report the skill action

The skill warning now keeps the full AWS error, so it names the denied
action. If AWS denies access, the warning also names the permissions that
the skill step needs. The warning shows one time, at the end of the run.

An empty SKILL.md now gets an update without --replace-skill. A skill with
no SKILL.md gets its own plan line. A SKILL.md that AWS sends as bytes is
compared as text.

The setup result now has skillAction, so a JSON run shows if setup kept,
updated, or left the skill.

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

* fix: report a plan change as a skipped skill and warn on stderr in JSON runs

If the skill changes between the plan and the write, skillAction is now
skipped, because setup tried no write.

The warning for a denied GetAssetFile now names the skill one time. The
plan line for a skipped skill starts with "Skip skill".

A JSON run now also writes the skill warning to stderr.

If someone deletes the skill after the list, the plan now creates a new
skill. Before, the plan said that the skill had no SKILL.md.

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

* fix: let the experiment skill resume across runs and wait 2 weeks for a result

A scheduled run of the agent has no memory of the run that started the
experiment. The skill now keeps an experiment record, tags the flags that it
owns, and resumes in-flight work before it starts a new goal.

The experiment now runs at least 2 weeks before a decision, not 30 minutes.
A result that is not a win stops the iteration with control as the winner and
turns the flag off. Guarded rollout stages stay at or below 50%, as
LaunchDarkly requires. If no coding agent is available, the skill waits for a
person to confirm the deployment.

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

* fix: shape the experiment skill for a chat run with approved writes

In AWS DevOps Agent, every LaunchDarkly write needs a person to approve it in
chat, and no coding agent or CI/CD is connected. The skill now runs as two
chats: one that starts an experiment and one that checks on experiments. A
person implements and deploys the change, and the agent stops at each wait.

- The flag serves false when it is on, so turning it on before the
  experiment starts does not give everyone the treatment.
- The experiment uses 10% of traffic through 5% and 5% treatments and
  notInExperimentVariationId, with sequential testing.
- The agent shows the draft experiment and waits for a confirmation before
  it starts it, as the create-experiment tool asks.
- The record in the flag description holds the project and environment.
- The release review, merge, and deploy steps are gone.

The allowlist adds update-flag-settings, for the record, and create-metric.

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

* fix: add missing MCP tools to an existing allowlist on request, and keep the win out of the 100% path

Stopping an experiment iteration serves the chosen winner to everyone that the
rule matches. The skill now stops a won experiment with control as the winner,
records the win first, makes sure that the default rule serves control, and
then ramps the treatment with the guarded rollout.

A space that reuses an MCP server kept its old allowlist, so the tools that
the skill now uses were missing. Setup now names the missing tools in the plan
and warns. With --add-mcp-tools it adds them. It rewrites the allowlist only
if every tool on it is an ldcli tool, because AWS replaces the whole
configuration and does not send back each tool's classification, and an
unclassified tool runs without approval. The run skips the rewrite if the
allowlist changed after the plan.

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

* fix: address review feedback on the experiment skill

- The report template is in a fenced markdown block, so its headings stay
  out of the skill's outline.
- The report compares control with treatment, not before with after.
- "Design waiting for confirmation" is a record state, so a later chat
  resumes the draft experiment instead of making another one.
- The skill says why the 2-week minimum holds with sequential testing on:
  sequential testing lets a guardrail regression end the experiment early,
  and the minimum covers weekly cycles and novelty effects.
- The report recommends a flag cleanup for a winner too.

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

* feat: add the experiment-orchestrator custom agent to the agent space in setup

Setup now creates a custom agent that runs the experiment-orchestration skill
with the LaunchDarkly MCP tools that the space allows. The tool IDs are
"<server name>_<tool name>", the format that AWS uses for a custom agent made
in the console.

An update adds the ldcli tools and skill to the agent and keeps the ones that
the customer added. If someone edited the prompt, setup leaves the agent
unless --replace-agent is passed. The agent is optional: if its step fails, or
the MCP server or the skill is missing, setup warns and does the other steps.

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

* feat: show the skill and the custom agent in status

status now reports the experiment-orchestration skill and the
experiment-orchestrator custom agent of each agent space: whether each is the
ldcli version, an older one that setup updates, edited, without its file, or
missing. For the agent, it also gives the number of tools and whether the
skill is attached. An agent with the ldcli prompt but without the skill or an
allowed tool is outdated, because setup updates it. Like the operator app, an
asset that status cannot read does not stop it.

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

* fix: shape the custom agent prompt for chat runs and read-only runs

The skill now runs in chat, where a person approves each write. Outside chat,
for example in a scheduled run, every write fails. In chat, the agent follows
the skill. Outside chat, it only reads: it reports, for each experiment in
flight, what is due and the message to send in chat, and it never writes.

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

* fix: name the custom agent's tools after the server's name in AWS

Since #968, setup registers a server for each agent space, named
LaunchDarkly-<agent space ID>, and a replace can rename a server. The agent's
tool IDs used the fixed name LaunchDarkly, so they would not match. The run now
reads the name of the registered server, and the plan shows the name that the
server will have.

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

* feat: add the experiment-orchestrator custom agent to the agent space in setup

Setup now creates a custom agent that runs the experiment-orchestration skill
with the LaunchDarkly MCP tools that the space allows. The tool IDs are
"<server name>_<tool name>", the format that AWS uses for a custom agent made
in the console.

An update adds the ldcli tools and skill to the agent and keeps the ones that
the customer added. If someone edited the prompt, setup leaves the agent
unless --replace-agent is passed. The agent is optional: if its step fails, or
the MCP server or the skill is missing, setup warns and does the other steps.

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

* feat: show the skill and the custom agent in status

status now reports the experiment-orchestration skill and the
experiment-orchestrator custom agent of each agent space: whether each is the
ldcli version, an older one that setup updates, edited, without its file, or
missing. For the agent, it also gives the number of tools and whether the
skill is attached. An agent with the ldcli prompt but without the skill or an
allowed tool is outdated, because setup updates it. Like the operator app, an
asset that status cannot read does not stop it.

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

* fix: shape the custom agent prompt for chat runs and read-only runs

The skill now runs in chat, where a person approves each write. Outside chat,
for example in a scheduled run, every write fails. In chat, the agent follows
the skill. Outside chat, it only reads: it reports, for each experiment in
flight, what is due and the message to send in chat, and it never writes.

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

* fix: name the custom agent's tools after the server's name in AWS

Since #968, setup registers a server for each agent space, named
LaunchDarkly-<agent space ID>, and a replace can rename a server. The agent's
tool IDs used the fixed name LaunchDarkly, so they would not match. The run now
reads the name of the registered server, and the plan shows the name that the
server will have.

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

* fix: make the custom agent prompt a thin layer on the experiment skill

The prompt now loads the experiment-orchestration skill from #970 and
follows it as is. It adds only the LaunchDarkly MCP tools and one rule:
never start a goal that a person did not ask for. The old prompt never
shipped, so its hash is replaced.

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

* fix: shorten the custom agent prompt to one paragraph

The prompt now has one paragraph that loads the experiment-orchestration
skill and follows it. The help text for the custom agent is shorter.

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

* fix: remove --replace-agent from aws-devops-agent setup

Setup never overwrites an edited prompt of the custom agent. The plan
and the log say that setup leaves the agent, and that a person can
delete the agent in the AWS console and run setup again to get the
ldcli version. Status no longer names a flag for an edited agent.

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

* fix: leave the skill and the custom agent out of status

Status does not show the experiment-orchestration skill or the
experiment-orchestrator custom agent. Status is the same as on main.

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

* chore: remove comments that repeat the code

The comments that stay give a reason that the code does not show.

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

* chore: remove dead code from the custom agent step

Setup always connects the MCP server before the agent step, so the
check for a missing server is gone. planAgent no longer takes the
options, and the unused AllowedTools test helper is gone. The message
for a missing permission now names aidevops:ListAssociations.

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

* chore: pass the MCP server name to the custom agent step

The MCP step knows the name of the server, so it keeps the name in the
result. The agent step no longer lists the servers again, and the OAuth
poll test is the same as on main.

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

* fix: give the custom agent the tools that --add-mcp-tools adds

The plan compared the agent with the allowlist before the MCP step. With
--add-mcp-tools, the MCP step adds tools first, so the plan kept the
agent without them. The plan now expects those tools, so setup updates
the agent in the same run.

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

* feat: sync the AWS DevOps Agent files from ai-tooling at a fixed commit

The experiment-orchestration skill and the custom agent prompt now come
from launchdarkly/ai-tooling. scripts/sync-aws-devops-agent.sh downloads
them at the commit in AI_TOOLING_COMMIT. go generate and
make aws-devops-agent-sync run it. ldcli embeds the files, so they stay
committed. CI fails if they differ from that commit.

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

* chore: sync the AWS DevOps Agent files from the ai-tooling merge commit

The sync now pins 887d4cb, the merge commit of launchdarkly/ai-tooling#230.
SKILL.md changed, so its hash is in shippedSkillHashes. The agent prompt did
not change. The skill test now compares the description with the front
matter of the embedded SKILL.md.

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

* docs: say that setting up the skill and the custom agent is optional

"The agent is optional" can mean that a space does not need the agent.
The help text now says that the setup step is optional.

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

* feat: allow the MCP tools of the whole experiment flow, and add them to existing spaces

The allowlist now has the tools that the new SKILL.md names and that were
missing: list-metric-events and update-off-variation. It also has tools for
the rest of that work that the skill does not name: update-experiment,
save-and-start-experiment-iteration, create-automated-rollout-config,
get-flag-health, get-flag-unique-context-exposures, and search-contexts.

Setup now adds the missing ldcli tools to the allowlist of an existing space
without --add-mcp-tools, so spaces from older ldcli versions get the new
tools. The flag still parses, has no effect, and is deprecated.

A new test fails when SKILL.md names a tool that the allowlist does not have.

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

* feat: download the AWS DevOps Agent skill and prompt from ai-tooling main

Setup no longer embeds SKILL.md and the custom agent prompt. The plan
downloads both from the main branch of launchdarkly/ai-tooling, and the
run writes the texts that the plan compared. If the download fails, setup
skips the skill and custom agent steps and warns.

A space text counts as ours when it is empty, matches a frozen hash of a
released ldcli, or equals an earlier version of the file on ai-tooling
main. Setup reads that history only when nothing else matches, and skips
the step if it cannot read it.

The plan and the result warn when the skill names MCP tools that this
ldcli version does not allow. The sync and check scripts, their Makefile
targets, and the CI step are gone.

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

* chore: drop the unknown-tool warning and the ai-tooling history check

A future GitHub Action will compare the skill on ai-tooling main with the
allowlist and open a pull request when they differ, so setup no longer warns
about tools that the skill names. Setup also no longer reads the history of
the files on ai-tooling main. A space whose text is the current main text or
a text that a released ldcli embedded gets the new text. Other text counts
as an edit.

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

* fix: skip an existing skill or agent that differs from ai-tooling main

Setup no longer keeps the hashes of the texts that older ldcli versions
embedded. If the skill in the space is not the latest SKILL.md on
ai-tooling main, the plan says so and setup skips it. --replace-skill
updates it to the latest version. A custom agent whose prompt differs is
skipped the same way, with the hint to delete it and run setup again.

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

* chore: trim comments and dead code in the skill and custom agent steps

Sources.File drops the ref, which is always main, and GitHubSources drops
the nil-client fallback. planSkill is one function again, and skillText is
inlined. Comments that repeat the code, or that describe the embedded files
and the hash lists, are gone. The allowlist comment no longer says that the
skill keeps its record in the flag description. Tests named for edits are
named for a different text.

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

* docs: clarify why setup downloads the skill and prompt once

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

* chore: restore comments that the earlier cleanup only rephrased

Comments whose code did not change get their wording from main back, and
skillText and two test names return. Comments now change only where the
behavior did.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants