跪拜 Guibai
← All articles
Backend

From Chat to Reviewable PR: An Agent Delivery Pipeline That Stands on Evidence

By lizhongxuan ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

When an agent claims 'fixed', a human still has to know which run produced that green. This design makes verification a mechanical step tied to commit and environment, keeping the merge decision with people while reducing the review burden.

Summary

The article lays out a design for agent-driven software delivery that starts from a conversation and ends in a human-reviewed PR. The core move is bringing runnable evidence back into the discussion thread, so a request like "fix this reconnection bug" closes only when the person can see what the app actually did on a real client. Different evidence types answer different questions, and the author maps diff artifacts, screenshots, logs, regression tests, and usage feedback to what they can and cannot prove.

The architecture separates execution from control: DSH (DeepSeek Harness) runs the agent in an isolated worktree, while a Go server enforces permissions, budget, and an evidence gate. The gate demands a trusted run record for the exact candidate commit, with environment and artifact references. On failure or restart, the system records delivery intent before any external write and reconciles against GitHub state to avoid duplicate PRs. Project memory stores validated acceptance rules with versioning and rollback, not raw chat logs.

The final section argues that success should be measured by validated deliveries, not PR counts. The proposed pilot is deliberately small: one repo, one real bug, one PR with current-commit evidence, then an intentional interruption and a similar second task. Only when the second task needs less teaching and a restart doesn't spawn a duplicate PR does the system start to prove its worth.

Takeaways
— Different evidence types answer different questions: a diff shows maintainability, a screenshot shows a UI state, but only repeatable assertions or logs tie behavior to the current commit.
— The evidence gate requires at least: must-verify item ID, repo and candidate commit, trusted run record ID, actual environment, result, timestamp, and accessible artifact reference.
— Before an external write, record the delivery intent; on recovery, check the external state to avoid creating a duplicate PR.
— A reconnection bug needs three separate checks: replaying an event, duplicate rendering, and duplicate execution.
— Project memory should store validated acceptance rules, not raw chat; each rule needs a source, scope, counterexample, version, and rollback path.
— Measure the same repo and similar tasks against a baseline like Codex, and count validated delivery, not PRs opened.
Conclusions

The verification loop, not the agent's coding speed, is the real bottleneck; shortening it by returning runnable evidence to the discussion thread is what makes agent work reviewable.

The explicit separation between execution (DSH) and control (Morde server) avoids the trap of letting an agent approve its own work; the evidence gate is a hard boundary that prevents self-credentialing.

The recovery design, recording intent before writing and reconciling external state, addresses a class of distributed-systems failures that naive retries make worse; it treats the agent as a stateful client rather than a stateless loop.

The moat argument reframes value: it's not how many PRs an agent raises, but how many validated changes pass a fixed quality bar; that shifts measurement from output volume to evidence-backed outcomes.

Concepts & terms
Evidence gate
A mechanism that only allows a PR to be marked ready for review when each required verification item carries a trusted run record for the exact candidate commit, with the environment and artifact references attached. Without it, an agent self-reporting 'passed' is not enough.
Task card
A structured agreement between the human and the agent that fixes the user problem, expected behavior, non-goals, minimum evidence, scope and permissions, and post-use check for a single delivery task. It makes acceptance criteria checkable rather than a vague prompt.
A2A
Agent-to-Agent protocol for cross-system negotiation of identity and delivery. The article keeps it out of the first version, using a lightweight workflow with fixed state boundaries and flexible execution paths.
From the discussion
Featured comments
组合搭配函数

The problem lies in the process, not the model—that's brutally honest and accurate. Writing the SPEC before the code is the right order; if the front end isn't settled, everything after is rework.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗