agentleFS
zhitongblogzhitongblog/solomd/docs/agents.md

solomd

AGENTS.md1.2k starsChanged 6 months agoMITView on GitHub

Status: v4.0 (May 2026). Companion to docs/roadmap.md § "v4.0 — Agent-native author". SoloMD treats agents as first-class editor surfaces, not external CLI handoffs. This doc is the write-your-own-agent guide: the YAML schema, what tools exist, the safety model, and the patterns that work. If you just want to install a starter, open Settings → Recipes → Browse cookbook. 1. A recipe is one YAML file under <workspace>/.solomd/agents/*.yml. No build step, no plugin manifest. Edit, save, run. 2. Every run is…

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 25 mentionsMay 2026: 5 mentionsJun 2026: 0 mentionsJul 2026: 6 mentionsAug 2026: 0 mentionsSep 2026: 5 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the zhitongblog/solomd repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about zhitongblog/solomd

The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 41

Talked about on GitHub (41 times).

On GitHub · 41

36 more on GitHub
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this agents.md into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read tools are always available.

    line 95
  2. Distinctive:

    Every recipe run begins by:

    line 125
  3. Distinctive:

    Every run materializes a directory:

    line 142
  4. Distinctive:

    The trace view is your debugger: Every model call, every tool call, every tool result is there.

    line 207
  5. Very specific:

    Models lie about doing tool calls they didn't: If the trace doesn't show a tool_call step, the call didn't happen — even if the model's …

    line 210
  6. Very specific:

    Run ./scripts/v4-self-test.sh for the fast lane (~30s), --with-release to also link-check cargo build --release for the bin

    line 243

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

Agents in SoloMD

Status: v4.0 (May 2026). Companion to docs/roadmap.md § "v4.0 — Agent-native author".

SoloMD treats agents as first-class editor surfaces, not external CLI handoffs. This doc is the write-your-own-agent guide: the YAML schema, what tools exist, the safety model, and the patterns that work. If you just want to install a starter, open Settings → Recipes → Browse cookbook.


TL;DR — three things to know

  1. A recipe is one YAML file under <workspace>/.solomd/agents/*.yml. No build step, no plugin manifest. Edit, save, run.
  2. Every run is sandboxed on its own AutoGit branch (agent/<recipe>/<run-id>). Writes don't touch main until you click Accept in Settings → Recipes → Pending.
  3. Read tools are free; write tools are gated behind allow-write: true + a per-run write-cap (default 5, hard cap 50). The trace view shows every read and every write before you accept.

YAML schema

name: Weekly review              # required, displayed in UI
trigger: schedule                # required: schedule | on-save | on-commit | on-tag-add | manual
schedule: "0 18 * * SUN"         # required when trigger=schedule (5-field cron, UTC)
match: "daily/**/*.md"           # required for on-save / on-commit / on-tag-add (glob, workspace-relative)
tag: review-me                   # required for on-tag-add (no leading #)
prompt: |                        # required: the agent's instructions (multi-line block)
  Read this week's daily/ notes.
  Write weekly/{{date:YYYY-WW}}.md: themes / decisions / open threads.
allow-write: true                # default false — required if prompt asks for write_note / append_to_note
write-cap: 5                     # default 5, hard upper bound 50 — refusal bails before any side-effect
provider: claude                 # optional: claude | openai | anthropic | gemini | ollama | local | …
model: claude-sonnet-4-6         # optional, falls back to user's default model for the provider
base_url: https://api.x          # optional, only when self-hosting an OpenAI-compatible endpoint
tools:                           # optional explicit allowlist; default = every tool
  - read_note
  - write_note

A few subtleties worth knowing:

  • Cron is UTC. 0 18 * * SUN fires at 18:00 UTC on Sunday — that's 02:00 Monday in Beijing, 10:00 Saturday in San Francisco. The cron parser accepts the standard 5 fields plus an optional 6th (seconds, for testing).
  • Glob is workspace-relative and uses the same globset crate as gitignore — **/*.md walks every folder, daily/**/*.md only inside daily/.
  • tools: allowlist is a safety belt: when set, any tool the prompt asks for that's not in the list is refused at dispatch time. Useful for "this recipe should never write" recipes that you also mark allow-write: false for double protection.
  • provider: local is an alias of ollama (kept for forward-compat with future local runtimes — see roadmap "Bundled local LLM runtime" → explicitly skipped).
  • provider: openai-compat (aliases: llama-cpp, llamacpp, lmstudio, vllm, custom) targets any self-hosted server that speaks OpenAI Chat Completions — llama.cpp's llama-server, LM Studio, vLLM, LocalAI, an internal gateway. Set base_url: to the address the server printed at startup; a bare host:port gets /v1 appended. No API key is required (store one only if your server sits behind an authenticating proxy).

Triggers

TriggerFires whenRequired fieldsNotes
scheduleCron expression matches current UTC minuteschedule: (cron)Cron loop polls every 60s; never double-fires within a minute.
on-saveA markdown file matching match: is savedmatch: (glob)Debounced 800ms; rapid saves coalesce into one run.
on-commitAn AutoGit commit lands and touches match:match: (glob)Fires once per commit; multiple matched files = one run with {{files}} populated.
on-tag-addA note gets #tag added that matches tag:tag:Detected by diffing the post-save tag list vs the pre-save list.
manualUser clicks Run now in Settings → Recipes(none)The escape hatch — also useful for "test my prompt" cycles.

Prompt variables

The runner does Mustache-style substitution before sending the prompt to the model. Unknown {{tokens}} are passed through verbatim, so embedding the literal string {{example}} in a prompt is fine.

TokenResolved toAvailable in
{{path}}Workspace-relative path of the triggering fileon-save, on-tag-add
{{files}}Comma-separated list of paths in the triggering commiton-commit
{{sha}}Short commit SHAon-commit
{{tag}}The #tag that was just added (no leading #)on-tag-add
{{date:FORMAT}}Current date in any chrono format string. Common: YYYY-MM-DD, YYYY-WW (ISO week), YYYY-MMAll triggers
{{workspace}}Absolute workspace pathAll triggers
{{recipe}}This recipe's name: (handy for self-reference inside prompts)All triggers

Tools the agent can call

Read tools are always available; write tools require allow-write: true.

Read

ToolWhat it does
list_notesList markdown files (optional folder: and limit:)
read_noteRead one note + parsed front matter / headings / wikilinks
searchFull-text search; mode: literal (default) or mode: regex
get_backlinksFind every note that links to a given note via [[wikilink]]
list_tagsEnumerate every #tag with file counts
get_outlineHeading tree (level / text / line) for a note
autogit_logRecent AutoGit commits that touched a file
autogit_diffUnified diff of a commit on a file
read_agent_traceRead another run's trace.jsonl — opens the door to self-correcting recipes

Write (requires allow-write: true)

ToolWhat it does
write_noteCreate or overwrite a note. allow_overwrite: true to overwrite
append_to_noteAppend to an existing note (creates a leading newline)

Each write call charges the per-run write-cap. When the cap is exhausted the next write returns an error to the model — the loop continues so the model can wrap up cleanly.


Safety model: the AutoGit sandbox

Every recipe run begins by:

  1. Creating a fresh AutoGit branch agent/<recipe-slug>/<run-id> off the current HEAD.
  2. Running the prompt + tool loop. All write_note / append_to_note calls land on this branch.
  3. On success the run goes into Pending review with a button to view the diff, Accept (merge into main), or Reject (delete the branch entirely).

A rejected run vanishes — no merge, no leftover commits in your history. An accepted run fast-forwards main and shows up in git log like any other commit.

The write-cap is enforced before dispatch, so a model that asks to write 100 files when the cap is 5 will get refusals starting at the 6th call, with no half-applied state.


Output: the run dir

Every run materializes a directory:

<workspace>/.solomd/agent-runs/<run-id>/
├── meta.json     ← provider / model / status / token totals / cost estimate
├── trace.jsonl   ← one JSON line per step (prompt / model_call / tool_call / tool_result / done)
└── run.md        ← human-readable transcript with tool blocks inline

run-id format: YYYYMMDD-HHMMSS-XXXXXX (UTC + 6 random hex). The directory is plain markdown + JSON — grep-able, git-trackable, AI-introspectable via the read_agent_trace tool.

The Settings → Recipes → History view renders these as collapsible step cards. The replay-from-step button mints a new run that re-uses the trace up to step N and continues from there — useful for "this run was almost right, but it took a bad turn at step 7."


Patterns that work

Read-only "suggest, don't act" recipes

Set allow-write: false. The model can still call read tools, and its conclusions land in the trace view for your manual review. Great for link suggestions, citation audits, "give me a TL;DR of these notes" kinds of work — anything where you want the agent to think but not edit.

See cookbook/07-link-suggester.yml for a full example.

Schedule + report = no-touch cron jobs

schedule: "0 22 * * *" + prompt: write a daily summary to today's daily note. The recipe runs every night, you wake up, the summary's there. If you don't like the summary you reject the run and the daily note is untouched.

See cookbook/08-daily-summary.yml.

Local provider for high-frequency, sensitive recipes

provider: ollama + model: qwen2.5:1.5b keeps notes on-device. Cheaper too: zero per-token cost. Trade-off is quality — Qwen 2.5 1.5B handles structure-extraction recipes well but struggles with nuanced prose rewrites. Use cloud providers for translation / proofreading.

Already running llama.cpp / LM Studio / vLLM instead? Use the OpenAI-compatible provider and point it at that server — same on-device guarantee, no key:

provider: openai-compat
base_url: http://192.168.1.20:8080/v1   # or just 192.168.1.20:8080
model: qwen2.5-7b-instruct-q4_k_m       # whatever your server lists at /v1/models

See cookbook/04-cjk-proofread.yml for the local-first pattern.

Tag-driven workflows

trigger: on-tag-add + tag: meeting lets you tag a freshly-typed meeting note #meeting and trigger a "summarize + extract action items" recipe. Composes naturally with the write-cap (one note touched = write-cap: 1 is enough).

See cookbook/06-meeting-notes-summary.yml.


Debugging recipes

  • The trace view is your debugger. Every model call, every tool call, every tool result is there. Token counts and cost estimates per step.
  • Click "Run now" in Settings → Recipes to test a recipe without waiting for its trigger.
  • Models lie about doing tool calls they didn't. If the trace doesn't show a tool_call step, the call didn't happen — even if the model's text claims it did. Re-run with a stronger prompt.
  • Bad cron expressions are caught at parse time (you'll see a YAML error in the recipe row).
  • Bad globs match nothing silently. match: "*.md" only matches the workspace root, not subfolders; use match: "**/*.md" or match: "daily/**/*.md".
  • {{date:…}} uses chrono format strings, not strftime. %Y-%m-%d becomes YYYY-MM-DD.

What recipes can't do

By design:

  • No multi-step orchestration across recipes. Each run is one prompt → one tool loop. If you want "Recipe A then Recipe B," chain them via the trace: Recipe B reads read_agent_trace of Recipe A's run.
  • No external HTTP calls from the prompt. The model only has the tools listed above. If you need to fetch from an external API, write a custom MCP tool (see the solomd-mcp source).
  • No long-running background work. Recipes are bounded by the model's context window and the tool-loop cap (default 8 round-trips). Long jobs should be split into multiple scheduled runs.
  • No mutation of files outside the workspace. The resolve_in_workspace check rejects any path that escapes the canonical workspace root.

Related docs

  • docs/roadmap.md — v4.0 plan + the strategic principles behind the safety model.
  • mcp-server/README.md — the MCP surface for external clients (Claude Desktop, etc.).
  • app/src-tauri/src/recipes.rs — schema definition (Rust types are the source of truth).
  • app/src-tauri/cookbook/ — every bundled recipe template.
  • scripts/v4-self-test.sh — one-shot pass/fail across all 5 pillars. Run ./scripts/v4-self-test.sh for the fast lane (~30s), --with-release to also link-check cargo build --release for the bin
    • mcp-server + frontend, or --with-ollama to add a live Ollama smoke test. Definition-of-Done for v4.0 requires this script to exit 0.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.