The Problem

Every developer knows this pain: push code → wait 15 minutes for CI → discover your change broke a downstream service → investigate → fix → push again → wait another 15 minutes.

In organizations with hundreds of microservices, a single exported function change can silently break multiple projects. You don't know until CI fails across the organization.

The Solution: Parity-Flow

Parity-Flow provides predictive CI/CD feedback BEFORE you push by combining local AST analysis with GitLab's Orbit knowledge graph.

How It Works

  1. Local Indexing: tree-sitter parses your TypeScript/JavaScript files, extracting all functions, classes, interfaces, imports, and exports
  2. Delta Calculation: When you make changes, Parity-Flow compares current state to the last snapshot and calculates impact
    scores
  3. Orbit Integration: The Duo Flow queries GitLab Orbit Remote to find ALL downstream dependencies across your organization
  4. Instant Feedback: Know which teams and projects will be affected BEFORE pushing

Key Features

CLI Tool

  • parity-flow init . - Index your repository
  • parity-flow push --dry-run - Analyze impact before pushing
  • parity-flow duo analyze - Generate Duo Flow payload
  • parity-flow heal yaml - Self-healing CI/CD configuration

Impact Scoring (0-1 scale)

  • High (≥0.6): Exported functions/classes with signature changes
  • Medium (0.3-0.6): Internal but referenced definitions
  • Low (<0.3): Local scope only

Flaky Test Detection
Uses the CP (Continuous Probability) formula:
CP = (F_recent/N_recent) × 0.7 + (F_total/N_total) × 0.3
Tests with CP ≥ 0.30 are auto-quarantined.

GitLab Duo Flow
4 AI agents work together:

  • Coordinator: Receives AST delta, orchestrates analysis
  • Dependency Analyzer: Queries Orbit for downstream importers
  • Flaky Sentinel: Calculates CP scores for affected tests
  • Self-Healer: Creates MRs to quarantine tests or fix YAML

VS Code Extension

  • CodeLens annotations showing impact scores
  • Tree views for Impact Analysis, Flaky Tests, Status
  • One-click actions to quarantine tests

Web Dashboard

  • Team-wide visibility
  • Impact analysis charts
  • Flaky test management
  • Dependency graph visualization
  • AI Agent Chatbot - Natural language interface to create issues, MRs, and query GitLab

How It Uses GitLab Orbit

Parity-Flow leverages GitLab Orbit in several ways:

  1. Dependency Discovery: Queries Orbit's knowledge graph to find all projects importing your changed exports
  2. Code Owner Identification: Finds the right teams to notify about breaking changes
  3. Pipeline History: Correlates test failures with code changes to detect flaky tests
  4. Organization-wide Impact: Goes beyond local analysis to show impact across the entire org

## Technical Stack

  • Languages: TypeScript, Node.js
  • AST Parser: tree-sitter (same parser used by GitHub)
  • Local Storage: SQLite via better-sqlite3
  • Web Framework: Next.js 14, React 18, Tailwind CSS
  • AI Integration: OpenAI GPT-4o for chatbot, GitLab Duo for flow agents
  • Testing: Vitest (26 passing tests)

Development Approach

  1. Phase 1: Built core CLI with tree-sitter indexing and SQLite storage
  2. Phase 2: Implemented delta calculation and impact scoring algorithm
  3. Phase 3: Created Duo Flow YAML with 4 specialized AI agents
  4. Phase 4: Added VS Code extension with CodeLens and tree views
  5. Phase 5: Built Next.js dashboard with AI chatbot
  6. Phase 6: Integrated self-healing CI/CD capabilities

Next Steps

  • Multi-language Support: Add Python, Ruby, Go parsers
  • Daemon Mode: Real-time file watching with instant feedback
  • GitLab CI Component: Native pipeline integration
  • Deeper Orbit Integration: Correlate with vulnerabilities, MR history
  • Team Analytics: Track impact trends over time

Impact

Parity-Flow solves a real pain point for development teams:

  • Saves CI minutes: Catch issues before triggering pipelines
  • Prevents broken builds: Know the blast radius before pushing
  • Reduces friction: No more angry Slack messages from other teams
  • Enables coordination: Automatically notify affected code owners

Built With

Share this project:

Updates