johnlindquist / johnlindquist/mdflow

feat: docs: frontmatter key for documentation site ingestion

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Parse docs: URL(s) from frontmatter
  2. Fetch the root page through into.md
  3. Optionally spider linked pages (configurable depth)
  4. Concatenate all converted markdown as context
  5. 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.ts and src/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 like web-context:?

Related

This is part of exploring into.md integration opportunities.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.