snippet

Generated file markers

Tier 4engineeringA person checks this

Hand-written logic lost when a generator overwrites a file. The header marks which files are safe to regenerate. Any kind not on the safe list (schemas, types, test scaffolds) is marked false, so a file nobody has vouched for stays hand-owned.

GENERATED FILEA PERSON CHECKS THIS PRODUCT MODEL GENERATOR SAFE TO REBUILD
Add this to your project
Add "Generated file markers" from ntent to this repo.

Fetch https://ntent.app/r/f/generated-header as plain text. Apply it to the first 3 lines of every generated file.

Then check it: Run the generator twice. Nothing hand-written is lost. Then find a generated file whose kind is not in the list of safe ones: its header says @regenerable: false.

Reads https://ntent.app/r/f/generated-header

Read the code
the first 3 lines of every generated file
3 lines
// @generated-from: contract.json#invoice
// @regenerable: true
// @last-generated: 2026-08-30

How to tell it works: Run the generator twice. Nothing hand-written is lost. Then find a generated file whose kind is not in the list of safe ones: its header says @regenerable: false.

Included in