Context
Deferred from the --inject design (markdown injection, v0.10.0). The initial
implementation requires the target file to exist and already contain
<!-- erdify:start --> / <!-- erdify:end --> markers; otherwise it errors and
changes nothing ("docs are sacred — never surprise-edit").
Idea (future, opt-in)
An opt-in flag (e.g. --inject-create / --inject-append) that, when markers
are absent:
- appends a fresh marker block to the end of the file, and/or
- creates the target file if it does not exist.
Kept behind an explicit flag so the default stays non-destructive.
Why deferred (YAGNI)
The common case is a README with markers placed once by hand. Auto-insertion
needs decisions about where to append (end of file? after the first heading?)
and how to interact with --check. Not worth the surface until requested.
Context
Deferred from the
--injectdesign (markdown injection, v0.10.0). The initialimplementation requires the target file to exist and already contain
<!-- erdify:start -->/<!-- erdify:end -->markers; otherwise it errors andchanges nothing ("docs are sacred — never surprise-edit").
Idea (future, opt-in)
An opt-in flag (e.g.
--inject-create/--inject-append) that, when markersare absent:
Kept behind an explicit flag so the default stays non-destructive.
Why deferred (YAGNI)
The common case is a README with markers placed once by hand. Auto-insertion
needs decisions about where to append (end of file? after the first heading?)
and how to interact with
--check. Not worth the surface until requested.