[FEATURE]: Support Markdown Embeds for Modular File Transclusion #2868

Open
opened 2026-02-16 17:37:36 -05:00 by yindo · 4 comments
Owner

Originally created by @dyllan-to-you on GitHub (Nov 14, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Obsidian has a syntax for embedding files
Why not utilize this syntax to modularize file imports/transclusions without having to spend tokens on tool calls? Implemented by setting up a custom markdown parser/reader that provides the "resulting" file to the model/conversation
This logic could maybe be reused for reading any markdown file, not just agents.md
Doing so could improve support for various plaintext spec-driven workflows and documentation integration. The initial iteration should probably be focused on just the agents.md, though, to keep it simple.

Related Issues:

It does seem like there's some debate around "support what's used in other similar tools" and different formats overall. I guess in doing this I'll throw my hat into the ring. I believe that having markdown files that are compatible with obsidian would let opencode users tap into obsidian's plugin ecosystem. This could be leveraged towards experimentation with spec-driven design workflows or alternative task management workflows. This could improve accessibility for less programming-inclined colleagues.

Originally created by @dyllan-to-you on GitHub (Nov 14, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Obsidian has a [syntax for embedding files](https://help.obsidian.md/embeds) Why not utilize this syntax to modularize file imports/transclusions without having to spend tokens on tool calls? Implemented by setting up a custom markdown parser/reader that provides the "resulting" file to the model/conversation This logic could maybe be reused for reading _any_ markdown file, not just `agents.md` Doing so could improve support for various plaintext spec-driven workflows and documentation integration. The initial iteration should probably be focused on just the `agents.md`, though, to keep it simple. Related Issues: - https://github.com/sst/opencode/issues/2965 - https://github.com/sst/opencode/issues/1490 - https://github.com/sst/opencode/issues/2225 - https://github.com/sst/opencode/issues/3195 It does seem like there's some debate around "support what's used in other similar tools" and different formats overall. I guess in doing this I'll throw my hat into the ring. I believe that having markdown files that are compatible with obsidian would let opencode users tap into obsidian's plugin ecosystem. This could be leveraged towards experimentation with spec-driven design workflows or alternative task management workflows. This could improve accessibility for less programming-inclined colleagues.
yindo added the discussion label 2026-02-16 17:37:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2225: Requests automatic loading of @ referenced files in AGENTS.md - very similar core functionality for file inclusion without token costs
  • #1490: Also discusses @ file references in AGENTS.md and file transclusion mechanics
  • #2965: Specifically about referencing markdown files using @ syntax in subagents

While your proposal uses Obsidian-style embed syntax, the underlying functionality (modular file transclusion to avoid token usage) is very similar to these existing requests.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 14, 2025): This issue might be a duplicate of existing issues. Please check: - #2225: Requests automatic loading of @ referenced files in AGENTS.md - very similar core functionality for file inclusion without token costs - #1490: Also discusses @ file references in AGENTS.md and file transclusion mechanics - #2965: Specifically about referencing markdown files using @ syntax in subagents While your proposal uses Obsidian-style embed syntax, the underlying functionality (modular file transclusion to avoid token usage) is very similar to these existing requests. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

Yeah i think we discussed this internally and we wish this was the standard but for whatever reason the "@" support within markdown seems more popular

@rekram1-node commented on GitHub (Nov 14, 2025): Yeah i think we discussed this internally and we wish this was the standard but for whatever reason the "@" support within markdown seems more popular
Author
Owner

@riekusr commented on GitHub (Dec 4, 2025):

@dyllan-to-you i am also exploring a way of working with opencode and obsidian. Can describe your workflow briefly? Using terminal plugin in Obsidian? Using mcp-tools and the smart connection plugins?

@riekusr commented on GitHub (Dec 4, 2025): @dyllan-to-you i am also exploring a way of working with opencode and obsidian. Can describe your workflow briefly? Using terminal plugin in Obsidian? Using mcp-tools and the smart connection plugins?
Author
Owner

@dyllan-to-you commented on GitHub (Dec 4, 2025):

@riekusr my goal behind this issue was mainly about minimizing token usage. I've got several more ideas I'm working on exploring.

That said, I don't really use obsidian as part of the workflow. I generate docs first, then code based on the generated docs. I stick to obsidian format, for previewing the docs and making some changes, but I also make changes directly in VSCode. I use opencode in the terminal and I ask it to modify my documents. I've got a whole documentation workflow that I'll be discussing on my blog whenever I get around to putting that online. I'm also really new to obsidian; my default for a while has been logseq. My work uses notion. If I could get logseq working on my arm windows laptop that'd be a different story, but I'm rambling at this point.

Ultimately; I use opencode in the terminal to modify markdown documentation; obsidian is mainly for editing and review, but I don't have a strong/explicit integration between the two

@dyllan-to-you commented on GitHub (Dec 4, 2025): @riekusr my goal behind this issue was mainly about minimizing token usage. I've got several more ideas I'm working on exploring. That said, I don't _really_ use obsidian as part of the workflow. I generate docs first, then code based on the generated docs. I stick to obsidian format, for previewing the docs and making some changes, but I also make changes directly in VSCode. I use opencode in the terminal and I ask it to modify my documents. I've got a whole documentation workflow that I'll be discussing on my blog whenever I get around to putting that online. I'm also _really_ new to obsidian; my default for a while has been logseq. My work uses notion. If I could get logseq working on my arm windows laptop that'd be a different story, but I'm rambling at this point. Ultimately; I use opencode in the terminal to modify markdown documentation; obsidian is mainly for editing and review, but I don't have a strong/explicit integration between the two
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2868