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

@@ -5,7 +5,7 @@ Validate technical feasibility and identify implementation risks for proposed so
□ Assess complexity, validate technology choices
□ Evaluate performance and security implications
□ Focus on TECHNICAL FEASIBILITY and RISK ASSESSMENT
□ Write output to specified .workflow/sessions/{session_id}/.process/ path
□ Write output to specified .workflow/active/{session_id}/.process/ path
## PREREQUISITE ANALYSIS
@@ -94,7 +94,7 @@ Review Gemini's proposed code targets:
## OUTPUT REQUIREMENTS
### Output File
**Path**: `.workflow/sessions/{session_id}/.process/codex-feasibility-validation.md`
**Path**: `.workflow/active/{session_id}/.process/codex-feasibility-validation.md`
**Format**: Follow structure from `~/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt`
### Required Sections
@@ -171,6 +171,6 @@ Rate each aspect on 1-5 scale:
□ Risk mitigation strategies provided
□ Resource requirements estimated
□ Final feasibility judgment (PROCEED/RECONSIDER/REJECT)
□ Output written to .workflow/sessions/{session_id}/.process/codex-feasibility-validation.md
□ Output written to .workflow/active/{session_id}/.process/codex-feasibility-validation.md
Focus: Technical feasibility validation with realistic risk assessment and mitigation strategies.

View File

@@ -5,7 +5,7 @@ Analyze and design optimal solution with comprehensive architecture evaluation a
□ Analyze current architecture patterns and code structure
□ Propose solution design with key decisions and rationale
□ Focus on SOLUTION IMPROVEMENTS and KEY DESIGN DECISIONS
□ Write output to specified .workflow/sessions/{session_id}/.process/ path
□ Write output to specified .workflow/active/{session_id}/.process/ path
## ANALYSIS PRIORITY
@@ -73,7 +73,7 @@ For each target:
## OUTPUT REQUIREMENTS
### Output File
**Path**: `.workflow/sessions/{session_id}/.process/gemini-solution-design.md`
**Path**: `.workflow/active/{session_id}/.process/gemini-solution-design.md`
**Format**: Follow structure from `~/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt`
### Required Sections
@@ -126,6 +126,6 @@ If brainstorming artifacts exist:
□ Code targets specified in correct format
□ Feasibility scores provided (X/5)
□ Final recommendation (PROCEED/RECONSIDER/REJECT)
□ Output written to .workflow/sessions/{session_id}/.process/gemini-solution-design.md
□ Output written to .workflow/active/{session_id}/.process/gemini-solution-design.md
Focus: Comprehensive solution design emphasizing architecture decisions and critical insights.

View File

@@ -6,9 +6,9 @@ IMPL_PLAN.md Template - Implementation Plan Document Structure
---
identifier: WFS-{session-id}
source: "User requirements" | "File: path" | "Issue: ISS-001"
analysis: .workflow/sessions//{session-id}/.process/ANALYSIS_RESULTS.md
artifacts: .workflow/sessions//{session-id}/.brainstorming/
context_package: .workflow/sessions//{session-id}/.process/context-package.json # CCW smart context
analysis: .workflow/active//{session-id}/.process/ANALYSIS_RESULTS.md
artifacts: .workflow/active//{session-id}/.brainstorming/
context_package: .workflow/active//{session-id}/.process/context-package.json # CCW smart context
workflow_type: "standard | tdd | design" # Indicates execution model
verification_history: # CCW quality gates
concept_verify: "passed | skipped | pending"

View File

@@ -134,7 +134,7 @@ All task files use this simplified 5-field schema:
### Active Session Detection
```bash
# Check for active session in sessions directory
active_session=$(find .workflow/sessions/ -name 'WFS-*' -type d 2>/dev/null | head -1)
active_session=$(find .workflow/active/ -name 'WFS-*' -type d 2>/dev/null | head -1)
```
### Workflow Context Inheritance
@@ -144,10 +144,10 @@ Tasks inherit from:
3. `IMPL_PLAN.md` - Planning document
### File Locations
- **Task JSON**: `.workflow/sessions/WFS-[topic]/.task/IMPL-*.json` (uppercase required)
- **Session State**: `.workflow/sessions/WFS-[topic]/workflow-session.json`
- **Planning Doc**: `.workflow/sessions/WFS-[topic]/IMPL_PLAN.md`
- **Progress**: `.workflow/sessions/WFS-[topic]/TODO_LIST.md`
- **Task JSON**: `.workflow/active/WFS-[topic]/.task/IMPL-*.json` (uppercase required)
- **Session State**: `.workflow/active/WFS-[topic]/workflow-session.json`
- **Planning Doc**: `.workflow/active/WFS-[topic]/IMPL_PLAN.md`
- **Progress**: `.workflow/active/WFS-[topic]/TODO_LIST.md`
## Agent Mapping

View File

@@ -25,7 +25,7 @@ This document defines the complete workflow system architecture using a **JSON-o
## Session Management
### Directory-Based Session Management
**Simple Location-Based Tracking**: Sessions in `.workflow/sessions/` directory
**Simple Location-Based Tracking**: Sessions in `.workflow/active/` directory
```bash
.workflow/
@@ -47,7 +47,7 @@ This document defines the complete workflow system architecture using a **JSON-o
#### Detect Active Session(s)
```bash
active_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
active_sessions=$(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null)
count=$(echo "$active_sessions" | wc -l)
if [ -z "$active_sessions" ]; then
@@ -67,7 +67,7 @@ fi
#### Archive Session
```bash
mv .workflow/sessions/WFS-feature .workflow/archives/WFS-feature
mv .workflow/active/WFS-feature .workflow/archives/WFS-feature
```
### Session State Tracking
@@ -768,8 +768,8 @@ All workflows use the same file structure definition regardless of complexity. *
4. **One-Off Queries**: Standalone questions or debugging without workflow context
**Output Routing Logic**:
- **IF** active session exists in `.workflow/sessions/` AND command is session-relevant:
- Save to `.workflow/sessions/WFS-[id]/.chat/[command]-[timestamp].md`
- **IF** active session exists in `.workflow/active/` AND command is session-relevant:
- Save to `.workflow/active/WFS-[id]/.chat/[command]-[timestamp].md`
- **ELSE** (no session OR one-off analysis):
- Save to `.workflow/.scratchpad/[command]-[description]-[timestamp].md`
@@ -839,10 +839,10 @@ All workflows use the same file structure definition regardless of complexity. *
### Session Management
```bash
# Create minimal required structure
mkdir -p .workflow/sessions/WFS-topic-slug/.task
echo '{"session_id":"WFS-topic-slug",...}' > .workflow/sessions/WFS-topic-slug/workflow-session.json
echo '# Implementation Plan' > .workflow/sessions/WFS-topic-slug/IMPL_PLAN.md
echo '# Tasks' > .workflow/sessions/WFS-topic-slug/TODO_LIST.md
mkdir -p .workflow/active/WFS-topic-slug/.task
echo '{"session_id":"WFS-topic-slug",...}' > .workflow/active/WFS-topic-slug/workflow-session.json
echo '# Implementation Plan' > .workflow/active/WFS-topic-slug/IMPL_PLAN.md
echo '# Tasks' > .workflow/active/WFS-topic-slug/TODO_LIST.md
```
### Task Operations
@@ -867,8 +867,8 @@ mkdir -p .summaries # When first task completes
### Session Consistency Checks & Recovery
```bash
# Validate session directory structure
if [ -d ".workflow/sessions/" ]; then
for session_dir in .workflow/sessions/WFS-*; do
if [ -d ".workflow/active/" ]; then
for session_dir in .workflow/active/WFS-*; do
if [ ! -f "$session_dir/workflow-session.json" ]; then
echo "⚠️ Missing workflow-session.json in $session_dir"
fi