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

@@ -3,8 +3,8 @@ name: conflict-resolution
description: Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen
argument-hint: "--session WFS-session-id --context path/to/context-package.json"
examples:
- /workflow:tools:conflict-resolution --session WFS-auth --context .workflow/sessions/WFS-auth/.process/context-package.json
- /workflow:tools:conflict-resolution --session WFS-payment --context .workflow/sessions/WFS-payment/.process/context-package.json
- /workflow:tools:conflict-resolution --session WFS-auth --context .workflow/active/WFS-auth/.process/context-package.json
- /workflow:tools:conflict-resolution --session WFS-payment --context .workflow/active/WFS-payment/.process/context-package.json
---
# Conflict Resolution Command
@@ -88,7 +88,7 @@ Task(subagent_type="cli-execution-agent", prompt=`
### 1. Load Context
- Read existing files from conflict_detection.existing_files
- Load plan from .workflow/sessions/{session_id}/.process/context-package.json
- Load plan from .workflow/active/{session_id}/.process/context-package.json
- Extract role analyses and requirements
### 2. Execute CLI Analysis (Enhanced with Scenario Uniqueness Detection)
@@ -107,7 +107,7 @@ Task(subagent_type="cli-execution-agent", prompt=`
- Compare scenario coverage and identify overlaps
- Generate clarification questions for boundary definition
MODE: analysis
CONTEXT: @**/*.ts @**/*.js @**/*.tsx @**/*.jsx @.workflow/sessions/{session_id}/**/*
CONTEXT: @**/*.ts @**/*.js @**/*.tsx @**/*.jsx @.workflow/active/{session_id}/**/*
EXPECTED: Conflict list with severity ratings, including ModuleOverlap conflicts with:
- Existing module list with scenarios
- Overlap analysis matrix
@@ -143,8 +143,8 @@ Task(subagent_type="cli-execution-agent", prompt=`
"severity": "Critical|High|Medium",
"category": "Architecture|API|Data|Dependency|ModuleOverlap",
"affected_files": [
".workflow/sessions/{session}/.brainstorm/guidance-specification.md",
".workflow/sessions/{session}/.brainstorm/system-architect/analysis.md"
".workflow/active/{session}/.brainstorm/guidance-specification.md",
".workflow/active/{session}/.brainstorm/system-architect/analysis.md"
],
"description": "详细描述冲突 - 什么不兼容",
"impact": {
@@ -187,7 +187,7 @@ Task(subagent_type="cli-execution-agent", prompt=`
],
"modifications": [
{
"file": ".workflow/sessions/{session}/.brainstorm/guidance-specification.md",
"file": ".workflow/active/{session}/.brainstorm/guidance-specification.md",
"section": "## 2. System Architect Decisions",
"change_type": "update",
"old_content": "原始内容片段(用于定位)",
@@ -195,7 +195,7 @@ Task(subagent_type="cli-execution-agent", prompt=`
"rationale": "为什么这样改"
},
{
"file": ".workflow/sessions/{session}/.brainstorm/system-architect/analysis.md",
"file": ".workflow/active/{session}/.brainstorm/system-architect/analysis.md",
"section": "## Design Decisions",
"change_type": "update",
"old_content": "原始内容片段",
@@ -540,7 +540,7 @@ return {
✓ Role analyses (*.md) updated
✓ context-package.json marked as resolved with clarification records
✓ Custom conflicts display overlap_analysis for manual handling
✓ Agent log saved to .workflow/sessions/{session_id}/.chat/
✓ Agent log saved to .workflow/active/{session_id}/.chat/
```
## Output Format: Agent JSON Response
@@ -597,9 +597,9 @@ If Edit tool fails mid-application:
**Output**:
- Modified files:
- `.workflow/sessions/{session_id}/.brainstorm/guidance-specification.md`
- `.workflow/sessions/{session_id}/.brainstorm/{role}/analysis.md`
- `.workflow/sessions/{session_id}/.process/context-package.json` (conflict_risk → resolved)
- `.workflow/active/{session_id}/.brainstorm/guidance-specification.md`
- `.workflow/active/{session_id}/.brainstorm/{role}/analysis.md`
- `.workflow/active/{session_id}/.process/context-package.json` (conflict_risk → resolved)
- NO report file generation
**User Interaction**:
@@ -635,7 +635,7 @@ If Edit tool fails mid-application:
- Custom handling (count)
- Clarification records
- Overlap analysis for custom ModuleOverlap conflicts
✓ Agent log saved to .workflow/sessions/{session_id}/.chat/
✓ Agent log saved to .workflow/active/{session_id}/.chat/
✓ Error handling robust (validate/retry/degrade)
```

View File

@@ -22,7 +22,7 @@ Orchestrator command that invokes `context-search-agent` to gather comprehensive
- **Agent Delegation**: Delegate all discovery to `context-search-agent` for autonomous execution
- **Detection-First**: Check for existing context-package before executing
- **Plan Mode**: Full comprehensive analysis (vs lightweight brainstorm mode)
- **Standardized Output**: Generate `.workflow/sessions/{session}/.process/context-package.json`
- **Standardized Output**: Generate `.workflow/active/{session}/.process/context-package.json`
## Execution Flow

View File

@@ -36,7 +36,7 @@ Autonomous task JSON and IMPL_PLAN.md generation using action-planning-agent wit
// Path selected by command based on --cli-execute flag, agent reads it
"session_metadata": {
// If in memory: use cached content
// Else: Load from .workflow/sessions//{session-id}/workflow-session.json
// Else: Load from .workflow/active//{session-id}/workflow-session.json
},
"brainstorm_artifacts": {
// Loaded from context-package.json → brainstorm_artifacts section
@@ -50,10 +50,10 @@ Autonomous task JSON and IMPL_PLAN.md generation using action-planning-agent wit
"synthesis_output": {"path": "...", "exists": true},
"conflict_resolution": {"path": "...", "exists": true} // if conflict_risk >= medium
},
"context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json",
"context_package_path": ".workflow/active//{session-id}/.process/context-package.json",
"context_package": {
// If in memory: use cached content
// Else: Load from .workflow/sessions//{session-id}/.process/context-package.json
// Else: Load from .workflow/active//{session-id}/.process/context-package.json
},
"mcp_capabilities": {
"code_index": true,
@@ -67,14 +67,14 @@ Autonomous task JSON and IMPL_PLAN.md generation using action-planning-agent wit
1. **Load Session Context** (if not in memory)
```javascript
if (!memory.has("workflow-session.json")) {
Read(.workflow/sessions//{session-id}/workflow-session.json)
Read(.workflow/active//{session-id}/workflow-session.json)
}
```
2. **Load Context Package** (if not in memory)
```javascript
if (!memory.has("context-package.json")) {
Read(.workflow/sessions//{session-id}/.process/context-package.json)
Read(.workflow/active//{session-id}/.process/context-package.json)
}
```
@@ -176,18 +176,18 @@ Refer to: @.claude/agents/action-planning-agent.md for:
### Required Outputs Summary
#### 1. Task JSON Files (.task/IMPL-*.json)
- **Location**: `.workflow/sessions//{session-id}/.task/`
- **Location**: `.workflow/active//{session-id}/.task/`
- **Template**: Read from `{template_path}` (pre-selected by command based on `--cli-execute` flag)
- **Schema**: 5-field structure (id, title, status, meta, context, flow_control) with artifacts integration
- **Details**: See action-planning-agent.md § Task JSON Generation
#### 2. IMPL_PLAN.md
- **Location**: `.workflow/sessions//{session-id}/IMPL_PLAN.md`
- **Location**: `.workflow/active//{session-id}/IMPL_PLAN.md`
- **Template**: `~/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt`
- **Details**: See action-planning-agent.md § Implementation Plan Creation
#### 3. TODO_LIST.md
- **Location**: `.workflow/sessions//{session-id}/TODO_LIST.md`
- **Location**: `.workflow/active//{session-id}/TODO_LIST.md`
- **Format**: Hierarchical task list with status indicators (▸, [ ], [x]) and JSON links
- **Details**: See action-planning-agent.md § TODO List Generation
@@ -231,13 +231,13 @@ const agentContext = {
// Use memory if available, else load
session_metadata: memory.has("workflow-session.json")
? memory.get("workflow-session.json")
: Read(.workflow/sessions/WFS-[id]/workflow-session.json),
: Read(.workflow/active/WFS-[id]/workflow-session.json),
context_package_path: ".workflow/sessions/WFS-[id]/.process/context-package.json",
context_package_path: ".workflow/active/WFS-[id]/.process/context-package.json",
context_package: memory.has("context-package.json")
? memory.get("context-package.json")
: Read(".workflow/sessions/WFS-[id]/.process/context-package.json"),
: Read(".workflow/active/WFS-[id]/.process/context-package.json"),
// Extract brainstorm artifacts from context package
brainstorm_artifacts: extractBrainstormArtifacts(context_package),

View File

@@ -74,7 +74,7 @@ Autonomous TDD task JSON and IMPL_PLAN.md generation using action-planning-agent
"workflow_type": "tdd",
"session_metadata": {
// If in memory: use cached content
// Else: Load from .workflow/sessions//{session-id}/workflow-session.json
// Else: Load from .workflow/active//{session-id}/workflow-session.json
},
"brainstorm_artifacts": {
// Loaded from context-package.json → brainstorm_artifacts section
@@ -88,12 +88,12 @@ Autonomous TDD task JSON and IMPL_PLAN.md generation using action-planning-agent
"synthesis_output": {"path": "...", "exists": true},
"conflict_resolution": {"path": "...", "exists": true} // if conflict_risk >= medium
},
"context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json",
"context_package_path": ".workflow/active//{session-id}/.process/context-package.json",
"context_package": {
// If in memory: use cached content
// Else: Load from .workflow/sessions//{session-id}/.process/context-package.json
// Else: Load from .workflow/active//{session-id}/.process/context-package.json
},
"test_context_package_path": ".workflow/sessions//{session-id}/.process/test-context-package.json",
"test_context_package_path": ".workflow/active//{session-id}/.process/test-context-package.json",
"test_context_package": {
// Existing test patterns and coverage analysis
},
@@ -109,21 +109,21 @@ Autonomous TDD task JSON and IMPL_PLAN.md generation using action-planning-agent
1. **Load Session Context** (if not in memory)
```javascript
if (!memory.has("workflow-session.json")) {
Read(.workflow/sessions//{session-id}/workflow-session.json)
Read(.workflow/active//{session-id}/workflow-session.json)
}
```
2. **Load Context Package** (if not in memory)
```javascript
if (!memory.has("context-package.json")) {
Read(.workflow/sessions//{session-id}/.process/context-package.json)
Read(.workflow/active//{session-id}/.process/context-package.json)
}
```
3. **Load Test Context Package** (if not in memory)
```javascript
if (!memory.has("test-context-package.json")) {
Read(.workflow/sessions//{session-id}/.process/test-context-package.json)
Read(.workflow/active//{session-id}/.process/test-context-package.json)
}
```
@@ -245,7 +245,7 @@ Refer to: @.claude/agents/action-planning-agent.md for:
#### Required Outputs Summary
##### 1. TDD Task JSON Files (.task/IMPL-*.json)
- **Location**: `.workflow/sessions//{session-id}/.task/`
- **Location**: `.workflow/active//{session-id}/.task/`
- **Template**: Read from `{template_path}` (pre-selected by command based on `--cli-execute` flag)
- **Schema**: 5-field structure with TDD-specific metadata
- `meta.tdd_workflow`: true (REQUIRED)
@@ -259,14 +259,14 @@ Refer to: @.claude/agents/action-planning-agent.md for:
- **Details**: See action-planning-agent.md § TDD Task JSON Generation
##### 2. IMPL_PLAN.md (TDD Variant)
- **Location**: `.workflow/sessions//{session-id}/IMPL_PLAN.md`
- **Location**: `.workflow/active//{session-id}/IMPL_PLAN.md`
- **Template**: `~/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt`
- **TDD-Specific Frontmatter**: workflow_type="tdd", tdd_workflow=true, feature_count, task_breakdown
- **TDD Implementation Tasks Section**: Feature-by-feature with internal Red-Green-Refactor cycles
- **Details**: See action-planning-agent.md § TDD Implementation Plan Creation
##### 3. TODO_LIST.md
- **Location**: `.workflow/sessions//{session-id}/TODO_LIST.md`
- **Location**: `.workflow/active//{session-id}/TODO_LIST.md`
- **Format**: Hierarchical task list with internal TDD phase indicators (Red → Green → Refactor)
- **Status**: ▸ (container), [ ] (pending), [x] (completed)
- **Details**: See action-planning-agent.md § TODO List Generation
@@ -338,19 +338,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-[id]/workflow-session.json),
: Read(.workflow/active/WFS-[id]/workflow-session.json),
context_package_path: ".workflow/sessions/WFS-[id]/.process/context-package.json",
context_package_path: ".workflow/active/WFS-[id]/.process/context-package.json",
context_package: memory.has("context-package.json")
? memory.get("context-package.json")
: Read(".workflow/sessions/WFS-[id]/.process/context-package.json"),
: Read(".workflow/active/WFS-[id]/.process/context-package.json"),
test_context_package_path: ".workflow/sessions/WFS-[id]/.process/test-context-package.json",
test_context_package_path: ".workflow/active/WFS-[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-[id]/.process/test-context-package.json"),
: Read(".workflow/active/WFS-[id]/.process/test-context-package.json"),
// Extract brainstorm artifacts from context package
brainstorm_artifacts: extractBrainstormArtifacts(context_package),
@@ -384,7 +384,7 @@ This section provides quick reference for TDD task JSON structure. For complete
## Output Files Structure
```
.workflow/sessions//{session-id}/
.workflow/active//{session-id}/
├── IMPL_PLAN.md # Unified plan with TDD Implementation Tasks section
├── TODO_LIST.md # Progress tracking with internal TDD phase indicators
├── .task/

View File

@@ -77,8 +77,8 @@ The command follows a streamlined, three-step process to convert analysis into e
### Step 1: Input & Discovery
The process begins by gathering all necessary inputs. It follows a **Memory-First Rule**, skipping file reads if documents are already in the conversation memory.
1. **Session Validation**: Loads and validates the session from `.workflow/sessions/{session_id}/workflow-session.json`.
2. **Context Package Loading** (primary source): Reads `.workflow/sessions/{session_id}/.process/context-package.json` for smart context and artifact catalog.
1. **Session Validation**: Loads and validates the session from `.workflow/active/{session_id}/workflow-session.json`.
2. **Context Package Loading** (primary source): Reads `.workflow/active/{session_id}/.process/context-package.json` for smart context and artifact catalog.
3. **Brainstorm Artifacts Extraction**: Extracts role analysis paths from `context-package.json``brainstorm_artifacts.role_analyses[]` (supports `analysis*.md` automatically).
4. **Document Loading**: Reads role analyses, guidance specification, synthesis output, and conflict resolution (if exists) using paths from context package.
@@ -224,7 +224,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
- `id`: Task identifier (format: `IMPL-N` or `IMPL-N.M` for subtasks)
- `title`: Descriptive task name
- `status`: Task state (`pending|active|completed|blocked|container`)
- `context_package_path`: Path to context package (`.workflow/sessions/WFS-[session]/.process/context-package.json`)
- `context_package_path`: Path to context package (`.workflow/active/WFS-[session]/.process/context-package.json`)
- `meta`: Task metadata
- `context`: Task-specific context and requirements
- `flow_control`: Execution steps and workflow
@@ -269,7 +269,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
"id": "IMPL-1",
"title": "Implement feature X with Y components",
"status": "pending",
"context_package_path": ".workflow/sessions/WFS-session/.process/context-package.json",
"context_package_path": ".workflow/active/WFS-session/.process/context-package.json",
"meta": {
"type": "feature",
"agent": "@code-developer",
@@ -291,7 +291,7 @@ Each task JSON embeds all necessary context, artifacts, and execution steps usin
"depends_on": [],
"artifacts": [
{
"path": ".workflow/sessions/WFS-session/.brainstorming/system-architect/analysis.md",
"path": ".workflow/active/WFS-session/.brainstorming/system-architect/analysis.md",
"priority": "highest",
"usage": "Architecture decisions and API specifications"
}
@@ -353,10 +353,10 @@ This document provides a high-level overview of the entire implementation plan.
---
identifier: WFS-{session-id}
source: "User requirements" | "File: path" | "Issue: ISS-001"
role_analyses: .workflow/sessions//{session-id}/.brainstorming/[role]/analysis*.md
artifacts: .workflow/sessions//{session-id}/.brainstorming/
context_package: .workflow/sessions//{session-id}/.process/context-package.json # CCW smart context
guidance_specification: .workflow/sessions//{session-id}/.brainstorming/guidance-specification.md # Finalized decisions with resolved conflicts
role_analyses: .workflow/active//{session-id}/.brainstorming/[role]/analysis*.md
artifacts: .workflow/active//{session-id}/.brainstorming/
context_package: .workflow/active//{session-id}/.process/context-package.json # CCW smart context
guidance_specification: .workflow/active//{session-id}/.brainstorming/guidance-specification.md # Finalized decisions with resolved conflicts
workflow_type: "standard | tdd | design" # Indicates execution model
verification_history: # CCW quality gates
synthesis_clarify: "passed | skipped | pending" # Brainstorm phase clarification
@@ -606,7 +606,7 @@ A simple Markdown file for tracking the status of each task.
### 6.4. Output Files Diagram
The command organizes outputs into a standard directory structure.
```
.workflow/sessions//{session-id}/
.workflow/active//{session-id}/
├── IMPL_PLAN.md # Implementation plan
├── TODO_LIST.md # Progress tracking
├── .task/

View File

@@ -21,7 +21,7 @@ Analyze test coverage and verify Red-Green-Refactor cycle execution for TDD work
### Phase 1: Extract Test Tasks
```bash
find .workflow/sessions/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.focus_paths[]' {} \;
find .workflow/active/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.focus_paths[]' {} \;
```
**Output**: List of test directories/files from all TEST tasks
@@ -29,20 +29,20 @@ find .workflow/sessions/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.co
### Phase 2: Run Test Suite
```bash
# Node.js/JavaScript
npm test -- --coverage --json > .workflow/sessions/{session_id}/.process/test-results.json
npm test -- --coverage --json > .workflow/active/{session_id}/.process/test-results.json
# Python
pytest --cov --json-report > .workflow/sessions/{session_id}/.process/test-results.json
pytest --cov --json-report > .workflow/active/{session_id}/.process/test-results.json
# Other frameworks (detect from project)
[test_command] --coverage --json-output .workflow/sessions/{session_id}/.process/test-results.json
[test_command] --coverage --json-output .workflow/active/{session_id}/.process/test-results.json
```
**Output**: test-results.json with coverage data
### Phase 3: Parse Coverage Data
```bash
jq '.coverage' .workflow/sessions/{session_id}/.process/test-results.json > .workflow/sessions/{session_id}/.process/coverage-report.json
jq '.coverage' .workflow/active/{session_id}/.process/test-results.json > .workflow/active/{session_id}/.process/coverage-report.json
```
**Extract**:
@@ -58,7 +58,7 @@ For each TDD chain (TEST-N.M -> IMPL-N.M -> REFACTOR-N.M):
**1. Red Phase Verification**
```bash
# Check TEST task summary
cat .workflow/sessions/{session_id}/.summaries/TEST-N.M-summary.md
cat .workflow/active/{session_id}/.summaries/TEST-N.M-summary.md
```
Verify:
@@ -69,7 +69,7 @@ Verify:
**2. Green Phase Verification**
```bash
# Check IMPL task summary
cat .workflow/sessions/{session_id}/.summaries/IMPL-N.M-summary.md
cat .workflow/active/{session_id}/.summaries/IMPL-N.M-summary.md
```
Verify:
@@ -80,7 +80,7 @@ Verify:
**3. Refactor Phase Verification**
```bash
# Check REFACTOR task summary
cat .workflow/sessions/{session_id}/.summaries/REFACTOR-N.M-summary.md
cat .workflow/active/{session_id}/.summaries/REFACTOR-N.M-summary.md
```
Verify:
@@ -90,7 +90,7 @@ Verify:
### Phase 5: Generate Analysis Report
Create `.workflow/sessions/{session_id}/.process/tdd-cycle-report.md`:
Create `.workflow/active/{session_id}/.process/tdd-cycle-report.md`:
```markdown
# TDD Cycle Analysis - {Session ID}
@@ -146,7 +146,7 @@ Create `.workflow/sessions/{session_id}/.process/tdd-cycle-report.md`:
## Output Files
```
.workflow/sessions//{session-id}/
.workflow/active//{session-id}/
└── .process/
├── test-results.json # Raw test execution results
├── coverage-report.json # Parsed coverage data
@@ -272,6 +272,6 @@ Function Coverage: 91%
Overall Compliance: 93/100
Detailed report: .workflow/sessions/WFS-auth/.process/tdd-cycle-report.md
Detailed report: .workflow/active/WFS-auth/.process/tdd-cycle-report.md
```

View File

@@ -3,7 +3,7 @@ name: test-concept-enhanced
description: Analyze test requirements and generate test generation strategy using Gemini with test-context package
argument-hint: "--session WFS-test-session-id --context path/to/test-context-package.json"
examples:
- /workflow:tools:test-concept-enhanced --session WFS-test-auth --context .workflow/sessions/WFS-test-auth/.process/test-context-package.json
- /workflow:tools:test-concept-enhanced --session WFS-test-auth --context .workflow/active/WFS-test-auth/.process/test-context-package.json
---
# Test Concept Enhanced Command
@@ -30,7 +30,7 @@ Specialized analysis tool for test generation workflows that uses Gemini to anal
### Phase 1: Validation & Preparation
1. **Session Validation**
- Load `.workflow/sessions/{test_session_id}/workflow-session.json`
- Load `.workflow/active/{test_session_id}/workflow-session.json`
- Verify test session type is "test-gen"
- Extract source session reference
@@ -48,11 +48,11 @@ Specialized analysis tool for test generation workflows that uses Gemini to anal
**Tool Configuration**:
```bash
cd .workflow/sessions/{test_session_id}/.process && gemini -p "
cd .workflow/active/{test_session_id}/.process && gemini -p "
PURPOSE: Analyze test coverage gaps and design comprehensive test generation strategy
TASK: Study implementation context, existing tests, and generate test requirements for missing coverage
MODE: analysis
CONTEXT: @{.workflow/sessions/{test_session_id}/.process/test-context-package.json}
CONTEXT: @{.workflow/active/{test_session_id}/.process/test-context-package.json}
**MANDATORY FIRST STEP**: Read and analyze test-context-package.json to understand:
- Test coverage gaps from test_coverage.missing_tests[]
@@ -226,13 +226,13 @@ RULES:
- Prioritize critical business logic tests
- Specify clear test scenarios and coverage targets
- Identify all dependencies requiring mocks
- **MUST write output to .workflow/sessions/{test_session_id}/.process/gemini-test-analysis.md**
- **MUST write output to .workflow/active/{test_session_id}/.process/gemini-test-analysis.md**
- Do NOT generate actual test code or implementation
- Output ONLY test analysis and generation strategy
" --approval-mode yolo
```
**Output Location**: `.workflow/sessions/{test_session_id}/.process/gemini-test-analysis.md`
**Output Location**: `.workflow/active/{test_session_id}/.process/gemini-test-analysis.md`
### Phase 3: Results Synthesis
@@ -408,7 +408,7 @@ Synthesize Gemini analysis into standardized format:
- **Coverage Tools**: {coverage_tool_if_detected}
```
**Output Location**: `.workflow/sessions/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md`
**Output Location**: `.workflow/active/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md`
## Error Handling

View File

@@ -22,7 +22,7 @@ Orchestrator command that invokes `test-context-search-agent` to gather comprehe
- **Detection-First**: Check for existing test-context-package before executing
- **Coverage-First**: Analyze existing test coverage before planning new tests
- **Source Context Loading**: Import implementation summaries from source session
- **Standardized Output**: Generate `.workflow/sessions/{test_session_id}/.process/test-context-package.json`
- **Standardized Output**: Generate `.workflow/active/{test_session_id}/.process/test-context-package.json`
## Execution Flow
@@ -164,7 +164,7 @@ Refer to `test-context-search-agent.md` Phase 3.2 for complete `test-context-pac
## Success Criteria
- ✅ Valid test-context-package.json generated in `.workflow/sessions/{test_session_id}/.process/`
- ✅ Valid test-context-package.json generated in `.workflow/active/{test_session_id}/.process/`
- ✅ Source session context loaded successfully
- ✅ Test coverage gaps identified (>90% accuracy)
- ✅ Test framework detected and documented

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