Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ process before rebuilding or you'll get `Access is denied (os error 5)`.
- `commands.rs` — All Tauri IPC handlers
- `output/` — Structured output rendering for LLM consumption
- `mcp/` — Model Context Protocol server
- `config.rs` — Persistent user settings (tags, exit modes, bookmarks)
- `terraform.rs` — Natural prose directives feature
- `config.rs` — Persistent user settings (tags, exit modes)

**Frontend** (`src/lib/`):
- `composables/` — Svelte 5 runes-based state (useAnnotations, useTerraformRegions, etc.)
- `composables/` — Svelte 5 runes-based state (useAnnotations, etc.)
- `components/` — UI components (LineRow, CodeViewer, etc.)
- `CommandPalette/` — `:` command palette with namespaces
- `tiptap.ts` — Rich text editor configuration
Expand Down Expand Up @@ -184,7 +183,7 @@ Kill the stray `annot.exe` before rebuilding.
## UI Patterns

### Line Actions (right-side icons)
Add buttons inside the `{#if trailing || showBookmarkIcon || terraformRegionStart}` block in `LineRow.svelte`. Use `.line-action` class.
Add buttons inside the `{#if trailing}` block in `LineRow.svelte`. Use `.line-action` class.

### Left Border Indicators
Use `::before` pseudo-elements with `position: absolute; left: 0; width: 3px;`. For overlapping indicators, use `repeating-linear-gradient`.
Expand All @@ -194,6 +193,3 @@ Use `::before` pseudo-elements with `position: absolute; left: 0; width: 3px;`.
- Source lines: `line.origin.line` (file) or `line.origin.new_line`/`old_line` (diff)

Use `getLineNumber(line)` and `getFilePath(line)` from `line-utils.ts`.

### Terraform Regions
Persist to backend with source line numbers. Use `useTerraformRegions` composable for state.
22 changes: 2 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ claude mcp add --scope user annot annot mcp
Make sure `annot.exe` is on your `PATH` first (see build instructions above), or pass
the full path: `claude mcp add --scope user annot "C:\path\to\annot.exe" mcp`.

Claude now has review tools (`review_file`, `review_diff`, `review_content`) and bookmark tools (`get_bookmark`, `list_bookmarks`). Ask it to review something and a window opens for your feedback.
Claude now has review tools (`review_file`, `review_diff`, `review_content`). Ask it to review something and a window opens for your feedback.

### Standalone

Expand Down Expand Up @@ -193,7 +193,6 @@ Press `Shift+C` to add comments that apply to the entire review — framing cont
- **Syntax highlighting** for 50+ languages
- **Mermaid diagrams** rendered inline
- **Portal links** — embed live code from other files
- **Bookmarks** — save and recall annotations across sessions
- **`/excalidraw`** — draw diagrams inside annotations
- **`/replace`** — propose inline code changes

Expand Down Expand Up @@ -225,21 +224,6 @@ Press `Shift+C` to add comments that apply to the entire review — framing cont
| `label` | string | yes | Display name with .md extension |
| `exit_modes` | array | no | Ephemeral exit modes for this session |

### `get_bookmark`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | Full or prefix bookmark ID |

### `list_bookmarks`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | no | Maximum number of bookmarks to return |
| `search` | string | no | Filter by label, selected text, or context |
| `project` | string | no | Filter by project path |
| `sort` | string | no | Sort order: "asc" (default) or "desc" |

## Keyboard shortcuts

| Shortcut | Function |
Expand All @@ -248,8 +232,6 @@ Press `Shift+C` to add comments that apply to the entire review — framing cont
| Shift+Drag | Select range |
| c | Comment hovered line |
| Shift+C | Session context (global comment) |
| b | Bookmark hovered line or selection |
| Shift+B | Bookmark entire session |
| Tab / Shift+Tab | Cycle exit modes |
| Alt+Tab | Exit mode picker |
| : | Command palette |
Expand All @@ -262,7 +244,7 @@ Press `Shift+C` to add comments that apply to the entire review — framing cont
| Shortcut | Function |
|---|---|
| # | Insert tag |
| @ | Reference (annotations, bookmarks, sections) |
| @ | Reference (annotations, sections, files) |
| / | Slash commands (/replace, /excalidraw) |

## License
Expand Down
28 changes: 3 additions & 25 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Review agent-generated content — plans, drafts, analysis. Markdown rendering w
- **Images**: Paste screenshots directly into annotations
- **Excalidraw diagrams**: Sketch ideas visually (can also convert Mermaid diagrams to Excalidraw)
- **Replace blocks**: Propose code replacements with before/after display
- **Bookmark references**: Link to previously captured moments
- **References**: Link to annotations, sections, and project files

### Slash Commands in Annotation Editor
- `/` triggers command menu (Excalidraw, Replace block, etc.)
- `#` triggers tag autocomplete
- `@` triggers bookmark reference autocomplete
- `@` triggers reference autocomplete (annotations, sections, files)

### Tag System
- Create custom tags with names and LLM instructions
Expand Down Expand Up @@ -84,17 +84,6 @@ This fetches and displays the actual code inline, syntax-highlighted. Max 50 por

---

## Bookmarks

Capture moments for future reference:

- **Session bookmarks**: Snapshot the entire current review with an optional label
- **Selection bookmarks**: Bookmark specific line ranges with optional labels
- Reference bookmarks in annotations with `@` syntax
- Bookmarks are **detached** — if deleted, references keep their content

---

## Content Shaping

annot isn't a document editor — humans shape content through **reaction**, not direct authorship:
Expand Down Expand Up @@ -149,12 +138,6 @@ Press `:` (colon) to open. Seven namespaces:
- Press `s` to set as active
- Press `r` to reorder (drag with arrow keys)

### Bookmarks
- Browse, edit labels, delete bookmarks
- Search by label or content
- Shows project context
- Sorted by creation date (newest first)

### Copy
- Copy content only
- Copy annotations only
Expand All @@ -180,7 +163,7 @@ Press `:` (colon) to open. Seven namespaces:
| Shift+Drag | Select range |
| `/` | Slash command menu (Excalidraw, Replace) |
| `#` | Tag autocomplete |
| `@` | Bookmark reference autocomplete |
| `@` | Reference autocomplete (annotations, sections, files) |
| Tab/Shift+Tab | Cycle exit modes |
| `Shift+C` | Session context editor |
| `:` | Command palette |
Expand All @@ -201,9 +184,6 @@ TAGS:
[# SECURITY] Review for security vulnerabilities
[# TODO] Items needing follow-up

BOOKMARKS:
[BOOKMARK abc] auth-flow (this session)

CONTEXT: plan.md [embeds: src/lib.rs, src/main.rs]

GENERAL:
Expand All @@ -225,7 +205,6 @@ Saved to /path/to/file.md

### Section Meanings
- **TAGS**: Tag definitions used in annotations (only if tags are present)
- **BOOKMARKS**: Referenced bookmarks with their snapshots
- **CONTEXT**: What's being reviewed, with any embedded portal files
- **GENERAL**: High-level comment about the entire review (not line-specific)
- **NEXT**: What action the human wants (exit mode name + instruction)
Expand Down Expand Up @@ -264,7 +243,6 @@ All block until window closes, returning structured output with annotations, exi

Persisted in the OS config directory (`~/.config/annot/` on Linux, `~/Library/Application Support/annot/` on macOS, `%APPDATA%\annot\` on Windows):
- Tags and exit modes
- Bookmarks with snapshots
- Usage statistics
- Theme preference
- Obsidian vault paths
Expand Down
Loading