tmux_command = f"claude-code --file {temp_path}"tags = get_document_tags(doc_id)
if 'π―' in tags: # Gameplan
tmux_command = f"claude-code --execute-plan {temp_path}"
elif 'π' in tags: # Analysis
tmux_command = f"claude-code --analyze {temp_path}"
elif 'π§ͺ' in tags: # Test
tmux_command = f"pytest && cat {temp_path}"tmux_command = f"""
echo 'Document: {doc['title']}'
echo ''
echo '1) Execute with Claude'
echo '2) Edit in vim'
echo '3) Convert to GitHub issue'
echo '4) Create todo list'
echo ''
read -p 'Choice: ' choice
case $choice in
1) claude-code --file {temp_path} ;;
2) vim {temp_path} ;;
3) gh issue create --title "{doc['title']}" --body-file {temp_path} ;;
4) emdx todo --from {temp_path} ;;
esac
"""project = doc.get('project')
if project == 'emdx':
tmux_command = f"cd ~/dev/emdx && poetry shell && cat {temp_path}"
elif project == 'webapp':
tmux_command = f"cd ~/projects/webapp && npm run dev & cat {temp_path}"if 'π§ͺ' in tags:
subprocess.run(['tmux', 'split-window', '-v', '-p', '30', 'npm test --watch'])You could add more keys for specific workflows:
Binding("c", "tmux_claude", "Claude β", key_display="c"), # Claude in new pane
Binding("x", "tmux_execute", "Execute β", key_display="x"), # Execute plan
Binding("w", "tmux_watch", "Watch β", key_display="w"), # Watch modesubprocess.run(['tmux', 'rename-window', f"π {doc['title'][:20]}"])
session_name = f"emdx-{doc_id}"
tmux_command = f"tmux new-session -d -s {session_name} 'cat {temp_path}'"with tempfile.NamedTemporaryFile(mode='w', suffix='.md', delete=False) as f:
f.write(f"# {doc['title']}
")
f.write(f"## Tags: {', '.join(tags)}
")
f.write(f"## Project: {doc.get('project', 'None')}
")
f.write(f"## Created: {doc['created_at']}
")
f.write("
---
")
f.write(doc['content'])
f.write("
")- Git operations: Auto-create branches named after gameplans
- Docker: Spawn containers based on document specs
- Testing: Run test suites mentioned in documents
- Monitoring: Start watching logs mentioned in analysis
- Communication: Auto-draft emails/PRs from plans
What direction excites you most? Want to implement any of these?