Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MergeSutra

### Issue in. Evidence-backed PR out.
### AI can propose a fix. MergeSutra demands evidence.

[![CI](https://github.com/Pavithran-R-A/mergesutra/actions/workflows/ci.yml/badge.svg)](https://github.com/Pavithran-R-A/mergesutra/actions/workflows/ci.yml)

Expand All @@ -17,6 +17,10 @@ becomes a PR."*

---

**Issue in. Evidence-backed PR out.** The trust layer for BharatCode-powered development asks a question a code diff alone cannot answer: **which requirements do the executed checks actually support?** MergeSutra keeps failed and unverified criteria visible rather than turning model confidence into proof.

**BharatCode ecosystem fit:** This release uses BharatCode's model API as a standalone CLI. It is **not** a BharatCode Desktop/IDE plugin or an official editor integration. The contract, evidence, and approval workflow could complement editor-based agents; no editor extension is currently shipped.

**BharatCode Build League judges:** [Start with the 2-minute guide](https://github.com/Pavithran-R-A/mergesutra/blob/main/docs/JUDGE_GUIDE.md).

**Source:** [github.com/Pavithran-R-A/mergesutra](https://github.com/Pavithran-R-A/mergesutra)
Expand Down
8 changes: 5 additions & 3 deletions docs/JUDGE_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# MergeSutra — judge's quick guide

**Issue in. Evidence-backed PR out.** MergeSutra is a BharatCode-powered command-line agent that converts one GitHub issue into a patch, a record of which requirements were checked, and a human-approved **draft** pull request. It is not a general chat assistant.
**AI can propose a fix. MergeSutra demands evidence.** MergeSutra is a BharatCode-powered CLI that takes a GitHub issue through acceptance contracts, bounded edits, executed checks and an auditable draft-PR candidate. Publication is a separate, human-approved action. It is not a general coding chatbot.

**Category:** Coding & developer tools (CLI agent).
**Competition:** [BharatCode Build League, Round 1](https://bharatcode.ai/hackathon).
**Source:** [Pavithran-R-A/mergesutra](https://github.com/Pavithran-R-A/mergesutra).
**Entry status:** A public repository is not proof of an account-linked contest submission. Check the competition site for the actual entry.

**BharatCode ecosystem fit:** The shipped product connects through BharatCode's model API as a standalone CLI. No BharatCode Desktop/IDE plugin or official editor integration is claimed.

## The important difference

Most code agents can make a patch and say tests passed. MergeSutra preserves an *acceptance contract* from the issue and repository policy, then maps each criterion to measured verification evidence. A requirement that no test covers is **not** silently marked complete. A model's claim never turns into a passing test receipt. Before GitHub is asked to open a draft PR, a person must approve the specific digest-bound publication page; publishing is a separate action.
Expand All @@ -21,8 +23,8 @@ A single run can be inspected through the shipped commands:

| Question | Evidence | Precise reading |
| --- | --- | --- |
| Does the source build and install across supported Node versions? | [CI run #41646695271](https://github.com/Pavithran-R-A/mergesutra/actions/runs/41646695271) | Six green jobs on Ubuntu, Windows and macOS × Node 22 and 24 at `f2e2b08` (3 Nov 2026) |
| Does the production CLI complete customer journeys? | [Customer workflow run #41640417724](https://github.com/Pavithran-R-A/mergesutra/actions/runs/41640417724) | Eight hosted journeys through the compiled CLI, with a **scripted-model gateway**; verifies workflow, not live-model quality |
| Does the source build and install across supported Node versions? | [CI run #42481055084](https://github.com/Pavithran-R-A/mergesutra/actions/runs/42481055084) | Six green jobs on Ubuntu, Windows and macOS × Node 22 and 24 at `e61fd5d` (8 Nov 2026) |
| Does the production CLI complete customer journeys? | [Customer workflow run #42478877591](https://github.com/Pavithran-R-A/mergesutra/actions/runs/42478877591) | Eight hosted journeys passed on PR #69 head `55f1351`; **scripted-model gateway**, not a live model or the exact post-merge SHA |
| Are commands isolated? | [Docker isolation run #41614337044](https://github.com/Pavithran-R-A/mergesutra/actions/runs/41614337044) | Three green Linux Docker isolation jobs, within the documented image/host/command limits |
| Has BharatCode actually completed a bounded issue-to-patch task? | [Live Qwen run #38144174041](https://github.com/Pavithran-R-A/mergesutra/actions/runs/38144174041) | Successful **older** 11 Oct 2026 fixture run at `b1c18bf`: 9/12 model requests; independent acceptance passed; **no PR published** |
| Does the present adapter answer at least one real request? | [Live smoke #41393924176](https://github.com/Pavithran-R-A/mergesutra/actions/runs/41393924176) | A bounded single request passed on 2 Nov 2026; this is **not** a full live chain |
Expand Down
2 changes: 2 additions & 0 deletions docs/PRODUCT_SPEC.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MergeSutra — Product Specification

> **Status note — 8 November 2026:** This specification includes historical stage-by-stage snapshots, including statements from Stage 11 that are no longer current. The shipped source and [README](https://github.com/Pavithran-R-A/mergesutra#readme) take precedence for present-tense behavior: the CLI has a digest-approved GitHub **draft** PR transport behind an explicit `pr --publish`, while unattended `run` and native BharatCode Desktop/IDE integration are **not** shipped. The product remains an evidence-first workflow powered by BharatCode's model API.

> Status legend used throughout: **[IMPLEMENTED]** exists and is tested today.
> **[DESIGNED]** specified but not yet built. **[PLANNED]** intended later.

Expand Down
11 changes: 5 additions & 6 deletions docs/SUBMISSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ Coding & developer tools (CLI Agent track)

**Short summary**

MergeSutra is a BharatCode-powered CLI agent that turns a GitHub issue into a
reviewable code change, independently verifies each acceptance criterion against
real evidence, and opens a draft pull request only after a human approves the
exact page by digest.
AI can propose a fix. MergeSutra demands evidence. Built on BharatCode's model API, MergeSutra is an evidence-first CLI that turns GitHub issues into reviewable, human-controlled draft PR workflows. It converts issues and repository policy into acceptance contracts, guides bounded AI edits in isolated worktrees, runs permitted checks in a locked-down Docker sandbox, and maps each criterion to what actually passed, failed, or remains unverified. A separate AI review examines the patch. Publication requires approval of the exact page by digest and a distinct, explicit action—no silent push, force-push, or merge. Less “AI says it's fixed.” More “here are the receipts.”

**Longer description**

MergeSutra adds the missing layer to AI coding agents: trustworthy evidence.
AI coding can propose patches at speed; maintainers still need to know what the checks actually prove. MergeSutra adds the missing layer: traceable evidence, explicit uncertainty, and human-controlled publication.
It reads an issue, compiles the repository's own requirements into an acceptance
contract, asks BharatCode for a plan and a bounded sequence of file writes and
commands, then runs the repository's own gates only after a human consents by
Expand All @@ -56,12 +53,14 @@ approval records a decision, and only a separate `--publish` asks GitHub for a
**draft** pull request through the operator's own `gh` login. MergeSutra never
force-pushes and never merges.

**BharatCode ecosystem positioning.** This release is a standalone CLI using BharatCode's model API, not an in-IDE feature, desktop plugin or official BharatCode integration. Its evidence-first contribution workflow could complement future editor workflows; no editor extension is currently shipped.

The repository command runner is a digest-pinned, network-disabled, read-only
Linux container under a non-root user; model output is untrusted,
schema-validated data. The project includes a recorded live BharatCode run from
11 October 2026 on commit `b1c18bf` (9 of 12 budgeted model requests, zero review
findings, independent fixture checks passed) and a completed scripted-model
demonstration of the full workflow at the current tree (`run-20261021T115401Z-ea10b8`:
demonstration of the full workflow on an earlier build (`run-20261021T115401Z-ea10b8`:
both gates exit 0, all five independent oracle checks pass, zero review findings,
digest-bound approval filed, `--publish` never invoked). The live run predates
the current tree and proves one bounded fixture task, not general model
Expand Down
Loading