
launchdarkly-factory-settings
โ Officialโ 25by launchdarkly ยท part of launchdarkly/ai-tooling
Controls Factory, LaunchDarkly's GitHub automation that can wrap new code changes in on/off switches and release them by itself, or explains, without changing anything, why it skipped a particular pull request.
WHEN YOUR AGENT SHOULD USE IT
A QUICK BOUNDARYUSE FOR
- Find out why Factory did not pick up or auto-flag a particular pull request.
- Turn automatic flagging or automatic releasing on or off for your whole account.
- Connect a GitHub repository to a LaunchDarkly project so Factory starts working on it.
- Opt one repository out of auto-flagging while the rest of the account keeps it.
- Stop Factory working on a repository by removing its mapping.
- See the current setting beside the proposed one, and who it affects, before anything changes.
DO NOT USE FOR
- Changing classification rules, GitHub App permissions or which organisations the App covers.
- Configuring auto-cleanup, which is not part of Factory settings yet.
This is the playbook your agent receives when the skill activates โ you don't need to read it to use the skill, but it's here to audit before installing.
LaunchDarkly Factory Settings
You're using a skill that configures Factory (GitHub App code automation) through the LaunchDarkly MCP, or explains why a PR was not classified. Factory can open and change pull requests (auto-flagging) and can drive auto-releasing. Treat every write as production automation with a blast radius.
Prerequisites
This skill requires the remotely hosted LaunchDarkly MCP server.
Required MCP tools:
get-factory-settings/update-factory-settingslist-factory-github-repos(GitHub App install โ mappable repos)list-factory-repo-settings(already mapped)update-factory-repo-settings/get-factory-repo-settings/delete-factory-repo-settings
If these tools are missing, stop. Do not invent REST calls, numeric GitHub ids, or "fixes" by guessing settings.
Factory settings are in alpha: the underlying endpoints are gated by the enable-factory-settings flag. If every Factory tool returns 404, the account is not in the alpha โ tell the user rather than retrying or falling back to REST.
Core Principles
- Fail closed. Diagnosis is read-only. Never change settings to "make classification work" unless the user confirmed that exact write after seeing current vs proposed state.
- Account settings are the master gate. A mapped repo cannot enable a capability the account has off. Turning a capability off at the account level turns it off for every mapped repo. Turning it on at the account level allows every mapped repo that inherits (no override off) to start automating PRs.
- Confirm before every Factory write. Account PATCH, mapping, repo overrides, and unmap all use Confirm before write. Only touch repos the user named.
- Least privilege. Never enable auto-releasing unless the user explicitly asked to auto-release (that can ship code). Never turn
approvalRequiredoff unless they explicitly asked to drop the approval gate. Never map or unmap repos they did not name. Never iterate the install list and map everything. - Discover, then map. Pass
owner/name. Never ask for a numeric GitHub id. Prefergit remoteof the current workspace when they say "this repo" / "this PR"; if remotes disagree (fork vs upstream), ask which one.owner/nameresolves against the GitHub App install list only โ a repo outside the install cannot be resolved or acted on, because Factory works through the App. A 404 saying the repo is not on the install, or that the App is not installed, is the answer; do not retry with other spellings or look the repo up elsewhere. projectKeyon first map. Required when creating a mapping; later updates can omit it.- Omit
autoCleanup. Not part of Factory settings yet. Never send it; never copy it from a response into a PATCH. - Do not install the GitHub App via MCP. If
list-factory-github-repossays it is not installed, stop and tell them to install it in the LaunchDarkly UI.
Confirm before write
STOP. Do not call update-factory-settings, update-factory-repo-settings, or delete-factory-repo-settings until the user has answered yes to the proposal in this turn. A yes from an earlier turn, or a vague "fix it" / "go ahead" that does not name the setting, is not enough.
- Read current state first (
get-factory-settings, and repo get/list if the change is repo-scoped). - State now vs proposed, in one or two sentences. Include blast radius. For a map, state inherited auto-flagging and auto-releasing from the account (read
get-factory-settingsfirst). - Wait. Do not batch the write in the same tool round as the question.
Account change (any field on update-factory-settings, including turning things on):
Auto-flagging is ON for this account. Turn it OFF for all mapped repos? Auto-flagging pull requests will stop until it is turned back on.
Auto-flagging is OFF for this account. Turn it ON for the account? Mapped repos that inherit this setting can start getting auto-flagging pull requests.
Auto-flagging approvalRequired is ON. Turn it OFF? Auto-flagging PRs would no longer require that approval gate.
Same pattern for auto-releasing, and say that auto-releasing can ship.
Map or change one repo (update-factory-repo-settings):
Always name both inherited account capabilities in the proposal. Omitted overrides inherit auto-flagging and auto-releasing; do not confirm a map that only mentions auto-flagging.
launchdarkly/gonfalonis not mapped. Map it to projectdefault, inheriting account auto-flagging (ON) and auto-releasing (OFF)? Factory can start classifying and opening auto-flagging PRs in that repo. Auto-releasing will stay off unless the account (or a repo override) turns it on.
launchdarkly/gonfalonis not mapped. Map it to projectdefault, inheriting account auto-flagging (ON) and auto-releasing (ON)? Factory can start auto-flagging PRs in that repo and auto-releasing, which can ship.
launchdarkly/gonfalonis mapped todefaultwith auto-flagging effective ON and auto-releasing effective OFF. Set a repo override turning auto-flagging OFF for this repo only? Auto-releasing stays inherited (OFF).
Unmap (delete-factory-repo-settings):
launchdarkly/gonfalonis mapped to projectdefaultwith auto-flagging effective ON and auto-releasing effective OFF. Unmap it? Factory will stop auto-flagging and auto-releasing that repo until it is mapped again.
After they confirm, apply only the fields in the proposal. Then verify (do not use verify as the safety check).
Choose a workflow
- "Why didn't Factory classify / auto-flag my PR?" (or similar) โ Why didn't my PR get classified? first. Do not write settings in that workflow.
- Configure / map / turn on / unmap โ Configure settings.
Why didn't my PR get classified?
Use this when the user asks why a PR was not classified, not auto-flagged, or Factory ignored the PR. Read-only. Check in this order. Stop at the first failure and tell them how to fix it (then Confirm before write if they ask you to apply the fix).
Identify the GitHub repo (owner/name) from the PR URL, git remote, or the name they gave. If you cannot identify one repo, ask. Do not diagnose a different repo.
- Is auto-flagging on for the account?
get-factory-settings. IfautoFlagging.enabledis false, that is the answer: account gate is off, so no repo can auto-flag. Stop. - Is this repo mapped to a project?
get-factory-repo-settingswithrepo: "owner/name"(orlist-factory-repo-settingsand find it). Read the 404 text before concluding: the App not being installed, and the repo not being on the install, are different answers from the repo being installed but unmapped. Unmapped install repos do not run Factory. Stop. - Does this repo override auto-flagging off? On the repo payload, if auto-flagging
enabledis false, orenabledOverrideis true whileenabledis false, the repo is opted out even if the account is on. Stop.
If all three look fine (account on, repo mapped, repo auto-flagging effective on):
- Do not flip settings to "try something."
- Point them at the Factory runbooks. These are internal LaunchDarkly Confluence pages (PD space) while Factory is in alpha; there is no public docs URL yet. Classification can still fail for reasons this MCP surface cannot see (GitHub App install on the wrong org, PR not in an installed repo, workflow/app permissions, classifier skip rules).
- Flag Classification (ODD) Runbook โ the classifier itself: verdicts (
not-suited,already-flagged), escalations, and the per-PR ledger that records why a PR got the verdict it did. - GitHub App Runbook โ the PR event never reaching Factory: install scope, permissions, webhooks.
- Flag Classification (ODD) Runbook โ the classifier itself: verdicts (
- Optional reads:
list-factory-github-reposto confirm the repo is on the install list;autoFlagging.approvalRequiredif they expected a PR and one exists but is waiting on approval.
Configure settings
Step 1: Read current settings
get-factory-settingslist-factory-repo-settingslist-factory-github-repos(optionalprojectKey; install is account-wide)
If the GitHub App is not installed, stop.
Step 2: Account defaults (if needed)
If an account PATCH is needed, follow Confirm before write, then update-factory-settings with only the confirmed fields:
autoFlagging.enabled/autoFlagging.approvalRequired(approval is only valid here)autoReleasing.enabled
Do not send autoCleanup. Requires updateFactorySettings.
Step 3: Map or override a repository
Only for repos the user named. Follow Confirm before write, then update-factory-repo-settings:
- Prefer
repo: "owner/name". - Include
projectKeywhen creating a mapping. - Optional repo-level
autoFlagging/autoReleasingoverrides. Omitted capabilities inherit the account setting. A repo cannot enable a capability the account has off.
Requires updateFactoryRepoSettings on the mapped project.
Step 4: Verify (after a confirmed write)
get-factory-repo-settings/get-factory-settingsas appropriate.- Effective
enabledmust match the proposal (account off โ repo cannot be on). - Mapped repos appear in
list-factory-repo-settings.
To unmap: Confirm before write, then delete-factory-repo-settings.
Out of scope
- Auto-cleanup
- GitHub App install / OAuth
- Vega BYOK
- Observability MCP (
github_repositories) โ do not require a second MCP server just to map a Factory repo - Changing classification rules, GitHub App permissions, or org install scope via this skill
npx skills add launchdarkly/ai-tooling --skill "launchdarkly-factory-settings" --full-depthRun this in your project โ your agent picks the skill up automatically.
BEFORE IT WILL WORK
3 FOR YOU- 01Connect the hosted LaunchDarkly MCP server
- 02Have your LaunchDarkly account admitted to the Factory alpha
- 03Install the LaunchDarkly GitHub App from the LaunchDarkly app