It's confusing how 'REPL' refers to two different UIs:
A CLI like IPython or Julia, where things like multiline editing and syntax highlighting need careful implementation.
An editor protocol like SLIME or CIDER where multiline editing is a total non-issue.
I'm increasingly doubtful that commit messages should be entirely immutable.
I sometimes find myself editing or commenting on merged pull requests, to help future readers.
Phabricator appended a URL to commit messages, which helped. In principle PR merging could do the same thing.
Beyond structural editing: semantic editing!
https://reasonablypolymorphic.com/blog/towards-tactics/index.html
(Uses Coq-style tactics.)