Refactor workflow file paths from .workflow/sessions/ to .workflow/active/ for improved session management and consistency across commands. Updated documentation and command references to reflect the new directory structure, ensuring all relevant commands and outputs are correctly aligned with the active session model.

This commit is contained in:
catlog22
2025-11-20 09:40:58 +08:00
parent 9f322e0f34
commit c3818fdb79
104 changed files with 682 additions and 682 deletions

View File

@@ -51,12 +51,12 @@ SlashCommand({command: "/workflow:init"});
### Step 1: List Active Sessions
```bash
bash(ls -1 .workflow/sessions/ 2>/dev/null | head -5)
bash(ls -1 .workflow/active/ 2>/dev/null | head -5)
```
### Step 2: Display Session Metadata
```bash
bash(cat .workflow/sessions/WFS-promptmaster-platform/workflow-session.json)
bash(cat .workflow/active/WFS-promptmaster-platform/workflow-session.json)
```
### Step 4: User Decision
@@ -73,7 +73,7 @@ Present session information and wait for user to select or create session.
### Step 1: Check Active Sessions Count
```bash
bash(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | wc -l)
bash(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | wc -l)
```
### Step 2a: No Active Sessions → Create New
@@ -82,12 +82,12 @@ bash(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | wc -l)
bash(echo "implement OAuth2 auth" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-50)
# Create directory structure
bash(mkdir -p .workflow/sessions/WFS-implement-oauth2-auth/.process)
bash(mkdir -p .workflow/sessions/WFS-implement-oauth2-auth/.task)
bash(mkdir -p .workflow/sessions/WFS-implement-oauth2-auth/.summaries)
bash(mkdir -p .workflow/active/WFS-implement-oauth2-auth/.process)
bash(mkdir -p .workflow/active/WFS-implement-oauth2-auth/.task)
bash(mkdir -p .workflow/active/WFS-implement-oauth2-auth/.summaries)
# Create metadata
bash(echo '{"session_id":"WFS-implement-oauth2-auth","project":"implement OAuth2 auth","status":"planning"}' > .workflow/sessions/WFS-implement-oauth2-auth/workflow-session.json)
bash(echo '{"session_id":"WFS-implement-oauth2-auth","project":"implement OAuth2 auth","status":"planning"}' > .workflow/active/WFS-implement-oauth2-auth/workflow-session.json)
```
**Output**: `SESSION_ID: WFS-implement-oauth2-auth`
@@ -95,10 +95,10 @@ bash(echo '{"session_id":"WFS-implement-oauth2-auth","project":"implement OAuth2
### Step 2b: Single Active Session → Check Relevance
```bash
# Extract session ID
bash(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1 | xargs basename)
bash(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1 | xargs basename)
# Read project name from metadata
bash(cat .workflow/sessions/WFS-promptmaster-platform/workflow-session.json | grep -o '"project":"[^"]*"' | cut -d'"' -f4)
bash(cat .workflow/active/WFS-promptmaster-platform/workflow-session.json | grep -o '"project":"[^"]*"' | cut -d'"' -f4)
# Check keyword match (manual comparison)
# If task contains project keywords → Reuse session
@@ -111,7 +111,7 @@ bash(cat .workflow/sessions/WFS-promptmaster-platform/workflow-session.json | gr
### Step 2c: Multiple Active Sessions → Use First
```bash
# Get first active session
bash(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1 | xargs basename)
bash(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1 | xargs basename)
# Output warning and session ID
# WARNING: Multiple active sessions detected
@@ -131,19 +131,19 @@ bash(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1 | xarg
bash(echo "fix login bug" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-50)
# Check if exists, add counter if needed
bash(ls .workflow/sessions/WFS-fix-login-bug 2>/dev/null && echo "WFS-fix-login-bug-2" || echo "WFS-fix-login-bug")
bash(ls .workflow/active/WFS-fix-login-bug 2>/dev/null && echo "WFS-fix-login-bug-2" || echo "WFS-fix-login-bug")
```
### Step 2: Create Session Structure
```bash
bash(mkdir -p .workflow/sessions/WFS-fix-login-bug/.process)
bash(mkdir -p .workflow/sessions/WFS-fix-login-bug/.task)
bash(mkdir -p .workflow/sessions/WFS-fix-login-bug/.summaries)
bash(mkdir -p .workflow/active/WFS-fix-login-bug/.process)
bash(mkdir -p .workflow/active/WFS-fix-login-bug/.task)
bash(mkdir -p .workflow/active/WFS-fix-login-bug/.summaries)
```
### Step 3: Create Metadata
```bash
bash(echo '{"session_id":"WFS-fix-login-bug","project":"fix login bug","status":"planning"}' > .workflow/sessions/WFS-fix-login-bug/workflow-session.json)
bash(echo '{"session_id":"WFS-fix-login-bug","project":"fix login bug","status":"planning"}' > .workflow/active/WFS-fix-login-bug/workflow-session.json)
```
**Output**: `SESSION_ID: WFS-fix-login-bug`