Skip to content

Files and workspace

A Facet workspace is a folder of Markdown files. Every .md file in it is a node, every folder is a node, and the folder tree is the default hierarchy. Facet adds meaning to plain Markdown and never new block syntax, so every file still renders normally on GitLab, GitHub or in any editor.

bike-share/
├── .facet opts the folder in (VS Code), content ignored
├── .facetignore paths Facet must not read
├── people.md optional list of people
├── roadmap.md a file node
└── pilot/ a folder node
├── index.md the folder node's own title, properties, description
├── stations.md a child of the pilot folder
└── app.md another child

There is one way to write each thing, so that people and AI agents read and edit the files the same way.

  • The workspace is a folder. Every .md file in it, at any depth, is a node.
  • In VS Code, a workspace folder opts in with a .facet file at its root (its content is ignored), or with the facet.root setting, which names the Facet workspace folder relative to the VS Code workspace folder (. for the folder itself). Facet leaves other folders alone, without lint, until one of its commands is run on them.
  • The facet command line tool takes the folder as an argument: facet lint bike-share/.

A .facetignore file at the workspace root excludes paths. It uses gitignore syntax.

# Unfinished drafts
drafts/
# Documentation of the folder, not part of the plan
/README.md

Ignored files do not exist for Facet: they are not nodes, their ids do not count (a reference to an id defined only there is an unknown id), and an include: of an ignored path is an error.

  • A folder is a node; its files and subfolders are its children, sorted by name.
  • A folder’s index.md, if it has one, is not a child of its own: it holds the folder node’s title, properties, description and frontmatter. Without an index.md, the folder node is titled with the folder name.
  • The nodes inside index.md (its headings and list items) are children of the folder node, before the folder’s other files and subfolders.

A file is the root node of its content.

  • Its title is the first # heading, or the file name (without .md) when there is none.
  • The key:: value lines right below that # heading are the file node’s properties: a file with start:: and end:: there has fixed dates like any other node. A file without a # heading cannot hold properties.
  • The paragraphs, quotes, tables and code blocks after the title are its description; so are blocks above the title, such as an introduction or a lint header.
  • Its headings and list items are its children, described in Nodes and properties.
---
type: project
---
# Station roll-out
start:: 2027-04-01
end:: 2027-06-30
Twelve docking stations along the harbour, in three batches.
- [ ] Batch 1 [duration:: 3 weeks]

YAML frontmatter at the top of a file (or of a folder’s index.md) holds the keys Facet reads at file level. Other frontmatter keys are kept and shown in the details pane, but have no meaning for Facet.

Key Value Meaning
type free text a label for the file: project, note, idea…
id [a-z0-9-]+ the file’s id, so !id can point at it
include paths and "!id" more children, for cross-cutting views
board list of column names custom columns for the board
  • type: is shown in views. It does not change type inference: item types apply to headings and list items only. A type: also makes a plain outline (headings and plain lists only) show up in folder views, see Facet content.
  • id: on a folder’s index.md gives the folder node that id. Ids follow the rules in References and ids.
  • board: is described in the Board view. A folder’s index.md board applies to everything in the folder; a file’s own board: overrides it.
  • Frontmatter that YAML cannot read is a bad-frontmatter error, and so is frontmatter that is not a mapping of keys to values.
---
type: project
include: [../city-events/, "!press-day"]
board: [backlog, design, build, review, done]
---
# Roadmap 2027

include: adds other files, folders or single nodes to this node’s children, for views that cut across the folder tree: a yearly roadmap that shows one project in full and a few milestones of others.

  • Each entry is either a path relative to the file (for an index.md, relative to its folder) or a reference to any node, "!id".
  • A single entry can be written without a list: include: ../pilot/.
  • Including a folder path (../pilot/) or a folder’s index.md brings in the whole folder node. Including any other file brings in that file’s node.
  • Included nodes keep their own place in the tree. Nothing is copied: the same node appears in both places.
  • A path that does not exist, is ignored by .facetignore, or leads outside the workspace is an unknown-include error. An "!id" entry that matches no node is an unknown-id error.

How views show included nodes (each once, marked, after the node’s own children) is described in the Overview.

Folder views and the Facet side bar list only the files and folders with Facet content, so plain notes in the same folder stay out of the way. A file has Facet content when it has:

  • a checkbox item (- [ ] …),
  • a key:: value property, dates included,
  • a requirement item (- req~name: …),
  • or a type, board, include or id frontmatter key.

A folder has Facet content when a file below it has. A file that is shown on its own, or brought in by include:, is always shown, and lint checks every file either way. To show a plain outline in the mindmap or tree of its folder, give it a type: in its frontmatter.