← ClaudeAtlas

merge-conflict-generated-fileslisted

Resolve merge/rebase conflicts where the conflicting files are DERIVED OUTPUTS from a source-of-truth generator script. Use when: (1) multiple files conflict but they are all generated from a single source (e.g., site/*.html from a tracker Python script, dist/*.js from a bundler config, openapi.json from OpenAPI spec, Sphinx/Docusaurus HTML from .rst/.md), (2) hand-merging the generated files line-by-line would produce wrong/stale output because the files encode computed aggregates, (3) two parallel branches both modified the generator source AND committed regenerated outputs. Core insight: generated outputs are fully derived — resolve their source, re-run the generator, stage the fresh output. Don't waste time resolving HTML/JSON conflicts in files that will be overwritten by the generator anyway.
wan-huiyan/agent-traffic-control · ★ 1 · Code & Development · score 80
Install: claude install-skill wan-huiyan/agent-traffic-control
# Merge Conflict in Generated Output Files ## Problem A project generates output files (HTML, JSON, CSS, TypeScript declarations, OpenAPI specs, etc.) from a source-of-truth input. Both branches modified the source AND committed fresh generated outputs. The merge/rebase now shows conflicts in the generated files — but hand- merging them is both futile (the generator will overwrite them) and error-prone (computed totals, sorted indexes, and aggregated summaries can't be correctly resolved by text diffing). **The key mistake to avoid:** treating generated file conflicts as real conflicts requiring line-by-line resolution. They're not — they're a side effect of forgetting that the files are derived. ## Context / Trigger Conditions Apply this skill when ALL of these hold: 1. Multiple files are in the conflict set, but most of them look like generated output (HTML tables, JSON indexes, minified CSS, declaration files, changelogs built from commits). 2. You can identify a single source generator that produces them — a build command, a Python script, `make docs`, `npm run build`, `openapi-generator`, etc. 3. `git diff --name-only origin/main...HEAD` shows the same generator SOURCE (not output) was also modified on your branch, meaning both sides touched the source AND re-ran the generator. 4. Hand-merging the outputs would produce semantically wrong results (e.g., duplicate tracker entries, stale totals, mismatched sort order, broken JSON). **Common generator → ou