mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
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:
@@ -55,7 +55,7 @@ Orchestrates autonomous workflow execution through systematic task discovery, ag
|
||||
**Applies to**: Normal mode only (skipped in resume mode)
|
||||
|
||||
**Process**:
|
||||
1. **Check Active Sessions**: Find sessions in `.workflow/sessions/` directory
|
||||
1. **Check Active Sessions**: Find sessions in `.workflow/active/` directory
|
||||
2. **Select Session**: If multiple found, prompt user selection
|
||||
3. **Load Session Metadata**: Read `workflow-session.json` ONLY (minimal context)
|
||||
4. **DO NOT read task JSONs yet** - defer until execution phase
|
||||
@@ -92,7 +92,7 @@ Orchestrates autonomous workflow execution through systematic task discovery, ag
|
||||
4. **Validate Prerequisites**: Ensure IMPL_PLAN.md and TODO_LIST.md exist and are valid
|
||||
|
||||
**Resume Mode Behavior**:
|
||||
- Load existing TODO_LIST.md directly from `.workflow/sessions//{session-id}/`
|
||||
- Load existing TODO_LIST.md directly from `.workflow/active//{session-id}/`
|
||||
- Extract current progress from TODO_LIST.md
|
||||
- Generate TodoWrite from TODO_LIST.md state
|
||||
- Proceed immediately to agent execution (Phase 4)
|
||||
@@ -322,11 +322,11 @@ TodoWrite({
|
||||
}
|
||||
},
|
||||
"session": {
|
||||
"workflow_dir": ".workflow/sessions/WFS-session/",
|
||||
"context_package_path": ".workflow/sessions/WFS-session/.process/context-package.json",
|
||||
"todo_list_path": ".workflow/sessions/WFS-session/TODO_LIST.md",
|
||||
"summaries_dir": ".workflow/sessions/WFS-session/.summaries/",
|
||||
"task_json_path": ".workflow/sessions/WFS-session/.task/IMPL-1.1.json"
|
||||
"workflow_dir": ".workflow/active/WFS-session/",
|
||||
"context_package_path": ".workflow/active/WFS-session/.process/context-package.json",
|
||||
"todo_list_path": ".workflow/active/WFS-session/TODO_LIST.md",
|
||||
"summaries_dir": ".workflow/active/WFS-session/.summaries/",
|
||||
"task_json_path": ".workflow/active/WFS-session/.task/IMPL-1.1.json"
|
||||
},
|
||||
"dependencies": [ /* Task summaries from depends_on */ ],
|
||||
"inherited": { /* Parent task context */ }
|
||||
@@ -452,7 +452,7 @@ Task(subagent_type="{meta.agent}",
|
||||
"step": "load_synthesis_specification",
|
||||
"action": "Load synthesis specification from context-package.json",
|
||||
"commands": [
|
||||
"Read(.workflow/sessions/WFS-[session]/.process/context-package.json)",
|
||||
"Read(.workflow/active/WFS-[session]/.process/context-package.json)",
|
||||
"Extract(brainstorm_artifacts.synthesis_output.path)",
|
||||
"Read(extracted path)"
|
||||
],
|
||||
@@ -514,7 +514,7 @@ meta.agent missing → Infer from meta.type:
|
||||
|
||||
## Workflow File Structure Reference
|
||||
```
|
||||
.workflow/sessions/WFS-[topic-slug]/
|
||||
.workflow/active/WFS-[topic-slug]/
|
||||
├── workflow-session.json # Session state and metadata
|
||||
├── IMPL_PLAN.md # Planning document and requirements
|
||||
├── TODO_LIST.md # Progress tracking (auto-updated)
|
||||
@@ -536,8 +536,8 @@ meta.agent missing → Infer from meta.type:
|
||||
| Error Type | Cause | Recovery Strategy | Max Attempts |
|
||||
|-----------|-------|------------------|--------------|
|
||||
| **Discovery Errors** |
|
||||
| No active session | No sessions in `.workflow/sessions/` | Create or resume session: `/workflow:plan "project"` | N/A |
|
||||
| Multiple sessions | Multiple sessions in `.workflow/sessions/` | Prompt user selection | N/A |
|
||||
| No active session | No sessions in `.workflow/active/` | Create or resume session: `/workflow:plan "project"` | N/A |
|
||||
| Multiple sessions | Multiple sessions in `.workflow/active/` | Prompt user selection | N/A |
|
||||
| Corrupted session | Invalid JSON files | Recreate session structure or validate files | N/A |
|
||||
| **Execution Errors** |
|
||||
| Agent failure | Agent crash/timeout | Retry with simplified context | 2 |
|
||||
@@ -557,7 +557,7 @@ meta.agent missing → Infer from meta.type:
|
||||
**Session Recovery**:
|
||||
```bash
|
||||
# Check session integrity
|
||||
find .workflow/sessions/ -name "WFS-*" -type d | while read session_dir; do
|
||||
find .workflow/active/ -name "WFS-*" -type d | while read session_dir; do
|
||||
session=$(basename "$session_dir")
|
||||
[ ! -f "$session_dir/workflow-session.json" ] && \
|
||||
echo '{"session_id":"'$session'","status":"active"}' > "$session_dir/workflow-session.json"
|
||||
@@ -567,13 +567,13 @@ done
|
||||
**Task Recovery**:
|
||||
```bash
|
||||
# Validate task JSON integrity
|
||||
for task_file in .workflow/sessions/$session/.task/*.json; do
|
||||
for task_file in .workflow/active/$session/.task/*.json; do
|
||||
jq empty "$task_file" 2>/dev/null || echo "Corrupted: $task_file"
|
||||
done
|
||||
|
||||
# Fix missing dependencies
|
||||
missing_deps=$(jq -r '.context.depends_on[]?' .workflow/sessions/$session/.task/*.json | sort -u)
|
||||
missing_deps=$(jq -r '.context.depends_on[]?' .workflow/active/$session/.task/*.json | sort -u)
|
||||
for dep in $missing_deps; do
|
||||
[ ! -f ".workflow/sessions/$session/.task/$dep.json" ] && echo "Missing dependency: $dep"
|
||||
[ ! -f ".workflow/active/$session/.task/$dep.json" ] && echo "Missing dependency: $dep"
|
||||
done
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user