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

@@ -102,7 +102,7 @@ Phase 2: Document Generation (Autonomous Output)
1. **Extract Tasks**: Parse `analysis_results.tasks` array
2. **Map Artifacts**: Use `artifacts_inventory` to add artifact references to task.context
3. **Assess Complexity**: Use `analysis_results.complexity` for document structure decision
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/sessions/{session_id}/)
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/active/{session_id}/)
### MCP Integration Guidelines
@@ -244,14 +244,14 @@ Generate individual `.task/IMPL-*.json` files with:
- Low priority: role_analyses
### 3. Implementation Plan Creation
Generate `IMPL_PLAN.md` at `.workflow/sessions/{session_id}/IMPL_PLAN.md`:
Generate `IMPL_PLAN.md` at `.workflow/active/{session_id}/IMPL_PLAN.md`:
**Structure**:
```markdown
---
identifier: {session_id}
source: "User requirements"
analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md
analysis: .workflow/active/{session_id}/.process/ANALYSIS_RESULTS.md
---
# Implementation Plan: {Project Title}
@@ -280,7 +280,7 @@ analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md
```
### 4. TODO List Generation
Generate `TODO_LIST.md` at `.workflow/sessions/{session_id}/TODO_LIST.md`:
Generate `TODO_LIST.md` at `.workflow/active/{session_id}/TODO_LIST.md`:
**Structure**:
```markdown

View File

@@ -190,11 +190,11 @@ cd src/auth && gemini -p "CONTEXT: @**/* @../shared/**/*" --include-directories
**Session Detection**:
```bash
find .workflow/sessions/ -name 'WFS-*' -type d
find .workflow/active/ -name 'WFS-*' -type d
```
**Output Paths**:
- **With session**: `.workflow/sessions/WFS-{id}/.chat/{agent}-{timestamp}.md`
- **With session**: `.workflow/active/WFS-{id}/.chat/{agent}-{timestamp}.md`
- **No session**: `.workflow/.scratchpad/{agent}-{description}-{timestamp}.md`
**Log Structure**:

View File

@@ -274,7 +274,7 @@ Calculate risk level based on:
**3.7 Context Packaging & Output**
**Output**: `.workflow/sessions//{session-id}/.process/context-package.json`
**Output**: `.workflow/active//{session-id}/.process/context-package.json`
**Note**: Task JSONs reference via `context_package_path` field (not in `artifacts`)

View File

@@ -304,7 +304,7 @@ if (!validation.all_passed()) {
## Output Location
```
.workflow/sessions/{test_session_id}/.process/test-context-package.json
.workflow/active/{test_session_id}/.process/test-context-package.json
```
## Helper Functions Reference

View File

@@ -76,8 +76,8 @@ Use `resume --last` when current task extends/relates to previous execution. See
## Workflow Integration
**Session Management**: Auto-detects active session from `.workflow/sessions/` directory
- Active session: Save to `.workflow/sessions/WFS-[id]/.chat/execute-[timestamp].md`
**Session Management**: Auto-detects active session from `.workflow/active/` directory
- Active session: Save to `.workflow/active/WFS-[id]/.chat/execute-[timestamp].md`
- No session: Create new session or save to scratchpad
**Task Integration**: Load from `.task/[TASK-ID].json`, update status, generate summary

View File

@@ -63,10 +63,10 @@ Lightweight planner that analyzes project structure, decomposes documentation wo
bash(pwd && basename "$(pwd)" && git rev-parse --show-toplevel 2>/dev/null || pwd && date +%Y%m%d-%H%M%S)
# Create session directories (replace timestamp)
bash(mkdir -p .workflow/sessions/WFS-docs-{timestamp}/.{task,process,summaries})
bash(mkdir -p .workflow/active/WFS-docs-{timestamp}/.{task,process,summaries})
# Create workflow-session.json (replace values)
bash(echo '{"session_id":"WFS-docs-{timestamp}","project":"{project} documentation","status":"planning","timestamp":"2024-01-20T14:30:22+08:00","path":".","target_path":"{target_path}","project_root":"{project_root}","project_name":"{project_name}","mode":"full","tool":"gemini","cli_execute":false}' | jq '.' > .workflow/sessions/WFS-docs-{timestamp}/workflow-session.json)
bash(echo '{"session_id":"WFS-docs-{timestamp}","project":"{project} documentation","status":"planning","timestamp":"2024-01-20T14:30:22+08:00","path":".","target_path":"{target_path}","project_root":"{project_root}","project_name":"{project_name}","mode":"full","tool":"gemini","cli_execute":false}' | jq '.' > .workflow/active/WFS-docs-{timestamp}/workflow-session.json)
```
### Phase 2: Analyze Structure
@@ -458,7 +458,7 @@ api_id=$((group_count + 3))
**Unified Structure** (single JSON replaces multiple text files):
```
.workflow/sessions/
.workflow/active/
└── WFS-docs-{timestamp}/
├── workflow-session.json # Session metadata
├── IMPL_PLAN.md

View File

@@ -128,8 +128,8 @@ Generate a complete tech stack SKILL package with Exa research.
1. **Extract Tech Stack Information**:
IF MODE == 'session':
- Read `.workflow/sessions/{session_id}/workflow-session.json`
- Read `.workflow/sessions/{session_id}/.process/context-package.json`
- Read `.workflow/active/{session_id}/workflow-session.json`
- Read `.workflow/active/{session_id}/.process/context-package.json`
- Extract tech_stack: {language, frameworks, libraries}
- Build tech stack name: \"{language}-{framework1}-{framework2}\"
- Example: \"typescript-react-nextjs\"

View File

@@ -32,7 +32,7 @@ Identify inconsistencies, duplications, ambiguities, and underspecified items be
IF --session parameter provided:
session_id = provided session
ELSE:
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
ELSE:
@@ -40,7 +40,7 @@ ELSE:
EXIT
# Derive absolute paths
session_dir = .workflow/sessions/WFS-{session}
session_dir = .workflow/active/WFS-{session}
brainstorm_dir = session_dir/.brainstorming
task_dir = session_dir/.task
@@ -333,7 +333,7 @@ Output a Markdown report (no file writes) with the following structure:
#### TodoWrite-Based Remediation Workflow
**Report Location**: `.workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
**Report Location**: `.workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
**Recommended Workflow**:
1. **Create TodoWrite Task List**: Extract all findings from report
@@ -361,7 +361,7 @@ Priority Order:
**Save Analysis Report**:
```bash
report_path = ".workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
report_path = ".workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
Write(report_path, full_report_content)
```
@@ -404,12 +404,12 @@ TodoWrite([
**File Modification Workflow**:
```bash
# For task JSON modifications:
1. Read(.workflow/sessions/WFS-{session}/.task/IMPL-X.Y.json)
1. Read(.workflow/active/WFS-{session}/.task/IMPL-X.Y.json)
2. Edit() to apply fixes
3. Mark todo as completed
# For IMPL_PLAN modifications:
1. Read(.workflow/sessions/WFS-{session}/IMPL_PLAN.md)
1. Read(.workflow/active/WFS-{session}/IMPL_PLAN.md)
2. Edit() to apply strategic changes
3. Mark todo as completed
```

View File

@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
### Output Files
```
.workflow/sessions/WFS-[topic]/.brainstorming/
.workflow/active/WFS-[topic]/.brainstorming/
├── guidance-specification.md # Input: Framework (if exists)
└── api-designer/
└── analysis.md # ★ OUTPUT: Framework-based analysis
@@ -181,7 +181,7 @@ IF update_mode = "incremental":
Session detection and selection:
```bash
# Check for active sessions
active_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
active_sessions=$(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null)
if [ multiple_sessions ]; then
prompt_user_to_select_session()
else
@@ -280,7 +280,7 @@ TodoWrite tracking for two-step process:
### Output Location
```
.workflow/sessions/WFS-{topic-slug}/.brainstorming/api-designer/
.workflow/active/WFS-{topic-slug}/.brainstorming/api-designer/
├── analysis.md # Primary API design analysis
├── api-specification.md # Detailed endpoint specifications (OpenAPI/Swagger)
├── data-contracts.md # Request/response schemas and validation rules
@@ -531,7 +531,7 @@ Upon completion, update `workflow-session.json`:
"api_designer": {
"status": "completed",
"completed_at": "timestamp",
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/api-designer/",
"output_directory": ".workflow/active/WFS-{topic}/.brainstorming/api-designer/",
"key_insights": ["endpoint_design", "versioning_strategy", "data_contracts"]
}
}

View File

@@ -10,7 +10,7 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*)
Six-phase workflow: **Automatic project context collection** → Extract topic challenges → Select roles → Generate task-specific questions → Detect conflicts → Generate confirmed guidance (declarative statements only).
**Input**: `"GOAL: [objective] SCOPE: [boundaries] CONTEXT: [background]" [--count N]`
**Output**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
**Output**: `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
**Core Principle**: Questions dynamically generated from project context + topic keywords/challenges, NOT from generic templates
**Parameters**:
@@ -32,7 +32,7 @@ Six-phase workflow: **Automatic project context collection** → Extract topic c
**Standalone Mode**:
```json
[
{"content": "Initialize session (.workflow/sessions/ session check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
{"content": "Initialize session (.workflow/active/ session check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
{"content": "Phase 0: Automatic project context collection (call context-gather)", "status": "pending", "activeForm": "Phase 0 context collection"},
{"content": "Phase 1: Extract challenges, output 2-4 task-specific questions, wait for user input", "status": "pending", "activeForm": "Phase 1 topic analysis"},
{"content": "Phase 2: Recommend count+2 roles, output role selection, wait for user input", "status": "pending", "activeForm": "Phase 2 role selection"},
@@ -133,7 +133,7 @@ b) {role-name} ({中文名})
## Execution Phases
### Session Management
- Check `.workflow/sessions/` for existing sessions
- Check `.workflow/active/` for existing sessions
- Multiple sessions → Prompt selection | Single → Use it | None → Create `WFS-[topic-slug]`
- Parse `--count N` parameter from user input (default: 3 if not specified)
- Store decisions in `workflow-session.json` including count parameter
@@ -145,7 +145,7 @@ b) {role-name} ({中文名})
**Detection Mechanism** (execute first):
```javascript
// Check if context-package already exists
const contextPackagePath = `.workflow/sessions/WFS-{session-id}/.process/context-package.json`;
const contextPackagePath = `.workflow/active/WFS-{session-id}/.process/context-package.json`;
if (file_exists(contextPackagePath)) {
// Validate package
@@ -229,7 +229,7 @@ Report completion with statistics.
**Steps**:
1. **Load Phase 0 context** (if available):
- Read `.workflow/sessions/WFS-{session-id}/.process/context-package.json`
- Read `.workflow/active/WFS-{session-id}/.process/context-package.json`
- Extract: tech_stack, existing modules, conflict_risk, relevant files
2. **Deep topic analysis** (context-aware):
@@ -449,7 +449,7 @@ FOR each selected role:
## Output Document Template
**File**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md`
**File**: `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md`
```markdown
# [Project] - Confirmed Guidance Specification
@@ -596,7 +596,7 @@ ELSE:
## File Structure
```
.workflow/sessions/WFS-[topic]/
.workflow/active/WFS-[topic]/
├── workflow-session.json # Session metadata ONLY
└── .brainstorming/
└── guidance-specification.md # Full guidance content

View File

@@ -85,7 +85,7 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
**Validation**:
- guidance-specification.md created with confirmed decisions
- workflow-session.json contains selected_roles[] (metadata only, no content duplication)
- Session directory `.workflow/sessions/WFS-{topic}/.brainstorming/` exists
- Session directory `.workflow/active/WFS-{topic}/.brainstorming/` exists
**TodoWrite Update (Phase 1 SlashCommand invoked - tasks attached)**:
```json
@@ -132,13 +132,13 @@ Execute {role-name} analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: {role-name}
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/{role}/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/{role}/
TOPIC: {user-provided-topic}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -148,7 +148,7 @@ TOPIC: {user-provided-topic}
3. **load_session_metadata**
- Action: Load session metadata and original user intent
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context (contains original user prompt as PRIMARY reference)
4. **load_style_skill** (ONLY for ui-designer role when style_skill_package exists)
@@ -194,7 +194,7 @@ TOPIC: {user-provided-topic}
- guidance-specification.md path
**Validation**:
- Each role creates `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
- Each role creates `.workflow/active/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
- If content is large (>800 lines), may split to `analysis-1.md`, `analysis-2.md` (max 3 files total)
- **File naming pattern**: ALL files MUST start with `analysis` prefix (use `analysis*.md` for globbing)
- **FORBIDDEN naming**: No `recommendations.md`, `recommendations-*.md`, or any non-`analysis` prefixed files
@@ -245,7 +245,7 @@ TOPIC: {user-provided-topic}
**Input**: `sessionId` from Phase 1
**Validation**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
- `.workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
- Synthesis references all role analyses
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
@@ -280,7 +280,7 @@ TOPIC: {user-provided-topic}
```
Brainstorming complete for session: {sessionId}
Roles analyzed: {count}
Synthesis: .workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md
Synthesis: .workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md
✅ Next Steps:
1. /workflow:concept-clarify --session {sessionId} # Optional refinement
@@ -392,7 +392,7 @@ CONTEXT_VARS:
## Session Management
**⚡ FIRST ACTION**: Check `.workflow/sessions/` for existing sessions before Phase 1
**⚡ FIRST ACTION**: Check `.workflow/active/` for existing sessions before Phase 1
**Multiple Sessions Support**:
- Different Claude instances can have different brainstorming sessions
@@ -408,15 +408,15 @@ CONTEXT_VARS:
## Output Structure
**Phase 1 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
- `.workflow/sessions/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
- `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
- `.workflow/active/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
**Phase 2 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
- `.workflow/active/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
- `.superdesign/design_iterations/` (ui-designer artifacts, if --style-skill provided)
**Phase 3 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
- `.workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
**⚠️ Storage Separation**: Guidance content in .md files, metadata in .json (no duplication)
**⚠️ Style References**: When --style-skill provided, workflow-session.json stores style_skill_package name, ui-designer loads from `.claude/skills/style-{package-name}/`
@@ -446,7 +446,7 @@ CONTEXT_VARS:
**File Structure**:
```
.workflow/sessions/WFS-[topic]/
.workflow/active/WFS-[topic]/
├── workflow-session.json # Session metadata ONLY
└── .brainstorming/
├── guidance-specification.md # Framework (Phase 1)

View File

@@ -47,10 +47,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -87,13 +87,13 @@ Execute data-architect analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: data-architect
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/data-architect/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/data-architect/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -103,7 +103,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -163,7 +163,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/data-architect/
.workflow/active/WFS-{session}/.brainstorming/data-architect/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -208,7 +208,7 @@ TodoWrite({
"data_architect": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/data-architect/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/data-architect/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute product-manager analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: product-manager
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-manager/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/product-manager/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/product-manager/
.workflow/active/WFS-{session}/.brainstorming/product-manager/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"product_manager": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/product-manager/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute product-owner analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: product-owner
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-owner/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/product-owner/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/product-owner/
.workflow/active/WFS-{session}/.brainstorming/product-owner/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"product_owner": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-owner/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/product-owner/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute scrum-master analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: scrum-master
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/scrum-master/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
.workflow/active/WFS-{session}/.brainstorming/scrum-master/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"scrum_master": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/scrum-master/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/scrum-master/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute subject-matter-expert analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: subject-matter-expert
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
.workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"subject_matter_expert": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -48,7 +48,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
### Phase 1: Discovery & Validation
1. **Detect Session**: Use `--session` parameter or find `.workflow/sessions/WFS-*` directories
1. **Detect Session**: Use `--session` parameter or find `.workflow/active/WFS-*` directories
2. **Validate Files**:
- `guidance-specification.md` (optional, warn if missing)
- `*/analysis*.md` (required, error if empty)
@@ -59,7 +59,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
**Main flow prepares file paths for Agent**:
1. **Discover Analysis Files**:
- Glob(.workflow/sessions/WFS-{session}/.brainstorming/*/analysis*.md)
- Glob(.workflow/active/WFS-{session}/.brainstorming/*/analysis*.md)
- Supports: analysis.md, analysis-1.md, analysis-2.md, analysis-3.md
- Validate: At least one file exists (error if empty)
@@ -69,7 +69,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
3. **Pass to Agent** (Phase 3):
- `session_id`
- `brainstorm_dir`: .workflow/sessions/WFS-{session}/.brainstorming/
- `brainstorm_dir`: .workflow/active/WFS-{session}/.brainstorming/
- `role_analysis_paths`: ["product-manager/analysis.md", "system-architect/analysis-1.md", ...]
- `participating_roles`: ["product-manager", "system-architect", ...]
@@ -361,7 +361,7 @@ Updated {role2}/analysis.md with Clarifications section + enhanced content
## Output
**Location**: `.workflow/sessions/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
**Location**: `.workflow/active/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
**Updated Structure**:
```markdown

View File

@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
### Output Files
```
.workflow/sessions/WFS-[topic]/.brainstorming/
.workflow/active/WFS-[topic]/.brainstorming/
├── guidance-specification.md # Input: Framework (if exists)
└── system-architect/
└── analysis.md # ★ OUTPUT: Framework-based analysis
@@ -187,7 +187,7 @@ IF update_mode = "incremental":
Session detection and selection:
```bash
# Check for existing sessions
existing_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
existing_sessions=$(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null)
if [ multiple_sessions ]; then
prompt_user_to_select_session()
else
@@ -279,7 +279,7 @@ TodoWrite tracking for two-step process:
### Output Location
```
.workflow/sessions/WFS-{topic-slug}/.brainstorming/system-architect/
.workflow/active/WFS-{topic-slug}/.brainstorming/system-architect/
├── analysis.md # Primary architecture analysis
├── architecture-design.md # Detailed system design and diagrams
├── technology-stack.md # Technology stack recommendations and justifications
@@ -340,7 +340,7 @@ Upon completion, update `workflow-session.json`:
"system_architect": {
"status": "completed",
"completed_at": "timestamp",
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/system-architect/",
"output_directory": ".workflow/active/WFS-{topic}/.brainstorming/system-architect/",
"key_insights": ["scalability_bottleneck", "architecture_pattern", "technology_recommendation"]
}
}

View File

@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -88,13 +88,13 @@ Execute ui-designer analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: ui-designer
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/ui-designer/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -164,7 +164,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
.workflow/active/WFS-{session}/.brainstorming/ui-designer/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -209,7 +209,7 @@ TodoWrite({
"ui_designer": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -88,13 +88,13 @@ Execute ux-expert analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: ux-expert
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/ux-expert/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -164,7 +164,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
.workflow/active/WFS-{session}/.brainstorming/ux-expert/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -209,7 +209,7 @@ TodoWrite({
"ux_expert": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/ux-expert/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -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
```

View File

@@ -70,7 +70,7 @@ CONTEXT: Existing user database schema, REST API endpoints
**Validation**:
- Session ID successfully extracted
- Session directory `.workflow/[sessionId]/` exists
- Session directory `.workflow/active/[sessionId]/` exists
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
@@ -87,7 +87,7 @@ CONTEXT: Existing user database schema, REST API endpoints
**Parse Output**:
- Extract: context-package.json path (store as `contextPath`)
- Typical pattern: `.workflow/[sessionId]/.process/context-package.json`
- Typical pattern: `.workflow/active/[sessionId]/.process/context-package.json`
**Validation**:
- Context package path extracted
@@ -141,7 +141,7 @@ CONTEXT: Existing user database schema, REST API endpoints
- Verify: CONFLICT_RESOLUTION.md file path (if executed)
**Validation**:
- File `.workflow/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
- File `.workflow/active/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
**Skip Behavior**:
- If conflict_risk is "none" or "low", skip directly to Phase 3.5
@@ -232,9 +232,9 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]
**Input**: `sessionId` from Phase 1
**Validation**:
- `.workflow/[sessionId]/IMPL_PLAN.md` exists
- `.workflow/[sessionId]/.task/IMPL-*.json` exists (at least one)
- `.workflow/[sessionId]/TODO_LIST.md` exists
- `.workflow/active/[sessionId]/IMPL_PLAN.md` exists
- `.workflow/active/[sessionId]/.task/IMPL-*.json` exists (at least one)
- `.workflow/active/[sessionId]/TODO_LIST.md` exists
<!-- TodoWrite: When task-generate-agent invoked, ATTACH 1 agent task -->
@@ -266,7 +266,7 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]
```
Planning complete for session: [sessionId]
Tasks generated: [count]
Plan: .workflow/[sessionId]/IMPL_PLAN.md
Plan: .workflow/active/[sessionId]/IMPL_PLAN.md
Recommended Next Steps:
1. /workflow:action-plan-verify --session [sessionId] # Verify plan quality before execution

View File

@@ -39,17 +39,17 @@ argument-hint: "[--type=security|architecture|action-items|quality] [optional: s
if [ -n "$SESSION_ARG" ]; then
sessionId="$SESSION_ARG"
else
sessionId=$(find .workflow/sessions/ -name "WFS-*" -type d | head -1 | xargs basename)
sessionId=$(find .workflow/active/ -name "WFS-*" -type d | head -1 | xargs basename)
fi
# Step 2: Validation
if [ ! -d ".workflow/sessions/${sessionId}" ]; then
if [ ! -d ".workflow/active/${sessionId}" ]; then
echo "Session ${sessionId} not found"
exit 1
fi
# Check for completed tasks
if [ ! -d ".workflow/sessions/${sessionId}/.summaries" ] || [ -z "$(find .workflow/sessions/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
if [ ! -d ".workflow/active/${sessionId}/.summaries" ] || [ -z "$(find .workflow/active/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
echo "No completed implementation found. Complete implementation first"
exit 1
fi
@@ -80,13 +80,13 @@ After bash validation, the model takes control to:
1. **Load Context**: Read completed task summaries and changed files
```bash
# Load implementation summaries
cat .workflow/sessions/${sessionId}/.summaries/IMPL-*.md
cat .workflow/active/${sessionId}/.summaries/IMPL-*.md
# Load test results (if available)
cat .workflow/sessions/${sessionId}/.summaries/TEST-FIX-*.md 2>/dev/null
cat .workflow/active/${sessionId}/.summaries/TEST-FIX-*.md 2>/dev/null
# Get changed files
git log --since="$(cat .workflow/sessions/${sessionId}/workflow-session.json | jq -r .created_at)" --name-only --pretty=format: | sort -u
git log --since="$(cat .workflow/active/${sessionId}/workflow-session.json | jq -r .created_at)" --name-only --pretty=format: | sort -u
```
2. **Perform Specialized Review**: Based on `review_type`
@@ -99,7 +99,7 @@ After bash validation, the model takes control to:
```
- Use Gemini for security analysis:
```bash
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Security audit of completed implementation
TASK: Review code for security vulnerabilities, insecure patterns, auth/authz issues
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -111,7 +111,7 @@ After bash validation, the model takes control to:
**Architecture Review** (`--type=architecture`):
- Use Qwen for architecture analysis:
```bash
cd .workflow/sessions/${sessionId} && qwen -p "
cd .workflow/active/${sessionId} && qwen -p "
PURPOSE: Architecture compliance review
TASK: Evaluate adherence to architectural patterns, identify technical debt, review design decisions
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -123,7 +123,7 @@ After bash validation, the model takes control to:
**Quality Review** (`--type=quality`):
- Use Gemini for code quality:
```bash
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Code quality and best practices review
TASK: Assess code readability, maintainability, adherence to best practices
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -136,14 +136,14 @@ After bash validation, the model takes control to:
- Verify all requirements and acceptance criteria met:
```bash
# Load task requirements and acceptance criteria
find .workflow/sessions/${sessionId}/.task -name "IMPL-*.json" -exec jq -r '
find .workflow/active/${sessionId}/.task -name "IMPL-*.json" -exec jq -r '
"Task: " + .id + "\n" +
"Requirements: " + (.context.requirements | join(", ")) + "\n" +
"Acceptance: " + (.context.acceptance | join(", "))
' {} \;
# Check implementation summaries against requirements
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Verify all requirements and acceptance criteria are met
TASK: Cross-check implementation summaries against original requirements
CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -195,7 +195,7 @@ After bash validation, the model takes control to:
4. **Output Files**:
```bash
# Save review report
Write(.workflow/sessions/${sessionId}/REVIEW-${review_type}.md)
Write(.workflow/active/${sessionId}/REVIEW-${review_type}.md)
# Update session metadata
# (optional) Update workflow-session.json with review status

View File

@@ -26,17 +26,17 @@ Mark the currently active workflow session as complete, analyze it for lessons l
#### Step 1.1: Find Active Session and Get Name
```bash
# Find active session directory
bash(find .workflow/sessions/ -name "WFS-*" -type d | head -1)
bash(find .workflow/active/ -name "WFS-*" -type d | head -1)
# Extract session name from directory path
bash(basename .workflow/sessions/WFS-session-name)
bash(basename .workflow/active/WFS-session-name)
```
**Output**: Session name `WFS-session-name`
#### Step 1.2: Check for Existing Archiving Marker (Resume Detection)
```bash
# Check if session is already being archived
bash(test -f .workflow/sessions/WFS-session-name/.archiving && echo "RESUMING" || echo "NEW")
bash(test -f .workflow/active/WFS-session-name/.archiving && echo "RESUMING" || echo "NEW")
```
**If RESUMING**:
@@ -49,14 +49,14 @@ bash(test -f .workflow/sessions/WFS-session-name/.archiving && echo "RESUMING" |
#### Step 1.3: Create Archiving Marker
```bash
# Mark session as "archiving in progress"
bash(touch .workflow/sessions/WFS-session-name/.archiving)
bash(touch .workflow/active/WFS-session-name/.archiving)
```
**Purpose**:
- Prevents concurrent operations on this session
- Enables recovery if archival fails
- Session remains in `.workflow/sessions/` for agent analysis
- Session remains in `.workflow/active/` for agent analysis
**Result**: Session still at `.workflow/sessions/WFS-session-name/` with `.archiving` marker
**Result**: Session still at `.workflow/active/WFS-session-name/` with `.archiving` marker
### Phase 2: Agent Analysis (In-Place Processing)
@@ -75,7 +75,7 @@ Task(
Analyze workflow session for archival preparation. Session is STILL in active location.
## Context
- Session: .workflow/sessions/WFS-session-name/
- Session: .workflow/active/WFS-session-name/
- Status: Marked as archiving (.archiving marker present)
- Location: Active sessions directory (NOT archived yet)
@@ -123,7 +123,7 @@ Analyze workflow session for archival preparation. Session is STILL in active lo
## Important Constraints
- DO NOT move or delete any files
- DO NOT update manifest.json yet
- Session remains in .workflow/sessions/ during analysis
- Session remains in .workflow/active/ during analysis
- Return complete metadata package for orchestrator to commit atomically
## Error Handling
@@ -135,7 +135,7 @@ Analyze workflow session for archival preparation. Session is STILL in active lo
**Expected Output**:
- Agent returns complete metadata package
- Session remains in `.workflow/sessions/` with `.archiving` marker
- Session remains in `.workflow/active/` with `.archiving` marker
- No files moved or manifests updated yet
### Phase 3: Atomic Commit (Transactional File Operations)
@@ -149,7 +149,7 @@ bash(mkdir -p .workflow/archives/)
#### Step 3.2: Move Session to Archive
```bash
bash(mv .workflow/sessions/WFS-session-name .workflow/archives/WFS-session-name)
bash(mv .workflow/active/WFS-session-name .workflow/archives/WFS-session-name)
```
**Result**: Session now at `.workflow/archives/WFS-session-name/`
@@ -345,16 +345,16 @@ function getLatestCommitHash() {
**Recovery Steps**:
```bash
# Session still in .workflow/sessions/WFS-session-name
# Session still in .workflow/active/WFS-session-name
# Remove archiving marker
bash(rm .workflow/sessions/WFS-session-name/.archiving)
bash(rm .workflow/active/WFS-session-name/.archiving)
```
**User Notification**:
```
ERROR: Session archival failed during analysis phase
Reason: [error message from agent]
Session remains active in: .workflow/sessions/WFS-session-name
Session remains active in: .workflow/active/WFS-session-name
Recovery:
1. Fix any issues identified in error message
@@ -373,7 +373,7 @@ Session state: SAFE (no changes committed)
**Recovery Steps**:
```bash
# Archiving marker still present
# Session still in .workflow/sessions/ (move failed)
# Session still in .workflow/active/ (move failed)
# No manifest updated yet
```
@@ -381,7 +381,7 @@ Session state: SAFE (no changes committed)
```
ERROR: Session archival failed during move operation
Reason: [mv error message]
Session remains in: .workflow/sessions/WFS-session-name
Session remains in: .workflow/active/WFS-session-name
Recovery:
1. Fix filesystem issues (permissions, disk space)

View File

@@ -19,35 +19,35 @@ Display all workflow sessions with their current status, progress, and metadata.
### Step 1: Find All Sessions
```bash
ls .workflow/sessions/WFS-* 2>/dev/null
ls .workflow/active/WFS-* 2>/dev/null
```
### Step 2: Check Active Session
```bash
find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1
```
### Step 3: Read Session Metadata
```bash
jq -r '.session_id, .status, .project' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.session_id, .status, .project' .workflow/active/WFS-session/workflow-session.json
```
### Step 4: Count Task Progress
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
find .workflow/sessions/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
```
### Step 5: Get Creation Time
```bash
jq -r '.created_at // "unknown"' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.created_at // "unknown"' .workflow/active/WFS-session/workflow-session.json
```
## Simple Bash Commands
### Basic Operations
- **List sessions**: `find .workflow/sessions/ -name "WFS-*" -type d`
- **Find active**: `find .workflow/sessions/ -name "WFS-*" -type d`
- **List sessions**: `find .workflow/active/ -name "WFS-*" -type d`
- **Find active**: `find .workflow/active/ -name "WFS-*" -type d`
- **Read session data**: `jq -r '.session_id, .status' session.json`
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
@@ -89,8 +89,8 @@ Total: 3 sessions (1 active, 1 paused, 1 completed)
### Quick Commands
```bash
# Count all sessions
ls .workflow/sessions/WFS-* | wc -l
ls .workflow/active/WFS-* | wc -l
# Show recent sessions
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -3
ls -t .workflow/active/WFS-*/workflow-session.json | head -3
```

View File

@@ -17,37 +17,37 @@ Resume the most recently paused workflow session, restoring all context and stat
### Step 1: Find Paused Sessions
```bash
ls .workflow/sessions/WFS-* 2>/dev/null
ls .workflow/active/WFS-* 2>/dev/null
```
### Step 2: Check Session Status
```bash
jq -r '.status' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.status' .workflow/active/WFS-session/workflow-session.json
```
### Step 3: Find Most Recent Paused
```bash
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -1
ls -t .workflow/active/WFS-*/workflow-session.json | head -1
```
### Step 4: Update Session Status
```bash
jq '.status = "active"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
jq '.status = "active"' .workflow/active/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/active/WFS-session/workflow-session.json
```
### Step 5: Add Resume Timestamp
```bash
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/active/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/active/WFS-session/workflow-session.json
```
## Simple Bash Commands
### Basic Operations
- **List sessions**: `ls .workflow/sessions/WFS-*`
- **List sessions**: `ls .workflow/active/WFS-*`
- **Check status**: `jq -r '.status' session.json`
- **Find recent**: `ls -t .workflow/sessions/*/workflow-session.json | head -1`
- **Find recent**: `ls -t .workflow/active/*/workflow-session.json | head -1`
- **Update status**: `jq '.status = "active"' session.json > temp.json`
- **Add timestamp**: `jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`

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`

View File

@@ -156,28 +156,28 @@ Use /workflow:session:complete to archive current session.
### Step 1: Find Active Session
```bash
find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1
```
### Step 2: Load Session Data
```bash
cat .workflow/sessions/WFS-session/workflow-session.json
cat .workflow/active/WFS-session/workflow-session.json
```
### Step 3: Scan Task Files
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
find .workflow/active/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
```
### Step 4: Generate Task Status
```bash
cat .workflow/sessions/WFS-session/.task/impl-1.json | jq -r '.status'
cat .workflow/active/WFS-session/.task/impl-1.json | jq -r '.status'
```
### Step 5: Count Task Progress
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f | wc -l
find .workflow/sessions/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.task/ -name "*.json" -type f | wc -l
find .workflow/active/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
```
### Step 6: Display Overview

View File

@@ -70,7 +70,7 @@ TEST_FOCUS: [Test scenarios]
**Parse Output**:
- Extract: context-package.json path (store as `contextPath`)
- Typical pattern: `.workflow/[sessionId]/.process/context-package.json`
- Typical pattern: `.workflow/active/[sessionId]/.process/context-package.json`
**Validation**:
- Context package path extracted
@@ -91,7 +91,7 @@ TEST_FOCUS: [Test scenarios]
- Related components and integration points
- Test framework detection
**Parse**: Extract testContextPath (`.workflow/[sessionId]/.process/test-context-package.json`)
**Parse**: Extract testContextPath (`.workflow/active/[sessionId]/.process/test-context-package.json`)
**Benefits**:
- Makes TDD aware of existing environment
@@ -153,7 +153,7 @@ TEST_FOCUS: [Test scenarios]
- Verify: CONFLICT_RESOLUTION.md file path (if executed)
**Validation**:
- File `.workflow/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
- File `.workflow/active/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
**Skip Behavior**:
- If conflict_risk is "none" or "low", skip directly to Phase 5
@@ -296,9 +296,9 @@ Structure:
[...]
Plans generated:
- Unified Implementation Plan: .workflow/[sessionId]/IMPL_PLAN.md
- Unified Implementation Plan: .workflow/active/[sessionId]/IMPL_PLAN.md
(includes TDD Implementation Tasks section with workflow_type: "tdd")
- Task List: .workflow/[sessionId]/TODO_LIST.md
- Task List: .workflow/active/[sessionId]/TODO_LIST.md
(with internal TDD phase indicators)
TDD Configuration:
@@ -496,7 +496,7 @@ Supports action-planning-agent for more autonomous TDD planning with:
**Session Structure**:
```
.workflow/sessions/WFS-xxx/
.workflow/active/WFS-xxx/
├── IMPL_PLAN.md (unified plan with TDD Implementation Tasks section)
├── TODO_LIST.md (with internal TDD phase indicators)
├── .process/

View File

@@ -28,7 +28,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(gemini:*)
sessionId = argument
# Else auto-detect active session
find .workflow/sessions/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
find .workflow/active/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
```
**Extract**: sessionId
@@ -44,18 +44,18 @@ find .workflow/sessions/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
```bash
# Load all task JSONs
find .workflow/sessions/{sessionId}/.task/ -name '*.json'
find .workflow/active/{sessionId}/.task/ -name '*.json'
# Extract task IDs
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
# Check dependencies
find .workflow/sessions/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/sessions/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/active/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/active/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
# Check meta fields
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
```
**Validation**:
@@ -82,9 +82,9 @@ find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.age
- Compliance score
**Validation**:
- `.workflow/sessions/{sessionId}/.process/test-results.json` exists
- `.workflow/sessions/{sessionId}/.process/coverage-report.json` exists
- `.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md` exists
- `.workflow/active/{sessionId}/.process/test-results.json` exists
- `.workflow/active/{sessionId}/.process/coverage-report.json` exists
- `.workflow/active/{sessionId}/.process/tdd-cycle-report.md` exists
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
@@ -97,7 +97,7 @@ find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.age
cd project-root && gemini -p "
PURPOSE: Generate TDD compliance report
TASK: Analyze TDD workflow execution and generate quality report
CONTEXT: @{.workflow/sessions/{sessionId}/.task/*.json,.workflow/sessions/{sessionId}/.summaries/*,.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md}
CONTEXT: @{.workflow/active/{sessionId}/.task/*.json,.workflow/active/{sessionId}/.summaries/*,.workflow/active/{sessionId}/.process/tdd-cycle-report.md}
EXPECTED:
- TDD compliance score (0-100)
- Chain completeness verification
@@ -106,7 +106,7 @@ EXPECTED:
- Red-Green-Refactor cycle validation
- Best practices adherence assessment
RULES: Focus on TDD best practices and workflow adherence. Be specific about violations and improvements.
" > .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
" > .workflow/active/{sessionId}/TDD_COMPLIANCE_REPORT.md
```
**Output**: TDD_COMPLIANCE_REPORT.md
@@ -134,7 +134,7 @@ Function Coverage: {percentage}%
## Compliance Score: {score}/100
Detailed report: .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
Detailed report: .workflow/active/{sessionId}/TDD_COMPLIANCE_REPORT.md
Recommendations:
- Complete missing REFACTOR-3.1 task
@@ -168,7 +168,7 @@ TodoWrite({todos: [
### Chain Validation Algorithm
```
1. Load all task JSONs from .workflow/sessions/{sessionId}/.task/
1. Load all task JSONs from .workflow/active/{sessionId}/.task/
2. Extract task IDs and group by feature number
3. For each feature:
- Check TEST-N.M exists
@@ -202,7 +202,7 @@ Final Score: Max(0, Base Score - Deductions)
## Output Files
```
.workflow/sessions/{session-id}/
.workflow/active/{session-id}/
├── TDD_COMPLIANCE_REPORT.md # Comprehensive compliance report ⭐
└── .process/
├── test-results.json # From tdd-coverage-analysis

View File

@@ -543,7 +543,7 @@ This package is passed to agents via the Task tool's prompt context.
"coverage_target": 80
},
"session": {
"workflow_dir": ".workflow/sessions/WFS-test-{session}/",
"workflow_dir": ".workflow/active/WFS-test-{session}/",
"iteration_state_file": ".process/iteration-state.json",
"test_results_file": ".process/test-results.json",
"fix_history_file": ".process/fix-history.json"
@@ -555,7 +555,7 @@ This package is passed to agents via the Task tool's prompt context.
### Test-Fix Session Files
```
.workflow/sessions/WFS-test-{session}/
.workflow/active/WFS-test-{session}/
├── workflow-session.json # Session metadata with workflow_type
├── IMPL_PLAN.md # Test plan
├── TODO_LIST.md # Progress tracking

View File

@@ -513,7 +513,7 @@ If quality gate fails:
### Output Files Structure
Created in `.workflow/sessions/WFS-test-[session]/`:
Created in `.workflow/active/WFS-test-[session]/`:
```
WFS-test-[session]/
@@ -579,7 +579,7 @@ Test-Fix-Gen Workflow Orchestrator (Dual-Mode Support)
└─ Command ends, control returns to user
Artifacts Created:
├── .workflow/sessions/WFS-test-[session]/
├── .workflow/active/WFS-test-[session]/
│ ├── workflow-session.json
│ ├── IMPL_PLAN.md
│ ├── TODO_LIST.md

View File

@@ -397,7 +397,7 @@ Test-Gen Workflow Orchestrator
└─ Command ends, control returns to user
Artifacts Created:
├── .workflow/sessions/WFS-test-[session]/
├── .workflow/active/WFS-test-[session]/
│ ├── workflow-session.json
│ ├── IMPL_PLAN.md
│ ├── TODO_LIST.md
@@ -444,7 +444,7 @@ See `/workflow:tools:test-task-generate` for complete task JSON schemas.
## Output Files
Created in `.workflow/sessions/WFS-test-[session]/`:
Created in `.workflow/active/WFS-test-[session]/`:
- `workflow-session.json` - Session metadata
- `.process/test-context-package.json` - Coverage analysis
- `.process/TEST_ANALYSIS_RESULTS.md` - Test requirements

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

View File

@@ -67,7 +67,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -25,10 +25,10 @@ Synchronize finalized design system references to brainstorming artifacts, prepa
```bash
# Validate session
CHECK: find .workflow/sessions/ -name "WFS-*" -type d; VALIDATE: session_id matches active session
CHECK: find .workflow/active/ -name "WFS-*" -type d; VALIDATE: session_id matches active session
# Verify design artifacts in latest design run
latest_design = find_latest_path_matching(".workflow/sessions/WFS-{session}/design-run-*")
latest_design = find_latest_path_matching(".workflow/active/WFS-{session}/design-run-*")
# Detect design system structure
IF exists({latest_design}/style-extraction/style-1/design-tokens.json):
@@ -51,7 +51,7 @@ REPORT: "Found {count} design artifacts, {prototype_count} prototypes"
```bash
# Check if role analysis documents contains current design run reference
synthesis_spec_path = ".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents"
synthesis_spec_path = ".workflow/active/WFS-{session}/.brainstorming/role analysis documents"
current_design_run = basename(latest_design) # e.g., "design-run-20250109-143022"
IF exists(synthesis_spec_path):
@@ -68,8 +68,8 @@ IF exists(synthesis_spec_path):
```bash
# Load target brainstorming artifacts (files to be updated)
Read(.workflow/sessions/WFS-{session}/.brainstorming/role analysis documents)
IF exists(.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
Read(.workflow/active/WFS-{session}/.brainstorming/role analysis documents)
IF exists(.workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
# Optional: Read prototype notes for descriptions (minimal context)
FOR each selected_prototype IN selected_list:
@@ -113,7 +113,7 @@ Update `.brainstorming/role analysis documents` with design system references.
**Implementation**:
```bash
# Option 1: Edit existing section
Edit(file_path=".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents",
Edit(file_path=".workflow/active/WFS-{session}/.brainstorming/role analysis documents",
old_string="## UI/UX Guidelines\n[existing content]",
new_string="## UI/UX Guidelines\n\n[new design reference content]")
@@ -128,15 +128,15 @@ IF section not found:
```bash
# Always update ui-designer
ui_designer_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
ui_designer_files = Glob(".workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
# Conditionally update other roles
has_animations = exists({latest_design}/animation-extraction/animation-tokens.json)
has_layouts = exists({latest_design}/layout-extraction/layout-templates.json)
IF has_animations: ux_expert_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
IF has_layouts: architect_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/system-architect/analysis*.md")
IF selected_list: pm_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis*.md")
IF has_animations: ux_expert_files = Glob(".workflow/active/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
IF has_layouts: architect_files = Glob(".workflow/active/WFS-{session}/.brainstorming/system-architect/analysis*.md")
IF selected_list: pm_files = Glob(".workflow/active/WFS-{session}/.brainstorming/product-manager/analysis*.md")
```
**Content Templates**:
@@ -223,7 +223,7 @@ For complete token definitions and usage examples, see:
**Implementation**:
```bash
Write(file_path=".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
Write(file_path=".workflow/active/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
content="[generated content with @ references]")
```
@@ -259,7 +259,7 @@ Next: /workflow:plan [--agent] "<task description>"
**Updated Files**:
```
.workflow/sessions/WFS-{session}/.brainstorming/
.workflow/active/WFS-{session}/.brainstorming/
├── role analysis documents # Updated with UI/UX Guidelines section
├── ui-designer/
│ ├── analysis*.md # Updated with design system references

View File

@@ -201,7 +201,7 @@ device_source = track_detection_source()
### Phase 4: Run Initialization & Directory Setup
```bash
design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
relative_base_path = --session ? ".workflow/sessions/WFS-{session}/${design_id}" : ".workflow/${design_id}"
relative_base_path = --session ? ".workflow/active/WFS-{session}/${design_id}" : ".workflow/${design_id}"
# Create directory and convert to absolute path
Bash(mkdir -p "${relative_base_path}/style-extraction")

View File

@@ -31,7 +31,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -67,7 +67,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
**Optional Parameters**:
- `--session <id>`: Workflow session ID
- Integrate into existing session (`.workflow/sessions/WFS-{session}/`)
- Integrate into existing session (`.workflow/active/WFS-{session}/`)
- Enable automatic design system integration (Phase 4)
- If not provided: standalone mode (`.workflow/`)
@@ -98,7 +98,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
**Session Integration**:
- `--session` flag determines session integration or standalone execution
- Integrated: Design system automatically added to session artifacts
- Standalone: Output in `.workflow/sessions/{run_id}/`
- Standalone: Output in `.workflow/active/{run_id}/`
## 5-Phase Execution
@@ -184,11 +184,11 @@ design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
IF --session:
session_id = {provided_session}
relative_base_path = ".workflow/sessions/WFS-{session_id}/{design_id}"
relative_base_path = ".workflow/active/WFS-{session_id}/{design_id}"
session_mode = "integrated"
ELSE:
session_id = null
relative_base_path = ".workflow/sessions/{design_id}"
relative_base_path = ".workflow/active/{design_id}"
session_mode = "standalone"
# Create base directory and convert to absolute path

View File

@@ -61,7 +61,7 @@ if [ -n "$DESIGN_ID" ]; then
fi
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
if [ -z "$relative_path" ]; then
echo "ERROR: No design run found in session: $SESSION_ID"
echo "HINT: Create a design run first or provide --design-id"

View File

@@ -84,7 +84,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -62,7 +62,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -102,7 +102,7 @@ Phase 2: Document Generation (Autonomous Output)
1. **Extract Tasks**: Parse `analysis_results.tasks` array
2. **Map Artifacts**: Use `artifacts_inventory` to add artifact references to task.context
3. **Assess Complexity**: Use `analysis_results.complexity` for document structure decision
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/sessions/{session_id}/)
4. **Session Paths**: Use `session_id` to construct output paths (.workflow/active/{session_id}/)
### MCP Integration Guidelines
@@ -244,14 +244,14 @@ Generate individual `.task/IMPL-*.json` files with:
- Low priority: role_analyses
### 3. Implementation Plan Creation
Generate `IMPL_PLAN.md` at `.workflow/sessions/{session_id}/IMPL_PLAN.md`:
Generate `IMPL_PLAN.md` at `.workflow/active/{session_id}/IMPL_PLAN.md`:
**Structure**:
```markdown
---
identifier: {session_id}
source: "User requirements"
analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md
analysis: .workflow/active/{session_id}/.process/ANALYSIS_RESULTS.md
---
# Implementation Plan: {Project Title}
@@ -280,7 +280,7 @@ analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md
```
### 4. TODO List Generation
Generate `TODO_LIST.md` at `.workflow/sessions/{session_id}/TODO_LIST.md`:
Generate `TODO_LIST.md` at `.workflow/active/{session_id}/TODO_LIST.md`:
**Structure**:
```markdown

View File

@@ -190,11 +190,11 @@ cd src/auth && gemini -p "CONTEXT: @**/* @../shared/**/*" --include-directories
**Session Detection**:
```bash
find .workflow/sessions/ -name 'WFS-*' -type d
find .workflow/active/ -name 'WFS-*' -type d
```
**Output Paths**:
- **With session**: `.workflow/sessions/WFS-{id}/.chat/{agent}-{timestamp}.md`
- **With session**: `.workflow/active/WFS-{id}/.chat/{agent}-{timestamp}.md`
- **No session**: `.workflow/.scratchpad/{agent}-{description}-{timestamp}.md`
**Log Structure**:

View File

@@ -274,7 +274,7 @@ Calculate risk level based on:
**3.7 Context Packaging & Output**
**Output**: `.workflow/sessions//{session-id}/.process/context-package.json`
**Output**: `.workflow/active//{session-id}/.process/context-package.json`
**Note**: Task JSONs reference via `context_package_path` field (not in `artifacts`)

View File

@@ -304,7 +304,7 @@ if (!validation.all_passed()) {
## Output Location
```
.workflow/sessions/{test_session_id}/.process/test-context-package.json
.workflow/active/{test_session_id}/.process/test-context-package.json
```
## Helper Functions Reference

View File

@@ -76,8 +76,8 @@ Use `resume --last` when current task extends/relates to previous execution. See
## Workflow Integration
**Session Management**: Auto-detects active session from `.workflow/sessions/` directory
- Active session: Save to `.workflow/sessions/WFS-[id]/.chat/execute-[timestamp].md`
**Session Management**: Auto-detects active session from `.workflow/active/` directory
- Active session: Save to `.workflow/active/WFS-[id]/.chat/execute-[timestamp].md`
- No session: Create new session or save to scratchpad
**Task Integration**: Load from `.task/[TASK-ID].json`, update status, generate summary

View File

@@ -63,10 +63,10 @@ Lightweight planner that analyzes project structure, decomposes documentation wo
bash(pwd && basename "$(pwd)" && git rev-parse --show-toplevel 2>/dev/null || pwd && date +%Y%m%d-%H%M%S)
# Create session directories (replace timestamp)
bash(mkdir -p .workflow/sessions/WFS-docs-{timestamp}/.{task,process,summaries})
bash(mkdir -p .workflow/active/WFS-docs-{timestamp}/.{task,process,summaries})
# Create workflow-session.json (replace values)
bash(echo '{"session_id":"WFS-docs-{timestamp}","project":"{project} documentation","status":"planning","timestamp":"2024-01-20T14:30:22+08:00","path":".","target_path":"{target_path}","project_root":"{project_root}","project_name":"{project_name}","mode":"full","tool":"gemini","cli_execute":false}' | jq '.' > .workflow/sessions/WFS-docs-{timestamp}/workflow-session.json)
bash(echo '{"session_id":"WFS-docs-{timestamp}","project":"{project} documentation","status":"planning","timestamp":"2024-01-20T14:30:22+08:00","path":".","target_path":"{target_path}","project_root":"{project_root}","project_name":"{project_name}","mode":"full","tool":"gemini","cli_execute":false}' | jq '.' > .workflow/active/WFS-docs-{timestamp}/workflow-session.json)
```
### Phase 2: Analyze Structure
@@ -458,7 +458,7 @@ api_id=$((group_count + 3))
**Unified Structure** (single JSON replaces multiple text files):
```
.workflow/sessions/
.workflow/active/
└── WFS-docs-{timestamp}/
├── workflow-session.json # Session metadata
├── IMPL_PLAN.md

View File

@@ -128,8 +128,8 @@ Generate a complete tech stack SKILL package with Exa research.
1. **Extract Tech Stack Information**:
IF MODE == 'session':
- Read `.workflow/sessions/{session_id}/workflow-session.json`
- Read `.workflow/sessions/{session_id}/.process/context-package.json`
- Read `.workflow/active/{session_id}/workflow-session.json`
- Read `.workflow/active/{session_id}/.process/context-package.json`
- Extract tech_stack: {language, frameworks, libraries}
- Build tech stack name: \"{language}-{framework1}-{framework2}\"
- Example: \"typescript-react-nextjs\"

View File

@@ -32,7 +32,7 @@ Identify inconsistencies, duplications, ambiguities, and underspecified items be
IF --session parameter provided:
session_id = provided session
ELSE:
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
ELSE:
@@ -40,7 +40,7 @@ ELSE:
EXIT
# Derive absolute paths
session_dir = .workflow/sessions/WFS-{session}
session_dir = .workflow/active/WFS-{session}
brainstorm_dir = session_dir/.brainstorming
task_dir = session_dir/.task
@@ -333,7 +333,7 @@ Output a Markdown report (no file writes) with the following structure:
#### TodoWrite-Based Remediation Workflow
**Report Location**: `.workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
**Report Location**: `.workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md`
**Recommended Workflow**:
1. **Create TodoWrite Task List**: Extract all findings from report
@@ -361,7 +361,7 @@ Priority Order:
**Save Analysis Report**:
```bash
report_path = ".workflow/sessions/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
report_path = ".workflow/active/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
Write(report_path, full_report_content)
```
@@ -404,12 +404,12 @@ TodoWrite([
**File Modification Workflow**:
```bash
# For task JSON modifications:
1. Read(.workflow/sessions/WFS-{session}/.task/IMPL-X.Y.json)
1. Read(.workflow/active/WFS-{session}/.task/IMPL-X.Y.json)
2. Edit() to apply fixes
3. Mark todo as completed
# For IMPL_PLAN modifications:
1. Read(.workflow/sessions/WFS-{session}/IMPL_PLAN.md)
1. Read(.workflow/active/WFS-{session}/IMPL_PLAN.md)
2. Edit() to apply strategic changes
3. Mark todo as completed
```

View File

@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
### Output Files
```
.workflow/sessions/WFS-[topic]/.brainstorming/
.workflow/active/WFS-[topic]/.brainstorming/
├── guidance-specification.md # Input: Framework (if exists)
└── api-designer/
└── analysis.md # ★ OUTPUT: Framework-based analysis
@@ -181,7 +181,7 @@ IF update_mode = "incremental":
Session detection and selection:
```bash
# Check for active sessions
active_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
active_sessions=$(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null)
if [ multiple_sessions ]; then
prompt_user_to_select_session()
else
@@ -280,7 +280,7 @@ TodoWrite tracking for two-step process:
### Output Location
```
.workflow/sessions/WFS-{topic-slug}/.brainstorming/api-designer/
.workflow/active/WFS-{topic-slug}/.brainstorming/api-designer/
├── analysis.md # Primary API design analysis
├── api-specification.md # Detailed endpoint specifications (OpenAPI/Swagger)
├── data-contracts.md # Request/response schemas and validation rules
@@ -531,7 +531,7 @@ Upon completion, update `workflow-session.json`:
"api_designer": {
"status": "completed",
"completed_at": "timestamp",
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/api-designer/",
"output_directory": ".workflow/active/WFS-{topic}/.brainstorming/api-designer/",
"key_insights": ["endpoint_design", "versioning_strategy", "data_contracts"]
}
}

View File

@@ -10,7 +10,7 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*)
Six-phase workflow: **Automatic project context collection** → Extract topic challenges → Select roles → Generate task-specific questions → Detect conflicts → Generate confirmed guidance (declarative statements only).
**Input**: `"GOAL: [objective] SCOPE: [boundaries] CONTEXT: [background]" [--count N]`
**Output**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
**Output**: `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md` (CONFIRMED/SELECTED format)
**Core Principle**: Questions dynamically generated from project context + topic keywords/challenges, NOT from generic templates
**Parameters**:
@@ -32,7 +32,7 @@ Six-phase workflow: **Automatic project context collection** → Extract topic c
**Standalone Mode**:
```json
[
{"content": "Initialize session (.workflow/sessions/ session check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
{"content": "Initialize session (.workflow/active/ session check, parse --count parameter)", "status": "pending", "activeForm": "Initializing"},
{"content": "Phase 0: Automatic project context collection (call context-gather)", "status": "pending", "activeForm": "Phase 0 context collection"},
{"content": "Phase 1: Extract challenges, output 2-4 task-specific questions, wait for user input", "status": "pending", "activeForm": "Phase 1 topic analysis"},
{"content": "Phase 2: Recommend count+2 roles, output role selection, wait for user input", "status": "pending", "activeForm": "Phase 2 role selection"},
@@ -133,7 +133,7 @@ b) {role-name} ({中文名})
## Execution Phases
### Session Management
- Check `.workflow/sessions/` for existing sessions
- Check `.workflow/active/` for existing sessions
- Multiple sessions → Prompt selection | Single → Use it | None → Create `WFS-[topic-slug]`
- Parse `--count N` parameter from user input (default: 3 if not specified)
- Store decisions in `workflow-session.json` including count parameter
@@ -145,7 +145,7 @@ b) {role-name} ({中文名})
**Detection Mechanism** (execute first):
```javascript
// Check if context-package already exists
const contextPackagePath = `.workflow/sessions/WFS-{session-id}/.process/context-package.json`;
const contextPackagePath = `.workflow/active/WFS-{session-id}/.process/context-package.json`;
if (file_exists(contextPackagePath)) {
// Validate package
@@ -229,7 +229,7 @@ Report completion with statistics.
**Steps**:
1. **Load Phase 0 context** (if available):
- Read `.workflow/sessions/WFS-{session-id}/.process/context-package.json`
- Read `.workflow/active/WFS-{session-id}/.process/context-package.json`
- Extract: tech_stack, existing modules, conflict_risk, relevant files
2. **Deep topic analysis** (context-aware):
@@ -449,7 +449,7 @@ FOR each selected role:
## Output Document Template
**File**: `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md`
**File**: `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md`
```markdown
# [Project] - Confirmed Guidance Specification
@@ -596,7 +596,7 @@ ELSE:
## File Structure
```
.workflow/sessions/WFS-[topic]/
.workflow/active/WFS-[topic]/
├── workflow-session.json # Session metadata ONLY
└── .brainstorming/
└── guidance-specification.md # Full guidance content

View File

@@ -85,7 +85,7 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
**Validation**:
- guidance-specification.md created with confirmed decisions
- workflow-session.json contains selected_roles[] (metadata only, no content duplication)
- Session directory `.workflow/sessions/WFS-{topic}/.brainstorming/` exists
- Session directory `.workflow/active/WFS-{topic}/.brainstorming/` exists
**TodoWrite Update (Phase 1 SlashCommand invoked - tasks attached)**:
```json
@@ -132,13 +132,13 @@ Execute {role-name} analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: {role-name}
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/{role}/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/{role}/
TOPIC: {user-provided-topic}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -148,7 +148,7 @@ TOPIC: {user-provided-topic}
3. **load_session_metadata**
- Action: Load session metadata and original user intent
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context (contains original user prompt as PRIMARY reference)
4. **load_style_skill** (ONLY for ui-designer role when style_skill_package exists)
@@ -194,7 +194,7 @@ TOPIC: {user-provided-topic}
- guidance-specification.md path
**Validation**:
- Each role creates `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
- Each role creates `.workflow/active/WFS-{topic}/.brainstorming/{role}/analysis.md` (primary file)
- If content is large (>800 lines), may split to `analysis-1.md`, `analysis-2.md` (max 3 files total)
- **File naming pattern**: ALL files MUST start with `analysis` prefix (use `analysis*.md` for globbing)
- **FORBIDDEN naming**: No `recommendations.md`, `recommendations-*.md`, or any non-`analysis` prefixed files
@@ -245,7 +245,7 @@ TOPIC: {user-provided-topic}
**Input**: `sessionId` from Phase 1
**Validation**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
- `.workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
- Synthesis references all role analyses
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
@@ -280,7 +280,7 @@ TOPIC: {user-provided-topic}
```
Brainstorming complete for session: {sessionId}
Roles analyzed: {count}
Synthesis: .workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md
Synthesis: .workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md
✅ Next Steps:
1. /workflow:concept-clarify --session {sessionId} # Optional refinement
@@ -392,7 +392,7 @@ CONTEXT_VARS:
## Session Management
**⚡ FIRST ACTION**: Check `.workflow/sessions/` for existing sessions before Phase 1
**⚡ FIRST ACTION**: Check `.workflow/active/` for existing sessions before Phase 1
**Multiple Sessions Support**:
- Different Claude instances can have different brainstorming sessions
@@ -408,15 +408,15 @@ CONTEXT_VARS:
## Output Structure
**Phase 1 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
- `.workflow/sessions/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
- `.workflow/active/WFS-{topic}/.brainstorming/guidance-specification.md` (framework content)
- `.workflow/active/WFS-{topic}/workflow-session.json` (metadata: selected_roles[], topic, timestamps, style_skill_package)
**Phase 2 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
- `.workflow/active/WFS-{topic}/.brainstorming/{role}/analysis.md` (one per role)
- `.superdesign/design_iterations/` (ui-designer artifacts, if --style-skill provided)
**Phase 3 Output**:
- `.workflow/sessions/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
- `.workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md` (integrated analysis)
**⚠️ Storage Separation**: Guidance content in .md files, metadata in .json (no duplication)
**⚠️ Style References**: When --style-skill provided, workflow-session.json stores style_skill_package name, ui-designer loads from `.claude/skills/style-{package-name}/`
@@ -446,7 +446,7 @@ CONTEXT_VARS:
**File Structure**:
```
.workflow/sessions/WFS-[topic]/
.workflow/active/WFS-[topic]/
├── workflow-session.json # Session metadata ONLY
└── .brainstorming/
├── guidance-specification.md # Framework (Phase 1)

View File

@@ -47,10 +47,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -87,13 +87,13 @@ Execute data-architect analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: data-architect
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/data-architect/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/data-architect/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -103,7 +103,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -163,7 +163,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/data-architect/
.workflow/active/WFS-{session}/.brainstorming/data-architect/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -208,7 +208,7 @@ TodoWrite({
"data_architect": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/data-architect/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/data-architect/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute product-manager analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: product-manager
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-manager/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/product-manager/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/product-manager/
.workflow/active/WFS-{session}/.brainstorming/product-manager/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"product_manager": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/product-manager/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute product-owner analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: product-owner
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/product-owner/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/product-owner/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/product-owner/
.workflow/active/WFS-{session}/.brainstorming/product-owner/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"product_owner": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/product-owner/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/product-owner/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute scrum-master analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: scrum-master
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/scrum-master/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/scrum-master/
.workflow/active/WFS-{session}/.brainstorming/scrum-master/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"scrum_master": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/scrum-master/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/scrum-master/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -27,10 +27,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -67,13 +67,13 @@ Execute subject-matter-expert analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: subject-matter-expert
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -83,7 +83,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -143,7 +143,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/
.workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -188,7 +188,7 @@ TodoWrite({
"subject_matter_expert": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/subject-matter-expert/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -48,7 +48,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
### Phase 1: Discovery & Validation
1. **Detect Session**: Use `--session` parameter or find `.workflow/sessions/WFS-*` directories
1. **Detect Session**: Use `--session` parameter or find `.workflow/active/WFS-*` directories
2. **Validate Files**:
- `guidance-specification.md` (optional, warn if missing)
- `*/analysis*.md` (required, error if empty)
@@ -59,7 +59,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
**Main flow prepares file paths for Agent**:
1. **Discover Analysis Files**:
- Glob(.workflow/sessions/WFS-{session}/.brainstorming/*/analysis*.md)
- Glob(.workflow/active/WFS-{session}/.brainstorming/*/analysis*.md)
- Supports: analysis.md, analysis-1.md, analysis-2.md, analysis-3.md
- Validate: At least one file exists (error if empty)
@@ -69,7 +69,7 @@ Three-phase workflow to eliminate ambiguities and enhance conceptual depth in ro
3. **Pass to Agent** (Phase 3):
- `session_id`
- `brainstorm_dir`: .workflow/sessions/WFS-{session}/.brainstorming/
- `brainstorm_dir`: .workflow/active/WFS-{session}/.brainstorming/
- `role_analysis_paths`: ["product-manager/analysis.md", "system-architect/analysis-1.md", ...]
- `participating_roles`: ["product-manager", "system-architect", ...]
@@ -361,7 +361,7 @@ Updated {role2}/analysis.md with Clarifications section + enhanced content
## Output
**Location**: `.workflow/sessions/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
**Location**: `.workflow/active/WFS-{session}/.brainstorming/[role]/analysis*.md` (in-place updates)
**Updated Structure**:
```markdown

View File

@@ -46,10 +46,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -162,7 +162,7 @@ IF update_mode = "incremental":
### Output Files
```
.workflow/sessions/WFS-[topic]/.brainstorming/
.workflow/active/WFS-[topic]/.brainstorming/
├── guidance-specification.md # Input: Framework (if exists)
└── system-architect/
└── analysis.md # ★ OUTPUT: Framework-based analysis
@@ -187,7 +187,7 @@ IF update_mode = "incremental":
Session detection and selection:
```bash
# Check for existing sessions
existing_sessions=$(find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null)
existing_sessions=$(find .workflow/active/ -name "WFS-*" -type d 2>/dev/null)
if [ multiple_sessions ]; then
prompt_user_to_select_session()
else
@@ -279,7 +279,7 @@ TodoWrite tracking for two-step process:
### Output Location
```
.workflow/sessions/WFS-{topic-slug}/.brainstorming/system-architect/
.workflow/active/WFS-{topic-slug}/.brainstorming/system-architect/
├── analysis.md # Primary architecture analysis
├── architecture-design.md # Detailed system design and diagrams
├── technology-stack.md # Technology stack recommendations and justifications
@@ -340,7 +340,7 @@ Upon completion, update `workflow-session.json`:
"system_architect": {
"status": "completed",
"completed_at": "timestamp",
"output_directory": ".workflow/sessions/WFS-{topic}/.brainstorming/system-architect/",
"output_directory": ".workflow/active/WFS-{topic}/.brainstorming/system-architect/",
"key_insights": ["scalability_bottleneck", "architecture_pattern", "technology_recommendation"]
}
}

View File

@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -88,13 +88,13 @@ Execute ui-designer analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: ui-designer
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/ui-designer/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -164,7 +164,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/
.workflow/active/WFS-{session}/.brainstorming/ui-designer/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -209,7 +209,7 @@ TodoWrite({
"ui_designer": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -48,10 +48,10 @@ allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
### Phase 1: Session & Framework Detection
```bash
# Check active session and framework
CHECK: find .workflow/sessions/ -name "WFS-*" -type d
CHECK: find .workflow/active/ -name "WFS-*" -type d
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/sessions/WFS-{session}/.brainstorming/
brainstorm_dir = .workflow/active/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/guidance-specification.md
IF EXISTS:
@@ -88,13 +88,13 @@ Execute ux-expert analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: ux-expert
OUTPUT_LOCATION: .workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
OUTPUT_LOCATION: .workflow/active/WFS-{session}/.brainstorming/ux-expert/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/sessions/WFS-{session}/.brainstorming/guidance-specification.md)
- Command: Read(.workflow/active/WFS-{session}/.brainstorming/guidance-specification.md)
- Output: topic_framework_content
2. **load_role_template**
@@ -104,7 +104,7 @@ ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/sessions/WFS-{session}/workflow-session.json)
- Command: Read(.workflow/active/WFS-{session}/workflow-session.json)
- Output: session_context
## Analysis Requirements
@@ -164,7 +164,7 @@ TodoWrite({
### Framework-Based Analysis
```
.workflow/sessions/WFS-{session}/.brainstorming/ux-expert/
.workflow/active/WFS-{session}/.brainstorming/ux-expert/
└── analysis.md # Structured analysis addressing guidance-specification.md discussion points
```
@@ -209,7 +209,7 @@ TodoWrite({
"ux_expert": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis.md",
"output_location": ".workflow/active/WFS-{session}/.brainstorming/ux-expert/analysis.md",
"framework_reference": "@../guidance-specification.md"
}
}

View File

@@ -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
```

View File

@@ -70,7 +70,7 @@ CONTEXT: Existing user database schema, REST API endpoints
**Validation**:
- Session ID successfully extracted
- Session directory `.workflow/[sessionId]/` exists
- Session directory `.workflow/active/[sessionId]/` exists
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
@@ -87,7 +87,7 @@ CONTEXT: Existing user database schema, REST API endpoints
**Parse Output**:
- Extract: context-package.json path (store as `contextPath`)
- Typical pattern: `.workflow/[sessionId]/.process/context-package.json`
- Typical pattern: `.workflow/active/[sessionId]/.process/context-package.json`
**Validation**:
- Context package path extracted
@@ -141,7 +141,7 @@ CONTEXT: Existing user database schema, REST API endpoints
- Verify: CONFLICT_RESOLUTION.md file path (if executed)
**Validation**:
- File `.workflow/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
- File `.workflow/active/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
**Skip Behavior**:
- If conflict_risk is "none" or "low", skip directly to Phase 3.5
@@ -232,9 +232,9 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]
**Input**: `sessionId` from Phase 1
**Validation**:
- `.workflow/[sessionId]/IMPL_PLAN.md` exists
- `.workflow/[sessionId]/.task/IMPL-*.json` exists (at least one)
- `.workflow/[sessionId]/TODO_LIST.md` exists
- `.workflow/active/[sessionId]/IMPL_PLAN.md` exists
- `.workflow/active/[sessionId]/.task/IMPL-*.json` exists (at least one)
- `.workflow/active/[sessionId]/TODO_LIST.md` exists
<!-- TodoWrite: When task-generate-agent invoked, ATTACH 1 agent task -->
@@ -266,7 +266,7 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]
```
Planning complete for session: [sessionId]
Tasks generated: [count]
Plan: .workflow/[sessionId]/IMPL_PLAN.md
Plan: .workflow/active/[sessionId]/IMPL_PLAN.md
Recommended Next Steps:
1. /workflow:action-plan-verify --session [sessionId] # Verify plan quality before execution

View File

@@ -39,17 +39,17 @@ argument-hint: "[--type=security|architecture|action-items|quality] [optional: s
if [ -n "$SESSION_ARG" ]; then
sessionId="$SESSION_ARG"
else
sessionId=$(find .workflow/sessions/ -name "WFS-*" -type d | head -1 | xargs basename)
sessionId=$(find .workflow/active/ -name "WFS-*" -type d | head -1 | xargs basename)
fi
# Step 2: Validation
if [ ! -d ".workflow/sessions/${sessionId}" ]; then
if [ ! -d ".workflow/active/${sessionId}" ]; then
echo "Session ${sessionId} not found"
exit 1
fi
# Check for completed tasks
if [ ! -d ".workflow/sessions/${sessionId}/.summaries" ] || [ -z "$(find .workflow/sessions/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
if [ ! -d ".workflow/active/${sessionId}/.summaries" ] || [ -z "$(find .workflow/active/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
echo "No completed implementation found. Complete implementation first"
exit 1
fi
@@ -80,13 +80,13 @@ After bash validation, the model takes control to:
1. **Load Context**: Read completed task summaries and changed files
```bash
# Load implementation summaries
cat .workflow/sessions/${sessionId}/.summaries/IMPL-*.md
cat .workflow/active/${sessionId}/.summaries/IMPL-*.md
# Load test results (if available)
cat .workflow/sessions/${sessionId}/.summaries/TEST-FIX-*.md 2>/dev/null
cat .workflow/active/${sessionId}/.summaries/TEST-FIX-*.md 2>/dev/null
# Get changed files
git log --since="$(cat .workflow/sessions/${sessionId}/workflow-session.json | jq -r .created_at)" --name-only --pretty=format: | sort -u
git log --since="$(cat .workflow/active/${sessionId}/workflow-session.json | jq -r .created_at)" --name-only --pretty=format: | sort -u
```
2. **Perform Specialized Review**: Based on `review_type`
@@ -99,7 +99,7 @@ After bash validation, the model takes control to:
```
- Use Gemini for security analysis:
```bash
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Security audit of completed implementation
TASK: Review code for security vulnerabilities, insecure patterns, auth/authz issues
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -111,7 +111,7 @@ After bash validation, the model takes control to:
**Architecture Review** (`--type=architecture`):
- Use Qwen for architecture analysis:
```bash
cd .workflow/sessions/${sessionId} && qwen -p "
cd .workflow/active/${sessionId} && qwen -p "
PURPOSE: Architecture compliance review
TASK: Evaluate adherence to architectural patterns, identify technical debt, review design decisions
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -123,7 +123,7 @@ After bash validation, the model takes control to:
**Quality Review** (`--type=quality`):
- Use Gemini for code quality:
```bash
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Code quality and best practices review
TASK: Assess code readability, maintainability, adherence to best practices
CONTEXT: @.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -136,14 +136,14 @@ After bash validation, the model takes control to:
- Verify all requirements and acceptance criteria met:
```bash
# Load task requirements and acceptance criteria
find .workflow/sessions/${sessionId}/.task -name "IMPL-*.json" -exec jq -r '
find .workflow/active/${sessionId}/.task -name "IMPL-*.json" -exec jq -r '
"Task: " + .id + "\n" +
"Requirements: " + (.context.requirements | join(", ")) + "\n" +
"Acceptance: " + (.context.acceptance | join(", "))
' {} \;
# Check implementation summaries against requirements
cd .workflow/sessions/${sessionId} && gemini -p "
cd .workflow/active/${sessionId} && gemini -p "
PURPOSE: Verify all requirements and acceptance criteria are met
TASK: Cross-check implementation summaries against original requirements
CONTEXT: @.task/IMPL-*.json,.summaries/IMPL-*.md,../.. @../../CLAUDE.md
@@ -195,7 +195,7 @@ After bash validation, the model takes control to:
4. **Output Files**:
```bash
# Save review report
Write(.workflow/sessions/${sessionId}/REVIEW-${review_type}.md)
Write(.workflow/active/${sessionId}/REVIEW-${review_type}.md)
# Update session metadata
# (optional) Update workflow-session.json with review status

View File

@@ -26,17 +26,17 @@ Mark the currently active workflow session as complete, analyze it for lessons l
#### Step 1.1: Find Active Session and Get Name
```bash
# Find active session directory
bash(find .workflow/sessions/ -name "WFS-*" -type d | head -1)
bash(find .workflow/active/ -name "WFS-*" -type d | head -1)
# Extract session name from directory path
bash(basename .workflow/sessions/WFS-session-name)
bash(basename .workflow/active/WFS-session-name)
```
**Output**: Session name `WFS-session-name`
#### Step 1.2: Check for Existing Archiving Marker (Resume Detection)
```bash
# Check if session is already being archived
bash(test -f .workflow/sessions/WFS-session-name/.archiving && echo "RESUMING" || echo "NEW")
bash(test -f .workflow/active/WFS-session-name/.archiving && echo "RESUMING" || echo "NEW")
```
**If RESUMING**:
@@ -49,14 +49,14 @@ bash(test -f .workflow/sessions/WFS-session-name/.archiving && echo "RESUMING" |
#### Step 1.3: Create Archiving Marker
```bash
# Mark session as "archiving in progress"
bash(touch .workflow/sessions/WFS-session-name/.archiving)
bash(touch .workflow/active/WFS-session-name/.archiving)
```
**Purpose**:
- Prevents concurrent operations on this session
- Enables recovery if archival fails
- Session remains in `.workflow/sessions/` for agent analysis
- Session remains in `.workflow/active/` for agent analysis
**Result**: Session still at `.workflow/sessions/WFS-session-name/` with `.archiving` marker
**Result**: Session still at `.workflow/active/WFS-session-name/` with `.archiving` marker
### Phase 2: Agent Analysis (In-Place Processing)
@@ -75,7 +75,7 @@ Task(
Analyze workflow session for archival preparation. Session is STILL in active location.
## Context
- Session: .workflow/sessions/WFS-session-name/
- Session: .workflow/active/WFS-session-name/
- Status: Marked as archiving (.archiving marker present)
- Location: Active sessions directory (NOT archived yet)
@@ -123,7 +123,7 @@ Analyze workflow session for archival preparation. Session is STILL in active lo
## Important Constraints
- DO NOT move or delete any files
- DO NOT update manifest.json yet
- Session remains in .workflow/sessions/ during analysis
- Session remains in .workflow/active/ during analysis
- Return complete metadata package for orchestrator to commit atomically
## Error Handling
@@ -135,7 +135,7 @@ Analyze workflow session for archival preparation. Session is STILL in active lo
**Expected Output**:
- Agent returns complete metadata package
- Session remains in `.workflow/sessions/` with `.archiving` marker
- Session remains in `.workflow/active/` with `.archiving` marker
- No files moved or manifests updated yet
### Phase 3: Atomic Commit (Transactional File Operations)
@@ -149,7 +149,7 @@ bash(mkdir -p .workflow/archives/)
#### Step 3.2: Move Session to Archive
```bash
bash(mv .workflow/sessions/WFS-session-name .workflow/archives/WFS-session-name)
bash(mv .workflow/active/WFS-session-name .workflow/archives/WFS-session-name)
```
**Result**: Session now at `.workflow/archives/WFS-session-name/`
@@ -345,16 +345,16 @@ function getLatestCommitHash() {
**Recovery Steps**:
```bash
# Session still in .workflow/sessions/WFS-session-name
# Session still in .workflow/active/WFS-session-name
# Remove archiving marker
bash(rm .workflow/sessions/WFS-session-name/.archiving)
bash(rm .workflow/active/WFS-session-name/.archiving)
```
**User Notification**:
```
ERROR: Session archival failed during analysis phase
Reason: [error message from agent]
Session remains active in: .workflow/sessions/WFS-session-name
Session remains active in: .workflow/active/WFS-session-name
Recovery:
1. Fix any issues identified in error message
@@ -373,7 +373,7 @@ Session state: SAFE (no changes committed)
**Recovery Steps**:
```bash
# Archiving marker still present
# Session still in .workflow/sessions/ (move failed)
# Session still in .workflow/active/ (move failed)
# No manifest updated yet
```
@@ -381,7 +381,7 @@ Session state: SAFE (no changes committed)
```
ERROR: Session archival failed during move operation
Reason: [mv error message]
Session remains in: .workflow/sessions/WFS-session-name
Session remains in: .workflow/active/WFS-session-name
Recovery:
1. Fix filesystem issues (permissions, disk space)

View File

@@ -19,35 +19,35 @@ Display all workflow sessions with their current status, progress, and metadata.
### Step 1: Find All Sessions
```bash
ls .workflow/sessions/WFS-* 2>/dev/null
ls .workflow/active/WFS-* 2>/dev/null
```
### Step 2: Check Active Session
```bash
find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1
```
### Step 3: Read Session Metadata
```bash
jq -r '.session_id, .status, .project' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.session_id, .status, .project' .workflow/active/WFS-session/workflow-session.json
```
### Step 4: Count Task Progress
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
find .workflow/sessions/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.task/ -name "*.json" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
```
### Step 5: Get Creation Time
```bash
jq -r '.created_at // "unknown"' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.created_at // "unknown"' .workflow/active/WFS-session/workflow-session.json
```
## Simple Bash Commands
### Basic Operations
- **List sessions**: `find .workflow/sessions/ -name "WFS-*" -type d`
- **Find active**: `find .workflow/sessions/ -name "WFS-*" -type d`
- **List sessions**: `find .workflow/active/ -name "WFS-*" -type d`
- **Find active**: `find .workflow/active/ -name "WFS-*" -type d`
- **Read session data**: `jq -r '.session_id, .status' session.json`
- **Count tasks**: `find .task/ -name "*.json" -type f | wc -l`
- **Count completed**: `find .summaries/ -name "*.md" -type f 2>/dev/null | wc -l`
@@ -89,8 +89,8 @@ Total: 3 sessions (1 active, 1 paused, 1 completed)
### Quick Commands
```bash
# Count all sessions
ls .workflow/sessions/WFS-* | wc -l
ls .workflow/active/WFS-* | wc -l
# Show recent sessions
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -3
ls -t .workflow/active/WFS-*/workflow-session.json | head -3
```

View File

@@ -17,37 +17,37 @@ Resume the most recently paused workflow session, restoring all context and stat
### Step 1: Find Paused Sessions
```bash
ls .workflow/sessions/WFS-* 2>/dev/null
ls .workflow/active/WFS-* 2>/dev/null
```
### Step 2: Check Session Status
```bash
jq -r '.status' .workflow/sessions/WFS-session/workflow-session.json
jq -r '.status' .workflow/active/WFS-session/workflow-session.json
```
### Step 3: Find Most Recent Paused
```bash
ls -t .workflow/sessions/WFS-*/workflow-session.json | head -1
ls -t .workflow/active/WFS-*/workflow-session.json | head -1
```
### Step 4: Update Session Status
```bash
jq '.status = "active"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
jq '.status = "active"' .workflow/active/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/active/WFS-session/workflow-session.json
```
### Step 5: Add Resume Timestamp
```bash
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/sessions/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/sessions/WFS-session/workflow-session.json
jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' .workflow/active/WFS-session/workflow-session.json > temp.json
mv temp.json .workflow/active/WFS-session/workflow-session.json
```
## Simple Bash Commands
### Basic Operations
- **List sessions**: `ls .workflow/sessions/WFS-*`
- **List sessions**: `ls .workflow/active/WFS-*`
- **Check status**: `jq -r '.status' session.json`
- **Find recent**: `ls -t .workflow/sessions/*/workflow-session.json | head -1`
- **Find recent**: `ls -t .workflow/active/*/workflow-session.json | head -1`
- **Update status**: `jq '.status = "active"' session.json > temp.json`
- **Add timestamp**: `jq '.resumed_at = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"'`

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`

View File

@@ -156,28 +156,28 @@ Use /workflow:session:complete to archive current session.
### Step 1: Find Active Session
```bash
find .workflow/sessions/ -name "WFS-*" -type d 2>/dev/null | head -1
find .workflow/active/ -name "WFS-*" -type d 2>/dev/null | head -1
```
### Step 2: Load Session Data
```bash
cat .workflow/sessions/WFS-session/workflow-session.json
cat .workflow/active/WFS-session/workflow-session.json
```
### Step 3: Scan Task Files
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
find .workflow/active/WFS-session/.task/ -name "*.json" -type f 2>/dev/null
```
### Step 4: Generate Task Status
```bash
cat .workflow/sessions/WFS-session/.task/impl-1.json | jq -r '.status'
cat .workflow/active/WFS-session/.task/impl-1.json | jq -r '.status'
```
### Step 5: Count Task Progress
```bash
find .workflow/sessions/WFS-session/.task/ -name "*.json" -type f | wc -l
find .workflow/sessions/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
find .workflow/active/WFS-session/.task/ -name "*.json" -type f | wc -l
find .workflow/active/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
```
### Step 6: Display Overview

View File

@@ -70,7 +70,7 @@ TEST_FOCUS: [Test scenarios]
**Parse Output**:
- Extract: context-package.json path (store as `contextPath`)
- Typical pattern: `.workflow/[sessionId]/.process/context-package.json`
- Typical pattern: `.workflow/active/[sessionId]/.process/context-package.json`
**Validation**:
- Context package path extracted
@@ -91,7 +91,7 @@ TEST_FOCUS: [Test scenarios]
- Related components and integration points
- Test framework detection
**Parse**: Extract testContextPath (`.workflow/[sessionId]/.process/test-context-package.json`)
**Parse**: Extract testContextPath (`.workflow/active/[sessionId]/.process/test-context-package.json`)
**Benefits**:
- Makes TDD aware of existing environment
@@ -153,7 +153,7 @@ TEST_FOCUS: [Test scenarios]
- Verify: CONFLICT_RESOLUTION.md file path (if executed)
**Validation**:
- File `.workflow/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
- File `.workflow/active/[sessionId]/.process/CONFLICT_RESOLUTION.md` exists (if executed)
**Skip Behavior**:
- If conflict_risk is "none" or "low", skip directly to Phase 5
@@ -296,9 +296,9 @@ Structure:
[...]
Plans generated:
- Unified Implementation Plan: .workflow/[sessionId]/IMPL_PLAN.md
- Unified Implementation Plan: .workflow/active/[sessionId]/IMPL_PLAN.md
(includes TDD Implementation Tasks section with workflow_type: "tdd")
- Task List: .workflow/[sessionId]/TODO_LIST.md
- Task List: .workflow/active/[sessionId]/TODO_LIST.md
(with internal TDD phase indicators)
TDD Configuration:
@@ -496,7 +496,7 @@ Supports action-planning-agent for more autonomous TDD planning with:
**Session Structure**:
```
.workflow/sessions/WFS-xxx/
.workflow/active/WFS-xxx/
├── IMPL_PLAN.md (unified plan with TDD Implementation Tasks section)
├── TODO_LIST.md (with internal TDD phase indicators)
├── .process/

View File

@@ -28,7 +28,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(gemini:*)
sessionId = argument
# Else auto-detect active session
find .workflow/sessions/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
find .workflow/active/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
```
**Extract**: sessionId
@@ -44,18 +44,18 @@ find .workflow/sessions/ -name "WFS-*" -type d | head -1 | sed 's/.*\///'
```bash
# Load all task JSONs
find .workflow/sessions/{sessionId}/.task/ -name '*.json'
find .workflow/active/{sessionId}/.task/ -name '*.json'
# Extract task IDs
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.id' {} \;
# Check dependencies
find .workflow/sessions/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/sessions/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/active/{sessionId}/.task/ -name 'IMPL-*.json' -exec jq -r '.context.depends_on[]?' {} \;
find .workflow/active/{sessionId}/.task/ -name 'REFACTOR-*.json' -exec jq -r '.context.depends_on[]?' {} \;
# Check meta fields
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.tdd_phase' {} \;
find .workflow/active/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.agent' {} \;
```
**Validation**:
@@ -82,9 +82,9 @@ find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.age
- Compliance score
**Validation**:
- `.workflow/sessions/{sessionId}/.process/test-results.json` exists
- `.workflow/sessions/{sessionId}/.process/coverage-report.json` exists
- `.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md` exists
- `.workflow/active/{sessionId}/.process/test-results.json` exists
- `.workflow/active/{sessionId}/.process/coverage-report.json` exists
- `.workflow/active/{sessionId}/.process/tdd-cycle-report.md` exists
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
@@ -97,7 +97,7 @@ find .workflow/sessions/{sessionId}/.task/ -name '*.json' -exec jq -r '.meta.age
cd project-root && gemini -p "
PURPOSE: Generate TDD compliance report
TASK: Analyze TDD workflow execution and generate quality report
CONTEXT: @{.workflow/sessions/{sessionId}/.task/*.json,.workflow/sessions/{sessionId}/.summaries/*,.workflow/sessions/{sessionId}/.process/tdd-cycle-report.md}
CONTEXT: @{.workflow/active/{sessionId}/.task/*.json,.workflow/active/{sessionId}/.summaries/*,.workflow/active/{sessionId}/.process/tdd-cycle-report.md}
EXPECTED:
- TDD compliance score (0-100)
- Chain completeness verification
@@ -106,7 +106,7 @@ EXPECTED:
- Red-Green-Refactor cycle validation
- Best practices adherence assessment
RULES: Focus on TDD best practices and workflow adherence. Be specific about violations and improvements.
" > .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
" > .workflow/active/{sessionId}/TDD_COMPLIANCE_REPORT.md
```
**Output**: TDD_COMPLIANCE_REPORT.md
@@ -134,7 +134,7 @@ Function Coverage: {percentage}%
## Compliance Score: {score}/100
Detailed report: .workflow/sessions/{sessionId}/TDD_COMPLIANCE_REPORT.md
Detailed report: .workflow/active/{sessionId}/TDD_COMPLIANCE_REPORT.md
Recommendations:
- Complete missing REFACTOR-3.1 task
@@ -168,7 +168,7 @@ TodoWrite({todos: [
### Chain Validation Algorithm
```
1. Load all task JSONs from .workflow/sessions/{sessionId}/.task/
1. Load all task JSONs from .workflow/active/{sessionId}/.task/
2. Extract task IDs and group by feature number
3. For each feature:
- Check TEST-N.M exists
@@ -202,7 +202,7 @@ Final Score: Max(0, Base Score - Deductions)
## Output Files
```
.workflow/sessions/{session-id}/
.workflow/active/{session-id}/
├── TDD_COMPLIANCE_REPORT.md # Comprehensive compliance report ⭐
└── .process/
├── test-results.json # From tdd-coverage-analysis

View File

@@ -543,7 +543,7 @@ This package is passed to agents via the Task tool's prompt context.
"coverage_target": 80
},
"session": {
"workflow_dir": ".workflow/sessions/WFS-test-{session}/",
"workflow_dir": ".workflow/active/WFS-test-{session}/",
"iteration_state_file": ".process/iteration-state.json",
"test_results_file": ".process/test-results.json",
"fix_history_file": ".process/fix-history.json"
@@ -555,7 +555,7 @@ This package is passed to agents via the Task tool's prompt context.
### Test-Fix Session Files
```
.workflow/sessions/WFS-test-{session}/
.workflow/active/WFS-test-{session}/
├── workflow-session.json # Session metadata with workflow_type
├── IMPL_PLAN.md # Test plan
├── TODO_LIST.md # Progress tracking

View File

@@ -513,7 +513,7 @@ If quality gate fails:
### Output Files Structure
Created in `.workflow/sessions/WFS-test-[session]/`:
Created in `.workflow/active/WFS-test-[session]/`:
```
WFS-test-[session]/
@@ -579,7 +579,7 @@ Test-Fix-Gen Workflow Orchestrator (Dual-Mode Support)
└─ Command ends, control returns to user
Artifacts Created:
├── .workflow/sessions/WFS-test-[session]/
├── .workflow/active/WFS-test-[session]/
│ ├── workflow-session.json
│ ├── IMPL_PLAN.md
│ ├── TODO_LIST.md

View File

@@ -397,7 +397,7 @@ Test-Gen Workflow Orchestrator
└─ Command ends, control returns to user
Artifacts Created:
├── .workflow/sessions/WFS-test-[session]/
├── .workflow/active/WFS-test-[session]/
│ ├── workflow-session.json
│ ├── IMPL_PLAN.md
│ ├── TODO_LIST.md
@@ -444,7 +444,7 @@ See `/workflow:tools:test-task-generate` for complete task JSON schemas.
## Output Files
Created in `.workflow/sessions/WFS-test-[session]/`:
Created in `.workflow/active/WFS-test-[session]/`:
- `workflow-session.json` - Session metadata
- `.process/test-context-package.json` - Coverage analysis
- `.process/TEST_ANALYSIS_RESULTS.md` - Test requirements

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
@@ -73,7 +73,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
@@ -87,7 +87,7 @@ Task(subagent_type="cli-execution-agent", prompt=`
• Detect data model incompatibilities
• Assess dependency conflicts
MODE: analysis
CONTEXT: @{existing_files} @.workflow/sessions/{session_id}/**/*
CONTEXT: @{existing_files} @.workflow/active/{session_id}/**/*
EXPECTED: Conflict list with severity ratings
RULES: Focus on breaking changes and migration needs
"
@@ -378,7 +378,7 @@ return {
✓ guidance-specification.md updated
✓ Role analyses (*.md) updated
✓ context-package.json marked as resolved
✓ Agent log saved to .workflow/sessions/{session_id}/.chat/
✓ Agent log saved to .workflow/active/{session_id}/.chat/
```
## Output Format: Agent JSON Response
@@ -435,9 +435,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**:
@@ -459,7 +459,7 @@ If Edit tool fails mid-application:
✓ context-package.json marked as "resolved"
✓ No CONFLICT_RESOLUTION.md file generated
✓ Modification summary includes custom conflict count
✓ 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

@@ -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

View File

@@ -67,7 +67,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -25,10 +25,10 @@ Synchronize finalized design system references to brainstorming artifacts, prepa
```bash
# Validate session
CHECK: find .workflow/sessions/ -name "WFS-*" -type d; VALIDATE: session_id matches active session
CHECK: find .workflow/active/ -name "WFS-*" -type d; VALIDATE: session_id matches active session
# Verify design artifacts in latest design run
latest_design = find_latest_path_matching(".workflow/sessions/WFS-{session}/design-run-*")
latest_design = find_latest_path_matching(".workflow/active/WFS-{session}/design-run-*")
# Detect design system structure
IF exists({latest_design}/style-extraction/style-1/design-tokens.json):
@@ -51,7 +51,7 @@ REPORT: "Found {count} design artifacts, {prototype_count} prototypes"
```bash
# Check if role analysis documents contains current design run reference
synthesis_spec_path = ".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents"
synthesis_spec_path = ".workflow/active/WFS-{session}/.brainstorming/role analysis documents"
current_design_run = basename(latest_design) # e.g., "design-run-20250109-143022"
IF exists(synthesis_spec_path):
@@ -68,8 +68,8 @@ IF exists(synthesis_spec_path):
```bash
# Load target brainstorming artifacts (files to be updated)
Read(.workflow/sessions/WFS-{session}/.brainstorming/role analysis documents)
IF exists(.workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
Read(.workflow/active/WFS-{session}/.brainstorming/role analysis documents)
IF exists(.workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis.md): Read(analysis.md)
# Optional: Read prototype notes for descriptions (minimal context)
FOR each selected_prototype IN selected_list:
@@ -113,7 +113,7 @@ Update `.brainstorming/role analysis documents` with design system references.
**Implementation**:
```bash
# Option 1: Edit existing section
Edit(file_path=".workflow/sessions/WFS-{session}/.brainstorming/role analysis documents",
Edit(file_path=".workflow/active/WFS-{session}/.brainstorming/role analysis documents",
old_string="## UI/UX Guidelines\n[existing content]",
new_string="## UI/UX Guidelines\n\n[new design reference content]")
@@ -128,15 +128,15 @@ IF section not found:
```bash
# Always update ui-designer
ui_designer_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
ui_designer_files = Glob(".workflow/active/WFS-{session}/.brainstorming/ui-designer/analysis*.md")
# Conditionally update other roles
has_animations = exists({latest_design}/animation-extraction/animation-tokens.json)
has_layouts = exists({latest_design}/layout-extraction/layout-templates.json)
IF has_animations: ux_expert_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
IF has_layouts: architect_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/system-architect/analysis*.md")
IF selected_list: pm_files = Glob(".workflow/sessions/WFS-{session}/.brainstorming/product-manager/analysis*.md")
IF has_animations: ux_expert_files = Glob(".workflow/active/WFS-{session}/.brainstorming/ux-expert/analysis*.md")
IF has_layouts: architect_files = Glob(".workflow/active/WFS-{session}/.brainstorming/system-architect/analysis*.md")
IF selected_list: pm_files = Glob(".workflow/active/WFS-{session}/.brainstorming/product-manager/analysis*.md")
```
**Content Templates**:
@@ -223,7 +223,7 @@ For complete token definitions and usage examples, see:
**Implementation**:
```bash
Write(file_path=".workflow/sessions/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
Write(file_path=".workflow/active/WFS-{session}/.brainstorming/ui-designer/design-system-reference.md",
content="[generated content with @ references]")
```
@@ -259,7 +259,7 @@ Next: /workflow:plan [--agent] "<task description>"
**Updated Files**:
```
.workflow/sessions/WFS-{session}/.brainstorming/
.workflow/active/WFS-{session}/.brainstorming/
├── role analysis documents # Updated with UI/UX Guidelines section
├── ui-designer/
│ ├── analysis*.md # Updated with design system references

View File

@@ -265,7 +265,7 @@ STORE: device_type, device_source
### Phase 4: Run Initialization & Directory Setup
```bash
design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
relative_base_path = --session ? ".workflow/sessions/WFS-{session}/${design_id}" : ".workflow/${design_id}"
relative_base_path = --session ? ".workflow/active/WFS-{session}/${design_id}" : ".workflow/${design_id}"
# Create directory and convert to absolute path
Bash(mkdir -p "${relative_base_path}/style-extraction")

View File

@@ -31,7 +31,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -67,7 +67,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
**Optional Parameters**:
- `--session <id>`: Workflow session ID
- Integrate into existing session (`.workflow/sessions/WFS-{session}/`)
- Integrate into existing session (`.workflow/active/WFS-{session}/`)
- Enable automatic design system integration (Phase 4)
- If not provided: standalone mode (`.workflow/`)
@@ -98,7 +98,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
**Session Integration**:
- `--session` flag determines session integration or standalone execution
- Integrated: Design system automatically added to session artifacts
- Standalone: Output in `.workflow/sessions/{run_id}/`
- Standalone: Output in `.workflow/active/{run_id}/`
## 5-Phase Execution
@@ -184,11 +184,11 @@ design_id = "design-run-$(date +%Y%m%d)-$RANDOM"
IF --session:
session_id = {provided_session}
relative_base_path = ".workflow/sessions/WFS-{session_id}/{design_id}"
relative_base_path = ".workflow/active/WFS-{session_id}/{design_id}"
session_mode = "integrated"
ELSE:
session_id = null
relative_base_path = ".workflow/sessions/{design_id}"
relative_base_path = ".workflow/active/{design_id}"
session_mode = "standalone"
# Create base directory and convert to absolute path

View File

@@ -61,7 +61,7 @@ if [ -n "$DESIGN_ID" ]; then
fi
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
if [ -z "$relative_path" ]; then
echo "ERROR: No design run found in session: $SESSION_ID"
echo "HINT: Create a design run first or provide --design-id"

View File

@@ -84,7 +84,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

View File

@@ -62,7 +62,7 @@ if [ -n "$DESIGN_ID" ]; then
relative_path=$(find .workflow -name "${DESIGN_ID}" -type d -print -quit)
elif [ -n "$SESSION_ID" ]; then
# Latest in session
relative_path=$(find .workflow/sessions/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
relative_path=$(find .workflow/active/WFS-$SESSION_ID -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)
else
# Latest globally
relative_path=$(find .workflow -name "design-run-*" -type d -printf "%T@ %p\n" 2>/dev/null | sort -nr | head -1 | cut -d' ' -f2)

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.

Some files were not shown because too many files have changed in this diff Show More