Knowledge-Based Pull Requests: A Trusted Workflow for Agent-Mediated Knowledge Collaboration

📅 2026-06-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional pull requests across trust boundaries struggle to effectively convey intent, negotiate scope, and ensure long-term accountability, often resulting in high costs for comprehension and refactoring. This work proposes the Knowledge-aware Pull Request (KPR) workflow, which treats code, tests, and interaction traces from external contributors as knowledge sources. After human validation, these inputs are distilled into structured knowledge packages, which trusted internal agents then use to regenerate candidate implementations locally according to project norms. KPR uniquely decouples the decisions of “whether to incorporate knowledge” and “whether to merge implementation,” integrating AI coding agents, knowledge distillation, trace sanitization, and safety policies to enable auditable knowledge extraction and context-aware code regeneration. Simulations based on seven real-world pull requests demonstrate that KPR consistently produces valid knowledge packages under various perturbations, significantly reducing the cost of understanding and refactoring external contributions.
📝 Abstract
AI coding agents are changing the bottleneck in software collaboration: code is increasingly cheap, while understanding intent, negotiating scope, and governing long-term project responsibility remain costly. This paper proposes \emph{Knowledge-Based Pull Requests} (KPR), a trusted workflow for agent-mediated software collaboration across trust boundaries, including open source, enterprise, vendor, contractor, and customer-driven settings. In KPR, an external collaborator's local code, tests, and cleaned agent interaction trace are treated as knowledge sources rather than as the default merge candidate. Agents distill these sources into a human-confirmed knowledge package and render it into reviewer-facing forms such as design memos, risk checklists, test plans, or implementation briefs. A project-owned inner trusted coding agent then regenerates candidate code inside the receiving project's environment under repository context, engineering conventions, tests, and security policy. KPR therefore separates two decisions that traditional pull requests often collapse: whether the knowledge should enter the project, and whether a particular implementation should be merged. We contribute the KPR workflow, a candidate artifact schema, a cost-accounting view, a collaboration gateway architecture, a minimal controlled simulation pilot over seven merged public pull requests, and an evaluation agenda. The pilot shows that KPR packages can be instantiated from real PR material and stress-tested under description ablation, diff ablation, and synthetic poisoned-patch conditions. We position KPR as an empirically testable workflow: its value depends on whether auditable extraction, transformation, and project-side regeneration reduce the cost of understanding and reworking high-context external changes.
Problem

Research questions and friction points this paper is trying to address.

AI coding agents
software collaboration
pull requests
trust boundaries
knowledge transfer
Innovation

Methods, ideas, or system contributions that make the work stand out.

Knowledge-Based Pull Requests
Agent-Mediated Collaboration
Trusted Workflow
Code Regeneration
Collaboration Gateway