Overview Installation Commands How It Works Languages Detection Layers Persistent Index GitHub Action MCP Server Output Formats

Documentation

Rosentic catches semantic conflicts between AI coding agents before they break your main branch. AST-level detection across 11 languages, deployed as a GitHub Action or MCP server.

Installation

GitHub Action (recommended)

Add a workflow file to your repository. The engine runs on GitHub's infrastructure — your code never leaves your environment.

.github/workflows/rosentic.ymlyaml
- name: Rosentic Scan uses: docker://ghcr.io/rosentic/engine:latest env: ROSENTIC_KEY: ${{ secrets.ROSENTIC_KEY }}

That's it. Four lines. Every PR gets scanned against all active branches before merge.

Local / CLI

Run the engine directly against any local repository.

Terminalbash
# Check one branch pair python3 detect.py <repo> <branch_a> <branch_b> # Full conflict matrix across all branches python3 detect.py scan-all <repo> # JSON output python3 detect.py scan-all <repo> --format json

Commands

CommandDescription
detect.py <repo> <a> <b>Check a single branch pair for semantic conflicts
detect.py scan-all <repo>Full conflict matrix — every branch pair in one query
--format textHuman-readable output (default)
--format markdownPR comment-ready markdown
--format jsonMachine-readable JSON for integrations

How It Works

Rosentic uses tree-sitter to build an AST (Abstract Syntax Tree) for every file on every active branch. From the AST, it extracts function definitions, call sites, HTTP route declarations, and HTTP client calls. Then it compares every branch pair to find incompatibilities.

Key design principle: Don't compare ASTs across languages. Normalize both sides onto shared interface nodes (HTTP routes, function signatures) and run compatibility analysis on the normalized layer.

The engine is deterministic. Same input, same output. No LLM inference, no hallucination, no false positives from model uncertainty. Tree-sitter parsing is production-grade from day one.

Supported Languages

Full AST parsing and symbol extraction across 11 languages:

Python
TypeScript
JavaScript
Go
Ruby
Java
Kotlin
Swift
Rust
C#
C++
More coming

Detection Layers

LayerWhat It DetectsStatus
L1 — Symbol GraphSame-language function signature mismatches. Function changed parameters but callers still use old signature.Built
L2 — Interface GraphCross-language HTTP contract conflicts. Python route changed required fields, TypeScript client still sends old fields.Built
L3 — Contract GraphGraphQL schemas, protobuf contracts, event bus topics (Kafka, RabbitMQ), database migration conflicts.Next
L4 — CompatibilityBreaking change classification. Required field = breaking, optional = compatible.Next
L5 — ConfidenceEvery conflict edge carries evidence source and confidence score.Future

Persistent Index

The engine stores a persistent index at .rosentic/index.json in the target repo. The index caches branch HEAD commit hashes — when a branch hasn't moved, the engine skips re-indexing.

On a warm run (no branches changed), scan times drop dramatically:

BenchmarkColdWarm
Demo repo (5 branches, 18 conflicts)1.6s0.97s
Production codebase (46,690 lines, 235 files)29.6s11.3s

The index auto-creates the .rosentic/ directory and adds it to .gitignore.

GitHub Action

When deployed as a GitHub Action, the workflow is:

Agent opens PR → GitHub spins up temporary runner → downloads Docker image → scans PR branch against all active branches → posts PR comment with conflict report → blocks or approves merge → runner is destroyed.

Security: Your code never leaves GitHub's infrastructure. The engine runs on GitHub's ephemeral runners. No server required on Rosentic's side. License key gates access to the Docker image.

MCP Server

Rosentic ships an MCP (Model Context Protocol) server for direct agent integration. Agents can query the conflict graph before pushing code, enabling them to self-correct before creating a PR.

Output Formats

Text (default)

Outputtext
Rosentic Scan Results Repository: ./my-app Branches: 5 active Pairs: 10 checked Conflicts: 3 found CONFLICT agent/alice ↔ agent/charlie Type: API contract mismatch Source: backend/main.py:create_order() Target: frontend/api.ts:fetch('/order') Detail: Required param 'shipping_id' added in source, missing in target call

JSON

Machine-readable output for CI integration, dashboards, or custom tooling. Use --format json flag.