OpenQuarryGitHub

Write courses and notes
in an open Markdown format

Each note or lesson is one Markdown file with YAML frontmatter, and a JSON Schema says what that frontmatter may hold. npx openquarry check validates the frontmatter and the manifests of a project and exits with 1 when a file fails. CI can run the same command.

Made by Frame.

Start a course or a folder of notes with one command

npx openquarry init copies a starter into a new folder, and npx openquarry check validates its files. The openquarry command runs on Node 18 or later. Both starters ship inside the package, so init works offline once the package is installed.

Every start command · Copy a starter with degit · The starters on GitHub

Notes
npx openquarry init my-notes
cd my-notes
npx openquarry check
A course
npx openquarry init my-course --template course
cd my-course
npx openquarry check

Validate files in your own code

npm install openquarry adds the command and the library: six JSON Schemas, TypeScript types for the files and six validators, imported from openquarry. @framers/openquarry is the same library without the command.

Shell
npm install openquarry

Start a project · Every export, with an example

check.mjs
import { validateWeave } from 'openquarry'

const result = validateWeave({
  slug: 'reading-a-map',
  title: 'Reading a map',
  kind: 'course',
})
console.log(result)
// { valid: true, errors: [] }

Fabric / Field skills

Weave / Reading a map

Loom / The map

Thread / Scale and distance

In the example, Field skills is the fabric, Reading a map is a course and The map is one of its units. The file below is the unit's lesson Scale and distance.

Browse the example course on GitHub
scale-and-distance.md Full source
---
id: 70c967bf-2dba-4399-aef1-671174eb904f
slug: scale-and-distance
title: Scale and distance
summary: The scale says how much smaller the map is than the ground. With it, a length on the map becomes a distance you can walk.
version: 1.0.0
contentType: lesson
difficulty: beginner
taxonomy:
  subjects: [navigation]
  topics: [maps]
relationships:
  - target: what-a-map-shows
    type: follows
teaches:
  - field-skills/skill/map-scale
requires:
  - field-skills/skill/map-symbols
publishing:
  status: published
  license: MIT
---

# Scale and distance

The scale says how much smaller the map is than the ground. A scale of 1:25,000 means that one unit on the map is 25,000 of the same unit on the ground.

## From the map to the ground

At 1:25,000, 1 cm on the map is 25,000 cm on the ground. That is 250 m. So 4 cm on the map is 1 km.

At 1:50,000, 1 cm on the map is 500 m on the ground, and 2 cm is 1 km.

## Example

A path measures 6 cm on a 1:25,000 map.

6 cm x 250 m = 1,500 m

The path is 1.5 km long.

## A common mistake

A bigger second number means a smaller drawing. A 1:50,000 map shows the same path at half the length a 1:25,000 map gives it.

Lessons can name the skills they need and teach

A quarry is worked from the surface down, one bench at a time, and the example course is built the same way. Each lesson lists the skills it needs in requires and the skills it gives in teaches.

  1. What a map shows needs no earlier skill and teaches the map's symbols.
  2. Scale and distance needs the symbols and teaches scale.
  3. Plan a route, an exercise in the second unit, needs scale and the skill that Orient the map teaches.
  4. Check your map reading, the assessment, tests all three skills, back to the first lesson's symbols. Its unit links back to the first unit with extends.

The research behind these fields · How to link a spiral curriculum

The example course as a quarry cut in benchesRock cut down in steps from the surface. Marker 1 is the first lesson on the surface, marker 2 the next lesson one step down, and marker 3 the route exercise on the deepest step. A second path climbs from there to marker 4 at the surface, where the assessment returns to the first lesson's skill. 1 2 3 4

Format

A thread is one Markdown file. Looms, weaves and a fabric group threads into knowledge bases and courses.

Courses

Build a course from units, lessons, exercises and a catalogue of subjects, on a worked example.

Language models

Have a model write a lesson, validate the frontmatter it returns and send the error lines back.

Spiral curriculum

Link a later lesson back to an earlier idea with extends, applies or refines.

Learning science

Read the studies on spaced and retrieval practice, and the fields an app reads to apply them.

Schemas

One JSON Schema for each kind of file, at a stable address your editor and CI can load.

What check prints when a file is invalid

Take version out of the first note of the notes starter and npx openquarry check prints these lines, then exits with 1.

Shell
npx openquarry check
Prints
ok fabric.yaml
not ok weaves/notes/getting-started/first-note.md
  / must have required property 'version'
ok weaves/notes/getting-started/loom.yaml
ok weaves/notes/weave.yaml
1 of 4 files invalid.
What the validators check, and what they leave to you

Who makes OpenQuarry and who uses it

Frame makes OpenQuarry. The schemas, the types and the validator are on GitHub under the MIT License, where anyone can open an issue or a pull request.

About OpenQuarry