Repository navigation
Description
Feature request: GitLab forge backend (pluggable VCS/ticketing) — working prototype included
Summary
The Horizon 2 roadmap section Pluggable VCS and Ticketing says:
Unbound Force is currently GitHub-only — Issues, PRs, Actions, the
gh
CLI. Real-world adoption requires GitLab support — Merge Requests instead
of Pull Requests, GitLab CI instead of GitHub Actions, the Files API for
knowledge store operations. … The coupling is in the CLI commands and
workflow scripts that assume GitHub. Pluggable backends for VCS
operations and ticketing operations make the agent layer portable across
platforms.
We run Unbound Force (uf v0.23.0, full scaffold: OpenSpec tier, Divisor
council, convention packs) across a nine-repository GitLab group on a
self-hosted enterprise GitLab instance. The forge-agnostic core works
perfectly there — /opsx-*, /speckit.*, /uf.unleash,
/uf.review-council, /gaze, Replicator worktrees, Dewey — because it
operates on local git and files. Only the six GitHub-aware commands are
unusable for us.
What we did
We prototyped the refactor the roadmap describes, on the current command
set, without forking anything:
- A
gitlab-forge-backendskill defining a small verb interface
over issues, merge requests, and CI pipelines (issue_get,
issue_notes,mr_get,mr_diff,pipeline_latest,job_trace,
mr_note,issue_add_labels,job_retry, …), implemented with the
glabCLI — the natural twin ofgh(OAuth'd, JSON output, same
invocation shape). - Three glab-backed command twins —
/gl.triage-issue,
/gl.review-mr,/gl.fix-ci— that preserve the originals'
semantics: Divisor fan-out, deterministic-checks-first ordering,
untrusted-content rules, confirmation-gated mutations, one JSON artifact
per run, rebase-only CI sync with force-push lease.
The prototype runs daily against real GitLab-hosted repositories. The
safety rails carried over unchanged; only the transport changed.
Why an issue (and not just a PR)
The roadmap paragraph is the only existing guidance — there is no spec, RFC,
or design doc for the backend interface yet, and we would rather converge
on the interface shape with you before porting all six commands. A PR with the working
prototype (the backend skill plus the three command twins) is linked below,
and the full design RFC is posted as a comment on this issue.
Questions for maintainers
- Interface placement — should the verb interface live in a shared
skill (as in our prototype), in the TypeScript plugin layer, or inuf
itself as a subcommand surface? - Boundary with FullSend — the Now-horizon FullSend BYOA integration
gives UF a path to GitLab through FullSend's forge abstraction. Our
reading is that command-layer portability (this proposal) and
infrastructure-layer dispatch (FullSend) are complementary, not
competing — but we would like your framing before investing in the
remaining three commands. glabdistribution —uf setupalready hastool_methods
machinery (gaze, replicator). Should the GitLab backend add aglab
method with the same treatment?
Environment
- uf v0.23.0, glab v1.134.0, self-hosted GitLab (issues, MRs, CI pipelines)
- Repositories: Go, spec-first via OpenSpec, convention packs active
Happy to restructure any of this to fit the project's plans. The prototype
exists and is in daily use; the remaining work is upstreaming shape, not
proof of concept.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
srslypleaswaite commentedon Dec 1, 2026
RFC: Pluggable VCS and Ticketing Backends — GitLab parity for the forge layer
Follow-up to the Horizon 2 roadmap item "Pluggable VCS and Ticketing."
A working prototype exists and is described below.
Problem
Six commands are the forge layer — the bridge between the local swarm and
the hosting platform's collaboration objects:
/uf.triage-issue/uf.review-pr/uf.address-feedback/uf.fix-ci/uf.rebase-pr/uf.finaleAll six are hardwired to the
ghCLI and GitHub's object model. Teamshosting on GitLab can use the entire forge-agnostic core — specs, swarm,
council, convention packs, worktrees — but none of these six. The coupling
is confined to the command files themselves; agents, packs, and the
constitution are already VCS-agnostic markdown.
Proposal
Introduce a forge backend interface with two axes, matching the
roadmap's "VCS operations and ticketing operations":
1. The verb interface
A small, closed set of operations that the six commands consume. From the
working prototype (GitLab column shown; GitHub column is today's
ghusage extracted from the commands):
gh)glab)issue_getgh issue view --jsonglab api projects/<enc>/issues/<iid>issue_notesgh api .../issues/N/commentsglab api .../issues/<iid>/notesissue_add_labelsgh issue edit --add-labelglab api -X PUT ... -f add_labels=issue_create_childgh issue createglab api -X POST .../issuesmr_get/mr_diffgh pr view/diffglab api .../merge_requests/<iid>(/changes)mr_notegh pr commentglab api -X POST .../notespipeline_latest/job_tracegh run list/view --logglab api .../pipelines,.../jobs/<id>/tracemr_rebase/mr_mergegh pr update-branch/mergeglab api -X PUT .../rebase,glab mr mergejob_retrygh run rerunglab api -X POST .../jobs/<id>/retry2. Backend selection
git remote get-url origin(host containsgitlab.→GitLab backend;
github.com→ GitHub backend).UF_FORGEenv) wins over detection.3. Implementation substrate
Both backends are authenticated CLI wrappers (
gh,glab) rather thanAPI clients:
ghassumption.
glab apireturns raw GitLab JSON, exactly as thecommands already consume
gh apiJSON.glabdistribution rides the existinguf setuptool_methodsmachinery (as gaze and replicator already do).
glab auth login --hostname); the backend skill documents it once.What changes for the six commands
Mechanical refactor, one command per OpenSpec change:
ghinvocation into the verb interface.merge request, check run → pipeline job) while keeping command names
and semantics stable.
GitLab notes vs GitHub comments pagination shapes).
Everything the commands already guarantee carries over unchanged:
untrusted-content rules, deterministic-checks-first ordering, Divisor
fan-out and model-matrix dispatch, confirmation-gated mutations,
checkpoint/progress tracking, one JSON artifact per run.
Working prototype
Three of the six commands have been ported and run daily against a
self-hosted enterprise GitLab (nine repositories, Go, spec-first):
gitlab-forge-backendskill — the verb interface above, with safetyrules, project-path resolution (URL-encoded
%2Fpaths), andpagination/validation requirements
/gl.triage-issue— Ingest → Assess (5-persona Divisor fan-out) →Classify → Act, confirmation-gated labels/comments/child issues
/gl.review-mr— deterministic checks first, light/full council modes,structured findings posted as a single MR note; approve/merge stay human
/gl.fix-ci— evidence-grounded job-log diagnosis, failureclassification (deterministic / flaky / infra / merge-skew), rebase-only
sync with
--force-with-lease, gated fix loop, retry path forflaky/infra
The port took roughly a day for three commands; the verb interface is the
part worth converging on, since the rest is translation.
Relationship to FullSend
The Now-horizon FullSend BYOA integration gives agents a path to GitLab
through FullSend's forge abstraction. These are complementary layers:
which event, with what sandbox and credentials — across forges.
working in an interactive session against whatever forge the repository
lives on.
A GitLab-hosted team should not need FullSend to run
/uf.triage-issuelocally, and a FullSend deployment should be able to dispatch
GitLab-capable agents to these same commands.
Non-goals
Open questions
plugin tool, or
ufsubcommand?ghcalls(zero behavior change) or normalized to the verb shapes exactly?
fixture replay?
Migration plan
/uf.triage-issue(ticketing axis) behind the interface./uf.review-prand/uf.fix-ci(VCS axis)./uf.address-feedback,/uf.rebase-pr,/uf.finale.jflowers commentedon Dec 3, 2026
Thanks for writing this up, and for running the prototype against a real GitLab. It shows the GitLab mapping actually works, which was the part I was least sure of.
I think the interface is in the wrong place though. A good chunk of the forge layer already lives in the
.opencode/plugins as typed tools:fetch_pr_review_context,fetch_pr_checks,fetch_failed_run_logs,post_issue_comment,create_child_issue,post_feedback_replies,checkout_pr_head,uf_finale_create_pr,uf_finale_ci_poll. They share one error classifier (.opencode/lib/gh-error.ts), and most take theirghrunner as an injected dependency. That injected runner is the seam. Put a GitLab adapter behind it and the commands don't change.The RFC's skill would tell the model which
glab apicall to make, how to encode%2Fand how to paginate. That's exactly the mechanical procedural prose our Determinism gate says to keep out of commands and skills when a tool is feasible. So for open question 1, my vote is plugin tools, and I don't think it's close.Two more things I'd change.
The verbs mirror the CLIs. If
issue_getreturns raw GitHub JSON in one repo and raw GitLab JSON in another, the model still has to know both shapes. I'd rather the tools return normalized objects (a change request with its diff, threads and checks). Notes vs comments, pipelines vs check runs and pagination would all stay in TypeScript, where we can test them.Forge and tracker are two axes, not one. Picking a single backend from
origincan't express GitLab for merge requests plus Jira for tickets, which is the setup a lot of enterprise teams actually have. I'd split it into aforgeadapter (github, gitlab) and atrackeradapter (github, gitlab, jira), configured separately in.uf/config.yaml, with the remote as the default forforge. That also brings up something the RFC doesn't cover yet:Closes #Nin/uf.finalemeans nothing for a Jira key, so the tracker has to own how that link gets written.Order I'd suggest:
ghcalls still written in command prose into tools, GitHub only. We owe that to the Determinism gate anyway.ForgeAdapterandTrackerAdapterinterfaces behind the existing runner seams, with GitHub as the only implementation, and make the error classes forge neutral.glabadapter, then add a Jira tracker. Test them with recorded fixtures through the existing dependency injection. That answers question 4 without standing up a GitLab container.One tradeoff: plugins only run under OpenCode, so this wouldn't carry over to the
gl.*skills in other harnesses. For this repo I think that's fine.Your verb table is still useful as the checklist of what the adapters have to cover. And I agree with the FullSend split.
Would you be up for taking step 3 once 1 and 2 land? Your prototype is most of the way there.
srslypleaswaite commentedon Dec 4, 2026
I can take a stab at that. I'll sort out the other issues you raised and take a look.
I've been using it in anger for the past few days and it seems to be holding up. The only real problems I've hit are that the model sometimes gets a little overly helpful and asking about the feasibility of a feature will on occasion get me a fully built, reviewed and committed code change. That's on me, though. I've also seen it get kinda dumb if it loses it's connection to the gitlab instance (because of a VPN drop or something) and it'll just keep retrying with longer and longer retry windows until I reconnect. Again, basically on my end. I'd rather see it recognize a bad network path and bail.