johnlindquist / johnlindquist/mdflow
feat: docs: frontmatter key for documentation site ingestion
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 604
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Add a new frontmatter key docs: that fetches and includes entire documentation sites as agent context using into.md.
Proposed Syntax
---
harness: claude
model: sonnet
docs: https://docs.astro.build/
---
Help me build an Astro site with these requirements...
How It Would Work
- Parse
docs:URL(s) from frontmatter - Fetch the root page through into.md
- Optionally spider linked pages (configurable depth)
- Concatenate all converted markdown as context
- Inject before the prompt body (similar to
context:globs)
Use Cases
- Instant Expert Agents: Create an agent that "knows" a specific library's docs
- Version-Specific Context: Point to
/v2/vs/v3/docs for the right version - Framework Helpers: Build agents specialized in Next.js, Remix, SvelteKit, etc.
Configuration Options
docs:
url: https://docs.example.com/
depth: 2 # How many levels to spider (default: 1)
include: /api/** # URL patterns to include
exclude: /blog/** # URL patterns to skip
cache: 24h # Cache duration
Implementation Notes
- New frontmatter key in
src/types.tsandsrc/schema.ts - Spider logic with depth limiting
- Respect robots.txt? Or trust user intent?
- Token budget awareness (docs can be huge)
Questions for Discussion
- How do we handle docs that exceed context limits? Summarize? Truncate? Error?
- Should we show a progress indicator while spidering?
- Is
docs:the right key name, or something likeweb-context:?
Related
This is part of exploring into.md integration opportunities.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/types.ts and src/schema.ts, then trace the existing context: handling to understand how frontmatter values become prompt context. Define the accepted docs: shape and its URL-fetching, depth, filtering, caching, and context-limit behavior before implementing; done means documentation-site content is reliably injected without exceeding supported limits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100