@hienlh/ppm 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/.claude/agent-memory/tester/MEMORY.md +3 -0
  2. package/.claude/agent-memory/tester/project-ppm-test-conventions.md +32 -0
  3. package/.env.example +1 -0
  4. package/.github/workflows/release.yml +46 -0
  5. package/README.md +349 -0
  6. package/bun.lock +1217 -0
  7. package/components.json +21 -0
  8. package/docs/code-standards.md +574 -0
  9. package/docs/codebase-summary.md +294 -0
  10. package/docs/deployment-guide.md +631 -0
  11. package/docs/design-guidelines.md +661 -0
  12. package/docs/project-overview-pdr.md +142 -0
  13. package/docs/project-roadmap.md +400 -0
  14. package/docs/system-architecture.md +459 -0
  15. package/package.json +68 -0
  16. package/plans/260314-2009-ppm-implementation/phase-01-project-skeleton.md +81 -0
  17. package/plans/260314-2009-ppm-implementation/phase-02-backend-core.md +148 -0
  18. package/plans/260314-2009-ppm-implementation/phase-03-frontend-shell.md +256 -0
  19. package/plans/260314-2009-ppm-implementation/phase-04-file-explorer-editor.md +120 -0
  20. package/plans/260314-2009-ppm-implementation/phase-05-web-terminal.md +174 -0
  21. package/plans/260314-2009-ppm-implementation/phase-06-git-integration.md +244 -0
  22. package/plans/260314-2009-ppm-implementation/phase-07-ai-chat.md +242 -0
  23. package/plans/260314-2009-ppm-implementation/phase-08-cli-commands.md +143 -0
  24. package/plans/260314-2009-ppm-implementation/phase-09-pwa-build-deploy.md +209 -0
  25. package/plans/260314-2009-ppm-implementation/phase-10-testing.md +311 -0
  26. package/plans/260314-2009-ppm-implementation/plan.md +202 -0
  27. package/plans/260315-0356-project-scoped-api-refactor/phase-01-backend-project-router.md +145 -0
  28. package/plans/260315-0356-project-scoped-api-refactor/phase-02-frontend-api-migration.md +107 -0
  29. package/plans/260315-0356-project-scoped-api-refactor/phase-03-per-project-tabs.md +100 -0
  30. package/plans/260315-0356-project-scoped-api-refactor/phase-04-websocket-migration.md +66 -0
  31. package/plans/260315-0356-project-scoped-api-refactor/plan.md +87 -0
  32. package/plans/reports/brainstorm-260314-1938-final-techstack.md +342 -0
  33. package/plans/reports/docs-manager-260315-1314-documentation-creation.md +386 -0
  34. package/plans/reports/fullstack-developer-260314-2252-phase-02-backend-core.md +57 -0
  35. package/plans/reports/fullstack-developer-260314-2253-phase-03-frontend-shell.md +70 -0
  36. package/plans/reports/fullstack-developer-260314-2300-phase-04-05-file-api-terminal-ws.md +49 -0
  37. package/plans/reports/fullstack-developer-260314-2300-phase-04-05-file-explorer-editor-terminal.md +52 -0
  38. package/plans/reports/fullstack-developer-260314-2307-ai-chat-phase7.md +58 -0
  39. package/plans/reports/fullstack-developer-260314-2307-phase-06-git-integration.md +33 -0
  40. package/plans/reports/research-260314-1911-ppm-tech-stack.md +318 -0
  41. package/plans/reports/research-260314-1930-claude-code-integration.md +293 -0
  42. package/plans/reports/researcher-260314-2232-node-pty-bun-crash-analysis.md +305 -0
  43. package/plans/reports/researcher-260314-2232-ui-style.md +942 -0
  44. package/plans/reports/researcher-260315-0300-opcode-claude-interaction.md +745 -0
  45. package/plans/reports/researcher-260315-0303-opcode-deep-analysis.md +742 -0
  46. package/plans/reports/researcher-260315-0305-claude-agent-sdk-github-research.md +423 -0
  47. package/plans/reports/tester-260314-2053-initial-test-suite.md +81 -0
  48. package/ppm.example.yaml +14 -0
  49. package/repomix-output.xml +23745 -0
  50. package/scripts/build.ts +13 -0
  51. package/src/cli/commands/chat-cmd.ts +259 -0
  52. package/src/cli/commands/config-cmd.ts +121 -0
  53. package/src/cli/commands/git-cmd.ts +315 -0
  54. package/src/cli/commands/init.ts +57 -0
  55. package/src/cli/commands/open.ts +19 -0
  56. package/src/cli/commands/projects.ts +100 -0
  57. package/src/cli/commands/start.ts +3 -0
  58. package/src/cli/commands/stop.ts +33 -0
  59. package/src/cli/utils/project-resolver.ts +27 -0
  60. package/src/index.ts +59 -0
  61. package/src/providers/claude-agent-sdk.ts +499 -0
  62. package/src/providers/claude-binary-finder.ts +256 -0
  63. package/src/providers/claude-code-cli.ts +413 -0
  64. package/src/providers/claude-process-registry.ts +106 -0
  65. package/src/providers/mock-provider.ts +171 -0
  66. package/src/providers/provider.interface.ts +10 -0
  67. package/src/providers/registry.ts +45 -0
  68. package/src/server/helpers/resolve-project.ts +22 -0
  69. package/src/server/index.ts +181 -0
  70. package/src/server/middleware/auth.ts +30 -0
  71. package/src/server/routes/chat.ts +153 -0
  72. package/src/server/routes/files.ts +168 -0
  73. package/src/server/routes/git.ts +261 -0
  74. package/src/server/routes/project-scoped.ts +27 -0
  75. package/src/server/routes/projects.ts +57 -0
  76. package/src/server/routes/static.ts +26 -0
  77. package/src/server/ws/chat.ts +130 -0
  78. package/src/server/ws/terminal.ts +89 -0
  79. package/src/services/chat.service.ts +110 -0
  80. package/src/services/claude-usage.service.ts +113 -0
  81. package/src/services/config.service.ts +90 -0
  82. package/src/services/file.service.ts +261 -0
  83. package/src/services/git-dirs.service.ts +112 -0
  84. package/src/services/git.service.ts +372 -0
  85. package/src/services/project.service.ts +107 -0
  86. package/src/services/slash-items.service.ts +184 -0
  87. package/src/services/terminal.service.ts +212 -0
  88. package/src/types/api.ts +37 -0
  89. package/src/types/chat.ts +92 -0
  90. package/src/types/config.ts +41 -0
  91. package/src/types/git.ts +50 -0
  92. package/src/types/project.ts +18 -0
  93. package/src/types/terminal.ts +20 -0
  94. package/src/web/app.tsx +168 -0
  95. package/src/web/components/auth/login-screen.tsx +88 -0
  96. package/src/web/components/chat/attachment-chips.tsx +55 -0
  97. package/src/web/components/chat/chat-placeholder.tsx +10 -0
  98. package/src/web/components/chat/chat-tab.tsx +301 -0
  99. package/src/web/components/chat/file-picker.tsx +126 -0
  100. package/src/web/components/chat/message-input.tsx +420 -0
  101. package/src/web/components/chat/message-list.tsx +838 -0
  102. package/src/web/components/chat/session-picker.tsx +139 -0
  103. package/src/web/components/chat/slash-command-picker.tsx +135 -0
  104. package/src/web/components/chat/usage-badge.tsx +186 -0
  105. package/src/web/components/editor/code-editor.tsx +329 -0
  106. package/src/web/components/editor/diff-viewer.tsx +276 -0
  107. package/src/web/components/editor/editor-placeholder.tsx +10 -0
  108. package/src/web/components/explorer/file-actions.tsx +191 -0
  109. package/src/web/components/explorer/file-tree.tsx +298 -0
  110. package/src/web/components/git/git-graph.tsx +727 -0
  111. package/src/web/components/git/git-placeholder.tsx +55 -0
  112. package/src/web/components/git/git-status-panel.tsx +850 -0
  113. package/src/web/components/layout/mobile-drawer.tsx +137 -0
  114. package/src/web/components/layout/mobile-nav.tsx +103 -0
  115. package/src/web/components/layout/sidebar.tsx +90 -0
  116. package/src/web/components/layout/tab-bar.tsx +152 -0
  117. package/src/web/components/layout/tab-content.tsx +85 -0
  118. package/src/web/components/projects/dir-suggest.tsx +152 -0
  119. package/src/web/components/projects/project-list.tsx +187 -0
  120. package/src/web/components/settings/settings-tab.tsx +57 -0
  121. package/src/web/components/terminal/terminal-placeholder.tsx +10 -0
  122. package/src/web/components/terminal/terminal-tab.tsx +133 -0
  123. package/src/web/components/ui/button.tsx +64 -0
  124. package/src/web/components/ui/context-menu.tsx +250 -0
  125. package/src/web/components/ui/dialog.tsx +156 -0
  126. package/src/web/components/ui/dropdown-menu.tsx +257 -0
  127. package/src/web/components/ui/input.tsx +21 -0
  128. package/src/web/components/ui/scroll-area.tsx +56 -0
  129. package/src/web/components/ui/separator.tsx +26 -0
  130. package/src/web/components/ui/sonner.tsx +40 -0
  131. package/src/web/components/ui/tabs.tsx +91 -0
  132. package/src/web/components/ui/tooltip.tsx +57 -0
  133. package/src/web/hooks/use-chat.ts +420 -0
  134. package/src/web/hooks/use-terminal.ts +182 -0
  135. package/src/web/hooks/use-url-sync.ts +66 -0
  136. package/src/web/hooks/use-websocket.ts +48 -0
  137. package/src/web/index.html +16 -0
  138. package/src/web/lib/api-client.ts +90 -0
  139. package/src/web/lib/file-support.ts +68 -0
  140. package/src/web/lib/utils.ts +6 -0
  141. package/src/web/lib/ws-client.ts +100 -0
  142. package/src/web/main.tsx +10 -0
  143. package/src/web/public/icon-192.svg +5 -0
  144. package/src/web/public/icon-512.svg +5 -0
  145. package/src/web/stores/file-store.ts +81 -0
  146. package/src/web/stores/project-store.ts +50 -0
  147. package/src/web/stores/settings-store.ts +65 -0
  148. package/src/web/stores/tab-store.ts +187 -0
  149. package/src/web/styles/globals.css +227 -0
  150. package/src/web/vite-env.d.ts +1 -0
  151. package/tests/integration/api/chat-routes.test.ts +95 -0
  152. package/tests/integration/claude-agent-sdk-integration.test.ts +228 -0
  153. package/tests/integration/ws/chat-websocket.test.ts +312 -0
  154. package/tests/test-setup.ts +5 -0
  155. package/tests/unit/providers/claude-agent-sdk.test.ts +339 -0
  156. package/tests/unit/providers/mock-provider.test.ts +143 -0
  157. package/tests/unit/services/chat-service.test.ts +100 -0
  158. package/tsconfig.json +32 -0
  159. package/vite.config.ts +62 -0
@@ -0,0 +1,142 @@
1
+ # PPM Project Overview & Product Development Requirements
2
+
3
+ ## Project Description
4
+
5
+ **PPM** (Personal Project Manager) is a full-stack, mobile-first web IDE designed for developers to manage code projects with AI-powered assistance. It combines a responsive web interface, real-time terminal access, AI chat with tool support, and Git integration into a cohesive development environment.
6
+
7
+ Built on the **Bun runtime** for performance, PPM enables developers to:
8
+ - Browse and edit project files with CodeMirror syntax highlighting
9
+ - Execute commands via xterm.js terminal with full PTY support
10
+ - Chat with Claude AI with file attachments and slash commands
11
+ - View Git status, diffs, and commit graphs in real-time
12
+ - Manage multiple projects via a project registry
13
+ - Access the IDE from mobile, tablet, or desktop browsers
14
+
15
+ ## Target Users
16
+
17
+ - **Solo developers** managing multiple code projects
18
+ - **Teams** requiring lightweight project collaboration
19
+ - **Developers** seeking AI-assisted development workflow
20
+ - **Researchers** prototyping with terminal + editor + AI
21
+ - **DevOps/SRE** managing infrastructure code with AI guidance
22
+
23
+ ## Key Features
24
+
25
+ ### Core Features (Implemented v2)
26
+ - **Project Management** — Create, switch, and manage multiple projects via CLI and web UI
27
+ - **File Explorer** — Browse directory trees, create/edit/delete files with path traversal protection
28
+ - **Code Editor** — CodeMirror 6 with syntax highlighting, line numbers, theme support (dark/light)
29
+ - **Terminal** — Full xterm.js with Bun PTY, resize handling, multiple terminal sessions per project
30
+ - **AI Chat** — Streaming Claude messages with tool use (file read/write, git commands), file attachments, slash command detection
31
+ - **Git Integration** — Status, diffs, commit graphs, branch management, staging/committing
32
+ - **PWA** — Installable web app with offline support
33
+ - **Authentication** — Token-based auth with auto-generated tokens in config
34
+ - **Multi-Session** — Independent terminal and chat sessions per project tab
35
+
36
+ ### Planned Features (v3+)
37
+ - Collaborative editing (WebSocket sync)
38
+ - Custom tool registry for AI
39
+ - Plugin architecture for providers
40
+ - Mobile-optimized git graph
41
+ - Performance profiling UI
42
+
43
+ ## Product Decisions & Rationale
44
+
45
+ ### Runtime: Bun v1.3.6+
46
+ - **Why:** Native TypeScript support, bundled HTTP server, PTY module, blazing-fast startup
47
+ - **Trade-off:** Smaller ecosystem vs Deno/Node; mitigated by npm compatibility
48
+ - **Impact:** Simplified tooling, single binary deployment
49
+
50
+ ### Framework: Hono 4.12.8
51
+ - **Why:** Lightweight, Bun-compatible, edge-first HTTP framework, minimal overhead
52
+ - **Trade-off:** Less middleware ecosystem than Express; sufficient for needs
53
+ - **Impact:** Single-file server setup, WebSocket support built-in
54
+
55
+ ### Frontend: React 19.2.4 + Zustand 5.0
56
+ - **Why:** React for component reusability, Zustand for simple state management (no Redux boilerplate)
57
+ - **Trade-off:** Client-side routing vs server-side; mitigated by URL sync hook
58
+ - **Impact:** Fast, responsive UI with minimal store complexity
59
+
60
+ ### UI Stack: Tailwind + Radix UI + shadcn/ui
61
+ - **Why:** Utility-first CSS (Tailwind), accessible components (Radix), pre-built New York style (shadcn)
62
+ - **Trade-off:** Larger CSS bundle; mitigated by tree-shaking, critical CSS extraction
63
+ - **Impact:** Consistent, accessible, maintainable UI with dark/light theme support
64
+
65
+ ### Editor: CodeMirror 6 + Diff2HTML
66
+ - **Why:** Modular, extensible, supports syntax highlighting, merge views, live collaboration
67
+ - **Trade-off:** More complex API than Monaco; justified by Bun compatibility and flexibility
68
+ - **Impact:** Supports 50+ languages, diffing, real-time file changes
69
+
70
+ ### Terminal: xterm.js + Bun PTY
71
+ - **Why:** xterm.js is industry-standard terminal emulator; Bun PTY avoids node-pty complexity
72
+ - **Trade-off:** Limited Windows support (PTY); justified by Linux/macOS target
73
+ - **Impact:** Full terminal experience, proper signal handling, resize support
74
+
75
+ ### AI Provider: Anthropic Claude Agent SDK
76
+ - **Why:** Native async/await streaming, tool use, built-in token tracking, multi-turn context
77
+ - **Trade-off:** Anthropic-specific; can swap via provider registry pattern
78
+ - **Impact:** Rich conversation capabilities, reliable streaming, tool approval flow
79
+
80
+ ### Database: None (Filesystem-based)
81
+ - **Why:** Single-machine design, YAML project registry, stateless server
82
+ - **Trade-off:** No persistence across server restarts for chat; mitigated by session IDs in URL
83
+ - **Impact:** Zero infrastructure, fast startup, git-friendly config
84
+
85
+ ### Build: Vite 8.0
86
+ - **Why:** ESM-native, fast hot reload, TypeScript support, PWA plugin
87
+ - **Trade-off:** Requires modern JS support; justified by target audience
88
+ - **Impact:** <1s dev refresh, optimized bundles
89
+
90
+ ## Non-Functional Requirements
91
+
92
+ | Requirement | Target | Implementation |
93
+ |---|---|---|
94
+ | **Performance** | Page load <2s, terminal <100ms latency | Vite code splitting, streaming APIs |
95
+ | **Availability** | 99.9% uptime for local deployments | Stateless server, git-based state |
96
+ | **Scalability** | Support 10+ concurrent projects | Stateless, horizontal if needed |
97
+ | **Security** | Token-based auth, path traversal protection | Middleware, filename validation |
98
+ | **Accessibility** | WCAG 2.1 AA | Radix UI primitives, semantic HTML |
99
+ | **Cross-platform** | macOS, Linux, Windows | Bun compatibility + PWA fallback |
100
+ | **Mobile** | iOS Safari, Android Chrome | Responsive design, touch-friendly UI |
101
+ | **Offline** | Basic file browsing, editor | Service worker caching (PWA) |
102
+
103
+ ## Architecture Highlights
104
+
105
+ ```
106
+ ┌─────────────────────────────────────┐
107
+ │ CLI (Commander.js) │ Manage projects, start server
108
+ ├─────────────────────────────────────┤
109
+ │ Hono Server (Bun.serve + WebSocket)│ REST API, WS for terminal/chat
110
+ ├────────────────────┬────────────────┤
111
+ │ Services Layer │ Providers │ Business logic, AI adapters
112
+ ├────────────────────┴────────────────┤
113
+ │ Filesystem + Git + Config │ Project data, auth tokens
114
+ ├─────────────────────────────────────┤
115
+ │ React UI (Vite) │ Frontend, installed as PWA
116
+ └─────────────────────────────────────┘
117
+ ```
118
+
119
+ ## Success Metrics
120
+
121
+ - **Adoption:** 10+ active users, 100+ GitHub stars
122
+ - **Performance:** Server startup <500ms, API response <200ms
123
+ - **Reliability:** <0.1% error rate in chat/git operations
124
+ - **Developer Velocity:** New developers productive in <30 minutes
125
+ - **Code Quality:** >80% test coverage, zero security vulnerabilities
126
+
127
+ ## Project Constraints
128
+
129
+ - **Team Size:** Solo developer (open source, community contributions)
130
+ - **Deployment:** Local/single-machine only (no cloud infrastructure required)
131
+ - **State:** Stateless server (config stored locally on disk)
132
+ - **Compatibility:** Linux/macOS primary, Windows secondary
133
+ - **Scope:** Project IDE, not CI/CD platform or cloud collaboration
134
+
135
+ ## Version History
136
+
137
+ | Version | Status | Focus | Date |
138
+ |---------|--------|-------|------|
139
+ | **v1** | Complete | Initial prototype (single project, basic chat, terminal) | Feb 2025 |
140
+ | **v2** | In Progress | Multi-project, project-scoped APIs, improved UI/UX | Mar 2025 |
141
+ | **v3** | Planned | Collaborative editing, plugin architecture | Q2 2025 |
142
+
@@ -0,0 +1,400 @@
1
+ # PPM Project Roadmap & Status
2
+
3
+ **Last Updated:** March 15, 2026
4
+
5
+ ## Current Version: v2.0 (In Progress)
6
+
7
+ ### Overall Progress: 85%
8
+
9
+ Multi-project, project-scoped API refactor with improved UX.
10
+
11
+ ---
12
+
13
+ ## Phase Breakdown
14
+
15
+ ### Phase 1: Project Skeleton ✅ Complete
16
+ - Bun runtime setup, TypeScript configuration
17
+ - CLI with Commander.js
18
+ - Hono server basic structure
19
+ - React frontend with Vite
20
+
21
+ **Status:** Done (v1 foundation)
22
+
23
+ ---
24
+
25
+ ### Phase 2: Backend Core ✅ Complete
26
+ - Services: ProjectService, ConfigService, FileService, GitService
27
+ - YAML-based project registry
28
+ - Path traversal protection
29
+ - Auth middleware (token-based)
30
+
31
+ **Status:** Done, enhanced in v2
32
+
33
+ **Latest Work (260315):**
34
+ - Project-scoped API refactor: `/api/project/:name/*` routes
35
+ - ProviderRegistry singleton pattern
36
+
37
+ ---
38
+
39
+ ### Phase 3: Frontend Shell ✅ Complete
40
+ - React layout (Sidebar, TabBar, MainArea)
41
+ - Zustand stores (project, tab, file, settings)
42
+ - Theme switcher (dark/light/system)
43
+ - Mobile responsive navigation
44
+
45
+ **Status:** Done, improved in v2
46
+
47
+ **Latest Work (260315):**
48
+ - Mobile nav refactor, tab bar auto-scroll
49
+ - URL sync for project/tab/file state
50
+ - Tab metadata persistence in localStorage
51
+
52
+ ---
53
+
54
+ ### Phase 4: File Explorer & Editor ✅ Complete
55
+ - FileTree component with directory expansion
56
+ - CodeMirror 6 integration with syntax highlighting
57
+ - File read/write operations
58
+ - Diff viewer (Diff2HTML)
59
+
60
+ **Status:** Done
61
+
62
+ **Latest Work (260315):**
63
+ - Chat file attachments (drag-drop, paste)
64
+ - File viewer for images/PDFs/markdown
65
+ - Better error messages
66
+
67
+ ---
68
+
69
+ ### Phase 5: Web Terminal ✅ Complete
70
+ - xterm.js integration
71
+ - Bun native PTY (Bun.spawn with shell)
72
+ - Terminal I/O via WebSocket
73
+ - Resize handling (SIGWINCH)
74
+
75
+ **Status:** Done
76
+
77
+ **Latest Work:**
78
+ - Multiple terminal sessions per project
79
+ - Terminal session persistence in tabs
80
+
81
+ ---
82
+
83
+ ### Phase 6: Git Integration ✅ Complete
84
+ - GitService with simple-git
85
+ - Status view (staged, unstaged, untracked)
86
+ - Diff viewer (file-level and project-level)
87
+ - Commit graph (Mermaid-based visualization)
88
+
89
+ **Status:** Done
90
+
91
+ **Latest Work (260315):**
92
+ - Git staging UI improvements
93
+ - Commit graph performance optimization
94
+ - Branch list, PR URL detection
95
+
96
+ ---
97
+
98
+ ### Phase 7: AI Chat ✅ Complete
99
+ - Claude Agent SDK integration
100
+ - Message streaming (async generators)
101
+ - Tool use (file_read, file_write, git commands)
102
+ - Tool approval flow
103
+
104
+ **Status:** Done
105
+
106
+ **Latest Work (260315):**
107
+ - File attachments in chat
108
+ - Slash command detection (/help, /git, /file)
109
+ - Usage badge (token tracking)
110
+ - Session management (save/load)
111
+
112
+ ---
113
+
114
+ ### Phase 8: CLI Commands ✅ Complete
115
+ - `ppm start` — Start server (foreground/daemon)
116
+ - `ppm stop` — Graceful shutdown
117
+ - `ppm open` — Launch browser
118
+ - `ppm init` — Initialize config
119
+ - `ppm projects {add,remove,list}` — Project management
120
+ - `ppm config {get,set}` — Configuration
121
+ - `ppm git {status,commit,branch}` — Git operations
122
+ - `ppm chat {send,sessions,delete}` — Chat CLI
123
+
124
+ **Status:** Done
125
+
126
+ ---
127
+
128
+ ### Phase 9: PWA & Build ✅ Complete
129
+ - Vite build configuration
130
+ - Service worker (vite-plugin-pwa)
131
+ - Offline support (cached assets)
132
+ - Manifest.json (installable)
133
+ - Binary compilation (`bun build --compile`)
134
+
135
+ **Status:** Done
136
+
137
+ ---
138
+
139
+ ### Phase 10: Testing ✅ In Progress (60%)
140
+
141
+ #### Unit Tests (40% complete)
142
+ - [x] Mock provider tests
143
+ - [x] ChatService tests
144
+ - [ ] FileService tests
145
+ - [ ] GitService tests
146
+ - [x] Zustand store tests
147
+
148
+ #### Integration Tests (30% complete)
149
+ - [x] Claude Agent SDK integration
150
+ - [x] Chat WebSocket flow
151
+ - [ ] Terminal WebSocket flow
152
+ - [ ] Git operations
153
+ - [ ] File operations
154
+
155
+ #### E2E Tests (0% — Planned for v3)
156
+
157
+ **Status:** Partial, needs completion
158
+
159
+ ---
160
+
161
+ ## Known Issues & Gaps (v2)
162
+
163
+ ### Critical (Blocking)
164
+ 1. **Terminal on Windows** — Node-pty complexity; Bun PTY may not work
165
+ - Mitigation: Document Linux/macOS support, add Windows detection
166
+ - Fix: Evaluate node-pty or WSL fallback
167
+
168
+ 2. **Chat streaming cancellation** — Cancel button partially working
169
+ - Issue: Async generator hard to interrupt mid-stream
170
+ - Fix: Implement CancellationToken pattern
171
+
172
+ ### High Priority (Should Fix)
173
+ 3. **File path encoding** — Unicode filenames may break
174
+ - Fix: Validate UTF-8, handle encoding edge cases
175
+
176
+ 4. **Large file handling** — No streaming for large files (>10MB)
177
+ - Fix: Chunk file reads, show progress bar
178
+
179
+ 5. **Git performance** — `git log --graph` slow on large repos
180
+ - Fix: Limit graph depth, add pagination
181
+
182
+ ### Medium Priority (Nice to Have)
183
+ 6. **Dark mode OLED** — No true black background
184
+ - Fix: Add separate OLED mode in settings
185
+
186
+ 7. **Keyboard shortcuts** — Limited shortcuts defined
187
+ - Fix: Add Cmd+K, Cmd+P (file search), Cmd+/ (comment)
188
+
189
+ 8. **Session persistence** — Chat history lost on server restart
190
+ - Fix: Persist sessions to filesystem or localStorage with IndexedDB
191
+
192
+ 9. **Collaborative editing** — No multi-user support
193
+ - Status: Planned for v3
194
+
195
+ 10. **Mobile terminal** — Terminal hard to use on small screens
196
+ - Fix: Optimize touch input, add virtual keyboard
197
+
198
+ ---
199
+
200
+ ## v2.0 Checklist
201
+
202
+ - [x] Project-scoped API refactor
203
+ - [x] Per-project chat sessions
204
+ - [x] Per-project git operations
205
+ - [x] Multi-tab UI with state persistence
206
+ - [x] File attachments in chat
207
+ - [x] Mobile responsive improvements
208
+ - [x] URL sync for bookmarking/sharing
209
+ - [ ] Complete test coverage (60% complete)
210
+ - [ ] Documentation (in progress)
211
+ - [ ] Security audit (planned)
212
+
213
+ **Target Release:** March 31, 2026
214
+
215
+ ---
216
+
217
+ ## Upcoming Features (v3.0)
218
+
219
+ ### Collaborative Editing (High Priority)
220
+ - Real-time multi-user file editing
221
+ - Cursor synchronization via WebSocket
222
+ - Conflict resolution (OT or CRDT)
223
+ - User presence indicators
224
+
225
+ **Estimated Effort:** 3 weeks
226
+ **Dependencies:** CRDT library (yjs or automerge)
227
+
228
+ ---
229
+
230
+ ### Custom Tool Registry
231
+ - Allow users to define custom AI tools (shell scripts, HTTP endpoints)
232
+ - Tool UI generator based on JSON schema
233
+ - Rate limiting and sandboxing
234
+
235
+ **Estimated Effort:** 2 weeks
236
+ **Dependencies:** JSON Schema library
237
+
238
+ ---
239
+
240
+ ### Plugin Architecture
241
+ - Load custom providers from npm or local plugins
242
+ - Provider discovery and versioning
243
+ - Hot-reload support
244
+
245
+ **Estimated Effort:** 2 weeks
246
+ **Dependencies:** Plugin loader (Rollup, Module Federation)
247
+
248
+ ---
249
+
250
+ ### Performance Profiling UI
251
+ - Flamegraph viewer for CPU profiling
252
+ - Memory allocation tracking
253
+ - Network waterfall visualization
254
+
255
+ **Estimated Effort:** 1 week
256
+ **Dependencies:** Profiling library (speedscope, Clinic.js)
257
+
258
+ ---
259
+
260
+ ### Advanced Git Features
261
+ - Interactive rebase UI
262
+ - Cherry-pick/squash support
263
+ - Stash management
264
+ - Rebase conflict resolution
265
+ - Submodule support
266
+
267
+ **Estimated Effort:** 2 weeks
268
+ **Dependencies:** Existing simple-git wrapper
269
+
270
+ ---
271
+
272
+ ### Cross-Platform Distribution (Planned)
273
+ - Compile platform-specific binaries via `bun build --compile` (macOS, Linux, Windows)
274
+ - Publish npm package with wrapper script that auto-detects platform and downloads correct binary
275
+ - Enables `npx ppm init` without requiring Bun on the target machine
276
+ - CI/CD pipeline for automated multi-platform builds on release
277
+
278
+ **Estimated Effort:** 1 week
279
+ **Dependencies:** CI/CD (GitHub Actions), npm publish pipeline
280
+
281
+ ---
282
+
283
+ ### Cloud Sync (Future)
284
+ - Optional cloud backup of chat sessions
285
+ - Cross-device session sync
286
+ - Settings synchronization
287
+
288
+ **Estimated Effort:** 3 weeks
289
+ **Dependencies:** Cloud storage API (AWS S3, Dropbox)
290
+ **Note:** Single-machine only in v2; this would be v4+
291
+
292
+ ---
293
+
294
+ ## Technical Debt
295
+
296
+ | Item | Priority | Effort | Notes |
297
+ |------|----------|--------|-------|
298
+ | Simplify ChatService streaming | Medium | 1d | Reduce async generator complexity |
299
+ | Extract WebSocket common logic | Low | 1d | DRY principle for chat/terminal WS |
300
+ | Improve error messages | Medium | 2d | More actionable error text |
301
+ | Add request logging | Low | 0.5d | Debugging aid |
302
+ | Refactor FileService validation | Low | 1d | Centralize path checks |
303
+ | Remove unused provider fallbacks | Low | 0.5d | Clean up mock/claude-cli code |
304
+
305
+ ---
306
+
307
+ ## Testing Coverage Targets
308
+
309
+ | Area | Current | Target v2 | Target v3 |
310
+ |------|---------|-----------|-----------|
311
+ | **Services** | 60% | 90% | 95% |
312
+ | **Routes** | 40% | 80% | 95% |
313
+ | **Hooks** | 30% | 70% | 90% |
314
+ | **Components** | 10% | 50% | 80% |
315
+ | **Overall** | 35% | 75% | 90% |
316
+
317
+ ---
318
+
319
+ ## Community & Contribution Roadmap
320
+
321
+ ### v2 (Current)
322
+ - [ ] GitHub issue templates
323
+ - [ ] Contribution guidelines (CONTRIBUTING.md)
324
+ - [ ] Developer setup guide
325
+ - [ ] Automated CI/CD (GitHub Actions)
326
+
327
+ ### v3
328
+ - [ ] Plugin development guide
329
+ - [ ] API documentation (OpenAPI/Swagger)
330
+ - [ ] Example plugins repository
331
+ - [ ] Community provider registry
332
+
333
+ ---
334
+
335
+ ## Release Schedule (Target Dates)
336
+
337
+ | Version | Status | Features | Target Date |
338
+ |---------|--------|----------|-------------|
339
+ | **v1.0** | Released | Single project, basic chat, terminal | Feb 28, 2025 |
340
+ | **v2.0** | In Progress | Multi-project, project-scoped API, improved UX | Mar 31, 2026 |
341
+ | **v2.1** | Planned | Bug fixes, performance improvements | Apr 15, 2026 |
342
+ | **v3.0** | Planned | Collaborative editing, custom tools, plugins | Jun 30, 2026 |
343
+ | **v4.0** | Planned | Cloud sync, advanced git, profiling UI | Sep 30, 2026 |
344
+
345
+ ---
346
+
347
+ ## Success Metrics
348
+
349
+ ### Adoption (By v2 Release)
350
+ - 10+ active users (internal + early adopters)
351
+ - 100+ GitHub stars
352
+ - 50+ questions/issues on GitHub
353
+
354
+ ### Performance
355
+ - Server startup: <500ms
356
+ - API response: <200ms (50th percentile)
357
+ - WebSocket latency: <50ms
358
+ - Frontend bundle: <800KB gzipped
359
+
360
+ ### Quality
361
+ - Test coverage: >75%
362
+ - Security vulnerabilities: 0
363
+ - Critical bugs in v2: <3
364
+
365
+ ### Developer Experience
366
+ - Time to first commit: <30 minutes
367
+ - Documentation completeness: 90%
368
+ - Contribution acceptance rate: >80%
369
+
370
+ ---
371
+
372
+ ## Dependencies to Monitor
373
+
374
+ | Dependency | Version | Risk | Monitoring |
375
+ |-----------|---------|------|-----------|
376
+ | Bun | 1.3.6+ | Medium | Check security advisories weekly |
377
+ | Claude Agent SDK | 0.2.76 | Low | Follow Anthropic releases |
378
+ | React | 19.2.4 | Low | Monitor for breaking changes |
379
+ | TypeScript | 5.9.3 | Low | Plan upgrades quarterly |
380
+ | xterm.js | 6.0 | Low | Check for terminal rendering bugs |
381
+
382
+ ---
383
+
384
+ ## Q&A
385
+
386
+ **Q: Why no cloud sync in v2?**
387
+ A: Complexity & scope. Single-machine focus allows faster iteration. Cloud features are v4+ when user base justifies.
388
+
389
+ **Q: When will Windows be fully supported?**
390
+ A: Investigating Bun PTY behavior. Windows support likely in v3 pending testing.
391
+
392
+ **Q: Can I self-host on a server?**
393
+ A: Yes, but no user isolation. Each user would need their own instance. Multi-user hosting planned for v4.
394
+
395
+ **Q: Will there be mobile apps (iOS/Android)?**
396
+ A: Web PWA first (installed on home screen). Native apps only if there's strong demand.
397
+
398
+ **Q: How do I contribute?**
399
+ A: v2 first focuses on internal stability. Contribution guidelines coming in v2.1. For now, open issues for bugs/features.
400
+