| 1 | # v0.8.6 Backlog — Work Brief for an AI Agent |
| 2 | |
| 3 | This is a structured brief for another AI (Claude Opus, DeepSeek V4, or similar) to |
| 4 | understand the full v0.8.6 scope and begin implementation. The repo is |
| 5 | `github.com/Hmbown/DeepSeek-TUI` — Rust workspace, TUI coding agent for DeepSeek V4. |
| 6 | |
| 7 | **Branch**: create `feat/v0.8.6` from `main` (current HEAD at v0.8.5 tag). |
| 8 | **All 23 issues are tagged `v0.8.6`** and live in the repo's GitHub Issues. |
| 9 | **Zero open issues outside this list** — the board is clean. |
| 10 | |
| 11 | ## Project Context |
| 12 | |
| 13 | DeepSeek TUI is a terminal-native coding agent. Key architectural points: |
| 14 | - **Dispatcher binary** (`deepseek`) delegates to the TUI binary (`deepseek-tui`) |
| 15 | - **Crate map**: `crates/tui` is the main crate; `crates/cli` handles CLI entry; |
| 16 | `crates/config`, `crates/core`, `crates/tools` etc. are sub-crates |
| 17 | - **Engine pattern**: `core/engine.rs` runs the agent loop, processes tool calls |
| 18 | - **TUI**: ratatui-based, alt-screen, composer at bottom, sidebar at right |
| 19 | - **Config**: `~/.deepseek/config.toml`, profiles, providers, settings |
| 20 | - **Key files to read first**: `docs/ARCHITECTURE.md`, `crates/tui/src/main.rs`, |
| 21 | `crates/tui/src/tui/app.rs`, `crates/tui/src/core/engine.rs` |
| 22 | |
| 23 | Read `AGENTS.md` and `CLAUDE.md` in the repo root for build/test commands. |
| 24 | |
| 25 | --- |
| 26 | |
| 27 | ## v0.8.6 Issues — Grouped by Theme |
| 28 | |
| 29 | ### Group A: UX Polish — Transcript & Clipboard (5 issues) |
| 30 | |
| 31 | | # | Title | TL;DR | |
| 32 | |---|-------|-------| |
| 33 | | 380 | Inline diff highlighting | Color +/- in apply_patch/edit_file results | |
| 34 | | 379 | Smart clipboard Ctrl+Y | Copy focused cell to system clipboard | |
| 35 | | 375 | Right-click context menu | Per-cell menu: Copy, Open in editor, Re-run, Hide | |
| 36 | | 374 | Clickable file:line | OSC-8 hyperlinks on path:line in tool output | |
| 37 | | 376 | Native-copy escape | Hold Shift to bypass alt-screen for terminal selection | |
| 38 | |
| 39 | ### Group B: Workspace UX — Navigation & Visibility (4 issues) |
| 40 | |
| 41 | | # | Title | TL;DR | |
| 42 | |---|-------|-------| |
| 43 | | 394 | File-tree pane | Ctrl+E toggles left-side workspace navigator | |
| 44 | | 395 | Cycle-boundary visualization | Inline dividers between coherence cycles | |
| 45 | | 396 | Per-turn cache hit chip | Footer shows cache hit % after each turn | |
| 46 | | 388 | Crash-recovery prompt | On restart, offer to restore interrupted turn | |
| 47 | |
| 48 | ### Group C: Session & History (3 issues) |
| 49 | |
| 50 | | # | Title | TL;DR | |
| 51 | |---|-------|-------| |
| 52 | | 383 | /edit — revise and resubmit | Pull last message into composer, re-run turn | |
| 53 | | 384 | /undo — revert last patch | Surgical undo of apply_patch/edit_file/write_file | |
| 54 | | 385 | /diff — session changes | Show git diff since session start | |
| 55 | |
| 56 | ### Group D: Tools & Intelligence (4 issues) |
| 57 | |
| 58 | | # | Title | TL;DR | |
| 59 | |---|-------|-------| |
| 60 | | 389 | Inline LSP diagnostics | Show rust-analyzer errors after each patch | |
| 61 | | 386 | /init — bootstrap AGENTS.md | Auto-detect project type, write starter AGENTS.md | |
| 62 | | 391 | User-defined slash commands | ~/.deepseek/commands/<name>.md templates | |
| 63 | | 392 | /model auto | Heuristic Pro-vs-Flash routing per turn | |
| 64 | |
| 65 | ### Group E: Infrastructure & Sharing (4 issues) |
| 66 | |
| 67 | | # | Title | TL;DR | |
| 68 | |---|-------|-------| |
| 69 | | 390 | /profile — hot-switch config | Switch config profiles in-session without restart | |
| 70 | | 393 | /share — session URL | Export session as static HTML, upload to gist/S3 | |
| 71 | | 387 | In-app self-update | deepseek update fetches + replaces binary | |
| 72 | | 397 | Goal mode | Stated objective, token budget, self-verification tools | |
| 73 | |
| 74 | ### Group F: Quality & Fixes (3 issues) |
| 75 | |
| 76 | | # | Title | TL;DR | |
| 77 | |---|-------|-------| |
| 78 | | 382 | Collapse Steer/Queue/Immediate | One mental model — everything queues, Ctrl+Enter steers | |
| 79 | | 373 | Sidebar Tasks panel ignores shell jobs | Wire shell jobs into Tasks panel | |
| 80 | | 377 | Shrink App state | Group ~200 fields into typed sub-states | |
| 81 | | 378 | Docs: tighten README + ARCHITECTURE | External-reader polish pass | |
| 82 | |
| 83 | --- |
| 84 | |
| 85 | ## Suggested Implementation Order |
| 86 | |
| 87 | ### Wave 1: Foundation (start here) |
| 88 | 1. **#377 (refactor App state)** — do this FIRST. Group fields into sub-state structs |
| 89 | before adding more fields. Every subsequent feature touches App. |
| 90 | 2. **#382 (collapse Steer/Queue)** — UX clarity fix, low implementation risk. |
| 91 | 3. **#373 (Tasks panel shell jobs)** — bugfix, low risk. |
| 92 | |
| 93 | ### Wave 2: Transcript UX |
| 94 | 4. **#380 (inline diff highlighting)** — parser pass on tool output, visible value. |
| 95 | 5. **#374 (clickable file:line)** — OSC-8 hyperlinks, high discoverability. |
| 96 | 6. **#379 (smart clipboard Ctrl+Y)** — small feature, big ergonomic win. |
| 97 | 7. **#375 (right-click context menu)** — depends on mouse event plumbing. |
| 98 | 8. **#376 (native-copy escape)** — terminal selection fix. |
| 99 | |
| 100 | ### Wave 3: Session tools |
| 101 | 9. **#383 (/edit)** — requires engine truncation path. |
| 102 | 10. **#384 (/undo)** — depends on snapshot infra. |
| 103 | 11. **#385 (/diff)** — uses snapshot repo, depends on #380 for rendering. |
| 104 | 12. **#388 (crash-recovery prompt)** — uses existing checkpoint infra. |
| 105 | |
| 106 | ### Wave 4: Intelligence |
| 107 | 13. **#386 (/init)** — project detection + AGENTS.md generation. |
| 108 | 14. **#389 (LSP diagnostics)** — polls existing LSP client, low-maintenance. |
| 109 | 15. **#391 (user-defined commands)** — skills loader reuse. |
| 110 | 16. **#392 (/model auto)** — heuristic router, DeepSeek-specific. |
| 111 | |
| 112 | ### Wave 5: Visibility & sharing |
| 113 | 17. **#394 (file-tree pane)** — workspace navigator. |
| 114 | 18. **#395 (cycle-boundary visualization)** — coherence cycle dividers. |
| 115 | 19. **#396 (cache hit chip)** — footer chip, simple addition. |
| 116 | 20. **#393 (/share)** — HTML export, gist/S3 backend. |
| 117 | 21. **#387 (self-update)** — binary fetch + verify + replace. |
| 118 | |
| 119 | ### Wave 6: Docs & goal mode |
| 120 | 22. **#378 (docs polish)** — README + ARCHITECTURE refresh. |
| 121 | 23. **#397 (Goal mode)** — largest feature, last (benefits from all previous work). |
| 122 | |
| 123 | --- |
| 124 | |
| 125 | ## Working Patterns |
| 126 | |
| 127 | - **PR-per-issue** (or small clusters). Each merged PR closes one issue. |
| 128 | - **Decomposition first**: read the issue body, identify the files that need to change, |
| 129 | create a `checklist_write`, then implement. |
| 130 | - **Test gates**: `cargo test --workspace --all-features` must pass before each PR. |
| 131 | - **Lint gates**: `cargo clippy --workspace --all-targets --all-features -- -D warnings` clean. |
| 132 | - **Format**: `cargo fmt --all` before commit. |
| 133 | - **GitHub**: push to `feat/v0.8.6`, create PRs to `main`. Use `gh` CLI. |
| 134 | - **No open issues** except the v0.8.6 list — if new issues emerge, create them but don't block. |
| 135 | |
| 136 | ## Key Resources |
| 137 | |
| 138 | - Repo: `https://github.com/Hmbown/DeepSeek-TUI` |
| 139 | - Architecture: `docs/ARCHITECTURE.md` |
| 140 | - Config reference: `docs/CONFIGURATION.md` |
| 141 | - CLI: `gh issue list --label v0.8.6 --json number,title,body` for full issue text |
| 142 |