-
Notifications
You must be signed in to change notification settings - Fork 39
Add multi-instance command station with org mode task tracking and workspace integration #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add multi-instance command station with org mode task tracking and workspace integration #54
Conversation
claude-code.el
Outdated
| (when claude-code-enable-notifications | ||
| (funcall claude-code-notification-function | ||
| "Claude Ready" | ||
| "Claude Reay" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
|
I haven't had a chance to try this yet, but this looks amazing and useful. I will try this out and give more detailed feedback in a few days. Here are some initial thoughts. I've only looked things over quickly, so I apologize if some of these things don't make sense. I'm trying to have claude-code.el use built-in features where practical. For example, I use the built-in project.el over projectile. Given that, is it possible to use tab-bar-mode instead of perspective.el? If not, optional dependencies (as you have done) are ok. Using hooks for notifications is a great idea, and something I've been meaning to add. So it might be possible to pull out your hooks and notifications work out into a separate PR. I think there will be lots of use cases for hooks and notifications. |
|
@stevemolitor (oops was writing as you were writing) one intention with this PR at the moment is also to think about overall architecture of this. I'm using this in my workflow and it's useful but not yet achieving the multi tasking flow I'm looking for -- Maybe it's missing some queue cycling layer, where e.g. if I have multiple Claude waiting for response, responding to one automatically pops me to the next in the queue. The taskmaster.org machinery I added here would make that straightforward as long as I can capture user replies happening. Or can use some shortcut to proceed without capturing. (Also tbc this is largely vibe coded right now, I will make a closer pass before marking it as not a draft.) |
|
I checked out this PR and tried it out. This isn't a code review because I understand you're looking for higher level feedback and are still working out the ideal flow. First of all, I love the concept. I think you're on to something useful. I really like the idea of a persistent, global claude notifications queue. I also like that it uses org, because I like org! I don't use perspective, and did not test the perspective.el integration. As I mentioned above, I prefer using built-in facilities where practical. But I am curious about how you use perspective.el in your claude code workflow. I think the built-in tab-bar-mode is roughly equivalent, but I haven't really explored either yet. I do use I appreciate that you made the perspective.el dependency optional. I'd remove the "Go to workspace" and "Clear and go to workspace" actions if perspective mode is not running. But I'd still want a generic "Clear" action. I'm still wondering if perspective integration is needed at all though. Since there could be different workflows and approaches, I'd start with a PR that provides some basic claude code hooks integration, something along these lines:
That could unleash a lot of creativity for claude-code.el users. I'm curious to see what users will come with. I'd then build your queue and workflow on top of that. I love the idea of putting the queue in an org file! I'd consider adding org categories or tags to indicate the directory (and/or project?) name. Then you could use org-agenda to create filtered agenda views by project, 'TODO' vs 'DONE', etc. Personally, I probably would use agendas and wouldn't use What I'd really love is to be able to invoke hot-key actions in an agenda view to jump to the claude buffer from a queue item, etc. Finally, and I wouldn't worry about this yet, I'm slowly implementing IDE integration including custom diff views to accept diffs. It'd be interesting option to include a proposed change diff notification in your queue, collapsed under the org heading in a src block, and an action to accept or reject the same. So many possibilities! I'd start with the foundation first and build on that. This is super cool! |
|
Thanks for the comments! The main way I'm using workspaces here is that in my workflow I typically have my projects organized in different workspaces, with a claude instance for each one (along with some files open, vterm, etc.). The perspective integration lets me jump to that whole workspace segup instead of a particular buffer. Also by jumping to workspaces I don't mess up my arrangement of buffers. I will investigate if this can be done with tab-bar mode, or maybe it can be set up to work with either. (I don't understand the space of workspace management solutions well, I'm just using the doom defaults for tab / workspace mangement.)
I like this, yes! :) Also like the idea of putting more information from the buffer in there too, e.g. the diff
I like that, yeah. Currently, I'm getting a lot of mileage out of the C-c c w and C-c c [,] commands I set up to cycle through the waiting responses from claude. I agree regarding the smaller PR for the claude code hook integration, will start there. :) |
Sounds great thanks! |
|
PR here: #70 |
This commit adds comprehensive hook integration between Claude Code CLI and Emacs: - Add claude-code-hook variable and claude-code-handle-hook function to receive hook events from CLI - Set CLAUDE_BUFFER_NAME environment variable in terminal processes for hook context - Pass through JSON data from Claude Code CLI stdin to Emacs hook handlers via temporary files - Update README with detailed hooks documentation and configuration examples - Add examples/hooks/ directory with hook handler examples and CLI settings template - Support for notification, stop, pre-tool-use, and post-tool-use hook types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace temp file approach with direct JSON passing via emacsclient args - Rename claude-code-hook to claude-code-event-hook for clarity - Remove /opt/homebrew/bin prefix from examples for broader compatibility - Update all hook configurations to use new streamlined approach - Add examples link to README and improve documentation clarity - Update hook handler to use server-eval-args-left for JSON data 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add claude-code-event-hook system for unified event handling - Implement claude-code-org-notifications.el for persistent task tracking - Add smart notification system with queue management and workspace integration - Support auto-advance queue mode for streamlined task processing - Include perspective.el integration for workspace navigation - Add comprehensive documentation for hooks and notification features 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
98609d2 to
ac987ad
Compare
Summary
Adds a command station for managing multiple Claude instances across projects with org mode task tracking and workspace navigation.
Note: Still experimenting with the best way to structure this workflow, opening as draft to gather feedback.
Features
Multi-Instance Command Station
~/.claude/taskmaster.org) tracks all Claude activities across projectsoverriding-local-mapNotificationandStopevent hooksNew Commands
claude-code-goto-recent-workspace(C-c c w) - Navigate to most recent workspace with Claude activityclaude-code-goto-recent-workspace-and-clear(C-c c W) - Navigate and mark org entry as doneclaude-code-setup-hooks- Configure notification hooks for multi-instance trackingTechnical Implementation
claude-code-org-notifications.elpersp-buffersEnvironment Variable Integration
CLAUDE_BUFFER_NAMEenvironment variable to shell sessions*claude:/path/to/project:default*) via$CLAUDE_BUFFER_NAMEInstallation
The notification system is loaded automatically via
claude-code.el. To enable org mode notifications:Optional dependency: perspective.el for workspace features
Use Case
Track and navigate between multiple Claude instances running in different project directories from a single command station, with persistent task logging and quick workspace switching.
Test Plan
claude-code-setup-hooksand verify~/.claude/settings.jsonis created with notification hooks~/.claude/taskmaster.orgC-c c wcommand navigates to most recent workspaceC-c c Wcommand navigates and clears org entry🤖 Generated with Claude Code