Goal: a minimal but impressive system that judges one patch against one task in one repo.
- TypeScript CLI
- test runner
- lint/typecheck scripts
- docs
mergecode.yamlschema draft
Done when: mergecode --help works and tests run.
- create isolated worktree
- apply patch
- capture apply errors
- cleanup option
Done when: fixture patch applies without touching the source repo.
- run configured commands
- capture status, duration, output summary
- timeout handling
Done when: a failing test produces structured evidence.
- parse unified diff
- touched files
- added/deleted lines
- file categories
- deleted test detection
Done when: fixture diffs produce stable summaries.
- hard gates
- weighted categories
- findings with evidence
- verdict
Done when: known good/bad fixture patches produce expected verdicts.
- 30-second summary
- verdict
- why
- verification
- diff risk
- findings
Done when: report is useful without opening source code.
Create 5-10 realistic repo tasks with multiple candidate patches each:
- good patch
- test-passing but bad patch
- failing patch
- overbroad patch
Detect:
- removed assertions
.skip/.only- snapshot churn
- changed expected values
Use repo context:
- existing module map
- similar utility detection
- layer boundary hints
- duplicate logic candidates
Compare MergeCode verdicts with human labels.
Output:
- confusion matrix
- false positives
- false negatives
- rubric changes
Run Claude/Codex/Cursor/Aider patches through same tasks.
Output:
- mergeable rate
- test-pass vs mergeable gap
- recurring failure modes
Each task must leave the repo working. Do not start Stage B until the spine can produce a complete report.