Medha · knowledge

Plain text that knows what it is.

Medha keeps what you know as Markdown files you own. Give a kind of document a type, and Medha treats your notes like a database: it checks them, queries them, and turns a line of text into a task on your agenda.

What org-mode did for plain text, for a whole business: one place for notes, tasks and records, in files that will still open in fifty years.

  1. 01 FilesOn your disk

    Markdown in folders. Open it in any editor, keep it in git.

  2. 02 TypesTyped

    A type says what a client or a delivery is. Medha checks every file against it.

  3. 03 ViewsQueried

    Views ask questions across your files and answer in a table.

  4. 04 SyncSynced

    Every device keeps the files. Edits merge, with no cloud in between.

  5. 05 AccompliceShared

    Your accomplice reads and writes the same files, under Dharma’s rules.

01

Files you own, readable forever.

Every document is a Markdown file in a folder on your machine. The few lines at the top are its properties. Everything below is yours to write: notes, links, tasks.

- [ ] Send the price list

A task, wherever you write it.

@due(2026-10-13)

A deadline. @scheduled(…) puts it on a day.

!High #sales

A priority and a tag.

[[projects/launch]]

A link. The other document lists it as a backlink.

Tasks from every document gather in one list, an agenda and a two-week timeline. Tick one in the app and the file changes; tick it in the file and the app follows.

docs/projects/moon-run.mdMarkdown
---
type: project
title: Moon run
owner: Leela
status: active
launch: 2026-10-16
---

# Moon run

Duff for the Lunar Park, every Friday, until the Moon says stop. For [[customers/duff]]; the first load is [[deliveries/duff-lunar-park]]. Crates from [[suppliers/buy-n-large]].

- [ ] Confirm the docking slot at Lunar Park @due(2026-10-13) !High
- [ ] Check every crate twice @scheduled(2026-10-15)
  Nothing goes to the Moon without a second person. Leela is the second person.
- [ ] Keep Bender out of the cargo hold @due(2026-10-16) #crew
- [x] Book the ship @done(2026-10-09)
docs/customers/duff.mddocs/deliveries/duff-lunar-park.mddocs/projects/moon-run.mdtypes/project.gdl

The real file, as Medha reads it: four tasks, three of them on the agenda (Oct 13, 15 and 16), and a backlink from the Duff delivery it links to.

02

Typed like a database.

A type is a short file that says what a kind of document holds: its fields, which are required, which values are allowed, and what must stay true. Medha checks every document of that type against it.

Mistakes show up where you wrote them

A missing date or a status that doesn’t exist is flagged on the document, not discovered a month later in a report.

Links know where they point

A field can link to a document of another type, so a record points at the right one, not at a name typed slightly differently each time.

A type can carry actions

Buttons on every document of that type, carried out by your accomplice with your approval.

types/delivery.gdlMedha type
type delivery
    fields
        title: Text
        customer: Link<customer>
        planet: Text
        due: Date
        crates: Integer
        status: Enum(booked, loaded, delivered)

    invariant
        status == 'delivered -> open_tasks == 0

    actions
        tell_customer:
            label = "Tell the customer"
            transport = "alma"
            prompt = "Write to {customer}: {crates} crates land on {planet} on {due}. Keep it short."
            confirm = true
The other two types
type customer
    fields
        title: Text
        planet: Text
        contact: Text?
        terms: Enum(prepaid, credit)
        tags: List<Text>?

type project
    fields
        title: Text
        owner: Text
        status: Enum(planned, active, done)
        launch: Date?

    invariant
        status == 'done -> open_tasks == 0

Real types, exactly as Medha loads them. Set a delivery’s status to “lost” and Medha flags it: expected one of booked, loaded, delivered.

03

Queried like one.

A view is a question in a few lines: which documents, which ones match, which columns, in what order. Medha runs it over your files and shows a table you can click through. Views live in files too, next to your notes.

You don’t have to write them

Ask for “clients due a reorder” and your accomplice writes the view. It’s saved only if Medha can run it.

Always current

A view reads the files as they are now. Change a date in a document and the table changes with it.

views/due_this_week.gqlMedha view
view DueThisWeek
documents delivery
| where status != 'delivered and days_until(due) <= 7
| select title, planet, customer, due, crates
| sort planet
DueThisWeek · 3 rowsOct 11

What Medha returns for this view over the five deliveries. Left out: the test run (delivered) and the Neptune crates (due in January).

04

On every device, with no cloud.

Your Mac, your phone and your server each keep the whole set of files. Edits travel directly between them and merge, even when two of them changed the same line while offline. Nothing is lost and there is no conflict to sort out. Properties merge one by one, so two people can change two fields at once.

Open the same document together and you see each other type.

Mac · offline

- [ ] Send the price list to all three

iPhone · offline

- [ ] Send the price list @due(2026-10-15)

Server

- [ ] Send the price list

Back online · merged everywhere

- [ ] Send the price list to all three @due(2026-10-15)

05

Your accomplice works in the same files.

Your accomplice reads your documents, runs your views and keeps your notes, with the same types and checks as you. When it acts outside them, writing to a customer or ordering stock, it goes through Dharma: the rules decide, you approve, and Karma records who did what, for whom.

It knows what you know

Answers come from your documents, with links to where they came from.

It writes like you would

Tasks, dates and links in the same plain syntax, so its notes read like yours.

Your notes are the business. Medha keeps them in a form you, your team and your accomplice can all rely on.

Is this org-mode?

It shares the idea: plain text you own, with tasks and an agenda inside it. Medha adds types, views that query your files, sync between devices, and an accomplice that works in them.

Can I open my files without Mandala?

Yes. They are ordinary Markdown files in ordinary folders. Edit them in any editor, keep them in git, back them up however you like.

Do I need types?

No. A document without a type is just a note, with tasks and links working as usual. Add a type when you want Medha to check and query a kind of document.

Do I have to learn the query language?

No. Ask your accomplice for the view you want. The language is there when you want to read or adjust it.

Where do my files live?

On your own devices: your Mac, your phone, your server. We never host them.

Medha is one of Mandala’s four parts.

How it works Dharma Karma Coming really soon