Configuration
Where mt reads its config, how the four layers merge, and which page explains each config section.
A project’s config is in .mindtape/config.toml at its root. Every key is optional. Any key you leave out takes its value from the floor, the defaults built into mt. To see what mt ends up with, mt config show --resolved prints it as TOML with every default filled in. mt config show alone prints just what the layers set, and --origin lists the files they came from (see mt config).
Layers
mt merges four layers, from lowest precedence to highest:
- the floor built into
mt mindtape/defaults.tomlin your config directory, such as~/.config/mindtape/defaults.tomlon Linux- each
.mindtape/defaults.tomlfrom the project root up to your home directory, farthest first, with the nearest one last - the project’s
.mindtape/config.toml
Tables merge key by key, so if you set [ls] hyperlinks, you keep the floor’s [ls.columns]. A scalar or an array replaces the lower layer’s value whole, so your [[tasks.status]] replaces the floor’s status legend. An empty array removes the floor’s value, so [tasks] status = [] leaves the status field unconstrained.
Eight arrays work differently. [[tasks.rules]], [[tasks.body.headers.rules]], [[tasks.body.content.rules]], [[commits.rules]], [[on.flip]], [[on.add]], [[on.rm]] and [[tasks.collectors]] collect the entries of every layer and of every pack a layer adopts. An entry replaces a lower layer’s entry with the same name, in its place, so you can change one inherited rule and keep the rest. Two entries with the same name in one layer’s array are a config error that reports both. An [[on.flip]], [[on.add]] or [[on.rm]] entry with no name always appends. extends and disable, which adopt a pack and drop a rule, are on Packs.
[go] editor and [add] editor name a program that mt runs, as a checker or a flip run does. They wait for mt allow, so a clone can’t start a program before you have read it. Until then mt tries $VISUAL, then $EDITOR, and warns once with the command it is waiting to run. With neither set, mt go fails and mt add opens vi (notepad on Windows). An editor in your own mindtape/defaults.toml doesn’t need approval. An ancestor’s .mindtape/defaults.toml does, since it can be inside a clone.
[add] verify-when decides whether mt add checks the task it files, as a condition over the run’s own facts. Absent, every run checks. Templates & slots says what a skipped check leaves behind.
A run in [[tasks.waits]] or [[on.flip]] takes a string, which runs through sh -c, or cmd /C on Windows, or an array such as ["cargo", "test"], which runs its program with no shell. Trust and portability says when to pick which.
Write a rule’s message as the next step: an imperative in lower case, with no trailing period or em dash, such as move Environment after AS-IS. mt check prints it after the rule’s name, so phrase it as the action to take.
Environment variables
| Variable | Effect |
|---|---|
MINDTAPE_CONFIG_HOME | Replaces the config directory: where mt reads the second layer and where mt install writes config.schema.json and at.schema.json. You write presets/ and at.toml there yourself, and mt reads them. Read many projects covers at.toml, and mt board lists its board keys. |
MINDTAPE_DATA_HOME | Replaces the data directory. mt install writes the @local/mindtape package under its typst/packages, and task files resolve it from there. |
MINDTAPE_CACHE_HOME | Replaces the cache directory. Each fetched pack source sits in its mindtape/packs/. |
TYPST_PACKAGE_PATH | Moves the package directory Typst reads, for mt too, unless you set MINDTAPE_DATA_HOME. See Local Typst packages below. |
MINDTAPE_NOW | Sets today’s date, which mt uses for status dates, for now() and stale() in filters, and in mt recur. Takes YYYY-MM-DD or an RFC 3339 timestamp, whose date part mt uses as written. |
MINDTAPE_WORKTREE | Selects the project, like -w. See For AI agents. |
MINDTAPE_PRINCIPAL | Fills a required assignee in mt add. See Actors below. |
The MINDTAPE_ directory variables work on every platform. The platform’s own lookup reads XDG_CONFIG_HOME, XDG_DATA_HOME and XDG_CACHE_HOME on Linux only, so for a test or a sandbox that must not see your own setup, set these instead. Set but empty, each one means there’s no such directory. mt then doesn’t read a global layer, resolve a global package, or find an installed pack source. just check-examples runs that way. Each example project then reads the prelude beside it.
With MINDTAPE_NOW unset or empty, today is the system clock’s local date, using TZ on Unix and the system time zone on Windows. A local date keeps a task in the day you filed it, even at 01:00. A date in a task file has no time zone. A MINDTAPE_NOW that isn’t a date is an error that reports the variable.
Local Typst packages
A task file imports the DSL as @local/mindtape, and Typst resolves a @local package from one directory per machine. mt install fills that directory with every prelude version mt reads, and mt, typst and tinymist all read it. This mt reads 0.2.0, 0.3.0, 0.4.0 and 0.5.0, and the binary holds a copy of each. A task file then loads even where the directory has none of them. mt refuses an import at any other version at load, with the supported set and the hint that fits.
| Platform | Directory |
|---|---|
| Linux | $XDG_DATA_HOME/typst/packages, else ~/.local/share/typst/packages |
| macOS | ~/Library/Application Support/typst/packages |
| Windows | %APPDATA%\typst\packages |
A set TYPST_PACKAGE_PATH replaces it on every platform, for all three tools. MINDTAPE_DATA_HOME replaces it for mt alone, which suits a test but hides the package from your editor.
So every checkout on that machine reads whichever lib/ you installed last. To pin a project to its own copy, add a [[typst.local-packages]] entry. It resolves the package from a path in the project instead:
# examples/statuses/.mindtape/config.toml: the prelude two directories up
[[typst.local-packages]]
name = "mindtape"
path = "../../lib"path is relative to the project root and may point outside it. An entry wins over the machine directory for the version its typst.toml declares. A file that imports a supported version the entry doesn’t have falls through to the machine’s copy, or to the matching copy built into mt. It works for any @local/<name> a task file or an x-<ns> helper imports. This repository pins its own prelude to its lib/ with one.
mt install still writes every supported version to the machine directory. Your editor’s Typst language server, typst compile and every project without an entry read it. mt fix never edits a project-local pin. When the pin declares the same unsupported version an import names, mt fix reports that import unfixable, because rewriting it would change which prelude the project reads.
Emitted imports
mt rebuilds a task file from the model in one place, mt import. The header it writes holds one #import "<path>": * per [tasks] emit-imports entry, then the prelude import, then the blank line and the body. Each entry is a root-absolute path to a .typ module in the project, so a rebuilt body that calls a project helper still evaluates:
[tasks]
emit-imports = ["/truth/prelude/2/lib.typ"]The : * wildcard brings in every name the module exports. A wildcard import shadows an earlier one. The prelude comes last, and its task, status and status constructors keep their names whatever a project module exports. A project helper that means to replace one of those names cannot. mt refuses an entry that is not root-absolute, holds .., does not end in .typ, or names a module the project lacks, and it refuses each of them when the config loads. A project with no entry writes the file mt always wrote.
The list is project policy, not a fixed header. mt import never reads the imports a task file carried before. It also never writes a project helper into the body, where the helper would sit in the prose and repeat on every round trip.
Editor schema
mt install writes a JSON Schema for .mindtape/config.toml into the config directory, and each later install refreshes it. mt init starts the config with a #:schema line that points at the published copy, so an editor with tombi or Taplo completes keys and checks values as you type. mt reads that line as a TOML comment. mt init’s --schema and --no-schema flags change it.
Presets
mt init --preset <name> writes a preset as the project’s config. A preset may have an [overlay] table, which mt init merges over the rest of the preset. Tables merge key by key, and any other value in the overlay replaces the preset’s. You get one file, with no comments and no [overlay].
mt init can adopt a pack from an answer instead of copying a preset’s keys. --priority ice-strict writes extends = ["mindtape:ice"]. The project then gets the pack’s fixes when mt upgrades. When the answers adopt more than one pack, mt init folds them into one extends line near the top of the file.
Sections
The table lists every top-level section, with the description mt config schema prints for it. The docs build fails if the schema has a section the table leaves out.
| Section | Purpose |
|---|---|
[tasks] roots | Directories (relative to the project root) holding one task per file. |
[[tasks.status]] | Status legend: legal values in lifecycle order, plus per-value display (glyph, color, label) and the terminal flag. |
[tasks.priority] | The priority scale, its bands, and an optional scoring framework that computes priority from inputs. |
[tasks.difficulty] | The difficulty scale and its labeled anchors or bands. |
[tasks.estimate] | Allowed estimate units, and whether a task must carry an estimate. |
[tasks.recur] | Whether the config enables recurring tasks, and the units, anchors and limits mt recur accepts. |
[tasks.naming] | The filename stem template mt add and mt recur use, and what mt add does when another task already holds the stem (dedup). |
[tasks.id] | Task id format. |
[tasks.fields.<name>] | Allowed values, default and requirement for kind and for each x-<ns> extension field, keyed by field name. Any other key fails config load. |
[tasks.assignee] | Which actors assignee: may name, and whether a task must carry one. |
[tasks.body.headers] | Section-heading gating rules. |
[tasks.body.content] | Section-content gating rules. |
[tasks.derive-tags] | Project-wide folder-derived-tag policy. |
[tasks] emit-imports | Typst modules every writer imports into a task file it rebuilds, each a root-absolute path to a .typ module. mt import writes #import "<path>": * for each entry, before the prelude import and the body, so a project wildcard cannot shadow a core helper. A project with no entry gets the file writers always wrote. |
[tasks.tags] | Tag allow-list, checked on open tasks only. |
[[tasks.rules]] | Assertions every selected task must satisfy. mt check enforces them, and so does every write command before it writes. |
[[tasks.collectors]] | Derived fields, each a query run over every task and read as derived.<name>. A collector a pack or a lower layer declared merges by name, as a rule does. |
[[tasks.waits]] | Commands a waits-on entry names: each answers by exit code whether a task still waits on something outside the repo. |
[commits] | The commit trailer, its external refs, and the rules mt check --commit-msg checks a commit against. |
extends | Packs this config builds on, in any config layer. An entry with a path separator is a TOML pack file, or a directory pack, a folder holding pack.toml and an optional templates/, relative to the file that declares it. A directory’s templates/ joins templates.dirs. Any other entry is <source>:<pack>, and mindtape is the one source known without a declaration: mindtape:tasks is a pack built into mt. A pack holds any config key but extends, disable, pack-sources, project.code, tasks.roots, templates.dirs and [typst]. Its keys merge just below this layer’s own, table by table, and its rules come ahead of this layer’s, where a rule with the same name replaces it. Two packs here that set one value differently are an error, unless this layer sets that key too. An entry { pack, with } sets the pack’s parameters, which its expressions read as param("name"). |
disable | Rule names to drop once every pack and layer has added its rules. A name that matches no rule is a config error. The resolved view skips it, as it skips extends. |
[pack-sources.<name>] | Git repositories the project takes packs from, each a [pack-sources.<name>] table of git, the repository, and ref, a tag, branch or commit. An extends entry <name>:<pack> names a pack in one. Only the project’s own .mindtape/config.toml declares a source, and the embedded source already holds the name mindtape. .mindtape/packs.lock pins each source to a commit, and a config load refuses a source the lock doesn’t pin from the git and ref here. |
[tasks.comments] | Review-comment policy over a task’s whole source file (mt check). |
[[tasks.links.kinds]] | Custom link kinds that links: edges may use, beside the built-in ones. |
[[actors]] | The project’s actor registry ([[actors]]): named workers (people and language models) that assignee: values may reference. |
[[roles]] | Role names ([[roles]]) that actors may hold. A role carries no settings, and a harness keys its own config by role name. |
[ls] | mt ls defaults. |
[rm] | rm (task removal) defaults. |
[retire] | Settings for the gitless rm strategy’s tombstone. |
[views.<name>] | Named query bundles ([views.<name>]), referenced by @name. |
[dicts.<name>] | Named string sets ([dicts.<name>]), which let a vocabulary two rules share stay one list rather than two that drift. Each unions values, path and include into one set, compiled and checked once at config load. The mindtape- prefix belongs to the built-in dictionaries. |
[[on.flip]], [[on.rm]], [[on.add]] | Hooks keyed by event: [[on.flip]], [[on.add]] and [[on.rm]]. |
[templates] | add (task creation) template discovery. |
[add] | add settings for mt add: the editor fill and whether it verifies. |
[go] | go (open in editor) settings. |
[format] | Whether mt reformats the Typst source it writes ([format]). |
[project] | Project-level settings (code, etc.). |
[typst] | Typst evaluation settings (local-package overrides). |
These sections have a page of their own:
[[tasks.status]]: Statuses.[[tasks.rules]],[[tasks.collectors]],[tasks.body.headers],[tasks.body.content],[tasks.comments]and everyrequiredkey: Rules.[[tasks.links.kinds]]: Task links.[tasks] rootsand[tasks.derive-tags]: Derived tags.[tasks.priority]and[tasks.difficulty]: Priority.[tasks.estimate]and[tasks.estimate.queries]: Estimates.[tasks.recur]: Recurring tasks.[views.<name>]and[dicts.<name>]: Views & dictionaries.[[on.flip]],[[on.rm]]and[[on.add]]: Hooks.[[tasks.waits]]: Wait on upstream.[templates]and[add]: Templates & slots.extends,disableand[pack-sources.<name>]: Packs.[commits]: Commit rules. Itsexternal-refslists regexes for trailer values that name work outside the backlog.[ls]and[rm]filters: Filter language.[rm]strategyis onmt rm, and the[[on.rm]]hook that runs on a removal is on Hooks.[[ls.rules]],[ls.columns.<name>]and[ls] hyperlinks:mt ls.
A [tasks] roots entry names where task sources are. Which files count as tasks says which files under a root mt reads. A root’s exclude lists globs, relative to the root, whose matches it does not cover. Another root can still admit them.
The sections below have no other page.
Derived fields
A [[tasks.collectors]] entry computes a field from the task itself instead of asking the author to write it twice. The collector’s name is the field name, read as derived.<name> everywhere a filter, a --sort, mt eval --json and mt ls --json read a field.
[[tasks.collectors]]
name = "changes"
when = "!terminal"
query = { section = "Changes", pattern = "(?m)^\\s*-\\s+`([^`]+)`" }
returns = ["path"]query names what to read. A regex query takes section, one heading name or a heading path, and pattern. Each match yields its first capture group, or the whole match when the pattern has none. group picks one explicitly, counting from 0. The section’s text is everything under its heading down to the next heading of the same or a higher level, the same slice a content rule reads. A missing section yields an empty list.
A Typst query calls a function from a project module instead:
[[tasks.collectors]]
name = "summary"
query = { typst = "lib.typ", function = "summarize", field = "body" }
returns = { count = "number", files = ["path"] }The function receives the task object that mt eval --json prints, or the field field names, such as body or an x-<ns> slot. A pack’s collector resolves typst from the pack’s own directory. The module must exist and export the function when the config loads. An eval error, a panic() or a value that does not match returns is a Collector violation at derived.<name>, which mt check reports and mt eval prints.
An ast-grep query matches code structure through the same query engine an estimate uses:
# examples/rules/.mindtape/config.toml: the collector and the rule that reads it
[[tasks.collectors]]
name = "callers"
when = "!terminal"
query = { ast_grep = { language = "rust", pattern = "parse_task($$$ARGS)", glob = "@source" } }
returns = ["path"]
[[tasks.rules]]
name = "callers-stay-local"
when = "!terminal && difficulty >= 3"
assert = 'count_paths(derived.callers, "@source") <= 3'
message = "keep the parse-task fan-out small"
severity = "error"
# examples/rules/.mindtape/config.toml: the @source set both read
[dicts.source]
case = "exact"
values = ["src/**"]language is rust or its alias rs in this version, and a query reads only .rs files. pattern is an ast-grep pattern, and glob is optional, a glob or a path-set name that narrows the files the query reads. Without one, it reads every file of that language git lists. Each matching file contributes its path once. A rule then reads count_paths(derived.callers, "@source") over a file count as it does for any path list. Paths are relative to the repository root, as changed() reads them, and the walk needs a git working tree. Outside one, mt check reports the collector problem and names git init as the fix. A bad pattern fails as a config error. So does an unknown language, a bad glob, or a returns other than ["path"].
returns is a type expression. The atoms are bool, int, number, string, path and date. Wrap one in a one-element array for a list, as in ["path"], or write a record such as { count = "number", files = ["path"] }. A regex query returns ["string"] or ["path"], and an ast-grep query returns ["path"]. A task the when excludes has no field at all.
Collectors merge by name across layers and packs, exactly as rules do, and disable drops one by name. Two collectors with the same name in one source are a config error. mt config show --resolved prints each one’s query and returns type, and mt config show --origin names the layer or pack it came from. A Typst collector specifies its module and function. An ast-grep collector specifies its language, pattern and optional glob.
mindtape:budget includes a changes collector over a task’s Changes section, and its rules read count_paths(derived.changes, "@source"). A project that sizes work that way sets [tasks.estimate] required = false. An estimate stays optional, and Split oversized tasks shows the rule.
Actors
[[actors]] lists who works on tasks, people and language models, and [[roles]] lists the roles they can hold. A role is only a name. If a harness gives a role tools or instructions, it keeps them in its own config, keyed by the role’s name.
# examples/rules/.mindtape/config.toml: one reviewer, one model
[[roles]]
name = "reviewer"
[[actors]]
name = "ada"
kind = "human"
roles = ["reviewer"]
[[actors]]
name = "lin"
kind = "llm"kind is human or llm. Actor names and role names must be unique and not empty, and an actor may hold only declared roles. A task’s assignee: names the actor working on it. If you set [tasks.assignee] allowed, each name in it must be a declared actor. In a filter, assignee == "ada" compares the name, and role == "reviewer" reads the assignee’s roles from this list (see Filter language).
When a project requires an assignee, mt add asks for it in a slot that MINDTAPE_PRINCIPAL fills, so a harness that sets the variable files tasks without a prompt. With the variable unset, an interactive mt add prompts, and a non-interactive one fails and reports the slot.
Task file names
[tasks.naming] stem is the pattern mt add and mt recur use to name a new task file, such as stem = "{slug}.task-{yy}{mm}{dd}". If it’s unset, mt add names the file {slug} and mt recur names a spawned occurrence {slug}-{date}.
| Macro | Expands to |
|---|---|
{slug} | The title, slugified. |
{date} | Today’s date, or the occurrence’s date for mt recur, as YYYY-MM-DD. |
{date:FMT} | The same date in the format FMT, built from the tokens below. Other characters pass through, so {date:YYYY} expands to 2026 and {date:%Y} to %Y. |
{yy}, {mm}, {dd} | Two-digit year, month and day. |
{n}, {n:0N} | The occurrence number, bare or zero-padded to N digits. |
A {date:FMT} format reads these tokens, longest first:
| Token | Expands to |
|---|---|
YYYY | Four-digit year. |
YY | Two-digit year (last two digits). |
MMMM | Full month name (January to December). |
MMM | Abbreviated month name (Jan to Dec). |
MM | Zero-padded month (01 to 12). |
M | Bare month (1 to 12). |
DD | Zero-padded day (01 to 31). |
D | Bare day (1 to 31). |
[tasks.naming] dedup decides what mt add does if the file already exists. fail stops before writing. skip leaves the file alone, exits 0 and reports the existing path. add-suffix appends -2, -3 and so on until the name is free. If dedup is unset, it’s fail when stem is unset and add-suffix when it’s set. mt add --dedup overrides it for one run.
Extension fields
mt checks an x-<ns> field only if you declare it in [tasks.fields.x-<ns>]. There, values and required work the same as they do for kind. A values-when filter limits the check to the tasks it matches, such as "!terminal" to leave closed tasks alone. A declared field takes one string, or a list of strings with multiple = true, and values covers every element. mt add offers a required one as a slot. A filter can read the value whether you declared the field or not.