Salesforce engineering describes a workflow developed to build trust in AI-generated code when building an AI-powered mobile app designer. Rather than trusting passing tests and clean code review, the team introduced a spec-driven development process where agents first produce a specification capturing requirements, assumptions, and success criteria before writing code. Unresolved questions are split into 'lookups' (evidence-based, resolved by agents searching the repository) versus 'judgment' calls (escalated to humans). Plans must cite repository evidence and are reviewed by a Skeptic Agent, success criteria are traced to tests via a Compliance Matrix, and a multi-agent 'Conclave' review process with independent critics, an Advocate, and a Judge Agent challenges the implementation before it's trusted. In a real feature test, the process produced six commits and 4,500+ passing tests with only one human interruption for a genuine product decision.

8m read timeFrom engineering.salesforce.com
Post cover image

Questions this post answers

How do you decide which questions an AI coding agent should answer itself versus escalate to a human?

Split unresolved questions into two categories: lookups and judgment calls. Lookups have an evidence-based answer discoverable in the codebase, documentation, tests, or version history, such as whether a file exists or which utility performs an operation, and agents should resolve these themselves. Judgment calls require a decision that cannot be recovered from evidence, such as UX preferences or acceptable compatibility breaks, and these should go to a human. daily.dev surfaces practical patterns like this for teams designing human-in-the-loop AI coding workflows.

Why can't passing tests and clean code review alone prove AI-generated code is trustworthy?

Because an agent can misinterpret an ambiguous requirement early on, and every subsequent decision remains internally consistent with that wrong interpretation, so tests validate the flawed implementation and reviewers approve a diff that does exactly what the agent believed was asked. Multiple valid-looking code paths can produce the same visible result while quietly increasing technical debt or missing the actual intent. Engineers evaluating AI coding agents can track these trust gaps through discussions shared on daily.dev.

What is a Skeptic Agent in an AI coding workflow?

A Skeptic Agent is an independent reviewer role that checks an implementation plan for imagined dependencies, hand-waved integration steps, unnecessary abstractions, and missing test coverage before the plan is allowed to proceed to implementation. It enforces a reuse-before-create principle and ensures the plan is grounded in actual repository evidence rather than plausible-sounding but false claims. Teams building multi-agent review pipelines can follow evolving practices like this through daily.dev.

3 Impressions