Blog

AI coding agents behind gated Salesforce CI

Using Claude, Cursor, Grok, and Kimi with human approval and CI gates across SFDX, Git, GitHub Actions, Copado, Gearset, and PMD—and 200+ metadata releases without deployment failures.

3 min readAwaiting author review

I use AI coding agents—Claude, Cursor, Grok, Kimi, and similar tools—in daily Salesforce engineering. I do not treat their output as a merge button. On NBCUniversal and subsequent programs, the combination of SFDX, Git, GitHub Actions, Copado, Gearset, and PMD with explicit human approval gates is what let me ship quickly while keeping orgs stable. Across more than 200 metadata releases, I have recorded zero deployment failures attributable to the promotion path—a result I credit to discipline around gates, not to luck.

What the agents are good at

Agents excel at boilerplate reduction: Apex test scaffolding, LWC Jest stubs, package.xml diffs, README updates, and translating a written story into a first draft of Flow-friendly Apex invocables. They also help me explore alternative designs in scratch orgs before I commit to one in a shared repo.

They are weaker at sharing-model subtleties, CPQ corner cases, and org-specific metadata dependencies unless I feed them constraints and examples from the project.

The CI gate stack

My default pipeline layers look like this:

  1. Local SFDX: format, unit tests, and PMD on changed files before push.
  2. Git pull request: diff review with a human owner; agents may open PRs but do not approve them.
  3. GitHub Actions: run Apex tests, Linters, and packaging checks on ephemeral environments where available.
  4. Copado or Gearset: promotion between environments with comparison reports, dependency analysis, and deployment windows aligned to change advisory boards.
  5. Post-deploy smoke: targeted regression scripts for integrations and critical CPQ paths.

PMD rules catch categories of issues agents reproduce—unused variables, insecure Apex patterns, complexity creep—before a human spends review time on style debates.

Human approval as a feature

Human approval is not bureaucracy; it is the control that lets me use aggressive AI assistance without blending environments. I require a named reviewer for:

  • Permission set and profile changes.
  • Integration credential or named credential updates.
  • Sharing rule and OWD adjustments.
  • Agentforce action wiring that touches production data classes.

Agents draft; humans attest they read the diff and the rollback steps.

Tooling habits across Claude, Cursor, Grok, and Kimi

I pick the client based on context, not loyalty:

  • Cursor when I want repo-wide refactors with inline diffs in the same session as sf CLI commands.
  • Claude for long architecture write-ups and test plan generation from acceptance criteria.
  • Grok and Kimi for second opinions on gnarly Apex chains—always cross-checked against tests.

None replace sf project deploy validate or Gearset comparisons before production.

Metadata release volume without deployment failures

200+ metadata releases sounds like velocity; operationally it is a statistic about repeatability. Zero deployment failures meant:

  • No surprise deletions in manifests.
  • No untracked manual changes in upper environments.
  • Roll-forward plans for data migrations shipped with their own validation jobs.

Agents helped me draft deployment notes and checklists; they did not bypass Copado/Gearset comparisons.

What I do not automate

I do not let agents rotate secrets, modify production OWD, or click “deploy to prod” without a human. I do not claim green CI when hosted runners are unavailable—I mirror checks locally and document that in the PR, the same way I document personal projects.

Takeaway

AI coding agents multiply drafting speed on Salesforce; SFDX, Git, GitHub Actions, Copado, Gearset, and PMD multiply safety. Keep human approval on the risky classes of change, and you can enjoy aggressive assistance while preserving the record that matters: 200+ releases, zero failed promotions on the path I controlled.