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

@@ -54,14 +54,14 @@ Autonomous test-fix task JSON generation using action-planning-agent with two-ph
"use_codex": true | false, // Determined by --use-codex flag
"session_metadata": {
// If in memory: use cached content
// Else: Load from .workflow/sessions/{test-session-id}/workflow-session.json
// Else: Load from .workflow/active/{test-session-id}/workflow-session.json
},
"test_analysis_results_path": ".workflow/sessions/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md",
"test_analysis_results_path": ".workflow/active/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md",
"test_analysis_results": {
// If in memory: use cached content
// Else: Load from TEST_ANALYSIS_RESULTS.md
},
"test_context_package_path": ".workflow/sessions/{test-session-id}/.process/test-context-package.json",
"test_context_package_path": ".workflow/active/{test-session-id}/.process/test-context-package.json",
"test_context_package": {
// Existing test patterns and coverage analysis
},
@@ -81,28 +81,28 @@ Autonomous test-fix task JSON generation using action-planning-agent with two-ph
1. **Load Test Session Context** (if not in memory)
```javascript
if (!memory.has("workflow-session.json")) {
Read(.workflow/sessions/{test-session-id}/workflow-session.json)
Read(.workflow/active/{test-session-id}/workflow-session.json)
}
```
2. **Load TEST_ANALYSIS_RESULTS.md** (if not in memory, REQUIRED)
```javascript
if (!memory.has("TEST_ANALYSIS_RESULTS.md")) {
Read(.workflow/sessions/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md)
Read(.workflow/active/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md)
}
```
3. **Load Test Context Package** (if not in memory)
```javascript
if (!memory.has("test-context-package.json")) {
Read(.workflow/sessions/{test-session-id}/.process/test-context-package.json)
Read(.workflow/active/{test-session-id}/.process/test-context-package.json)
}
```
4. **Load Source Session Summaries** (if source_session_id exists)
```javascript
if (sessionMetadata.source_session_id) {
const summaryFiles = Bash("find .workflow/sessions/{source-session-id}/.summaries/ -name 'IMPL-*-summary.md'")
const summaryFiles = Bash("find .workflow/active/{source-session-id}/.summaries/ -name 'IMPL-*-summary.md'")
summaryFiles.forEach(file => Read(file))
}
```
@@ -205,7 +205,7 @@ Refer to: @.claude/agents/action-planning-agent.md for:
#### Required Outputs Summary
##### 1. Test Task JSON Files (.task/IMPL-*.json)
- **Location**: `.workflow/sessions/{test-session-id}/.task/`
- **Location**: `.workflow/active/{test-session-id}/.task/`
- **Template**: Read from `{template_path}` (pre-selected by command based on `--cli-execute` flag)
- **Schema**: 5-field structure with test-specific metadata
- IMPL-001: `meta.type: "test-gen"`, `meta.agent: "@code-developer"`
@@ -214,14 +214,14 @@ Refer to: @.claude/agents/action-planning-agent.md for:
- **Details**: See action-planning-agent.md § Test Task JSON Generation
##### 2. IMPL_PLAN.md (Test Variant)
- **Location**: `.workflow/sessions/{test-session-id}/IMPL_PLAN.md`
- **Location**: `.workflow/active/{test-session-id}/IMPL_PLAN.md`
- **Template**: `~/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt`
- **Test-Specific Frontmatter**: workflow_type="test_session", test_framework, source_session_id
- **Test-Fix-Retest Cycle Section**: Iterative fix cycle with Gemini diagnosis
- **Details**: See action-planning-agent.md § Test Implementation Plan Creation
##### 3. TODO_LIST.md
- **Location**: `.workflow/sessions/{test-session-id}/TODO_LIST.md`
- **Location**: `.workflow/active/{test-session-id}/TODO_LIST.md`
- **Format**: Task list with test generation and execution phases
- **Status**: [ ] (pending), [x] (completed)
- **Details**: See action-planning-agent.md § TODO List Generation
@@ -273,19 +273,19 @@ const agentContext = {
// Use memory if available, else load
session_metadata: memory.has("workflow-session.json")
? memory.get("workflow-session.json")
: Read(.workflow/sessions/WFS-test-[id]/workflow-session.json),
: Read(.workflow/active/WFS-test-[id]/workflow-session.json),
test_analysis_results_path: ".workflow/sessions/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md",
test_analysis_results_path: ".workflow/active/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md",
test_analysis_results: memory.has("TEST_ANALYSIS_RESULTS.md")
? memory.get("TEST_ANALYSIS_RESULTS.md")
: Read(".workflow/sessions/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md"),
: Read(".workflow/active/WFS-test-[id]/.process/TEST_ANALYSIS_RESULTS.md"),
test_context_package_path: ".workflow/sessions/WFS-test-[id]/.process/test-context-package.json",
test_context_package_path: ".workflow/active/WFS-test-[id]/.process/test-context-package.json",
test_context_package: memory.has("test-context-package.json")
? memory.get("test-context-package.json")
: Read(".workflow/sessions/WFS-test-[id]/.process/test-context-package.json"),
: Read(".workflow/active/WFS-test-[id]/.process/test-context-package.json"),
// Load source session summaries if exists
source_session_id: session_metadata.source_session_id || null,
@@ -312,7 +312,7 @@ This section provides quick reference for test task JSON structure. For complete
## Output Files Structure
```
.workflow/sessions/WFS-test-[session]/
.workflow/active/WFS-test-[session]/
├── workflow-session.json # Test session metadata
├── IMPL_PLAN.md # Test validation plan
├── TODO_LIST.md # Progress tracking