AtlatestRepositoryfolio
1
# Folio Development Guide3
Markdown-native knowledge and project management system exposed as an MCP server. All state stored as structured markdown files.5
## Build7
Uses `sigil build` with `--redirects` to resolve dependencies from the local sigil workspace:9
```bash10
sigil build --redirects dev-redirects.sgl11
```13
The `dev-redirects.sgl` file maps Sigil ecosystem dependencies to the local sigil worktree. Without it, the build fetches from remote repos.15
## Test17
Build first, then run tests with `-L build/dev/lib` so the test runner finds compiled modules:19
```bash20
sigil build --redirects dev-redirects.sgl21
sigil -L build/dev/lib test --redirects dev-redirects.sgl22
```24
## Run26
The MCP server reads `FOLIO_ROOT` to find the folio data directory:28
```bash29
FOLIO_ROOT=~/folio ./build/dev/bin/folio30
```32
For Claude Code integration, add to `.mcp.json`:34
```json35
{36
"mcpServers": {37
"folio": {38
"command": "./build/dev/bin/folio",39
"env": {40
"FOLIO_ROOT": "/home/daviwil/folio"41
}42
}43
}44
}45
```47
## Architecture49
- `(folio store)` -- Folio root directory management and file discovery50
- `(folio frontmatter)` -- YAML frontmatter read/write via `(sigil yaml)`51
- `(folio task)` -- Task struct, parsing `- [ ] text {key: val}` lines52
- `(folio id)` -- Short task ID generation (`t-xxxx`)53
- `(folio inbox)` -- Inbox read/add/remove operations54
- `(folio tools)` -- MCP tool schemas, handlers, registration55
- `(folio main)` -- Entry point: reads FOLIO_ROOT, starts MCP server57
## Conventions59
- Task metadata uses `{key: val, key: val}` suffix -- commas separate fields60
- Tags are space-separated within metadata (not comma-separated, since commas are the field separator)61
- Task IDs are `t-` followed by 4 random hex chars, stored in metadata as `id: t-xxxx`62
- Frontmatter uses full YAML via `(sigil yaml)`, not the markdown parser's simple frontmatter63
- All file writes bump the `last-updated` frontmatter field to today's date