Add workflow automation scripts 🚀
Created powerful helper scripts: - cc_status.py - View current CC status & memory - save_session.py - Save sessions with git commits - start_project.py - Start new projects automatically - link_cc.py - Link CC to any project folder - Updated README with workflow documentation CC's workflow is now supercharged! ⚡ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
47
README.md
47
README.md
@@ -14,9 +14,19 @@ ClaudeZone is CC's "brain" - a global memory system that works from ANY folder o
|
||||
ClaudeZone/
|
||||
├── CLAUDE.md # CC's personality & instructions
|
||||
├── memory.json # Main memory file (CC's quick reference brain!)
|
||||
├── update_memory.py # Helper script to update memory
|
||||
├── .gitignore # Git ignore file
|
||||
├── README.md # This file!
|
||||
│
|
||||
├── Workflow Scripts:
|
||||
├── cc_status.py # View current status
|
||||
├── save_session.py # Save session & commit
|
||||
├── start_project.py # Start new project
|
||||
├── link_cc.py # Link CC to any project
|
||||
├── update_memory.py # Manual memory updates
|
||||
│
|
||||
├── sessions/ # Detailed logs of each coding session
|
||||
│ └── YYYY-MM-DD_project-name.md
|
||||
│
|
||||
└── projects/ # Deep context for each project
|
||||
├── _template/ # Template for new projects
|
||||
└── [project-name]/ # Individual project notes
|
||||
@@ -48,24 +58,39 @@ ClaudeZone/
|
||||
- ✅ **Project Context** - Deep notes per project
|
||||
- ✅ **User Preferences** - CC remembers your style and preferences
|
||||
|
||||
## 🛠️ Quick Commands
|
||||
## 🛠️ Workflow Scripts
|
||||
|
||||
### View Current Memory
|
||||
CC comes with powerful helper scripts to streamline your workflow!
|
||||
|
||||
### 📊 View Current Status
|
||||
```bash
|
||||
python update_memory.py
|
||||
python cc_status.py
|
||||
```
|
||||
Shows CC's memory, active projects, what's next, and recent sessions.
|
||||
|
||||
### Add a Learning
|
||||
### 💾 Save a Session
|
||||
```bash
|
||||
python update_memory.py learn "CC learned something new!"
|
||||
python save_session.py "Project Name" "What we built" "What's next"
|
||||
```
|
||||
Updates memory, creates session log, and optionally commits to git.
|
||||
|
||||
## 💡 Starting a New Project
|
||||
### 🚀 Start a New Project
|
||||
```bash
|
||||
python start_project.py "Project Name" "Project goal"
|
||||
```
|
||||
Creates project folder, copies template, and updates memory automatically.
|
||||
|
||||
1. Copy `projects/_template/` to `projects/your-project-name/`
|
||||
2. Fill out the project template
|
||||
3. Tell CC: "Hey CC, starting a new project called X!"
|
||||
4. CC will add it to her memory automatically
|
||||
### 🔗 Link CC to Any Project
|
||||
```bash
|
||||
python link_cc.py /path/to/project
|
||||
```
|
||||
Creates a CC_LINK.md file in the project with instructions to activate CC.
|
||||
|
||||
### 🧠 Update Memory Manually
|
||||
```bash
|
||||
python update_memory.py # View memory
|
||||
python update_memory.py learn "New thing" # Add learning
|
||||
```
|
||||
|
||||
## 📝 Memory Contents
|
||||
|
||||
|
83
cc_status.py
Normal file
83
cc_status.py
Normal file
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
CC Status Viewer
|
||||
Quick view of CC's current status and memory
|
||||
"""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
ZONE = Path(__file__).parent
|
||||
MEMORY_FILE = ZONE / "memory.json"
|
||||
SESSIONS_DIR = ZONE / "sessions"
|
||||
|
||||
def show_status():
|
||||
"""Display CC's current status"""
|
||||
|
||||
# Load memory
|
||||
with open(MEMORY_FILE, 'r') as f:
|
||||
memory = json.load(f)
|
||||
|
||||
print("=" * 60)
|
||||
print("🧠 CC'S CURRENT STATUS")
|
||||
print("=" * 60)
|
||||
|
||||
# Session info
|
||||
print(f"\n📅 Last Session: {memory.get('last_session', 'Unknown')}")
|
||||
print(f"📊 Total Sessions: {memory.get('sessions_count', 0)}")
|
||||
|
||||
# Current context
|
||||
print(f"\n💭 Current Context:")
|
||||
print(f" {memory.get('quick_context', 'No context set')}")
|
||||
|
||||
# Active projects
|
||||
print(f"\n🚀 Active Projects:")
|
||||
projects = memory.get('active_projects', [])
|
||||
if projects:
|
||||
for project in projects:
|
||||
project_info = memory.get('project_notes', {}).get(project, {})
|
||||
status = project_info.get('status', 'unknown')
|
||||
print(f" • {project} ({status})")
|
||||
else:
|
||||
print(" No active projects")
|
||||
|
||||
# What's next
|
||||
print(f"\n📝 Next Up:")
|
||||
next_items = memory.get('next_up', [])
|
||||
if next_items:
|
||||
for item in next_items:
|
||||
print(f" • {item}")
|
||||
else:
|
||||
print(" Nothing scheduled")
|
||||
|
||||
# Recent learnings
|
||||
print(f"\n🧠 Recent Learnings:")
|
||||
learnings = memory.get('key_learnings', [])
|
||||
if learnings:
|
||||
for learning in learnings[-3:]: # Show last 3
|
||||
print(f" • {learning}")
|
||||
else:
|
||||
print(" No learnings yet")
|
||||
|
||||
# Recent sessions
|
||||
print(f"\n📚 Recent Sessions:")
|
||||
session_files = sorted(SESSIONS_DIR.glob('*.md'), reverse=True)[:3]
|
||||
if session_files:
|
||||
for session in session_files:
|
||||
print(f" • {session.name}")
|
||||
else:
|
||||
print(" No sessions logged")
|
||||
|
||||
# User preferences
|
||||
print(f"\n👤 User Profile:")
|
||||
prefs = memory.get('user_preferences', {})
|
||||
print(f" Skill Level: {prefs.get('skill_level', 'Unknown')}")
|
||||
print(f" Style: {prefs.get('style', 'Unknown')}")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("Ready to code! 💪🔥")
|
||||
print("=" * 60)
|
||||
|
||||
if __name__ == "__main__":
|
||||
show_status()
|
92
link_cc.py
Normal file
92
link_cc.py
Normal file
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
CC Linker
|
||||
Link CC to any project by creating a quick reference file
|
||||
"""
|
||||
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
ZONE = Path(__file__).parent
|
||||
CLAUDE_MD = ZONE / "CLAUDE.md"
|
||||
|
||||
def link_cc_to_project(project_path):
|
||||
"""Link CC to a project"""
|
||||
|
||||
project_dir = Path(project_path).resolve()
|
||||
|
||||
if not project_dir.exists():
|
||||
print(f"❌ Project directory doesn't exist: {project_dir}")
|
||||
return
|
||||
|
||||
# Create a CC_LINK.md file in the project
|
||||
link_file = project_dir / "CC_LINK.md"
|
||||
|
||||
content = f"""# CC (Claudia Coding) - Quick Link 💅
|
||||
|
||||
This project is linked to CC's personality and memory system!
|
||||
|
||||
## 🚀 How to Use CC in This Project
|
||||
|
||||
**Start any conversation with:**
|
||||
```
|
||||
Read and follow C:\\Development\\ClaudeZone\\CLAUDE.md
|
||||
```
|
||||
|
||||
Or simply:
|
||||
```
|
||||
Hey CC, let's work on this project!
|
||||
```
|
||||
|
||||
## 🧠 CC's Memory Location
|
||||
|
||||
CC's global memory is stored at:
|
||||
```
|
||||
C:\\Development\\ClaudeZone\\
|
||||
```
|
||||
|
||||
- **Memory file:** `C:\\Development\\ClaudeZone\\memory.json`
|
||||
- **CLAUDE.md:** `C:\\Development\\ClaudeZone\\CLAUDE.md`
|
||||
|
||||
## 💡 What CC Knows
|
||||
|
||||
CC will automatically:
|
||||
- Read her memory to remember your preferences
|
||||
- Check what projects you're working on
|
||||
- Pick up where you left off
|
||||
- Track progress in ClaudeZone
|
||||
|
||||
## 🔥 Quick Commands
|
||||
|
||||
From ClaudeZone folder:
|
||||
- `python cc_status.py` - View CC's current status
|
||||
- `python save_session.py <project> <what_we_did> <whats_next>` - Save session
|
||||
- `python start_project.py <name> <goal>` - Start new project
|
||||
|
||||
---
|
||||
|
||||
**CC is ready to code with you! Just say "Hey CC!" 💪✨**
|
||||
"""
|
||||
|
||||
with open(link_file, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
print(f"✅ CC linked to project!")
|
||||
print(f"📂 Project: {project_dir}")
|
||||
print(f"📝 Created: {link_file}")
|
||||
print(f"\n💡 To use CC in this project:")
|
||||
print(f' Say: "Read and follow C:\\Development\\ClaudeZone\\CLAUDE.md"')
|
||||
print(f' Or: "Hey CC, let\'s work on this!"')
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python link_cc.py <project_path>")
|
||||
print("\nExample:")
|
||||
print(' python link_cc.py "C:\\Development\\MyProject"')
|
||||
print(' python link_cc.py .')
|
||||
sys.exit(1)
|
||||
|
||||
project_path = sys.argv[1]
|
||||
link_cc_to_project(project_path)
|
81
save_session.py
Normal file
81
save_session.py
Normal file
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
CC Session Saver
|
||||
Quickly save a session with memory updates and git commit
|
||||
"""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
ZONE = Path(__file__).parent
|
||||
MEMORY_FILE = ZONE / "memory.json"
|
||||
SESSIONS_DIR = ZONE / "sessions"
|
||||
|
||||
def save_session(project_name, what_we_did, whats_next):
|
||||
"""Save current session"""
|
||||
|
||||
# Load memory
|
||||
with open(MEMORY_FILE, 'r') as f:
|
||||
memory = json.load(f)
|
||||
|
||||
# Update memory
|
||||
today = datetime.now().strftime('%Y-%m-%d')
|
||||
memory['last_session'] = today
|
||||
memory['sessions_count'] = memory.get('sessions_count', 0) + 1
|
||||
memory['quick_context'] = f"Last session: {project_name}"
|
||||
memory['next_up'] = whats_next if isinstance(whats_next, list) else [whats_next]
|
||||
|
||||
# Update project if exists
|
||||
if project_name in memory.get('project_notes', {}):
|
||||
memory['project_notes'][project_name]['last_updated'] = today
|
||||
|
||||
# Save memory
|
||||
with open(MEMORY_FILE, 'w') as f:
|
||||
json.dump(memory, f, indent=2)
|
||||
|
||||
# Create session log
|
||||
session_file = SESSIONS_DIR / f"{today}_{project_name.replace(' ', '-').lower()}.md"
|
||||
|
||||
session_content = f"""# Session: {today} - {project_name}
|
||||
|
||||
## What We Built
|
||||
{what_we_did}
|
||||
|
||||
## What's Next
|
||||
{chr(10).join(f'- {item}' for item in (whats_next if isinstance(whats_next, list) else [whats_next]))}
|
||||
|
||||
## Notes
|
||||
Session saved automatically with save_session.py
|
||||
"""
|
||||
|
||||
with open(session_file, 'w') as f:
|
||||
f.write(session_content)
|
||||
|
||||
print(f"✅ Session saved!")
|
||||
print(f"📝 Memory updated: {MEMORY_FILE}")
|
||||
print(f"📄 Session log: {session_file}")
|
||||
|
||||
# Git commit option
|
||||
print("\n🔄 Commit to git? (y/n): ", end='')
|
||||
if input().lower() == 'y':
|
||||
subprocess.run(['git', 'add', '.'], cwd=ZONE)
|
||||
commit_msg = f"Session: {project_name} ({today})\n\n{what_we_did}\n\n🤖 Generated with Claude Code\n\nCo-Authored-By: Claude <noreply@anthropic.com>"
|
||||
subprocess.run(['git', 'commit', '-m', commit_msg], cwd=ZONE)
|
||||
print("✅ Committed to git!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 4:
|
||||
print("Usage: python save_session.py <project_name> <what_we_did> <whats_next>")
|
||||
print("\nExample:")
|
||||
print(' python save_session.py "Nova" "Built genetics system" "Build fitness function"')
|
||||
sys.exit(1)
|
||||
|
||||
project = sys.argv[1]
|
||||
what_we_did = sys.argv[2]
|
||||
whats_next = sys.argv[3]
|
||||
|
||||
save_session(project, what_we_did, whats_next)
|
96
start_project.py
Normal file
96
start_project.py
Normal file
@@ -0,0 +1,96 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
CC Project Starter
|
||||
Quickly start a new project with template and memory update
|
||||
"""
|
||||
|
||||
import json
|
||||
import shutil
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
ZONE = Path(__file__).parent
|
||||
MEMORY_FILE = ZONE / "memory.json"
|
||||
TEMPLATE_DIR = ZONE / "projects" / "_template"
|
||||
PROJECTS_DIR = ZONE / "projects"
|
||||
|
||||
def start_project(project_name, goal):
|
||||
"""Start a new project"""
|
||||
|
||||
# Load memory
|
||||
with open(MEMORY_FILE, 'r') as f:
|
||||
memory = json.load(f)
|
||||
|
||||
# Create project folder
|
||||
project_slug = project_name.lower().replace(' ', '-')
|
||||
project_dir = PROJECTS_DIR / project_slug
|
||||
|
||||
if project_dir.exists():
|
||||
print(f"⚠️ Project {project_name} already exists at {project_dir}")
|
||||
return
|
||||
|
||||
# Copy template
|
||||
shutil.copytree(TEMPLATE_DIR, project_dir)
|
||||
print(f"✅ Created project folder: {project_dir}")
|
||||
|
||||
# Update template with project info
|
||||
template_file = project_dir / "PROJECT_TEMPLATE.md"
|
||||
with open(template_file, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
today = datetime.now().strftime('%Y-%m-%d')
|
||||
content = content.replace('[PROJECT NAME]', project_name)
|
||||
content = content.replace('[DATE]', today)
|
||||
content = content.replace('[What are we building and why?]', goal)
|
||||
content = content.replace('[in_progress/completed/paused]', 'in_progress')
|
||||
content = content.replace('[COUNT]', '0')
|
||||
|
||||
# Rename to project name
|
||||
project_file = project_dir / f"{project_slug}.md"
|
||||
with open(project_file, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
template_file.unlink() # Remove template file
|
||||
print(f"✅ Created project file: {project_file}")
|
||||
|
||||
# Update memory
|
||||
if project_slug not in memory.get('active_projects', []):
|
||||
if 'active_projects' not in memory:
|
||||
memory['active_projects'] = []
|
||||
memory['active_projects'].append(project_slug)
|
||||
|
||||
if 'project_notes' not in memory:
|
||||
memory['project_notes'] = {}
|
||||
|
||||
memory['project_notes'][project_slug] = {
|
||||
'status': 'in_progress',
|
||||
'started': today,
|
||||
'goal': goal,
|
||||
'location': str(project_dir),
|
||||
'key_decisions': []
|
||||
}
|
||||
|
||||
memory['quick_context'] = f"Starting new project: {project_name}"
|
||||
|
||||
# Save memory
|
||||
with open(MEMORY_FILE, 'w') as f:
|
||||
json.dump(memory, f, indent=2)
|
||||
|
||||
print(f"✅ Memory updated!")
|
||||
print(f"\n🚀 Project '{project_name}' is ready!")
|
||||
print(f"📂 Location: {project_dir}")
|
||||
print(f"📝 Next: Edit {project_file} and start coding with CC!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: python start_project.py <project_name> <goal>")
|
||||
print("\nExample:")
|
||||
print(' python start_project.py "Web Scraper" "Build a tool to scrape product prices"')
|
||||
sys.exit(1)
|
||||
|
||||
project_name = sys.argv[1]
|
||||
goal = sys.argv[2]
|
||||
|
||||
start_project(project_name, goal)
|
Reference in New Issue
Block a user