iterion

ADR-049 — Forge as an interchangeable substrate (iterion stays a layer, not a forge)

Status: Accepted

Context

A recurring strategic question: should iterion couple itself to an open-source forge (Forgejo) — by embedding it, forking it, building its own forge derived from its code, or by remaining an interfaceable layer over a forge and deepening the integration?

The codebase already draws a clean line:

So iterion already owns “work orchestration + tracking” and delegates the heavy, commoditized part (git + PR + review + CI) to the forge. The boundary exists and is healthy.

Decision

iterion remains an AI-native layer over an interchangeable forge. We close the gaps inside the existing abstraction; we do not fork a forge and we do not build one.

Rationale:

Options rejected

Consequences

The integration is deepened by filling these gaps within the existing interfaces (this ADR’s accompanying change implements them):

  1. Bot-driven PR lifecyclePullClient gains CreatePull / UpdatePull / MergePull (was read-only) across all three providers, surfaced as card actions (pkg/server/board_forge.go) so a run ties its PR back to the source card.
  2. GitLab dispatch parity — a new GitLab Tracker adapter (pkg/dispatcher/tracker/gitlab.go) so GitLab Issues are dispatchable (previously GitLab was reachable only via MR webhooks).
  3. Forge comment-backIssueClient.CommentIssue lets a bot reply on the source issue/PR (was inbound-only).
  4. Webhook introspectionAdmin.ListHooks + a per-integration hooks endpoint, to audit orphaned/divergent forge-side hooks.
  5. Near-real-time forge→board projection — an inbound forge webhook now triggers an immediate incremental sync of the affected repo’s integration (reusing syncOneIntegration), with the periodic worker kept as the reconciliation net.

The capabilities stay optional (type-asserted, ErrNotSupported) so a provider/auth-kind that lacks one (e.g. a GitHub-App connection without issue/PR scope) degrades gracefully.

When to revisit

Reconsider the heavier options only if either holds:

The AI-native collaboration experience (“a forge where agents are first-class collaborators”) is delivered as an overlay via the forge API + the studio (linked-PR/CI panels, board sync) — it does not require owning the git substrate.