Draft: Propose the DAP Software Factory architecture design document

Why is this change being made?

The Duo Agent Platform now has a working autonomous delivery loop: a reference flow carries a stated intent through discovery, planning, work-item materialization, implementation and review, and out to merged merge requests, with no person in the loop. That is a checkpoint rather than a finished product, and right now the only record of how it works is one flow definition plus a set of design notes that are not readable by anyone who was not in the conversation.

This document exists so the rest of the team can review the architecture rather than the artifact. Four things in particular are worth a wider decision than they have had so far:

  • The stage decomposition. Whether six stages with durable artifacts between them is the right factoring, and whether the entry and exit profiles cover the cases teams actually want.
  • The separation of judgment from privilege. A model decides whether a review finding is a real defect or a nit; nothing a model decides can cause a merge. That split is currently forced by a platform restriction, and this document argues it is worth keeping regardless of how that restriction is resolved. If the group disagrees, better to know now.
  • The constraint register in Appendix A. Twelve platform constraints, each established by a live run rather than by reading source, each with the condition under which it stops applying. Several of them are the reason the design looks unusual, and a reviewer who does not know them will reasonably propose the thing each one rules out.
  • Where the loop ends. The loop carries a change to merged merge requests and publishes what happened. Whether the change also owed an update to the durable knowledge that describes the system is a question none of the stages here has an opinion about. The companion governed change lifecycle supplies that opinion, and this document now states how the two fit. Whether that is the right seam, and whether a governance-complete profile belongs in this document at all rather than only in the companion, is worth deciding rather than assuming.

The document is positioned as the architecture for the delivery loop described in https://gitlab.com/groups/gitlab-org/-/work_items/21067, and is scoped to that loop. The epic's other pillars, including session transfer, agent trace, cost accounting and multi-project fan-out, are named as out of scope with the seam each one would attach to.

Companion document

!21125 proposes the governed change lifecycle: the wrapper that decides what a change is obliged to leave behind before it counts as complete. The two documents were written independently and describe adjacent halves of one system, so they have been positioned against each other rather than merged:

  • This document owns the stages, their contracts, and the platform reality they run on. The companion owns the authority that governs a change, the artifacts that must change with it, and the completion obligation. Neither restates the other.
  • The dependency is one-directional. The Factory is useful without that lifecycle and stays correct under it. Nothing here requires it to be adopted.
  • The companion defers runtime packaging to this document, which is the reason its own implementation boundaries got shorter rather than longer.
  • This document's open question about where discovery findings become durable is now split. The run-scoped half is answered here, on the parent work item as already proposed. The system-scoped half belongs to the companion. What stays open is the split itself: which findings are which, and whether Discovery can be expected to make that call.
  • Cross-links in both documents point at merge requests rather than page paths, because neither page exists on the default branch yet. They become relative links once the documents land.

Related open work that will change implementation detail rather than direction:

Notes for the reviewer

  • status: proposed, and the template's guidance to merge early and iterate applies. The intent is to get the goals and the shape agreed, not to land every detail.
  • coaches and dris are deliberately left empty. CODEOWNERS routes this path to @gitlab-org/architecture/coaches, and naming a specific Architecture Evolution Coach is a choice for the author and that group rather than something to guess at. This is why the MR is a draft.
  • The directory name uses underscores to match the existing sibling design documents, rather than the hyphenated convention that applies to general content pages.
  • This branch is behind the default branch by several hundred commits, since it was opened on 2026-08-26. The merge request diff is a single added file, so the staleness is not visible in the diff, but the branch wants a rebase before it merges, with the resulting diff audited against the target branch rather than trusted.

Validation:

  • The original revision: markdownlint-cli2 clean, vale clean at --minAlertLevel warning, which is the level CI gates at, and a full hugo build completing with no errors and rendering the page, both Mermaid diagrams and every table.
  • The positioning revision: markdownlint-cli2 and vale clean at the same level, every in-page anchor resolving against the document's own headings, and the profiles table verified for uniform column count. No full build for this revision: the change is prose, one table row and one heading, which is the scope AGENTS.md prescribes lint and Vale for. That revision also pins the toolchain at hugo-extended 0.151.0, which the pending rebase would move.

Author and Reviewer Checklist

Please verify the check list and ensure to tick them off before the MR is merged.

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
  • Assign reviewers for this MR to the correct
    • The when to get approval handbook section explains when DRI approval is required
    • The who can approve handbook section explains how to identify the DRI
    • If the MR does not require DRI approval, consider asking someone on your team, such as your manager.
    • The approver may merge the MR. If they approve but don't merge, you can merge.
  • For transparency, share this MR with the audience that will be impacted.
    • Team: For changes that affect your direct team, share in your group Slack channel
    • Department: If the update affects your department, share the MR in your department Slack channel
    • Division: If the update affects your division, share the MR in your division Slack channel
    • Company: If the update affects all (or the majority of) GitLab team members, post an update in #whats-happening-at-gitlab linking to this MR

🤖 Generated with Claude Code

Edited by Denys Mishunov

Merge request reports

Loading
Loading