cli + tui to publish to leaflet (wip) & manage tasks, notes & watch/read lists 🍃
charm leaflet readability golang
at main 547 lines 20 kB view raw view rendered
1# ROADMAP 2 3Noteleaf is a command-line and TUI tool for managing tasks, notes, media, and articles. This roadmap outlines milestones: current capabilities, planned baseline features (v1), and future directions. 4 5## Core Usability 6 7The foundation across all domains is implemented. Tasks support CRUD operations, projects, tags, contexts, and time tracking. 8Notes have create, list, read, edit, and remove commands with interactive and static modes. Media queues exist for books, movies, and TV with progress and status management. SQLite persistence is in place with setup, seed, and reset commands. TUIs and colorized output are available. 9 10## RC 11 12### CORE 13 14- [x] Ensure **all documented subcommands** exist and work: 15 - Tasks: add, list, view, update, edit, delete, projects, tags, contexts, done, start, stop, timesheet 16 - Notes: create, list, read, edit, remove 17 - Books: add, list, reading, finished, remove, progress, update 18 - Movies: add, list, watched, remove 19 - TV: add, list, watching, watched, remove 20 - Articles: add, list, view, read, remove 21- [x] Confirm all **aliases** work (`todo`, `ls`, `rm`, etc.). 22- [x] Verify **flags** and argument parsing match man page (priority, project, context, due, tags, etc.). 23- [x] Implement or finish stubs (e.g. `config management` noted in code). 24 25### Task Management Domain 26 27- [x] Verify tasks can be created with all attributes (priority, project, context, due date, tags). 28- [x] Confirm task listing supports interactive and static modes. 29- [x] Implement status filtering (`pending`, `completed`, etc.). 30- [x] Validate time tracking (start/stop) writes entries and timesheet summarizes correctly. 31- [x] Ensure update supports add/remove tags and all fields. 32- [x] Test interactive editor (`task edit`). 33 34### Notes Domain 35 36- [x] Implement note creation from: 37 - Inline text 38 - File (`--file`) 39 - Interactive input (`--interactive`) 40- [x] Verify note list interactive TUI works, static list fallback works. 41- [x] Confirm filtering by tags and `--archived`. 42- [x] Ensure notes can be opened, edited in `$EDITOR`, and deleted. 43 44#### Publication 45 46- [x] Implement authentication with BlueSky/leaflet (AT Protocol). 47 - [ ] Add [OAuth2](#publications--authentication) 48- [x] Verify `pub pull` fetches and syncs documents from leaflet. 49- [x] Confirm `pub list` with status filtering (`all`, `published`, `draft`). 50- [x] Test `pub post` creates new documents with draft/preview/validate modes. 51- [x] Ensure `pub patch` updates existing documents correctly. 52- [x] Validate `pub push` handles batch operations (create/update). 53- [x] Verify markdown conversion to leaflet block format (headings, code, images, facets). 54 55### Media Domains 56 57#### Books 58 59- [x] Implement search + add (possibly external API). 60- [x] Verify list supports statuses (`queued`, `reading`, `finished`). 61- [x] Progress updates (`book progress`) work with percentages. 62- [x] Status update (`book update`) accepts valid values. 63 64#### Movies 65 66- [x] Implement search + add. 67- [x] Verify `list` with status filtering (`all`, `queued`, `watched`). 68- [x] Confirm `watched`/`remove` commands update correctly. 69 70#### TV 71 72- [x] Implement search + add. 73- [x] Verify `list` with multiple statuses (`queued`, `watching`, `watched`). 74- [x] Ensure `watching`, `watched`, `remove` commands behave correctly. 75 76#### Articles 77 78- [x] Implement article parser (XPath/domain-specific rules). 79- [x] Save articles in Markdown + HTML. 80- [x] Verify metadata is stored in DB. 81- [x] Confirm list supports query, author filter, limit. 82- [x] Test article view/read/remove. 83 84### Configuration & Data 85 86- [x] Implement **config management** 87- [x] Define config file format (TOML, YAML, JSON). 88- [x] Set default config/data paths: 89 - Linux: `~/.config/noteleaf`, `~/.local/share/noteleaf` 90 - macOS: `~/Library/Application Support/noteleaf` 91 - Windows: `%APPDATA%\noteleaf` 92- [x] Implement overrides with environment variables (`NOTELEAF_CONFIG`, `NOTELEAF_DATA_DIR`). 93- [x] Ensure consistent DB schema migrations and versioning. 94 95### Documentation 96 97- [x] Finalize **man page** - use `tools/docgen.go` as a dev only command for `website/docs/manual` 98- [x] Strictly follow <https://diataxis.fr/> 99 - [x] Write quickstart guide in `README.md` & add `website/docs/Quickstart.md` 100 - [x] Add examples for each command (`website/docs/examples`) 101 - [x] Document config file with defaults and examples in `website/docs/Configuration.md` 102 - [x] Provide developer docs for contributing in `docs/dev` 103 - [x] Move to `website/docs/development` 104 105### QA 106 107- [x] Verify **unit tests** for all handlers (TaskHandler, NoteHandler, Media Handlers). 108- [x] Write **integration tests** covering CLI flows. 109- [x] Ensure error handling works for: 110 - Invalid IDs 111 - Invalid flags 112 - Schema corruption (already tested in repo) 113 114### Packaging 115 116- [ ] Provide prebuilt binaries (via GoReleaser). 117- [ ] Add installation instructions (Homebrew, AUR, Scoop, etc.). 118- [ ] Version bump to `v1.0.0-rc1`. 119- [ ] Publish man page with release. 120- [ ] Verify `noteleaf --version` returns correct string. 121 122## v1 Features 123 124Planned functionality for a complete baseline release. 125 126### Tasks 127 128- [x] Model 129 - [x] Dependencies 130 - [x] Recurrence (`recur`, `until`, templates) 131 - [x] Wait/scheduled dates 132 - [x] Urgency scoring 133- [x] Operations 134 - [x] `annotate` 135 - [x] Bulk edit and undo/history 136- [x] Reports and Views 137 - [x] Next actions 138 - [x] Completed/waiting/blocked reports 139 - [x] Calendar view 140 - [x] Sorting and urgency-based views 141- [ ] Queries and Filters 142 - [ ] Rich query language 143 - [ ] Saved filters and aliases 144- [ ] Interoperability 145 - [ ] JSON import/export 146 - [ ] todo.txt compatibility 147 148### Notes 149 150- [ ] Commands 151 - [x] `note search` - TF-IDF search via `search query` command 152 - [ ] `note tag` 153 - [ ] `note recent` 154 - [ ] `note templates` 155 - [ ] `note archive` 156 - [ ] `note export` 157- [ ] Features 158 - [x] Full-text search - TF-IDF ranking with Unicode tokenization 159 - [ ] Linking between notes, tasks, and media 160 161### Search 162 163#### Ranking Improvements 164 165- [ ] BM25 scoring algorithm 166 - [ ] Implement Okapi BM25 with configurable parameters (k1, b) 167 - [ ] Field-aware BM25F with title/body weighting 168 - [ ] Pluggable scoring strategy interface (TF-IDF/BM25 interchangeable) 169 - [ ] Benchmark against TF-IDF on sample corpus 170 171#### Query Features 172 173- [ ] Phrase and proximity queries 174 - [ ] Positional inverted index (track term positions in documents) 175 - [ ] Exact phrase matching (`"go programming"`) 176 - [ ] Proximity scoring (boost when terms appear near each other) 177- [ ] Query understanding 178 - [ ] Synonym expansion with configurable dictionaries 179 - [ ] Boolean operators (AND, OR, NOT) 180 - [ ] Field-specific queries (`title:golang body:concurrency`) 181 - [ ] Spelling correction with edit distance suggestions 182 - [ ] Query boosting syntax (`title^3 golang`) 183 184#### Linguistic Processing 185 186- [ ] Text normalization 187 - [ ] Porter stemmer for English (run/runs/running → run) 188 - [ ] Stopword filtering with domain-specific lists 189 - [ ] Unicode normalization and diacritic folding 190 - [ ] Configurable token filter pipeline 191- [ ] Multi-language support 192 - [ ] Language detection 193 - [ ] Language-specific stemmers 194 - [ ] CJK tokenization improvements 195 196#### Advanced Scoring 197 198- [ ] Learning to Rank 199 - [ ] Feature extraction (TF-IDF/BM25 scores, term coverage, recency) 200 - [ ] Click-through rate tracking for relevance feedback 201 - [ ] Gradient-boosted tree models for re-ranking 202 - [ ] Evaluation metrics (NDCG, MAP) 203- [ ] Non-text signals 204 - [ ] Document recency scoring 205 - [ ] Tag-based relevance 206 - [ ] User interaction signals 207 208#### Index Management 209 210- [ ] Persistence and optimization 211 - [ ] On-disk index snapshots (gob serialization) 212 - [ ] Segmented indexing with periodic merging (Lucene-style) 213 - [ ] Incremental updates (add/update/delete without full rebuild) 214 - [ ] Index versioning and rollback 215 - [ ] Compression for large corpora 216- [ ] Performance 217 - [ ] Index build benchmarks vs corpus size 218 - [ ] Query latency monitoring 219 - [ ] Memory usage profiling 220 - [ ] Concurrent search support 221 222#### User Experience 223 224- [ ] Interactive search interface 225 - [ ] TUI with real-time search-as-you-type 226 - [ ] Result navigation with vim keybindings 227 - [ ] Preview pane showing full note content 228 - [ ] Filtering by tags, date ranges, doc kind 229 - [ ] Sort options (relevance, date, alphabetical) 230 - [ ] Quick actions (open in editor, copy ID, tag) 231- [ ] Search result display 232 - [ ] Snippet generation with matched term highlighting 233 - [ ] Configurable result limit and pagination 234 - [ ] Score explanation mode (`--explain` flag) 235 - [ ] Export results to JSON/CSV 236- [ ] CLI 237 - [ ] Saved search queries and aliases 238 - [ ] Search history 239 - [ ] Query latency and result count in output 240 - [ ] Color-coded relevance scores 241 242### Media 243 244- [ ] Articles/papers/blogs 245 - [ ] Parser with domain-specific rules 246 - [ ] Commands: `add`, `list`, `view`, `remove` 247 - [ ] Metadata validation and storage 248- [ ] Books 249 - [ ] Source tracking and ratings 250 - [ ] Genre/topic tagging 251- [ ] Movies/TV 252 - [ ] Ratings and notes 253 - [ ] Genre/topic tagging 254 - [ ] Episode/season progress for TV 255 - [ ] Platform/source tracking 256 257## Beyond v1 258 259Features that demonstrate Go proficiency and broaden Noteleaf’s scope. 260 261### Tasks 262 263- [ ] Parallel report generation and background services 264- [ ] Hook system for task lifecycle events 265- [ ] Plugin mechanism 266- [ ] Generics-based filter engine 267- [ ] Functional options for configuration 268- [ ] Error handling with wrapping and sentinel checks 269 270### Notes 271 272- [ ] Templates system for note types 273- [ ] Versioning and history 274- [ ] Export with formatting 275- [ ] Import from other systems 276 277### Media 278 279- [ ] External imports (Goodreads, IMDB, Letterboxd) 280- [ ] Cross-referencing across media types 281- [ ] Analytics: velocity, completion rates 282- [ ] Books (Open Library integration enhancements) 283 - [ ] Author detail fetching (full names, bio) 284 - [ ] Edition-specific metadata 285 - [ ] Cover image download and caching 286 - [ ] Reading progress tracking 287 - [ ] Personal reading lists sync 288- [ ] Movies/TV (external API integration) 289 - [ ] Movie databases (TMDb, OMDb) 290 - [ ] Rotten Tomatoes integration 291- [ ] Music 292 - [ ] Music services (MusicBrainz, Album of the Year) 293 294### Articles 295 296- [ ] Enhanced parsing coverage 297- [ ] Export to multiple formats 298- [ ] Linking with tasks and notes 299 300### Publications & Authentication 301 302- [ ] OAuth2 authentication for AT Protocol 303 - [ ] Client metadata server for publishing application details 304 - [ ] DPoP (Demonstrating Proof of Possession) implementation 305 - [ ] ES256 JWT generation with unique JTI nonces 306 - [ ] Server-issued nonce management with 5-minute rotation 307 - [ ] Separate nonce tracking for authorization and resource servers 308 - [ ] PAR (Pushed Authorization Requests) flow 309 - [ ] PKCE code challenge generation 310 - [ ] State token management 311 - [ ] Request URI handling 312 - [ ] Identity resolution and verification 313 - [ ] Bidirectional handle verification 314 - [ ] DID resolution from handles 315 - [ ] Authorization server discovery via .well-known endpoints 316 - [ ] Token lifecycle management 317 - [ ] Access token refresh (5-15 min lifetime recommended) 318 - [ ] Refresh token rotation (180 day max for confidential clients) 319 - [ ] Concurrent request handling to prevent duplicate refreshes 320 - [ ] Secure token storage (encrypted at rest) 321 - [ ] Local callback server for OAuth redirects 322 - [ ] Ephemeral HTTP server on localhost 323 - [ ] Browser launch integration 324 - [ ] Timeout handling for abandoned flows 325 - [ ] Support both OAuth & App Passwords but recommend OAuth 326- [ ] Leaflet.pub enhancements 327 - [ ] Multiple Publications: Manage separate publications for different topics 328 - [ ] Image Upload: Automatically upload images to blob storage and embed in documents 329 - [ ] Status Management: Publish drafts and unpublish documents from CLI 330 - [ ] Metadata Editing: Update document titles, summaries, and tags 331 - [ ] Backlink Support: Parse and resolve cross-references between documents 332 - [ ] Offline Mode: Queue posts and patches for later upload 333 334### User Experience 335 336- [ ] Shell completions 337- [ ] Manpages and docs generator 338- [ ] Theming and customizable output 339- [ ] Calendar integration 340- [ ] Task synchronization services 341- [ ] Git repository linking 342- [ ] Note export to other platforms 343 344### Tasks 345 346- [ ] Sub-tasks and hierarchical tasks 347- [ ] Visual dependency mapping 348- [ ] Forecasting and smart suggestions 349- [ ] Habit and streak tracking 350- [ ] Context-aware recommendations 351 352### Notes 353 354- [ ] Graph view of linked notes 355- [ ] Content extraction and summarization 356- [ ] Encryption and privacy controls 357 358### Media 359 360- [ ] Podcast and YouTube management 361- [ ] Multi-format (audiobooks, comics) 362- [ ] Media consumption goals and streaks 363- [ ] Media budget tracking 364- [ ] Seasonal and energy-based filtering 365 366### Articles 367 368- [ ] Content validation 369- [ ] Encryption support 370- [ ] Advanced classification 371 372### Local API Server 373 374A local HTTP server daemon that exposes Noteleaf data for web UIs and extensions. 375Runs on the user's machine and provides programmatic access to tasks, notes, and media. 376 377#### Architecture 378 379- [ ] Daemon mode via `noteleaf server start/stop/status` 380- [ ] Binds to localhost by default (configurable port) 381- [ ] HTTP/REST API using existing repository layer 382- [ ] Shares same SQLite database as CLI 383- [ ] Middleware: logging, CORS (for localhost web UIs), compression 384- [ ] Health and status endpoints 385 386#### Daemon Management 387 388- [ ] Commands: `start`, `stop`, `restart`, `status` 389- [ ] PID file tracking for process management 390- [ ] Systemd service file for Linux 391- [ ] launchd plist for macOS 392- [ ] Graceful shutdown with active request draining 393- [ ] Auto-restart on crash option 394- [ ] Configurable bind address and port 395- [ ] Log file rotation 396 397#### API Endpoints 398 399RESTful design matching CLI command structure: 400 401- [ ] `GET /api/v1/tasks` - List tasks with filters 402- [ ] `POST /api/v1/tasks` - Create task 403- [ ] `GET /api/v1/tasks/:id` - Get task details 404- [ ] `PUT /api/v1/tasks/:id` - Update task 405- [ ] `DELETE /api/v1/tasks/:id` - Delete task 406- [ ] `POST /api/v1/tasks/:id/start` - Start time tracking 407- [ ] `POST /api/v1/tasks/:id/stop` - Stop time tracking 408- [ ] `GET /api/v1/tasks/:id/time-entries` - Get time entries 409- [ ] Similar CRUD endpoints for notes, books, movies, TV shows, articles 410- [ ] `GET /api/v1/projects` - List all projects 411- [ ] `GET /api/v1/tags` - List all tags 412- [ ] `GET /api/v1/contexts` - List all contexts 413- [ ] `GET /api/v1/stats` - Dashboard statistics 414 415#### Real-time Updates 416 417- [ ] WebSocket endpoint for live data updates 418- [ ] Server-Sent Events (SSE) as fallback 419- [ ] Event types: task created/updated/deleted, note modified, etc. 420- [ ] Subscribe to specific domains or IDs 421- [ ] Change notification for web UI reactivity 422 423#### Authentication & Security 424 425- [ ] Optional API token authentication (disabled by default for localhost) 426- [ ] Token stored in config file 427- [ ] Token rotation command 428- [ ] CORS configuration for allowed origins 429- [ ] Localhost-only binding by default (security through network isolation) 430- [ ] Optional TLS for local network access 431 432#### Extension System 433 434- [ ] Webhook endpoints for extension registration 435- [ ] Event hooks for task/note lifecycle: 436 - [ ] Before/after create, update, delete 437 - [ ] Task completion, start, stop 438 - [ ] Note archive/unarchive 439- [ ] Webhook delivery with retries 440- [ ] Extension manifest for discovery 441- [ ] JavaScript plugin API (embedded V8/goja runtime) 442- [ ] Plugin sandbox for security 443 444#### Web UI 445 446- [ ] Reference web UI implementation 447- [ ] Static file serving from embedded assets 448- [ ] Single-page application architecture 449- [ ] Responsive design (desktop, tablet, mobile) 450- [ ] Features: 451 - [ ] Task board view (Kanban) 452 - [ ] Calendar view for tasks 453 - [ ] Note editor with Markdown preview 454 - [ ] Media queue management 455 - [ ] Search and filtering 456 - [ ] Keyboard shortcuts matching CLI 457 458#### Configuration 459 460- [ ] Server config section in noteleaf.toml: 461 - [ ] bind_address (default: 127.0.0.1) 462 - [ ] port (default: 8080) 463 - [ ] enable_auth (default: false) 464 - [ ] api_token (optional) 465 - [ ] enable_websocket (default: true) 466 - [ ] log_level (default: info) 467- [ ] Environment variable overrides 468- [ ] CLI flag overrides for daemon commands 469 470#### Monitoring & Diagnostics 471 472- [ ] `GET /health` - Health check endpoint 473- [ ] `GET /metrics` - Prometheus-compatible metrics 474- [ ] Request logging (access log) 475- [ ] Error logging with stack traces 476- [ ] Performance metrics (request duration, DB query time) 477- [ ] Active connections and goroutine count 478- [ ] Memory and CPU usage stats 479 480#### Client Libraries 481 482- [ ] Go client library for extensions 483- [ ] JavaScript/TypeScript client for web UIs 484- [ ] OpenAPI/Swagger specification 485- [ ] Auto-generated API documentation 486 487## Technical Infrastructure 488 489### Completed 490 491SQLite persistence, CI with GitHub Actions and Codecov, TUIs with Charm stack, initial help system. 492 493### Planned 494 495- Prebuilt binaries for releases 496- Installation and usage documentation 497- Contribution guide and developer docs 498- Consistent argument parsing 499 500#### Post v1 501 502- Backup/restore 503 - [ ] Automated backups 504 - [ ] Backup scheduling and rotation 505- Multiple profiles 506- Optional synchronization 507 - [ ] Sync service 508- Import/Export 509 - [ ] CSV export for tasks 510 - [ ] Markdown export for tasks 511 - [ ] Bulk export commands 512 - [ ] Migration utilities (TaskWarrior, todo.txt, etc.) 513 - [ ] Git integration for notes/data versioning 514 515## v1 Feature Matrix 516 517| Domain | Feature | Status | 518|--------------|----------------------------|-----------| 519| Tasks | CRUD | Complete | 520| Tasks | Projects/tags | Complete | 521| Tasks | Time tracking | Complete | 522| Tasks | Dependencies | Complete | 523| Tasks | Recurrence | Complete | 524| Tasks | Wait/scheduled | Complete | 525| Tasks | Urgency scoring | Complete | 526| Tasks | Reports and views | Complete | 527| Notes | CRUD | Complete | 528| Notes | Search (TF-IDF) | Complete | 529| Notes | Advanced search | Planned | 530| Notes | Tagging | Planned | 531| Publications | AT Protocol sync | Complete | 532| Publications | Post/patch/push | Complete | 533| Publications | Markdown conversion | Complete | 534| Publications | OAuth2 | Future | 535| Media | Books/movies/TV | Complete | 536| Media | Articles | Complete | 537| Media | Source/ratings | Planned | 538| Articles | Parser + storage | Complete | 539| System | SQLite persistence | Complete | 540| System | Configuration management | Complete | 541| System | Synchronization | Future | 542| System | Import/export formats | Future | 543 544## Parking Lot 545 546- [ ] Test cross-platform behavior (Linux/macOS/Windows). 547- [ ] `$EDITOR` integration