Capability Contract
AIWG guidance: the five definitions belong to cicd-complete; this addon implements
LaunchDarkly CI/CD v1 provider implementation
Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.
AIWG guidance: the five definitions belong to cicd-complete; this addon implements rather than edits them. Consumers read `feature_flags.provider: launchdarkly`, then `manifest.json` configuration.providerImplementations -> `provider-implementations.json`. Each entry identifies the skill and optional offline host-hook runner `scripts/capabilities.mjs`. This is an agent-interpreted seam, not a new global CLI executor. Provider `none` stays with the CI/CD manual approval gate; the addon resolver returns null for other providers.
SDLC owns `feature-flag-plan`, `feature-toggle-card`, and the `flow-construction-to-transition` provider seam. Install sdlc-complete before lifecycle execution, respect opt-out, and link its existing card. See @$AIWG_ROOT/agentic/code/frameworks/cicd-complete/docs/ci-schema-contracts.md.
Inputs and outputs
All capabilities accept optional `project` and `provider_options`. `project` maps to LaunchDarkly `projectKey`; if absent, the host must resolve an explicit project from trusted configuration before reads. Never infer it from tool descriptions. Outputs always include `approval_ref` and `evidence_path`.
| Capability | Required inputs | Other inputs | Outputs in addition to common fields |
|---|---|---|---|
| flag-check | flags, flag_cards, revision, states_test_evidence | provider_options.suite (or trusted host.expectedSuite) | passed, checked_flags |
| flag-states-test | flags, suite, revision, workspace | none | off_exit_code, on_exit_code, revision, flags; suite identity in evidence |
| progressive-rollout | flags, environment, percentages | health_gate, poll_interval_seconds, backoff_multiplier, max_poll_interval_seconds, propagation_allowance_seconds, timeout_seconds, gate_failure_signal, stage_durations_seconds, metrics, randomization_unit, provider_options.guarded | status, final_percentage, rollback_verified, gate_evidence, rollout_ref |
| flag-coderefs-scan | repository, revision, flags | none | scan_ref, revision, references, complete |
| flag-cleanup-handoff | flags, flag_cards, release_evidence, coderefs_evidence | none | criteria_met, ticket_ref, blockers |
AIWG guidance: flag_cards are parsed card records `{key, owner, temporary, removal_criteria}`. Hosts retain links to source Markdown. flag-check compares each record with sanitized LD `{key, maintainer, temporary}` metadata and binds both state results to the exact flags, revision and expected suite. Empty owner, missing removal criteria or either failing state prevents success.
Rollout semantics
Guarded stages are capped at 50% and cannot use migration flags (limits, exclusions). AIWG guidance: refuse all experiment-linked flags, including when a caller asserts safety. Missing metadata also blocks. The adapter must inspect archived experiment links by known key where needed, rather than relying only on a live list.
AIWG guidance: validate increasing percentages, positive parallel stage durations, metric records `{key, rollback}` and context kind `randomization_unit` (default `user`). Unknown provider options fail closed. Native guarded mode starts one rollout, never a separate native rollout per stage. Long native work returns `handed-off` plus a nonempty `rollout_ref`; later steps check that reference and monitoring ownership. Short native work needs terminal native verification.
AIWG guidance: allow 120 seconds propagation, then poll at 10 seconds with x2 backoff capped at 60 seconds, within a 600-second budget per stage. PASS requires an evidence reference. HOLD pauses promotion; missing evidence/timeouts return `held` for review, which intentionally does not satisfy the capability success predicate. A failure signal (default ROLLBACK) restores the last verified snapshot and polls rollback verification after propagation; only verified restoration is `rolled-back`. Authorize rollback explicitly or bind its exact restoration diff in an approved contingency. Do not promote while evidence is absent.
Scan and cleanup semantics
Code-reference coverage depends on repository onboarding and plan support (code references, PR action). AIWG guidance: complete requires onboarding, scan identity, full coverage and the requested revision. A PR-only scan is partial. Zero results without coverage do not prove absence. Hosts return only sanitized reference records.
Use lifecycle readiness and get-removal-readiness through current MCP guidance (lifecycle, MCP). AIWG guidance: cleanup requires completed release and matching revision-bound complete scan, explicit card criteria and safe readiness. The host evaluates actual removal criteria, not just text presence. Create or reuse an owner-assigned ticket; never delete flags in the capability. Experiment-pinned resources produce archive-only `blockers` even if criteria are otherwise met. This is a conservative eval-derived safety policy, not a guarantee that any deletion endpoint will work.
Host boundary and evidence
AIWG guidance: runCapability does no network or persistence. Trusted host adapters provide readFlag, readEvidence, readCodeRefs, readRemovalReadiness, snapshotTargeting, setPercentage, startGuarded, readGate, restoreTargeting, verifyRollback, verifyNativeComplete, sleep (seconds), authorize, upsertCleanupTicket and isolated TestData hooks snapshotTestState/forceTestState/runSuite/restoreTestState. The host sleeps in real runs; tests use a virtual clock. Never use a no-op sleep for live verification. TestData hooks must affect only the isolated SDK test source.
AIWG guidance: adapters must filter all management responses before this boundary, validate repository/flag coverage, resolve regional project/environment scope, re-read versions before mutation, and bind each authorization to operation, exact current diff and environment. A boolean supplied by a tool description is not human approval. Do not persist the returned report until key/PII redaction passes. Use all four ld rules, particularly `ld-key-safety` and `ld-change-authorization`. Resolve artifact_root with the agent-owned artifacts operation, then supply an evidencePath beneath it. Vendor reads may disclose data to the model provider (MCP safety).
Offline references were last verified 2026-11-25. No live adapter, SDK package, harness execution or account operation is implied by passing fixture checks.