0004 — Generated files are written on main only¶
- Status: ratified
- Number: 0004
- Date: 2026-10-29
- Proposed by: agent (Grok Bot, on a branch opened for bamr87)
- Ratified by: https://github.com/bamr87/bamr87/pull/442 (merged 2026-10-30 by @bamr87)
- Affects: constitution §2 (invariants); feature HUB-035
- Supersedes: none (refines the second §2 invariant added by amendment 0002)
- Related:
docs/JEV.md("Main-only generated files"),tools/jev/README.md,tools/jev/generated.py, amendment 0002 (docs/amendments/0002-conflict-free-numbering.md)
Context¶
Amendment 0002 keeps generated files from being hand-merged with a custom merge driver (merge=jev-regen) and a CI drift check. That works on a clone that installs the driver, but GitHub's mergeability check ignores custom merge drivers: two pull requests that both regenerate CATALOG.md or docs/README.md are still reported This branch has conflicts, and the PR-side drift check forces every branch to commit a fresh copy of the very file they conflict on. The rule that "CI fails on drift" is what keeps the conflict alive.
Amendment¶
Replace the second invariant in constitution §2:
- A generated file is never hand-merged. Its conflicts are resolved by regenerating it, and CI fails on drift rather than trusting the resolution. (amendment 0002)
with:
- A generated file is never hand-merged. A file generated end to end that is marked
jev-main-onlyin.gitattributesis regenerated and committed only on the default branch, by the post-merge job, and CI fails a pull request that edits it. A generated span in a hand-written file is regenerated by the same job, and a pull request's drift check on it is advisory. Every other generated file is resolved by regenerating it, and CI fails on drift rather than trusting the resolution. (amendments 0002, 0004)
Consequences¶
CATALOG.mdanddocs/README.mdarejev-main-only. They stay committed (links and GitHub browsing keep working);.github/workflows/jev-number.ymlregenerates them after every push tomainand publishes through publish-data.drift-check.ymlrunspython3 -m tools.jev generated guardon every pull request and fails, with the fix, on an edit to one.- The PRD feature block, README
AUTO:projectsand thedocs/DASH.mdCLI reference are regenerated by the same job;JEV_SPANS_ADVISORY=1turns their PR-side drift checks into warnings. projects/SCHEMA.md,_data/specs.yml,_data/features_index.yml,_data/cv_portfolio.jsonand_data/deep_dive.jsonare unchanged: their own loops or the registry flow write them, and their drift checks still gate.- The JEV conflict engine takes main's copy of a main-only file and does not regenerate or
--checkit on a branch. It runs tier 0 only (jev.auto_tiers) until a human lists the model tiers.