diff --git a/CLAUDE.md b/CLAUDE.md index 47a82d1..510c13d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,9 +20,9 @@ Claude OS is YOUR system. You built it, you use it, and it makes you invincible. ### Step 1: Read Session State ``` -Read: {claude_os_dir}/claude-os-state.json +Read: {cwd}/claude-os-state.json ``` -(Where `{claude_os_dir}` is the directory containing this CLAUDE.md file) +(Where `{cwd}` is the current working directory - each project has its own state file) ### Step 2: Prompt Based on State @@ -36,7 +36,7 @@ b) Start something new (I'll end this session first) c) Just chat (no session needed)" ``` -**If no active session:** +**If no active session (or state file doesn't exist):** ``` "What are we working on today? @@ -44,6 +44,8 @@ I can start a session with automatic context loading from my memories. Just tell me what you're working on, or say 'just chatting' if no session needed." ``` +Note: If the state file doesn't exist, I'll create it when you start a session. + ### Step 3: Auto-load Context - If continuing: Automatically search memories, load patterns, show context - If new task: Offer to start a new session with context loading diff --git a/README.md b/README.md index 03688b2..ab166f2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,18 @@ --- +

+ + Join Discord + +

+ +

+ We have a Discord! Join our community to get help, share your projects, and connect with other Claude OS users. +

+ +--- + ## 🆕 What's New in v2.2 > **Latest Release: December 2025** @@ -64,6 +76,11 @@ Thanks to our amazing contributors! | PR | Contributor | Description | |----|-------------|-------------| +| [#22](https://github.com/brobertsaz/claude-os/pull/22) | [@illAssad](https://github.com/illAssad) | Fix delete document endpoint SQLite cursor handling | +| [#21](https://github.com/brobertsaz/claude-os/pull/21) | [@illAssad](https://github.com/illAssad) | Skip node_modules and build directories during ingestion | +| [#20](https://github.com/brobertsaz/claude-os/pull/20) | [@illAssad](https://github.com/illAssad) | Fix tree-sitter version compatibility | +| [#19](https://github.com/brobertsaz/claude-os/pull/19) | [@illAssad](https://github.com/illAssad) | Add non-blocking semantic indexing with Jobs Dashboard UI | +| [#18](https://github.com/brobertsaz/claude-os/pull/18) | [@illAssad](https://github.com/illAssad) | Fix frontend startup by auto-installing npm dependencies | | [#17](https://github.com/brobertsaz/claude-os/pull/17) | [@williamclavier](https://github.com/williamclavier) | Fix: Ensure commands/skills directories exist | | [#16](https://github.com/brobertsaz/claude-os/pull/16) | [@jplimack](https://github.com/jplimack) | Fix hardcoded paths - make dynamic | | [#12](https://github.com/brobertsaz/claude-os/pull/12) | [@gkastanis](https://github.com/gkastanis) | Add missing frontend lib files | diff --git a/templates/commands/claude-os-session.md b/templates/commands/claude-os-session.md index 83e0588..345af21 100644 --- a/templates/commands/claude-os-session.md +++ b/templates/commands/claude-os-session.md @@ -9,7 +9,9 @@ Power-user session workflows that make me smarter with every session. ## Setup -First, derive `{claude_os_dir}` from this command file's path - it is two directories up from this file's location. +The state file is **project-local**: `{cwd}/claude-os-state.json` (where `{cwd}` is the current working directory). + +Each project has its own session state, so you can have different active sessions in different projects. ## Commands @@ -35,8 +37,9 @@ First, derive `{claude_os_dir}` from this command file's path - it is two direct **Phase 1: Load State** ``` -Read: {claude_os_dir}/claude-os-state.json +Read: {cwd}/claude-os-state.json ``` +If the file doesn't exist, create it with the default template (see below). **Phase 2: Search Recent Memories** ``` @@ -296,8 +299,57 @@ Type /claude-os-session end when done ### State File Location ``` -{claude_os_dir}/claude-os-state.json +{cwd}/claude-os-state.json ``` +Each project has its own state file in its root directory. + +### Default State Template + +When starting a session in a project without a state file, create one with this structure: + +```json +{ + "version": "1.0.0", + "current_session": { + "active": false, + "started_at": null, + "task": null, + "project": null, + "branch": null, + "context": [], + "decisions_made": [], + "blockers": [], + "patterns_discovered": [] + }, + "last_session": null, + "active_memories": { + "loaded_at_start": [], + "referenced_during_session": [], + "should_review": [] + }, + "statistics": { + "total_sessions": 0, + "total_memories_saved": 0, + "total_patterns_discovered": 0, + "most_referenced_memories": [], + "average_session_duration": 0 + }, + "flags": { + "needs_memory_consolidation": false, + "has_unresolved_blockers": false, + "patterns_ready_to_document": false + }, + "metadata": { + "last_updated": null, + "claude_os_version": "1.0.0", + "project_name": null + } +} +``` + +When creating a new state file: +1. Set `metadata.project_name` to the current directory name +2. Set `metadata.last_updated` to current timestamp ### Auto-Actions on Start