Skip to content

holdenmatt/spectree-v1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Note

This was an early v1 prototype of SpecTree.

A newer version with more features and cross-language support is here.


SpecTree (v1)

A simple format for composable Markdown trees using @ references.

What is SpecTree?

SpecTree is Markdown with one addition: the @ operator for referencing other Markdown files via transclusion. This enables you to build trees of instructions from modular, reusable components.

As my LLM prompts and specs have gotten more complex, I wanted a simple way to make plain English instructions more composable and reusable.

Example

Given this file structure:

specs/
β”œβ”€β”€ app.md
β”œβ”€β”€ stack.md
└── design/
    β”œβ”€β”€ system.md
    └── colors.md

Where app.md contains:

# My App

@stack.md
@design/system.md
@design/colors.md

SpecTree resolves these references into a single, complete Markdown document.

Syntax

  • The @ operator must be the first character on a line
  • Followed by a relative path to a Markdown file
  • Paths are resolved relative to the current file
  • Circular references are not allowed

Implementations

  • Python - Install with pip install spectree-md
  • JavaScript - Install with npm install spectree (coming soon)

License

MIT

About

A simple format for composable Markdown trees using `@` references

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages