Surprised nobody has mentioned this yet, but Org-mode for Emacs [1] is just great, and fits very well to the requirements:
- Source of truth: these are text files, so any of git, nextcloud, syncthing etc. will do.
- Consistent interface: using emacs might be tough on mobile, but there are some pretty good web interfaces for it [2]. I personally use Orgzly [3] and syntching on my Android
- Standard protocols: custom scripting does anything. ical is pretty easy to handle, not sure about webdav.
- FOSS: check
- Multiple calendars: yep, via Org agenda [4]
- Subtask support: As deep as you can go
- Custom logic: via emacs scripts (or some creativity if you're using other clients)
- Markdown notes: yes, minimal differences between org mode and markdown
Yes. Org mode is fantastic.
However, some limitations/ drawbacks.
- org-agenda is slow and completely unusable if you have hundreds of org files.
- despite multiple half-baked efforts there is still no easy-to-use parser and pretty printer for the lanuguage. I'm not even asking for 100% of the syntax, 20% capability of t he built-in org-element API with good documentatiom will accomplish 80% of the requirements.
- no easy way to integrate calendars and org-agenda with something like a calDav server.