EtherPK Format
EtherPK Format describes how EtherPK keeps a graph as plain files. A graph is a folder of GitHub-flavoured Markdown documents, linked by wikilinks, that a person and a coding agent can both read and write. GitHub-flavoured Markdown with wikilinks is a format that suits both agents and humans and provides a clear document linking mechanism. The EtherPK client supports realtime collaboration when using synced graphs via the Headless Client / MCP server, and auto-detects external file changes when using folder based graphs so is ideal for multiple editors working concurrently.
This page is the format's specification. It states how a program reads a graph folder as EtherPK reads it, and what a program keeps when it writes one.
This specification describes version 1 of the format, which is the format EtherPK reads and writes.
Read this page when you build a tool, a script or an agent that works on EtherPK files. To have an agent work on your own notes you do not need it, because EtherPK writes the rules into the folder for the agent. See Using AI Agents With Your Notes for more information.
The folder
A graph folder holds one graph in four folders.
| Folder | Holds |
|---|---|
journals/ |
One Markdown file for each calendar day |
pages/ |
One Markdown file for each page |
assets/ |
The images and other files that documents link to |
etherpk/ |
Files that EtherPK manages, such as graph settings |
The documents of a graph are the .md files directly inside journals/ and pages/. A reader ignores a subfolder of either one, and it ignores every file outside the four folders. See Graph Folder Layout for each file and its rules.
A synced graph has no folder. It holds the same documents under the same rules, and a program reaches it through the Headless Client.
Documents and names
Every document has one name, and links find a document by its name.
- A file
journals/YYYY-MM-DD.mdis a journal entry. Its name is the day in its file name, which is a real calendar day. - A file in
pages/is a page. Its name is thetitlein its frontmatter. When the frontmatter has notitle, or an empty one, the name is the file name without.md. - Names are compared without regard to case, so
Gardenandgardenare one name. A name is shown in the case its document gives it. aliasesin the frontmatter lists other names that the document answers to.- A page whose name holds a wikilink is a scoped concept.
[[Garden]] Toolsis Tools within Garden, and each wikilink in the name is one of its scopes. See Scoped Concepts for more information. - No two documents share a name or an alias, and no page has a calendar day as its name.
Frontmatter
Frontmatter is a YAML block at the very start of a file, opened and closed by a line that is exactly ---. Everything after the closing line is the document's body. A journal entry needs no frontmatter.
EtherPK reads title, aliases, template and the publishing keys public, publications, publication, slug and date. It keeps every other key as written and gives it no meaning. See Titles Aliases And Frontmatter for the form EtherPK writes the block in.
Links
[[Name]] in a document's body is a link to the document with that name or alias. When no document has the name, the link still names a concept, which a page can be written for later.
- The name is the text between the brackets, spaces included.
- A link has no label form and no heading form.
[[Name|label]]and[[Name#heading]]are not read as either. - A link to a scoped concept keeps the inner brackets, as in
[[[[Garden]] Tools]]. It is also a link to each scope inside it. - A wikilink inside inline code or a fenced code block is plain text.
Blocks
A document's outline comes from its text.
- A bullet is a line that starts with
-. A bullet nested under another is indented by two spaces for each level, and sits exactly one level below its parent. - A line that continues a bullet is indented to the bullet's text, two columns right of its hyphen. A blank line inside a bullet keeps that indent.
- A blank line with no indent ends a group of bullets.
- A heading nests the lines below it by its level, and a paragraph is a block of its own.
- Numbered lists and bullets written with
*or+are ordinary Markdown and are not outline blocks.
Tasks
A task is a bullet that starts with a checkbox, - [ ] or - [x]. Task tags follow the checkbox and carry the task's priority, state and dates.
| Tag | Meaning |
|---|---|
#P1, #P2, #P3 |
Priority, with 1 the highest |
#D |
Doing |
#W |
Waiting |
#T |
Test |
#C |
Cancelled |
#A |
Archived |
#D-YYYY-MM-DD |
Due on that day |
#S-YYYY-MM-DD |
Scheduled for that day |
#C-YYYY-MM-DD |
Completed on that day |
- Task tags are read in any case, and EtherPK writes them in upper case.
- A ticked task is archived with
#A, otherwise cancelled with#C, otherwise done. An unticked task is in test with#T, otherwise waiting with#W, otherwise doing with#D, otherwise open. - A state tag that the checkbox contradicts has no effect, so
- [ ] #Cis an open task. - Any other
#word made of letters, digits and single hyphens, with at least one letter, is a free tag. A free tag is a label and carries no state. - A task nested under another task, at any depth, is a subtask of the nearest task above it.
- A task is about every name linked on its own line, on each bullet and heading above it in the outline, and the document that holds it with the scopes of that document's name.
- A checkbox line inside a fenced code block is not a task.
- A bullet whose text is exactly
Comments, nested directly under a task, holds the task's comments, one for each bullet under theCommentsbullet.
Code and named blocks
A fenced block opens with three or more backticks and closes with a line of the same number of backticks at the same column. Tildes do not open a block. The word after the opening backticks says what the block holds.
| Word | The block holds |
|---|---|
| A language name | Code, which EtherPK highlights |
mermaid |
A diagram |
math |
LaTeX |
map |
Places and routes, one on each line |
An extension's id, a dot and a name, such as excalidraw.drawing |
That extension's own data |
A program that does not own an extension's block leaves every line of it as written. See Document Syntax for every construct, and Code Maths And Diagrams and Maps for these blocks.
Protected documents
A page whose whole body is one fenced block marked etherpk-cipher is a protected document. The block holds ciphertext that only EtherPK can read, with the user's protection key.
- A reader treats the document as one it cannot read.
- A writer never changes the block, and never adds text before or after the block.
- The frontmatter above the block is plain text and stays in the file.
etherpk/protection.jsonholds the wrapped protection key. A program never edits, moves or deletes it.
See Protected Documents for more information.
What a writer keeps
- Files are UTF-8 with LF line endings, no byte-order mark and one newline at the end.
- Indentation is spaces, never tabs.
- A line that holds only spaces stays as it is, because it can be part of a bullet.
- A Markdown formatter is never run over a document. It changes the indentation that the outline is read from.
- Nothing in
etherpk/is created, renamed or deleted. Adding a word todictionary.txtis the one edit a program makes there. - A file is written whole, in one write.
See Graph Folder Layout for the reason behind each rule.
The example folder
The etherpk-client repository holds a small graph folder and the result a reader gets from that folder.
EtherPK's own tests read the example folder with the code the app runs and compare what they get with the expected result. A program that reads the example folder and gets the same result reads names, links and tasks as EtherPK does.
expected.json lists each document by its path, with these fields.
| Field | Holds |
|---|---|
kind |
journal or page |
name |
The document's name, in the case it is written in |
aliases |
The names in aliases, as written |
scopes |
The scopes in the document's name |
links |
The names linked from the body |
tasks |
The tasks, in the order they are written |
Each task has its text after the checkbox, its status, priority, due, scheduled and completed values, its freeTags, the names it is about, and subtaskOf, the position in tasks of the task it is a subtask of. Names in scopes, links, about and freeTags are in lower case, listed once each and sorted.
How an agent learns the format
- EtherPK writes an
AGENTS.mdinto every graph folder, and aCLAUDE.mdthat imports it. Its EtherPK section describes this format to an agent started in the folder, and names the format's version. - The Headless Client is an MCP server that gives an agent one graph, synced or folder. Its tools read and write documents by these rules.
- The
etherpkagent skill teaches an agent to create and edit a graph folder. Install it withnpx skills add appsoftwareltd/etherpk-client.
Versions
The version number goes up when a later version would read a document written for the earlier version differently. A graph folder does not record a version of its own. The AGENTS.md in the folder names the format version of the EtherPK that last opened the folder.
| Version | EtherPK | Change |
|---|---|---|
| 1 | 0.51 | The first published version |
Licence
This page, the example folder, expected.json, the EtherPK section of AGENTS.md and the agent skill's starter folders are available under the MIT License. You can write software that reads and writes the format without asking App Software Ltd.