There is a script that convert each line in a csv file to markdown with YAML.
So if you want a markdown file for each object in your Gramps database, you can export to csv from gramps and split the resulting csv file to multiple csv files, then run this script for each csv file
In the script you can define what should be YAML, what should be folders etc.
Then you can link each of the md files to your objects in Gramps as media files, and you will always have up to date “Research Logs” or "Research Notes linked to any of your Gramps Objects.
And if you use one “main” Research Log file, and embed other Notes and Documents to that “Main Note”, You will always have an up to date Research Log attached to your Gramps Object and only need to link one Note for a Research Task, even if you have 10 different Notes for that single research.
Another way of doing this is to export to xml, import the xml file to Excel , LibreOffice, Panda or any other software for editing data tables (there is actually some plugins for VS Code that might be possible to use), map the xml object to columns in different tables, then export each sheet to a csv file.
If you know how, you can also create a VBA app in Excel, LO or Python that add the path of each md file back to the Gramps xml file and links it to the correct Gramps Objects…
It should also be a relatively simple case to change any of the html or text reports (or any report using Pandoc) to write md files instead, but someone with knowledge would need to create that gramplet or make those changes.
A gramplet that creates a markdown or text file in a given path for either all objects or the active object in Gramps, and links that file as media to the correct Gramps Object, would be a great and useful Gramplet…
Especially if it was possible to select fields for the YAML frontmatter etc.
I use Foam and Obsidian for all my Research Notes, the information that can be found in a network graph like the graph in Obsidian, and the timelines and map views that can be made with some of the plugins have given me multiple findings of relations I wouldn’t have found with a normal hierarchical graph (read familytree), just by adding wiki-links to both unstructured and structured text from documents and other sources I have found.
I also use Zotero for my sources, multiple network graph software (specially Constellation is interesting) for analyzes of data, Aeon Timeline 3 and The Timeline Project (Timeline) for visual timeline graphs and research.
I add links to my markdown files to any objects/items in any of the software I use, so my Markdown Research Notes is like a “hub” for all my research.
I have a Collection Structure in Zotero that I have mirrored to a Folder Structure for my Notes, Media and Sources, and that file structure reflects a complete workflow from the creation of a research log to the registration of data in e.g. Gramps, and until any publication of the information I have collected.
Both FOAM and Obsidian (and other software of same type) is also great for writing reports, blogs, articles etc., and there is a lot of addons/plugins for both Obsidian and VS Code (FOAM), or other markdown editors, that can be really useful for research and analyzes of data.