Repository navigation
Description
Platform Abstraction: GitLab and Azure DevOps Support
Epic: Multi-agent backend support (#373)
Depends on: #368 (PlatformProvider interface — done), #443 (consolidate remainingghcalls)
Priority: P2 — architecture is ready; ship post-2.0 when demand signal arrives
Target: v2.1 or v2.2 (not included in v2.0 release)
Current State (as of 2026-03-25)
#368 shipped and the platform abstraction layer is ~95% complete:
| Component | Status |
|---|---|
PlatformProvider interface |
Done — src/lib/workflow/platforms/platform-provider.ts |
GitHubProvider implementation |
Done — all orchestration gh calls consolidated |
AgentDriver interface + registry |
Done — Claude Code + Aider drivers |
Remaining gh debt in utility modules |
9 calls — tracked in #443 |
Skills (gh hardcoded) |
Intentional v1 debt per #368 non-goals |
Hooks (pre-tool.sh) |
Shell-level, requires sync platform check |
What changed since this issue was written:
- The "Current State" table in the original issue described pre-Extract AgentDriver interface from phase-executor.ts #368 coupling. That work is done — all orchestration-layer
ghcalls are inGitHubProvider. - The remaining work is purely additive: implement new providers against the existing interface.
- Consolidate remaining gh CLI calls into GitHubProvider #443 tracks cleanup of the last 9 scattered
ghcalls as a prerequisite.
Strategic Assessment
Why not in 2.0:
- 2.0 is scoped to /assess unification + MCP server (breaking changes + migration)
- No proven enterprise demand yet for non-GitHub platforms
- GitLab Duo Workflows competes on GitLab's platform; Sequant complements GitHub
When to pull the trigger:
- Enterprise customer or design partner on GitLab/Azure DevOps
- Significant community demand (50+ thumbs-up)
- GitLab Duo gaps that Sequant can fill (structured QA, quality gates)
Implementation is straightforward once triggered — mostly CLI mapping (gh → glab) against an existing, tested interface.
Goal
Implement GitLabProvider and AzureDevOpsProvider conforming to the PlatformProvider interface, enabling npx sequant run 123 --platform gitlab.
Phase 1: GitLab Provider
Why GitLab First
- Largest non-GitHub share in enterprise
- Official CLI (
glab) is mature — MR management, CI/CD, releases - GitLab explicitly supports external AI agents (Claude Code, Codex) via Duo
- Terminology mapping is straightforward: issue → issue, PR → merge request, label → label
CLI Mapping
| Operation | GitHub (gh) |
GitLab (glab) |
|---|---|---|
| Fetch issue | gh issue view N --json title,body,labels |
glab issue view N --output json |
| Post comment | gh issue comment N --body "..." |
glab issue note N --message "..." |
| Add label | gh issue edit N --add-label "foo" |
glab issue update N --label "foo" |
| Create PR/MR | gh pr create --title --body --head |
glab mr create --title --description --source-branch |
| PR/MR status | gh pr view N --json state |
glab mr view N --output json |
| Auth check | gh auth status |
glab auth status |
| List closed | gh issue list --state closed --json ... |
glab issue list --closed --output json |
Acceptance Criteria
-
GitLabProviderimplementsPlatformProviderinterface - All operations mapped to
glabCLI equivalents -
isAvailable()checksglab auth status - MR URL extraction (regex for
gitlab.com/.../merge_requests/\d+) - Self-managed GitLab support (custom domain, not just gitlab.com)
-
npx sequant run 42 --platform gitlabworks end-to-end - Phase markers work in GitLab issue comments (same HTML comment format)
- Labels created if they don't exist (GitLab requires explicit label creation unlike GitHub)
- Settings:
"platform": "gitlab"in.sequant/settings.json
Skill Adaptation
Skills embed raw gh commands. Two options:
- Template variables: Replace
gh issue commentwith{{platform.commentCommand}}in skill prompts - Platform-aware prompt injection: Prepend "You are working with GitLab. Use
glabinstead ofgh." to phase prompts
Option 2 is simpler and works because AI agents can adapt to platform instructions. Start there.
Phase 2: Azure DevOps Provider
Why Second
- Smaller addressable market than GitLab
- Microsoft is actively pushing ADO users to GitHub repos for AI features
az devopsCLI is less ergonomic thanglab- Work items (ADO's "issues") have a different data model
Key Differences from GitHub/GitLab
| Concept | GitHub | GitLab | Azure DevOps |
|---|---|---|---|
| Issue | Issue | Issue | Work Item |
| PR | Pull Request | Merge Request | Pull Request |
| Labels | Labels | Labels | Tags (on work items) |
| Comments | Issue comments | Notes | Discussion threads |
| CLI | gh |
glab |
az devops / az repos |
| ID format | Integer (#42) | Integer (#42) | Integer (but scoped to project) |
| Org structure | owner/repo | group/project | org/project/repo |
Acceptance Criteria
-
AzureDevOpsProviderimplementsPlatformProviderinterface - Work item operations mapped to
az boardsCLI - PR operations mapped to
az repos prCLI -
npx sequant run 42 --platform azure-devopsworks end-to-end - Work item state transitions handled (New → Active → Resolved → Closed)
- Settings:
"platform": "azure-devops"with requiredorganizationandprojectfields
Non-Goals
- Bitbucket: No official CLI, shrinking market, Atlassian building Rovo Dev. Not planned.
- Jira integration: Jira is a project tracker, not a code platform. Out of scope.
- Gitea/Forgejo: Niche self-hosted. Community contribution welcome, not prioritized.
- Platform auto-detection: Nice to have but not required. Explicit
--platformflag is fine. - Skill rewriting per platform: Use prompt injection, not skill variants.
Testing
- Unit:
GitLabProvider/AzureDevOpsProvidermethod implementations - Unit: CLI mapping produces correct
glab/azcommands - Integration: Mock
glab/azCLI and verify end-to-end flow - Manual: Real GitLab project + real Azure DevOps project test runs
- CI: Platform provider tests should run without real platform auth (mock CLI responses)
Research References
glabCLI docsaz devopsCLI docs- Azure DevOps MCP server — potential alternative to CLI
- GitLab Duo external agents
- CodeRabbit multi-platform approach — reference for how they abstract across platforms
Activity
admarble commentedon Apr 8, 2026
Architecture Update — Async Interface Improvement
#506 (Async I/O modernization) will convert all
GitHubProvidersync methods to async and addbatchFetchIssues()for GraphQL batching.Impact on this issue: New providers (
GitLabProvider,AzureDevOpsProvider) should implement the asyncPlatformProviderinterface from the start. If #506 lands before this issue, you avoid building sync methods that would need immediate migration.No changes to this issue's scope — all provider implementation work (glab/az CLI mapping, skill adaptation, settings schema, E2E testing) is independent.