Skip to content

feat(v0.3): manifest.json, llms.txt, and cross-document overview#1

Open
b02thomas wants to merge 1 commit into
mainfrom
feat/v0.3-agent-features
Open

feat(v0.3): manifest.json, llms.txt, and cross-document overview#1
b02thomas wants to merge 1 commit into
mainfrom
feat/v0.3-agent-features

Conversation

@b02thomas

Copy link
Copy Markdown
Owner

Summary

Turns a doc bundle into something both humans AND agents can read.

Every build now emits four companion files alongside index.html:

  • overview.html — cross-document dashboard aggregating every ## Open Questions, ## Decisions, ## Risks, ## Assumptions, ## Blockers, and ## TODOs section from every .md. Task-list items - [ ] / - [x] render as open/done markers. Linked from the index sidebar whenever at least one interest section is detected.
  • manifest.json — machine-readable index. One JSON file listing every doc with title, section, words, frontmatter tags, top-level headings, interest-section counts, and mtime. Read this file to know what's in the bundle without parsing any HTML.
  • llms.txtllmstxt.org-style short index (title + first paragraph per doc) for LLM context injection.
  • llms-full.txt — full concatenated Markdown bundle for full-context LLM prompts.

Also:

  • YAML-ish frontmatter parser (title, tags, section) shared between builder, manifest, and overview.
  • --no-manifest / --no-llms / --no-llms-full / --no-overview opt-outs.
  • .gitignore covers the new generated demo artifacts.

Zero new dependencies — Node stdlib only.

Test plan

  • npm run demo succeeds, generates all four companion files
  • Test fixture with ## Open Questions, ## Open Decisions, ## Risks, ## Blockers produces correctly bucketed overview.html (10 items, 4 buckets verified)
  • Frontmatter tags: [prd, step-9] round-trips into manifest.json with aggregated tag counts
  • Index sidebar shows the ↗ Open decisions · questions · risks link only when at least one interest section exists
  • - [x] task-list items render as checked/struck, - [ ] as open checkbox markers
  • --no-manifest / --no-llms / --no-overview flags suppress their respective outputs
  • Reviewer: try on a real doc bundle (e.g. the Atlantis HQ spec pack)

Files

  • lib/scan.mjs — frontmatter parser, heading extractor, interest-section detector
  • lib/manifest.mjs — manifest.json writer
  • lib/llms.mjs — llms.txt / llms-full.txt writers
  • lib/overview.mjs — overview.html renderer
  • lib/build.mjs — integrates the four writers into the build pipeline
  • lib/template.mjs — sidebar link + CSS for the overview entry
  • bin/cli.mjs — new --no-* flags + help text
  • README.md — companion outputs section, frontmatter docs, interest-section labels
  • package.json — v0.3.0

…board

Every build now emits four companion files alongside index.html so the output
is usable both as a human-facing dashboard and as an agent-readable bundle:

- overview.html — aggregates ## Open Questions / Decisions / Risks /
  Assumptions / Blockers / TODOs from every .md into one scannable view,
  with open/done checkbox markers for task-list items. Linked from the
  index sidebar whenever at least one interest section is detected.
- manifest.json — machine-readable index: every doc with title, section,
  words, frontmatter tags, top-level headings, interest-section counts,
  and mtime. Read one file to know what the bundle contains.
- llms.txt — llmstxt.org-style short index (title + first paragraph
  per doc, grouped by section) for LLM context injection.
- llms-full.txt — full concatenated Markdown bundle for full-context
  LLM prompts.

Also:
- YAML-ish frontmatter parser (title, tags, section keys) shared between
  the builder, the manifest, and the overview.
- --no-manifest / --no-llms / --no-llms-full / --no-overview opt-outs.
- .gitignore covers the new generated demo artifacts.

Zero new dependencies. Node stdlib only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant