# AGENTS.md — Cherry Note

Guidance for AI agents that help users write content for **Cherry Note**,
a focused desktop writing app (Windows & macOS, with Linux coming soon) whose notes are plain
Markdown `.md` files. There is no AI built into the app — agents like you are how users get
AI-drafted content, so producing correct Cherry Note Markdown matters.

---

## Docs

- [llms.txt](https://cherry-note.app/llms.txt): A brief overview of Cherry Note and the Markdown syntax it supports.
- [Full context](https://cherry-note.app/llms-full.txt): Complete app overview + the full Markdown syntax reference with examples.
- [AGENTS.md](https://cherry-note.app/AGENTS.md): Operating guide for AI agents producing Cherry Note content.
- [SKILL.md](https://cherry-note.app/SKILL.md): A loadable Agent Skill for writing Cherry Note Markdown.


## What to do

- When a user asks you to write, draft, reformat, or structure a note **for Cherry
  Note**, output plain text using the Markdown syntax below.
- Prefer Cherry Note's expressive features (color, highlight, callouts, details,
  task lists, arithmetic blocks) when they add clarity — but don't over-decorate.
- If you're unsure whether a feature is supported, fall back to standard/CommonMark
  Markdown, which Cherry Note also understands.
- Do not invent syntax. Only use the tokens documented here.


## Cherry Note Markdown syntax

### Text & inline marks
- Headings: `#`, `##`, `###`, `####` (H1–H4).
- Bold `**text**` · Italic `_text_` · Underline `__text__` · Strikethrough `~~text~~`
- Inline code `` `text` `` · Superscript `^{text}` · Subscript `_{text}` · Small `||text||`

### Color & highlight
- Text color: `~={ColorName} text here=~` — e.g. `~={Cyan} Cyan colored text=~`
- Highlight: `=={ColorName} text here==` — e.g. `=={Cyan} Cyan Highlighted Text==`
- Color names: `Red`, `Orange`, `Amber`, `Yellow`, `Lime`, `Green`, `Emerald`,
  `Teal`, `Cyan`, `Sky`, `Blue`, `Indigo`, `Purple`, `Fuchsia`, `Pink`, `Rose`.

### Alignment
Prefix a paragraph/heading: `{<->}` centered, `{->}` right, `{==}` justified.
Left is the default (no prefix).

### Lists
- Bullet `- item` · Ordered `1. item`
- Task list `- [ ] todo` / `- [x] done`
- Nesting via indentation is supported.

### Links & blockquotes
- Link: `[link text](https://url.com)` (inline marks allowed in the text).
- Blockquote: `> quoted text`.

### Code blocks
Fenced with an optional language hint:

````
```ts
// code here
```
````

### Horizontal rule
`---` on its own line.

### Callout blocks
```
> [!NOTE] Title here
> Body text here.
```
Types: `NOTE`, `INFO`, `WARNING`, `IMPORTANT`, `SUCCESS`.

### Details (collapsible)
```
:::details {theme: Blue, isExpanded: true}
Summary / title text
---
Content goes here. Full Markdown allowed inside.
:::
```
`theme` = one of `Yellow`, `Orange`, `Sienna`, `Red`, `Pink`, `Purple`, `Indigo`,
`Blue`, `Cyan`, `Green`, `Lime` (case-insensitive); other color names render with no
theme. `isExpanded` = `true`/`false` (default `false`). The line before the inner
`---` is the summary; content follows.

### Tables
Standard Markdown tables; inline marks work in cells.

### Images
Standard Markdown images are supported.

### Arithmetic blocks
A fenced code block with language `cherry-note-arithmetic`. Evaluates live; `x`
means `*`; supports `++ -- += -= *= /=`, `let` variables, and mathjs units/conversions.

````
```cherry-note-arithmetic
let price = 120
let tax = price * 0.2   // = 24
price + tax             // = 144
4 kg to g               // = 4000 g
```
````

Add ` isolated` to the language (```` ```cherry-note-arithmetic isolated ````) to
keep variables local to that block. Blocks are global by default (variables shared
across the note).

### Emoji
Supported (e.g. 🍒).

## Example output

```
# Sprint notes 🍒

Status: =={Emerald} on track==. Risk in ~={Amber} payments=~.

> [!WARNING] Blocker
> Waiting on the API key.

- [x] Spec reviewed
- [ ] Implementation
- [ ] QA
```
