Skip to content

Platform abstraction: GitLab and Azure DevOps support #375

Open

Description

@admarble

Platform Abstraction: GitLab and Azure DevOps Support

Epic: Multi-agent backend support (#373)
Depends on: #368 (PlatformProvider interface — done), #443 (consolidate remaining gh calls)
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:

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

  • GitLabProvider implements PlatformProvider interface
  • All operations mapped to glab CLI equivalents
  • isAvailable() checks glab 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 gitlab works 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:

  1. Template variables: Replace gh issue comment with {{platform.commentCommand}} in skill prompts
  2. Platform-aware prompt injection: Prepend "You are working with GitLab. Use glab instead of gh." 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 devops CLI is less ergonomic than glab
  • 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

  • AzureDevOpsProvider implements PlatformProvider interface
  • Work item operations mapped to az boards CLI
  • PR operations mapped to az repos pr CLI
  • npx sequant run 42 --platform azure-devops works end-to-end
  • Work item state transitions handled (New → Active → Resolved → Closed)
  • Settings: "platform": "azure-devops" with required organization and project fields

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 --platform flag is fine.
  • Skill rewriting per platform: Use prompt injection, not skill variants.

Testing

  • Unit: GitLabProvider / AzureDevOpsProvider method implementations
  • Unit: CLI mapping produces correct glab / az commands
  • Integration: Mock glab/az CLI 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

Activity

  1. added
    roadmap
    multi-agent
    on Mar 22, 2026
  2. admarble commented on Apr 8, 2026

    @admarble
    ContributorAuthor

    Architecture Update — Async Interface Improvement

    #506 (Async I/O modernization) will convert all GitHubProvider sync methods to async and add batchFetchIssues() for GraphQL batching.

    Impact on this issue: New providers (GitLabProvider, AzureDevOpsProvider) should implement the async PlatformProvider interface 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.

  3. added
    backlog
    on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogmulti-agentroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions