Repository navigation
Description
The intuitive way to detect a generated file — grep for the generator's banner — is structurally blind to one of the two trees generated files live in, and it fails in the direction of "nothing here is generated".
Measured (per tree, at origin/main)
tree grep -lEi 'DO[- ]NOT[- ]EDIT' grep -l 'GENERATED by'
plugins 345 339
docs 900 0
The two trees are emitted by different generators with different banners:
plugins line 1: <!-- GENERATED by `charly marketplace generate` — DO NOT EDIT. … -->
docs line 1: --- <- Astro frontmatter
line 6: <!-- DO-NOT-EDIT — generated by `charly docs generate`; run `task docs:sync` … -->
Two independent reasons a marketplace-keyed matcher misses every docs page: the banner sits behind frontmatter (so head -1 misses it), and it reads lowercase generated by after a DO-NOT-EDIT — prefix (so a case-sensitive GENERATED by misses it even inside head -12).
And the separators are opposite between trees, which is why case- and separator-tolerance are both load-bearing rather than stylistic:
tree 'DO NOT EDIT' (spaced) 'DO-NOT-EDIT' (hyphenated)
plugins 344 4
docs 2 900
Why this is a defect in the guard rather than a documentation nit
The banner exists to stop someone editing a projection. Anyone auditing plugins naturally writes GENERATED by — it names the generator they are thinking about — gets 339 hits, and carries that instrument to docs, where it returns a confident zero on ~900 generated pages. A guard that fails silently toward "nothing here is generated" converts a question into a false answer — and the cost of that is measured below, not assumed.
This is not hypothetical: two PRs in this repo's history spent multiple review rounds editing generated projections before anyone noticed, and the reusable lesson recorded at the time — "a DO-NOT-EDIT banner only works if you arrive at the top of the file, and a targeted edit never does" — understated it. The banner also does not work if you arrive with the wrong pattern.
The discriminator, stated as a rule rather than a count
A detector keyed on one generator's banner cannot see another generator's tree. Key it on the property all generated files share —
DO[- ]NOT[- ]EDIT, case-insensitive — never on the emitter's name.
Stated as a rule because counts move; the property does not.
Candidate remedies (not prescribing one)
- Converge the banners so both generators emit an identical, greppable marker line — the durable fix, and it makes the property real rather than conventional.
- Ship the detector as a
charlyverb, so nobody hand-rolls the pattern. Per R4, a probe nocharlyverb expresses is a gap, and this one has now produced a wrong answer twice. - At minimum, ensure every place that prescribes a detection command prescribes the tolerant form.
charly#289already does this at two sites, with the separator split as its measured justification — so the documented form is correct today; the intuitive form is what fails.
Related
- marketplace drift: the (stale) suffix marks an orphan and should say so #290 —
marketplace drift: the(stale)suffix marks an orphan and should say so. - plugins/main carries an ollama skill corpus with no superproject source — a producer orphaned by projection-first ordering #291 —
plugins/maincarries an ollama skill corpus with no superproject source. - candy-prose-accuracy: three defects in candy/charly-internals/charly.yml, fixable in one regeneration #292 —
candy-prose-accuracy: three defects incandy/charly-internals/charly.yml, closing withplugins#194. This issue is its successor and shares the file'sdocs-copy incompleteness (the page'shead -1canary is stamped and true at the tree it names; the docs projection differs).
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Activity
atrawog commentedon Aug 28, 2026
Validation (2026-08-28) — RESOLVED (superseded)
Verified against current repos. The detection tooling evolved past the blind grep: the docs generator now has its own header (
emit.go:14: "") and detects its own pages via it (prune.go:38), and the docs tree carries that banner on every generated page (verified ondocs/src/content/docs/reference/box/arch/*). The marketplace generator checks its own header (emit.go:17). The "confident zero" failure mode is gone because each tree is detected by its own generator's header, not a shared grep.Closing as superseded.