From 89a61acb7164cb2cac575d7ac5650d10ae5b9489 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 19 Nov 2025 23:04:10 +0800 Subject: [PATCH] Refactor workflow output paths to use a standardized sessions directory structure - Updated output paths in various command files to reflect the new structure: `.workflow/sessions/{session_id}/` instead of `.workflow/{session_id}/`. - Adjusted documentation and code comments to ensure consistency across all agents and commands. - Ensured that all references to session-related files are correctly pointing to the new directory format. --- .claude/agents/action-planning-agent.md | 8 +- .claude/agents/cli-planning-agent.md | 2 +- .claude/agents/context-search-agent.md | 8 +- .claude/agents/test-context-search-agent.md | 2 +- .claude/commands/memory/tech-research.md | 4 +- .claude/commands/workflow/execute.md | 4 +- .../commands/workflow/test-cycle-execute.md | 8 +- .../workflow/tools/conflict-resolution.md | 468 ++++++++++++------ .../commands/workflow/tools/context-gather.md | 2 +- .../workflow/tools/task-generate-agent.md | 16 +- .../workflow/tools/task-generate-tdd.md | 22 +- .../commands/workflow/tools/task-generate.md | 14 +- .../workflow/tools/tdd-coverage-analysis.md | 20 +- .../workflow/tools/test-concept-enhanced.md | 12 +- .../workflow/tools/test-context-gather.md | 4 +- .../workflow/tools/test-task-generate.md | 20 +- .../workflow/ui-design/imitate-auto.md | 4 +- .../reference/agents/action-planning-agent.md | 8 +- .../reference/agents/cli-planning-agent.md | 2 +- .../reference/agents/context-search-agent.md | 8 +- .../agents/test-context-search-agent.md | 2 +- .../commands/memory/tech-research.md | 4 +- .../reference/commands/workflow/execute.md | 4 +- .../commands/workflow/test-cycle-execute.md | 8 +- .../workflow/tools/conflict-resolution.md | 22 +- .../commands/workflow/tools/context-gather.md | 2 +- .../workflow/tools/task-generate-agent.md | 16 +- .../workflow/tools/task-generate-tdd.md | 22 +- .../commands/workflow/tools/task-generate.md | 14 +- .../workflow/tools/tdd-coverage-analysis.md | 20 +- .../workflow/tools/test-concept-enhanced.md | 12 +- .../workflow/tools/test-context-gather.md | 4 +- .../workflow/tools/test-task-generate.md | 20 +- .../workflow/ui-design/imitate-auto.md | 4 +- .../workflow/codex-feasibility-validation.txt | 6 +- .../workflow/gemini-solution-design.txt | 6 +- .../prompts/workflow/impl-plan-template.txt | 6 +- 37 files changed, 492 insertions(+), 316 deletions(-) diff --git a/.claude/agents/action-planning-agent.md b/.claude/agents/action-planning-agent.md index be7dfe39..3b2cc5b1 100644 --- a/.claude/agents/action-planning-agent.md +++ b/.claude/agents/action-planning-agent.md @@ -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/{session_id}/) +4. **Session Paths**: Use `session_id` to construct output paths (.workflow/sessions/{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/{session_id}/IMPL_PLAN.md`: +Generate `IMPL_PLAN.md` at `.workflow/sessions/{session_id}/IMPL_PLAN.md`: **Structure**: ```markdown --- identifier: {session_id} source: "User requirements" -analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md +analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md --- # Implementation Plan: {Project Title} @@ -280,7 +280,7 @@ analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md ``` ### 4. TODO List Generation -Generate `TODO_LIST.md` at `.workflow/{session_id}/TODO_LIST.md`: +Generate `TODO_LIST.md` at `.workflow/sessions/{session_id}/TODO_LIST.md`: **Structure**: ```markdown diff --git a/.claude/agents/cli-planning-agent.md b/.claude/agents/cli-planning-agent.md index e9d75fad..81cd3271 100644 --- a/.claude/agents/cli-planning-agent.md +++ b/.claude/agents/cli-planning-agent.md @@ -98,7 +98,7 @@ Phase 3: Task JSON Generation 1. Load task JSON template 2. Populate template with parsed CLI results 3. Add iteration context and previous attempts -4. Write task JSON to .workflow/{session}/.task/IMPL-fix-N.json +4. Write task JSON to .workflow/session/{session}/.task/IMPL-fix-N.json 5. Return success status and task ID to orchestrator ``` diff --git a/.claude/agents/context-search-agent.md b/.claude/agents/context-search-agent.md index 54369fd7..89bd6778 100644 --- a/.claude/agents/context-search-agent.md +++ b/.claude/agents/context-search-agent.md @@ -238,7 +238,7 @@ const context = { **3.5 Brainstorm Artifacts Integration** -If `.workflow/{session}/.brainstorming/` exists, read and include content: +If `.workflow/session/{session}/.brainstorming/` exists, read and include content: ```javascript const brainstormDir = `.workflow/${session}/.brainstorming`; if (dir_exists(brainstormDir)) { @@ -274,7 +274,7 @@ Calculate risk level based on: **3.7 Context Packaging & Output** -**Output**: `.workflow/{session-id}/.process/context-package.json` +**Output**: `.workflow/sessions//{session-id}/.process/context-package.json` **Note**: Task JSONs reference via `context_package_path` field (not in `artifacts`) @@ -422,7 +422,7 @@ Calculate risk level based on: ## Quality Validation Before completion verify: -- [ ] context-package.json in `.workflow/{session}/.process/` +- [ ] context-package.json in `.workflow/session/{session}/.process/` - [ ] Valid JSON with all required fields - [ ] Metadata complete (description, keywords, complexity) - [ ] Project context documented (patterns, conventions, tech stack) @@ -456,7 +456,7 @@ Conflict Detection: - Affected: {modules} - Mitigation: {strategy} -Output: .workflow/{session}/.process/context-package.json +Output: .workflow/session/{session}/.process/context-package.json (Referenced in task JSONs via top-level `context_package_path` field) ``` diff --git a/.claude/agents/test-context-search-agent.md b/.claude/agents/test-context-search-agent.md index 1def5372..331bb380 100644 --- a/.claude/agents/test-context-search-agent.md +++ b/.claude/agents/test-context-search-agent.md @@ -304,7 +304,7 @@ if (!validation.all_passed()) { ## Output Location ``` -.workflow/{test_session_id}/.process/test-context-package.json +.workflow/sessions/{test_session_id}/.process/test-context-package.json ``` ## Helper Functions Reference diff --git a/.claude/commands/memory/tech-research.md b/.claude/commands/memory/tech-research.md index 4685fc57..e37e0ce7 100644 --- a/.claude/commands/memory/tech-research.md +++ b/.claude/commands/memory/tech-research.md @@ -128,8 +128,8 @@ Generate a complete tech stack SKILL package with Exa research. 1. **Extract Tech Stack Information**: IF MODE == 'session': - - Read `.workflow/{SESSION_ID}/workflow-session.json` - - Read `.workflow/{SESSION_ID}/.process/context-package.json` + - Read `.workflow/sessions/{session_id}/workflow-session.json` + - Read `.workflow/sessions/{session_id}/.process/context-package.json` - Extract tech_stack: {language, frameworks, libraries} - Build tech stack name: \"{language}-{framework1}-{framework2}\" - Example: \"typescript-react-nextjs\" diff --git a/.claude/commands/workflow/execute.md b/.claude/commands/workflow/execute.md index 0628867b..2be74627 100644 --- a/.claude/commands/workflow/execute.md +++ b/.claude/commands/workflow/execute.md @@ -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/{session-id}/` +- Load existing TODO_LIST.md directly from `.workflow/sessions//{session-id}/` - Extract current progress from TODO_LIST.md - Generate TodoWrite from TODO_LIST.md state - Proceed immediately to agent execution (Phase 4) @@ -118,7 +118,7 @@ If IMPL_PLAN.md lacks execution strategy, use intelligent fallback (analyze task ``` while (TODO_LIST.md has pending tasks) { next_task_id = getTodoWriteInProgressTask() - task_json = Read(.workflow/{session}/.task/{next_task_id}.json) // Lazy load + task_json = Read(.workflow/session/{session}/.task/{next_task_id}.json) // Lazy load executeTaskWithAgent(task_json) updateTodoListMarkCompleted(next_task_id) advanceTodoWriteToNextTask() diff --git a/.claude/commands/workflow/test-cycle-execute.md b/.claude/commands/workflow/test-cycle-execute.md index 59c40453..c8d76c64 100644 --- a/.claude/commands/workflow/test-cycle-execute.md +++ b/.claude/commands/workflow/test-cycle-execute.md @@ -209,13 +209,13 @@ Iteration N (managed by test-cycle-execute orchestrator): "pre_analysis": [ { "step": "load_failure_context", - "command": "Read(.workflow/{session}/.process/iteration-{N-1}-failures.json)", + "command": "Read(.workflow/session/{session}/.process/iteration-{N-1}-failures.json)", "output_to": "previous_failures", "on_error": "skip_optional" }, { "step": "load_fix_strategy", - "command": "Read(.workflow/{session}/.process/iteration-{N}-strategy.md)", + "command": "Read(.workflow/session/{session}/.process/iteration-{N}-strategy.md)", "output_to": "fix_strategy", "on_error": "fail" } @@ -704,7 +704,7 @@ Task(subagent_type="{meta.agent}", #### Resume from Interruption ```bash # Load iteration state -iteration_state=$(cat .workflow/{session}/.process/iteration-state.json) +iteration_state=$(cat .workflow/session/{session}/.process/iteration-state.json) current_iteration=$(jq -r '.current_iteration' <<< "$iteration_state") # Determine resume point @@ -723,7 +723,7 @@ fi git revert HEAD # Remove failed fix task -rm .workflow/{session}/.task/IMPL-fix-{N}.json +rm .workflow/session/{session}/.task/IMPL-fix-{N}.json # Restore iteration state jq '.current_iteration -= 1' iteration-state.json > temp.json diff --git a/.claude/commands/workflow/tools/conflict-resolution.md b/.claude/commands/workflow/tools/conflict-resolution.md index 01bd6b98..d7d5f599 100644 --- a/.claude/commands/workflow/tools/conflict-resolution.md +++ b/.claude/commands/workflow/tools/conflict-resolution.md @@ -10,7 +10,12 @@ examples: # Conflict Resolution Command ## Purpose -Analyzes conflicts between implementation plans and existing codebase, generating multiple resolution strategies. +Analyzes conflicts between implementation plans and existing codebase, **including module scenario uniqueness detection**, generating multiple resolution strategies with **iterative clarification until boundaries are clear**. + +**Key Enhancements**: +- **Scenario Uniqueness Detection**: Agent searches all existing modules to identify functional overlaps +- **Iterative Clarification Loop**: Unlimited questions per conflict until scenario boundaries are uniquely defined (max 10 rounds) +- **Dynamic Re-analysis**: Agent updates strategies based on user clarifications **Scope**: Detection and strategy generation only - NO code modification or task creation. @@ -21,11 +26,14 @@ Analyzes conflicts between implementation plans and existing codebase, generatin | Responsibility | Description | |---------------|-------------| | **Detect Conflicts** | Analyze plan vs existing code inconsistencies | +| **Scenario Uniqueness** | **NEW**: Search and compare new modules with existing modules for functional overlaps | | **Generate Strategies** | Provide 2-4 resolution options per conflict | +| **Iterative Clarification** | **NEW**: Ask unlimited questions until scenario boundaries are clear and unique | +| **Agent Re-analysis** | **NEW**: Dynamically update strategies based on user clarifications | | **CLI Analysis** | Use Gemini/Qwen (Claude fallback) | -| **User Decision** | Present options, never auto-apply | +| **User Decision** | Present options ONE BY ONE, never auto-apply | | **Direct Text Output** | Output questions via text directly, NEVER use bash echo/printf | -| **Single Output** | `CONFLICT_RESOLUTION.md` with findings | +| **Structured Data** | JSON output for programmatic processing, NO file generation | ## Conflict Categories @@ -49,6 +57,13 @@ Analyzes conflicts between implementation plans and existing codebase, generatin - Setup conflicts - Breaking updates +### 5. Module Scenario Overlap +- **NEW**: Functional overlap between new and existing modules +- Scenario boundary ambiguity +- Duplicate responsibility detection +- Module merge/split decisions +- **Requires iterative clarification until uniqueness confirmed** + ## Execution Flow ### Phase 1: Validation @@ -73,23 +88,31 @@ Task(subagent_type="cli-execution-agent", prompt=` ### 1. Load Context - Read existing files from conflict_detection.existing_files - - Load plan from .workflow/{session_id}/.process/context-package.json + - Load plan from .workflow/sessions/{session_id}/.process/context-package.json - Extract role analyses and requirements - ### 2. Execute CLI Analysis + ### 2. Execute CLI Analysis (Enhanced with Scenario Uniqueness Detection) Primary (Gemini): cd {project_root} && gemini -p " - PURPOSE: Detect conflicts between plan and codebase + PURPOSE: Detect conflicts between plan and codebase, including module scenario overlaps TASK: • Compare architectures • Identify breaking API changes • Detect data model incompatibilities • Assess dependency conflicts + • **NEW: Analyze module scenario uniqueness** + - Extract new module functionality from plan + - Search all existing modules with similar functionality + - Compare scenario coverage and identify overlaps + - Generate clarification questions for boundary definition MODE: analysis - CONTEXT: @{existing_files} @.workflow/{session_id}/**/* - EXPECTED: Conflict list with severity ratings - RULES: Focus on breaking changes and migration needs + CONTEXT: @**/*.ts @**/*.js @**/*.tsx @**/*.jsx @.workflow/sessions/{session_id}/**/* + EXPECTED: Conflict list with severity ratings, including ModuleOverlap conflicts with: + - Existing module list with scenarios + - Overlap analysis matrix + - Targeted clarification questions + RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt) | Focus on breaking changes, migration needs, and functional overlaps | analysis=READ-ONLY " Fallback: Qwen (same prompt) → Claude (manual analysis) @@ -98,9 +121,11 @@ Task(subagent_type="cli-execution-agent", prompt=` Template per conflict: - Severity: Critical/High/Medium - - Category: Architecture/API/Data/Dependency + - Category: Architecture/API/Data/Dependency/ModuleOverlap - Affected files + impact + - **For ModuleOverlap**: Include overlap_analysis with existing modules and scenarios - Options with pros/cons, effort, risk + - **For ModuleOverlap strategies**: Add clarification_needed questions for boundary definition - Recommended strategy + rationale ### 4. Return Structured Conflict Data @@ -116,10 +141,10 @@ Task(subagent_type="cli-execution-agent", prompt=` "id": "CON-001", "brief": "一行中文冲突摘要", "severity": "Critical|High|Medium", - "category": "Architecture|API|Data|Dependency", + "category": "Architecture|API|Data|Dependency|ModuleOverlap", "affected_files": [ - ".workflow/{session}/.brainstorm/guidance-specification.md", - ".workflow/{session}/.brainstorm/system-architect/analysis.md" + ".workflow/sessions/{session}/.brainstorm/guidance-specification.md", + ".workflow/sessions/{session}/.brainstorm/system-architect/analysis.md" ], "description": "详细描述冲突 - 什么不兼容", "impact": { @@ -128,6 +153,23 @@ Task(subagent_type="cli-execution-agent", prompt=` "migration_required": true|false, "estimated_effort": "人天估计" }, + "overlap_analysis": { + "// NOTE": "仅当 category=ModuleOverlap 时需要此字段", + "new_module": { + "name": "新模块名称", + "scenarios": ["场景1", "场景2", "场景3"], + "responsibilities": "职责描述" + }, + "existing_modules": [ + { + "file": "src/existing/module.ts", + "name": "现有模块名称", + "scenarios": ["场景A", "场景B"], + "overlap_scenarios": ["重叠场景1", "重叠场景2"], + "responsibilities": "现有模块职责" + } + ] + }, "strategies": [ { "name": "策略名称(中文)", @@ -137,9 +179,15 @@ Task(subagent_type="cli-execution-agent", prompt=` "effort": "时间估计", "pros": ["优点1", "优点2"], "cons": ["缺点1", "缺点2"], + "clarification_needed": [ + "// NOTE: 仅当需要用户进一步澄清时需要此字段(尤其是 ModuleOverlap)", + "新模块的核心职责边界是什么?", + "如何与现有模块 X 协作?", + "哪些场景应该由新模块处理?" + ], "modifications": [ { - "file": ".workflow/{session}/.brainstorm/guidance-specification.md", + "file": ".workflow/sessions/{session}/.brainstorm/guidance-specification.md", "section": "## 2. System Architect Decisions", "change_type": "update", "old_content": "原始内容片段(用于定位)", @@ -147,7 +195,7 @@ Task(subagent_type="cli-execution-agent", prompt=` "rationale": "为什么这样改" }, { - "file": ".workflow/{session}/.brainstorm/system-architect/analysis.md", + "file": ".workflow/sessions/{session}/.brainstorm/system-architect/analysis.md", "section": "## Design Decisions", "change_type": "update", "old_content": "原始内容片段", @@ -204,155 +252,251 @@ Task(subagent_type="cli-execution-agent", prompt=` `) ``` -**Agent Internal Flow**: +**Agent Internal Flow** (Enhanced): ``` 1. Load context package 2. Check conflict_risk (exit if none/low) 3. Read existing files + plan artifacts -4. Run CLI analysis (Gemini→Qwen→Claude) -5. Parse conflict findings -6. Generate 2-4 strategies per conflict with modifications +4. Run CLI analysis (Gemini→Qwen→Claude) with enhanced tasks: + - Standard conflict detection (Architecture/API/Data/Dependency) + - **NEW: Module scenario uniqueness detection** + * Extract new module functionality from plan + * Search all existing modules with similar keywords/functionality + * Compare scenario coverage and responsibilities + * Identify functional overlaps and boundary ambiguities + * Generate ModuleOverlap conflicts with overlap_analysis +5. Parse conflict findings (including ModuleOverlap category) +6. Generate 2-4 strategies per conflict: + - Include modifications for each strategy + - **For ModuleOverlap**: Add clarification_needed questions for boundary definition 7. Return JSON to stdout (NOT file write) 8. Return execution log path ``` -### Phase 3: User Confirmation via Text Interaction +### Phase 3: Iterative User Interaction with Clarification Loop -**Command parses agent JSON output and presents conflicts to user via text**: +**Execution Flow**: +``` +FOR each conflict (逐个处理,无数量限制): + clarified = false + round = 0 + userClarifications = [] + + WHILE (!clarified && round < 10): + round++ + + // 1. Display conflict (包含所有关键字段) + - category, id, brief, severity, description + - IF ModuleOverlap: 展示 overlap_analysis + * new_module: {name, scenarios, responsibilities} + * existing_modules[]: {file, name, scenarios, overlap_scenarios, responsibilities} + + // 2. Display strategies (2-4个策略 + 自定义选项) + - FOR each strategy: {name, approach, complexity, risk, effort, pros, cons} + * IF clarification_needed: 展示待澄清问题列表 + - 自定义选项: {suggestions: modification_suggestions[]} + + // 3. User selects strategy + userChoice = readInput() + + IF userChoice == "自定义": + customConflicts.push({id, brief, category, suggestions, overlap_analysis}) + clarified = true + BREAK + + selectedStrategy = strategies[userChoice] + + // 4. Clarification loop + IF selectedStrategy.clarification_needed.length > 0: + // 收集澄清答案 + FOR each question: + answer = readInput() + userClarifications.push({question, answer}) + + // Agent 重新分析 + reanalysisResult = Task(cli-execution-agent, prompt={ + 冲突信息: {id, brief, category, 策略} + 用户澄清: userClarifications[] + 场景分析: overlap_analysis (if ModuleOverlap) + + 输出: { + uniqueness_confirmed: bool, + rationale: string, + updated_strategy: {name, approach, complexity, risk, effort, modifications[]}, + remaining_questions: [] (如果仍有歧义) + } + }) + + IF reanalysisResult.uniqueness_confirmed: + selectedStrategy = updated_strategy + selectedStrategy.clarifications = userClarifications + clarified = true + ELSE: + // 更新澄清问题,继续下一轮 + selectedStrategy.clarification_needed = remaining_questions + ELSE: + clarified = true + + resolvedConflicts.push({conflict, strategy: selectedStrategy}) + END WHILE +END FOR + +// Build output +selectedStrategies = resolvedConflicts.map(r => ({ + conflict_id, strategy, clarifications[] +})) +``` + +**Key Data Structures**: ```javascript -// 1. Parse agent JSON output -const conflictData = JSON.parse(agentOutput); -const conflicts = conflictData.conflicts; // No 4-conflict limit - -// 2. Format conflicts as text output (max 10 per round) -const batchSize = 10; -const batches = chunkArray(conflicts, batchSize); - -for (const [batchIdx, batch] of batches.entries()) { - const totalBatches = batches.length; - - // Output batch header - console.log(`===== 冲突解决 (第 ${batchIdx + 1}/${totalBatches} 轮) =====\n`); - - // Output each conflict in batch - batch.forEach((conflict, idx) => { - const questionNum = batchIdx * batchSize + idx + 1; - console.log(`【问题${questionNum} - ${conflict.category}】${conflict.id}: ${conflict.brief}`); - - conflict.strategies.forEach((strategy, sIdx) => { - const optionLetter = String.fromCharCode(97 + sIdx); // a, b, c, ... - console.log(`${optionLetter}) ${strategy.name}`); - console.log(` 说明:${strategy.approach}`); - console.log(` 复杂度: ${strategy.complexity} | 风险: ${strategy.risk} | 工作量: ${strategy.effort}`); - }); - - // Add custom option - const customLetter = String.fromCharCode(97 + conflict.strategies.length); - console.log(`${customLetter}) 自定义修改`); - console.log(` 说明:根据修改建议自行处理,不应用预设策略`); - - // Show modification suggestions - if (conflict.modification_suggestions && conflict.modification_suggestions.length > 0) { - console.log(` 修改建议:`); - conflict.modification_suggestions.forEach(suggestion => { - console.log(` - ${suggestion}`); - }); - } - console.log(); - }); - - console.log(`请回答 (格式: 1a 2b 3c...):`); - - // Wait for user input - const userInput = await readUserInput(); - - // Parse answers - const answers = parseUserAnswers(userInput, batch); +// Custom conflict tracking +customConflicts[] = { + id, brief, category, + suggestions: modification_suggestions[], + overlap_analysis: { new_module{}, existing_modules[] } // ModuleOverlap only } -// 3. Build selected strategies (exclude custom selections) -const selectedStrategies = answers.filter(a => !a.isCustom).map(a => a.strategy); -const customConflicts = answers.filter(a => a.isCustom).map(a => ({ - id: a.conflict.id, - brief: a.conflict.brief, - suggestions: a.conflict.modification_suggestions -})); +// Agent re-analysis prompt output +{ + uniqueness_confirmed: bool, + rationale: string, + updated_strategy: { + name, approach, complexity, risk, effort, + modifications: [{file, section, change_type, old_content, new_content, rationale}] + }, + remaining_questions: string[] +} ``` -**Text Output Example**: +**Text Output Example** (展示关键字段): + ```markdown -===== 冲突解决 (第 1/1 轮) ===== +============================================================ +冲突 1/3 - 第 1 轮 +============================================================ +【ModuleOverlap】CON-001: 新增用户认证服务与现有模块功能重叠 +严重程度: High | 描述: 计划中的 UserAuthService 与现有 AuthManager 场景重叠 -【问题1 - Architecture】CON-001: 现有认证系统与计划不兼容 -a) 渐进式迁移 - 说明:保留现有系统,逐步迁移到新方案 - 复杂度: Medium | 风险: Low | 工作量: 3-5天 -b) 完全重写 - 说明:废弃旧系统,从零实现新认证 - 复杂度: High | 风险: Medium | 工作量: 7-10天 -c) 自定义修改 - 说明:根据修改建议自行处理,不应用预设策略 - 修改建议: - - 评估现有认证系统的兼容性,考虑是否可以通过适配器模式桥接 - - 检查JWT token格式和验证逻辑是否需要调整 - - 确保用户会话管理与新架构保持一致 +--- 场景重叠分析 --- +新模块: UserAuthService | 场景: 登录, Token验证, 权限, MFA +现有模块: AuthManager (src/auth/AuthManager.ts) | 重叠: 登录, Token验证 -【问题2 - Data】CON-002: 数据库 schema 冲突 -a) 添加迁移脚本 - 说明:创建数据库迁移脚本处理 schema 变更 - 复杂度: Low | 风险: Low | 工作量: 1-2天 -b) 自定义修改 - 说明:根据修改建议自行处理,不应用预设策略 - 修改建议: - - 检查现有表结构是否支持新增字段,避免破坏性变更 - - 考虑使用数据库版本控制工具(如Flyway或Liquibase) - - 准备数据迁移和回滚策略 +--- 解决策略 --- +1) 合并 (Low复杂度 | Low风险 | 2-3天) + ⚠️ 需澄清: AuthManager是否能承担MFA? -请回答 (格式: 1a 2b): +2) 拆分边界 (Medium复杂度 | Medium风险 | 4-5天) + ⚠️ 需澄清: 基础/高级认证边界? Token验证归谁? + +3) 自定义修改 + 建议: 评估扩展性; 策略模式分离; 定义接口边界 + +请选择 (1-3): > 2 + +--- 澄清问答 (第1轮) --- +Q: 基础/高级认证边界? +A: 基础=密码登录+token验证, 高级=MFA+OAuth+SSO + +Q: Token验证归谁? +A: 统一由 AuthManager 负责 + +🔄 重新分析... +✅ 唯一性已确认 | 理由: 边界清晰 - AuthManager(基础+token), UserAuthService(MFA+OAuth+SSO) + +============================================================ +冲突 2/3 - 第 1 轮 [下一个冲突] +============================================================ ``` -**User Input Examples**: -- `1a 2a` → Conflict 1: 渐进式迁移, Conflict 2: 添加迁移脚本 -- `1b 2b` → Conflict 1: 完全重写, Conflict 2: 自定义修改 -- `1c 2c` → Both choose custom modification (user handles manually with suggestions) +**Loop Characteristics**: 逐个处理 | 无限轮次(max 10) | 动态问题生成 | Agent重新分析判断唯一性 | ModuleOverlap场景边界澄清 ### Phase 4: Apply Modifications ```javascript -// 1. Extract modifications from selected strategies +// 1. Extract modifications from resolved strategies const modifications = []; -selectedStrategies.forEach(strategy => { - if (strategy !== "skip") { - modifications.push(...strategy.modifications); +selectedStrategies.forEach(item => { + if (item.strategy && item.strategy.modifications) { + modifications.push(...item.strategy.modifications.map(mod => ({ + ...mod, + conflict_id: item.conflict_id, + clarifications: item.clarifications + }))); } }); +console.log(`\n正在应用 ${modifications.length} 个修改...`); + // 2. Apply each modification using Edit tool -modifications.forEach(mod => { - if (mod.change_type === "update") { - Edit({ - file_path: mod.file, - old_string: mod.old_content, - new_string: mod.new_content - }); +const appliedModifications = []; +const failedModifications = []; + +modifications.forEach((mod, idx) => { + try { + console.log(`[${idx + 1}/${modifications.length}] 修改 ${mod.file}...`); + + if (mod.change_type === "update") { + Edit({ + file_path: mod.file, + old_string: mod.old_content, + new_string: mod.new_content + }); + } else if (mod.change_type === "add") { + // Handle addition - append or insert based on section + const fileContent = Read(mod.file); + const updated = insertContentAfterSection(fileContent, mod.section, mod.new_content); + Write(mod.file, updated); + } else if (mod.change_type === "remove") { + Edit({ + file_path: mod.file, + old_string: mod.old_content, + new_string: "" + }); + } + + appliedModifications.push(mod); + console.log(` ✓ 成功`); + } catch (error) { + console.log(` ✗ 失败: ${error.message}`); + failedModifications.push({ ...mod, error: error.message }); } - // Handle "add" and "remove" similarly }); -// 3. Update context-package.json +// 3. Update context-package.json with resolution details const contextPackage = JSON.parse(Read(contextPath)); contextPackage.conflict_detection.conflict_risk = "resolved"; -contextPackage.conflict_detection.resolved_conflicts = conflicts.map(c => c.id); +contextPackage.conflict_detection.resolved_conflicts = selectedStrategies.map(s => ({ + conflict_id: s.conflict_id, + strategy_name: s.strategy.name, + clarifications: s.clarifications +})); +contextPackage.conflict_detection.custom_conflicts = customConflicts.map(c => c.id); contextPackage.conflict_detection.resolved_at = new Date().toISOString(); Write(contextPath, JSON.stringify(contextPackage, null, 2)); -// 4. Output custom conflict summary (if any) +// 4. Output custom conflict summary with overlap analysis (if any) if (customConflicts.length > 0) { - console.log("\n===== 需要自定义处理的冲突 =====\n"); + console.log(`\n${'='.repeat(60)}`); + console.log(`需要自定义处理的冲突 (${customConflicts.length})`); + console.log(`${'='.repeat(60)}\n`); + customConflicts.forEach(conflict => { - console.log(`【${conflict.id}】${conflict.brief}`); - console.log("修改建议:"); + console.log(`【${conflict.category}】${conflict.id}: ${conflict.brief}`); + + // Show overlap analysis for ModuleOverlap conflicts + if (conflict.category === 'ModuleOverlap' && conflict.overlap_analysis) { + console.log(`\n场景重叠信息:`); + console.log(` 新模块: ${conflict.overlap_analysis.new_module.name}`); + console.log(` 场景: ${conflict.overlap_analysis.new_module.scenarios.join(', ')}`); + console.log(`\n 与以下模块重叠:`); + conflict.overlap_analysis.existing_modules.forEach(mod => { + console.log(` - ${mod.name} (${mod.file})`); + console.log(` 重叠场景: ${mod.overlap_scenarios.join(', ')}`); + }); + } + + console.log(`\n修改建议:`); conflict.suggestions.forEach(suggestion => { console.log(` - ${suggestion}`); }); @@ -360,25 +504,43 @@ if (customConflicts.length > 0) { }); } -// 5. Return summary +// 5. Output failure summary (if any) +if (failedModifications.length > 0) { + console.log(`\n⚠️ 部分修改失败 (${failedModifications.length}):`); + failedModifications.forEach(mod => { + console.log(` - ${mod.file}: ${mod.error}`); + }); +} + +// 6. Return summary return { - resolved: modifications.length, - custom: customConflicts.length, - modified_files: [...new Set(modifications.map(m => m.file))], - custom_conflicts: customConflicts + total_conflicts: conflicts.length, + resolved_with_strategy: selectedStrategies.length, + custom_handling: customConflicts.length, + modifications_applied: appliedModifications.length, + modifications_failed: failedModifications.length, + modified_files: [...new Set(appliedModifications.map(m => m.file))], + custom_conflicts: customConflicts, + clarification_records: selectedStrategies.filter(s => s.clarifications.length > 0) }; ``` **Validation**: ``` -✓ Agent returns valid JSON structure -✓ Text output displays all conflicts (max 10 per round) -✓ User selections captured correctly +✓ Agent returns valid JSON structure with ModuleOverlap conflicts +✓ Conflicts processed ONE BY ONE (not in batches) +✓ ModuleOverlap conflicts include overlap_analysis field +✓ Strategies with clarification_needed display questions +✓ User selections captured correctly per conflict +✓ Clarification loop continues until uniqueness confirmed +✓ Agent re-analysis returns uniqueness_confirmed and updated_strategy +✓ Maximum 10 rounds per conflict safety limit enforced ✓ Edit tool successfully applies modifications ✓ guidance-specification.md updated ✓ Role analyses (*.md) updated -✓ context-package.json marked as resolved -✓ Agent log saved to .workflow/{session_id}/.chat/ +✓ 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/ ``` ## Output Format: Agent JSON Response @@ -435,31 +597,45 @@ If Edit tool fails mid-application: **Output**: - Modified files: - - `.workflow/{session_id}/.brainstorm/guidance-specification.md` - - `.workflow/{session_id}/.brainstorm/{role}/analysis.md` - - `.workflow/{session_id}/.process/context-package.json` (conflict_risk → resolved) + - `.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) - NO report file generation **User Interaction**: -- Text-based strategy selection (max 10 conflicts per round) +- **Iterative conflict processing**: One conflict at a time, not in batches - Each conflict: 2-4 strategy options + "自定义修改" option (with suggestions) +- **Clarification loop**: Unlimited questions per conflict until uniqueness confirmed (max 10 rounds) +- **ModuleOverlap conflicts**: Display overlap_analysis with existing modules +- **Agent re-analysis**: Dynamic strategy updates based on user clarifications ### Success Criteria ``` -✓ CLI analysis returns valid JSON structure -✓ Conflicts presented in batches (max 10 per round) +✓ CLI analysis returns valid JSON structure with ModuleOverlap category +✓ Agent performs scenario uniqueness detection (searches existing modules) +✓ Conflicts processed ONE BY ONE with iterative clarification ✓ Min 2 strategies per conflict with modifications +✓ ModuleOverlap conflicts include overlap_analysis with existing modules +✓ Strategies requiring clarification include clarification_needed questions ✓ Each conflict includes 2-5 modification_suggestions -✓ Text output displays all conflicts correctly with suggestions -✓ User selections captured and processed +✓ Text output displays conflict with overlap analysis (if ModuleOverlap) +✓ User selections captured per conflict +✓ Clarification loop continues until uniqueness confirmed (unlimited rounds, max 10) +✓ Agent re-analysis with user clarifications updates strategy +✓ Uniqueness confirmation based on clear scenario boundaries ✓ Edit tool applies modifications successfully -✓ Custom conflicts displayed with suggestions for manual handling +✓ Custom conflicts displayed with overlap_analysis for manual handling ✓ guidance-specification.md updated with resolved conflicts ✓ Role analyses (*.md) updated with resolved conflicts -✓ context-package.json marked as "resolved" +✓ context-package.json marked as "resolved" with clarification records ✓ No CONFLICT_RESOLUTION.md file generated -✓ Modification summary includes custom conflict count -✓ Agent log saved to .workflow/{session_id}/.chat/ +✓ Modification summary includes: + - Total conflicts + - Resolved with strategy (count) + - Custom handling (count) + - Clarification records + - Overlap analysis for custom ModuleOverlap conflicts +✓ Agent log saved to .workflow/sessions/{session_id}/.chat/ ✓ Error handling robust (validate/retry/degrade) ``` diff --git a/.claude/commands/workflow/tools/context-gather.md b/.claude/commands/workflow/tools/context-gather.md index 3e51cd9a..d195fb8e 100644 --- a/.claude/commands/workflow/tools/context-gather.md +++ b/.claude/commands/workflow/tools/context-gather.md @@ -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/{session}/.process/context-package.json` +- **Standardized Output**: Generate `.workflow/sessions/{session}/.process/context-package.json` ## Execution Flow diff --git a/.claude/commands/workflow/tools/task-generate-agent.md b/.claude/commands/workflow/tools/task-generate-agent.md index 2c99ceea..648c0b1c 100644 --- a/.claude/commands/workflow/tools/task-generate-agent.md +++ b/.claude/commands/workflow/tools/task-generate-agent.md @@ -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/{session-id}/workflow-session.json + // Else: Load from .workflow/sessions//{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/{session-id}/.process/context-package.json", + "context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json", "context_package": { // If in memory: use cached content - // Else: Load from .workflow/{session-id}/.process/context-package.json + // Else: Load from .workflow/sessions//{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/{session-id}/workflow-session.json) + Read(.workflow/sessions//{session-id}/workflow-session.json) } ``` 2. **Load Context Package** (if not in memory) ```javascript if (!memory.has("context-package.json")) { - Read(.workflow/{session-id}/.process/context-package.json) + Read(.workflow/sessions//{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/{session-id}/.task/` +- **Location**: `.workflow/sessions//{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/{session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions//{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/{session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions//{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 diff --git a/.claude/commands/workflow/tools/task-generate-tdd.md b/.claude/commands/workflow/tools/task-generate-tdd.md index 04e93a8a..7fead06a 100644 --- a/.claude/commands/workflow/tools/task-generate-tdd.md +++ b/.claude/commands/workflow/tools/task-generate-tdd.md @@ -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/{session-id}/workflow-session.json + // Else: Load from .workflow/sessions//{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/{session-id}/.process/context-package.json", + "context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json", "context_package": { // If in memory: use cached content - // Else: Load from .workflow/{session-id}/.process/context-package.json + // Else: Load from .workflow/sessions//{session-id}/.process/context-package.json }, - "test_context_package_path": ".workflow/{session-id}/.process/test-context-package.json", + "test_context_package_path": ".workflow/sessions//{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/{session-id}/workflow-session.json) + Read(.workflow/sessions//{session-id}/workflow-session.json) } ``` 2. **Load Context Package** (if not in memory) ```javascript if (!memory.has("context-package.json")) { - Read(.workflow/{session-id}/.process/context-package.json) + Read(.workflow/sessions//{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/{session-id}/.process/test-context-package.json) + Read(.workflow/sessions//{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/{session-id}/.task/` +- **Location**: `.workflow/sessions//{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/{session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions//{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/{session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions//{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 @@ -384,7 +384,7 @@ This section provides quick reference for TDD task JSON structure. For complete ## Output Files Structure ``` -.workflow/{session-id}/ +.workflow/sessions//{session-id}/ ├── IMPL_PLAN.md # Unified plan with TDD Implementation Tasks section ├── TODO_LIST.md # Progress tracking with internal TDD phase indicators ├── .task/ diff --git a/.claude/commands/workflow/tools/task-generate.md b/.claude/commands/workflow/tools/task-generate.md index c3fe5213..220426ad 100644 --- a/.claude/commands/workflow/tools/task-generate.md +++ b/.claude/commands/workflow/tools/task-generate.md @@ -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/{session_id}/workflow-session.json`. -2. **Context Package Loading** (primary source): Reads `.workflow/{session_id}/.process/context-package.json` for smart context and artifact catalog. +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. 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. @@ -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/{session-id}/.brainstorming/[role]/analysis*.md -artifacts: .workflow/{session-id}/.brainstorming/ -context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context -guidance_specification: .workflow/{session-id}/.brainstorming/guidance-specification.md # Finalized decisions with resolved conflicts +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 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/{session-id}/ +.workflow/sessions//{session-id}/ ├── IMPL_PLAN.md # Implementation plan ├── TODO_LIST.md # Progress tracking ├── .task/ diff --git a/.claude/commands/workflow/tools/tdd-coverage-analysis.md b/.claude/commands/workflow/tools/tdd-coverage-analysis.md index 1bdb1c2f..d5b73337 100644 --- a/.claude/commands/workflow/tools/tdd-coverage-analysis.md +++ b/.claude/commands/workflow/tools/tdd-coverage-analysis.md @@ -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/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.focus_paths[]' {} \; +find .workflow/sessions/{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/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.foc ### Phase 2: Run Test Suite ```bash # Node.js/JavaScript -npm test -- --coverage --json > .workflow/{session_id}/.process/test-results.json +npm test -- --coverage --json > .workflow/sessions/{session_id}/.process/test-results.json # Python -pytest --cov --json-report > .workflow/{session_id}/.process/test-results.json +pytest --cov --json-report > .workflow/sessions/{session_id}/.process/test-results.json # Other frameworks (detect from project) -[test_command] --coverage --json-output .workflow/{session_id}/.process/test-results.json +[test_command] --coverage --json-output .workflow/sessions/{session_id}/.process/test-results.json ``` **Output**: test-results.json with coverage data ### Phase 3: Parse Coverage Data ```bash -jq '.coverage' .workflow/{session_id}/.process/test-results.json > .workflow/{session_id}/.process/coverage-report.json +jq '.coverage' .workflow/sessions/{session_id}/.process/test-results.json > .workflow/sessions/{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/{session_id}/.summaries/TEST-N.M-summary.md +cat .workflow/sessions/{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/{session_id}/.summaries/IMPL-N.M-summary.md +cat .workflow/sessions/{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/{session_id}/.summaries/REFACTOR-N.M-summary.md +cat .workflow/sessions/{session_id}/.summaries/REFACTOR-N.M-summary.md ``` Verify: @@ -90,7 +90,7 @@ Verify: ### Phase 5: Generate Analysis Report -Create `.workflow/{session_id}/.process/tdd-cycle-report.md`: +Create `.workflow/sessions/{session_id}/.process/tdd-cycle-report.md`: ```markdown # TDD Cycle Analysis - {Session ID} @@ -146,7 +146,7 @@ Create `.workflow/{session_id}/.process/tdd-cycle-report.md`: ## Output Files ``` -.workflow/{session-id}/ +.workflow/sessions//{session-id}/ └── .process/ ├── test-results.json # Raw test execution results ├── coverage-report.json # Parsed coverage data diff --git a/.claude/commands/workflow/tools/test-concept-enhanced.md b/.claude/commands/workflow/tools/test-concept-enhanced.md index e58aadde..9376637a 100644 --- a/.claude/commands/workflow/tools/test-concept-enhanced.md +++ b/.claude/commands/workflow/tools/test-concept-enhanced.md @@ -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/{test_session_id}/workflow-session.json` + - Load `.workflow/sessions/{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/{test_session_id}/.process && gemini -p " +cd .workflow/sessions/{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/{test_session_id}/.process/test-context-package.json} +CONTEXT: @{.workflow/sessions/{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/{test_session_id}/.process/gemini-test-analysis.md** +- **MUST write output to .workflow/sessions/{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/{test_session_id}/.process/gemini-test-analysis.md` +**Output Location**: `.workflow/sessions/{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/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md` +**Output Location**: `.workflow/sessions/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md` ## Error Handling diff --git a/.claude/commands/workflow/tools/test-context-gather.md b/.claude/commands/workflow/tools/test-context-gather.md index 80e937c7..b4ee5c96 100644 --- a/.claude/commands/workflow/tools/test-context-gather.md +++ b/.claude/commands/workflow/tools/test-context-gather.md @@ -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/{test_session_id}/.process/test-context-package.json` +- **Standardized Output**: Generate `.workflow/sessions/{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/{test_session_id}/.process/` +- ✅ Valid test-context-package.json generated in `.workflow/sessions/{test_session_id}/.process/` - ✅ Source session context loaded successfully - ✅ Test coverage gaps identified (>90% accuracy) - ✅ Test framework detected and documented diff --git a/.claude/commands/workflow/tools/test-task-generate.md b/.claude/commands/workflow/tools/test-task-generate.md index 84dedb1f..a9230452 100644 --- a/.claude/commands/workflow/tools/test-task-generate.md +++ b/.claude/commands/workflow/tools/test-task-generate.md @@ -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/{test-session-id}/workflow-session.json + // Else: Load from .workflow/sessions/{test-session-id}/workflow-session.json }, - "test_analysis_results_path": ".workflow/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md", + "test_analysis_results_path": ".workflow/sessions/{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/{test-session-id}/.process/test-context-package.json", + "test_context_package_path": ".workflow/sessions/{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/{test-session-id}/workflow-session.json) + Read(.workflow/sessions/{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/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md) + Read(.workflow/sessions/{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/{test-session-id}/.process/test-context-package.json) + Read(.workflow/sessions/{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/{source-session-id}/.summaries/ -name 'IMPL-*-summary.md'") + const summaryFiles = Bash("find .workflow/sessions/{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/{test-session-id}/.task/` +- **Location**: `.workflow/sessions/{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/{test-session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions/{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/{test-session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions/{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 diff --git a/.claude/commands/workflow/ui-design/imitate-auto.md b/.claude/commands/workflow/ui-design/imitate-auto.md index 3c631fd0..461141ae 100644 --- a/.claude/commands/workflow/ui-design/imitate-auto.md +++ b/.claude/commands/workflow/ui-design/imitate-auto.md @@ -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/{run_id}/` +- Standalone: Output in `.workflow/sessions/{run_id}/` ## 5-Phase Execution @@ -188,7 +188,7 @@ IF --session: session_mode = "integrated" ELSE: session_id = null - relative_base_path = ".workflow/{design_id}" + relative_base_path = ".workflow/sessions/{design_id}" session_mode = "standalone" # Create base directory and convert to absolute path diff --git a/.claude/skills/command-guide/reference/agents/action-planning-agent.md b/.claude/skills/command-guide/reference/agents/action-planning-agent.md index be7dfe39..3b2cc5b1 100644 --- a/.claude/skills/command-guide/reference/agents/action-planning-agent.md +++ b/.claude/skills/command-guide/reference/agents/action-planning-agent.md @@ -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/{session_id}/) +4. **Session Paths**: Use `session_id` to construct output paths (.workflow/sessions/{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/{session_id}/IMPL_PLAN.md`: +Generate `IMPL_PLAN.md` at `.workflow/sessions/{session_id}/IMPL_PLAN.md`: **Structure**: ```markdown --- identifier: {session_id} source: "User requirements" -analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md +analysis: .workflow/sessions/{session_id}/.process/ANALYSIS_RESULTS.md --- # Implementation Plan: {Project Title} @@ -280,7 +280,7 @@ analysis: .workflow/{session_id}/.process/ANALYSIS_RESULTS.md ``` ### 4. TODO List Generation -Generate `TODO_LIST.md` at `.workflow/{session_id}/TODO_LIST.md`: +Generate `TODO_LIST.md` at `.workflow/sessions/{session_id}/TODO_LIST.md`: **Structure**: ```markdown diff --git a/.claude/skills/command-guide/reference/agents/cli-planning-agent.md b/.claude/skills/command-guide/reference/agents/cli-planning-agent.md index e9d75fad..81cd3271 100644 --- a/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +++ b/.claude/skills/command-guide/reference/agents/cli-planning-agent.md @@ -98,7 +98,7 @@ Phase 3: Task JSON Generation 1. Load task JSON template 2. Populate template with parsed CLI results 3. Add iteration context and previous attempts -4. Write task JSON to .workflow/{session}/.task/IMPL-fix-N.json +4. Write task JSON to .workflow/session/{session}/.task/IMPL-fix-N.json 5. Return success status and task ID to orchestrator ``` diff --git a/.claude/skills/command-guide/reference/agents/context-search-agent.md b/.claude/skills/command-guide/reference/agents/context-search-agent.md index 54369fd7..89bd6778 100644 --- a/.claude/skills/command-guide/reference/agents/context-search-agent.md +++ b/.claude/skills/command-guide/reference/agents/context-search-agent.md @@ -238,7 +238,7 @@ const context = { **3.5 Brainstorm Artifacts Integration** -If `.workflow/{session}/.brainstorming/` exists, read and include content: +If `.workflow/session/{session}/.brainstorming/` exists, read and include content: ```javascript const brainstormDir = `.workflow/${session}/.brainstorming`; if (dir_exists(brainstormDir)) { @@ -274,7 +274,7 @@ Calculate risk level based on: **3.7 Context Packaging & Output** -**Output**: `.workflow/{session-id}/.process/context-package.json` +**Output**: `.workflow/sessions//{session-id}/.process/context-package.json` **Note**: Task JSONs reference via `context_package_path` field (not in `artifacts`) @@ -422,7 +422,7 @@ Calculate risk level based on: ## Quality Validation Before completion verify: -- [ ] context-package.json in `.workflow/{session}/.process/` +- [ ] context-package.json in `.workflow/session/{session}/.process/` - [ ] Valid JSON with all required fields - [ ] Metadata complete (description, keywords, complexity) - [ ] Project context documented (patterns, conventions, tech stack) @@ -456,7 +456,7 @@ Conflict Detection: - Affected: {modules} - Mitigation: {strategy} -Output: .workflow/{session}/.process/context-package.json +Output: .workflow/session/{session}/.process/context-package.json (Referenced in task JSONs via top-level `context_package_path` field) ``` diff --git a/.claude/skills/command-guide/reference/agents/test-context-search-agent.md b/.claude/skills/command-guide/reference/agents/test-context-search-agent.md index 1def5372..331bb380 100644 --- a/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +++ b/.claude/skills/command-guide/reference/agents/test-context-search-agent.md @@ -304,7 +304,7 @@ if (!validation.all_passed()) { ## Output Location ``` -.workflow/{test_session_id}/.process/test-context-package.json +.workflow/sessions/{test_session_id}/.process/test-context-package.json ``` ## Helper Functions Reference diff --git a/.claude/skills/command-guide/reference/commands/memory/tech-research.md b/.claude/skills/command-guide/reference/commands/memory/tech-research.md index 4685fc57..e37e0ce7 100644 --- a/.claude/skills/command-guide/reference/commands/memory/tech-research.md +++ b/.claude/skills/command-guide/reference/commands/memory/tech-research.md @@ -128,8 +128,8 @@ Generate a complete tech stack SKILL package with Exa research. 1. **Extract Tech Stack Information**: IF MODE == 'session': - - Read `.workflow/{SESSION_ID}/workflow-session.json` - - Read `.workflow/{SESSION_ID}/.process/context-package.json` + - Read `.workflow/sessions/{session_id}/workflow-session.json` + - Read `.workflow/sessions/{session_id}/.process/context-package.json` - Extract tech_stack: {language, frameworks, libraries} - Build tech stack name: \"{language}-{framework1}-{framework2}\" - Example: \"typescript-react-nextjs\" diff --git a/.claude/skills/command-guide/reference/commands/workflow/execute.md b/.claude/skills/command-guide/reference/commands/workflow/execute.md index 0628867b..2be74627 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/execute.md +++ b/.claude/skills/command-guide/reference/commands/workflow/execute.md @@ -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/{session-id}/` +- Load existing TODO_LIST.md directly from `.workflow/sessions//{session-id}/` - Extract current progress from TODO_LIST.md - Generate TodoWrite from TODO_LIST.md state - Proceed immediately to agent execution (Phase 4) @@ -118,7 +118,7 @@ If IMPL_PLAN.md lacks execution strategy, use intelligent fallback (analyze task ``` while (TODO_LIST.md has pending tasks) { next_task_id = getTodoWriteInProgressTask() - task_json = Read(.workflow/{session}/.task/{next_task_id}.json) // Lazy load + task_json = Read(.workflow/session/{session}/.task/{next_task_id}.json) // Lazy load executeTaskWithAgent(task_json) updateTodoListMarkCompleted(next_task_id) advanceTodoWriteToNextTask() diff --git a/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md b/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md index 59c40453..c8d76c64 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md +++ b/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md @@ -209,13 +209,13 @@ Iteration N (managed by test-cycle-execute orchestrator): "pre_analysis": [ { "step": "load_failure_context", - "command": "Read(.workflow/{session}/.process/iteration-{N-1}-failures.json)", + "command": "Read(.workflow/session/{session}/.process/iteration-{N-1}-failures.json)", "output_to": "previous_failures", "on_error": "skip_optional" }, { "step": "load_fix_strategy", - "command": "Read(.workflow/{session}/.process/iteration-{N}-strategy.md)", + "command": "Read(.workflow/session/{session}/.process/iteration-{N}-strategy.md)", "output_to": "fix_strategy", "on_error": "fail" } @@ -704,7 +704,7 @@ Task(subagent_type="{meta.agent}", #### Resume from Interruption ```bash # Load iteration state -iteration_state=$(cat .workflow/{session}/.process/iteration-state.json) +iteration_state=$(cat .workflow/session/{session}/.process/iteration-state.json) current_iteration=$(jq -r '.current_iteration' <<< "$iteration_state") # Determine resume point @@ -723,7 +723,7 @@ fi git revert HEAD # Remove failed fix task -rm .workflow/{session}/.task/IMPL-fix-{N}.json +rm .workflow/session/{session}/.task/IMPL-fix-{N}.json # Restore iteration state jq '.current_iteration -= 1' iteration-state.json > temp.json diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md b/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md index 01bd6b98..233898a8 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md @@ -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/{session_id}/.process/context-package.json + - Load plan from .workflow/sessions/{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/{session_id}/**/* + CONTEXT: @{existing_files} @.workflow/sessions/{session_id}/**/* EXPECTED: Conflict list with severity ratings RULES: Focus on breaking changes and migration needs " @@ -118,8 +118,8 @@ Task(subagent_type="cli-execution-agent", prompt=` "severity": "Critical|High|Medium", "category": "Architecture|API|Data|Dependency", "affected_files": [ - ".workflow/{session}/.brainstorm/guidance-specification.md", - ".workflow/{session}/.brainstorm/system-architect/analysis.md" + ".workflow/session/{session}/.brainstorm/guidance-specification.md", + ".workflow/session/{session}/.brainstorm/system-architect/analysis.md" ], "description": "详细描述冲突 - 什么不兼容", "impact": { @@ -139,7 +139,7 @@ Task(subagent_type="cli-execution-agent", prompt=` "cons": ["缺点1", "缺点2"], "modifications": [ { - "file": ".workflow/{session}/.brainstorm/guidance-specification.md", + "file": ".workflow/session/{session}/.brainstorm/guidance-specification.md", "section": "## 2. System Architect Decisions", "change_type": "update", "old_content": "原始内容片段(用于定位)", @@ -147,7 +147,7 @@ Task(subagent_type="cli-execution-agent", prompt=` "rationale": "为什么这样改" }, { - "file": ".workflow/{session}/.brainstorm/system-architect/analysis.md", + "file": ".workflow/session/{session}/.brainstorm/system-architect/analysis.md", "section": "## Design Decisions", "change_type": "update", "old_content": "原始内容片段", @@ -378,7 +378,7 @@ return { ✓ guidance-specification.md updated ✓ Role analyses (*.md) updated ✓ context-package.json marked as resolved -✓ Agent log saved to .workflow/{session_id}/.chat/ +✓ Agent log saved to .workflow/sessions/{session_id}/.chat/ ``` ## Output Format: Agent JSON Response @@ -435,9 +435,9 @@ If Edit tool fails mid-application: **Output**: - Modified files: - - `.workflow/{session_id}/.brainstorm/guidance-specification.md` - - `.workflow/{session_id}/.brainstorm/{role}/analysis.md` - - `.workflow/{session_id}/.process/context-package.json` (conflict_risk → resolved) + - `.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) - 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/{session_id}/.chat/ +✓ Agent log saved to .workflow/sessions/{session_id}/.chat/ ✓ Error handling robust (validate/retry/degrade) ``` diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md b/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md index 3e51cd9a..a6851b54 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md @@ -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/{session}/.process/context-package.json` +- **Standardized Output**: Generate `.workflow/session/{session}/.process/context-package.json` ## Execution Flow diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md index 2c99ceea..648c0b1c 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md @@ -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/{session-id}/workflow-session.json + // Else: Load from .workflow/sessions//{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/{session-id}/.process/context-package.json", + "context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json", "context_package": { // If in memory: use cached content - // Else: Load from .workflow/{session-id}/.process/context-package.json + // Else: Load from .workflow/sessions//{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/{session-id}/workflow-session.json) + Read(.workflow/sessions//{session-id}/workflow-session.json) } ``` 2. **Load Context Package** (if not in memory) ```javascript if (!memory.has("context-package.json")) { - Read(.workflow/{session-id}/.process/context-package.json) + Read(.workflow/sessions//{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/{session-id}/.task/` +- **Location**: `.workflow/sessions//{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/{session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions//{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/{session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions//{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 diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md index 04e93a8a..7fead06a 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md @@ -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/{session-id}/workflow-session.json + // Else: Load from .workflow/sessions//{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/{session-id}/.process/context-package.json", + "context_package_path": ".workflow/sessions//{session-id}/.process/context-package.json", "context_package": { // If in memory: use cached content - // Else: Load from .workflow/{session-id}/.process/context-package.json + // Else: Load from .workflow/sessions//{session-id}/.process/context-package.json }, - "test_context_package_path": ".workflow/{session-id}/.process/test-context-package.json", + "test_context_package_path": ".workflow/sessions//{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/{session-id}/workflow-session.json) + Read(.workflow/sessions//{session-id}/workflow-session.json) } ``` 2. **Load Context Package** (if not in memory) ```javascript if (!memory.has("context-package.json")) { - Read(.workflow/{session-id}/.process/context-package.json) + Read(.workflow/sessions//{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/{session-id}/.process/test-context-package.json) + Read(.workflow/sessions//{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/{session-id}/.task/` +- **Location**: `.workflow/sessions//{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/{session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions//{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/{session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions//{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 @@ -384,7 +384,7 @@ This section provides quick reference for TDD task JSON structure. For complete ## Output Files Structure ``` -.workflow/{session-id}/ +.workflow/sessions//{session-id}/ ├── IMPL_PLAN.md # Unified plan with TDD Implementation Tasks section ├── TODO_LIST.md # Progress tracking with internal TDD phase indicators ├── .task/ diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate.md b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate.md index c3fe5213..220426ad 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate.md @@ -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/{session_id}/workflow-session.json`. -2. **Context Package Loading** (primary source): Reads `.workflow/{session_id}/.process/context-package.json` for smart context and artifact catalog. +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. 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. @@ -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/{session-id}/.brainstorming/[role]/analysis*.md -artifacts: .workflow/{session-id}/.brainstorming/ -context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context -guidance_specification: .workflow/{session-id}/.brainstorming/guidance-specification.md # Finalized decisions with resolved conflicts +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 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/{session-id}/ +.workflow/sessions//{session-id}/ ├── IMPL_PLAN.md # Implementation plan ├── TODO_LIST.md # Progress tracking ├── .task/ diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md b/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md index 1bdb1c2f..d5b73337 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md @@ -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/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.focus_paths[]' {} \; +find .workflow/sessions/{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/{session_id}/.task/ -name 'TEST-*.json' -exec jq -r '.context.foc ### Phase 2: Run Test Suite ```bash # Node.js/JavaScript -npm test -- --coverage --json > .workflow/{session_id}/.process/test-results.json +npm test -- --coverage --json > .workflow/sessions/{session_id}/.process/test-results.json # Python -pytest --cov --json-report > .workflow/{session_id}/.process/test-results.json +pytest --cov --json-report > .workflow/sessions/{session_id}/.process/test-results.json # Other frameworks (detect from project) -[test_command] --coverage --json-output .workflow/{session_id}/.process/test-results.json +[test_command] --coverage --json-output .workflow/sessions/{session_id}/.process/test-results.json ``` **Output**: test-results.json with coverage data ### Phase 3: Parse Coverage Data ```bash -jq '.coverage' .workflow/{session_id}/.process/test-results.json > .workflow/{session_id}/.process/coverage-report.json +jq '.coverage' .workflow/sessions/{session_id}/.process/test-results.json > .workflow/sessions/{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/{session_id}/.summaries/TEST-N.M-summary.md +cat .workflow/sessions/{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/{session_id}/.summaries/IMPL-N.M-summary.md +cat .workflow/sessions/{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/{session_id}/.summaries/REFACTOR-N.M-summary.md +cat .workflow/sessions/{session_id}/.summaries/REFACTOR-N.M-summary.md ``` Verify: @@ -90,7 +90,7 @@ Verify: ### Phase 5: Generate Analysis Report -Create `.workflow/{session_id}/.process/tdd-cycle-report.md`: +Create `.workflow/sessions/{session_id}/.process/tdd-cycle-report.md`: ```markdown # TDD Cycle Analysis - {Session ID} @@ -146,7 +146,7 @@ Create `.workflow/{session_id}/.process/tdd-cycle-report.md`: ## Output Files ``` -.workflow/{session-id}/ +.workflow/sessions//{session-id}/ └── .process/ ├── test-results.json # Raw test execution results ├── coverage-report.json # Parsed coverage data diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md b/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md index e58aadde..9376637a 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md @@ -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/{test_session_id}/workflow-session.json` + - Load `.workflow/sessions/{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/{test_session_id}/.process && gemini -p " +cd .workflow/sessions/{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/{test_session_id}/.process/test-context-package.json} +CONTEXT: @{.workflow/sessions/{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/{test_session_id}/.process/gemini-test-analysis.md** +- **MUST write output to .workflow/sessions/{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/{test_session_id}/.process/gemini-test-analysis.md` +**Output Location**: `.workflow/sessions/{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/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md` +**Output Location**: `.workflow/sessions/{test_session_id}/.process/TEST_ANALYSIS_RESULTS.md` ## Error Handling diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md b/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md index 80e937c7..b4ee5c96 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md @@ -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/{test_session_id}/.process/test-context-package.json` +- **Standardized Output**: Generate `.workflow/sessions/{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/{test_session_id}/.process/` +- ✅ Valid test-context-package.json generated in `.workflow/sessions/{test_session_id}/.process/` - ✅ Source session context loaded successfully - ✅ Test coverage gaps identified (>90% accuracy) - ✅ Test framework detected and documented diff --git a/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md b/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md index 84dedb1f..a9230452 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +++ b/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md @@ -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/{test-session-id}/workflow-session.json + // Else: Load from .workflow/sessions/{test-session-id}/workflow-session.json }, - "test_analysis_results_path": ".workflow/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md", + "test_analysis_results_path": ".workflow/sessions/{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/{test-session-id}/.process/test-context-package.json", + "test_context_package_path": ".workflow/sessions/{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/{test-session-id}/workflow-session.json) + Read(.workflow/sessions/{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/{test-session-id}/.process/TEST_ANALYSIS_RESULTS.md) + Read(.workflow/sessions/{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/{test-session-id}/.process/test-context-package.json) + Read(.workflow/sessions/{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/{source-session-id}/.summaries/ -name 'IMPL-*-summary.md'") + const summaryFiles = Bash("find .workflow/sessions/{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/{test-session-id}/.task/` +- **Location**: `.workflow/sessions/{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/{test-session-id}/IMPL_PLAN.md` +- **Location**: `.workflow/sessions/{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/{test-session-id}/TODO_LIST.md` +- **Location**: `.workflow/sessions/{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 diff --git a/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md b/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md index 3c631fd0..461141ae 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md +++ b/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md @@ -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/{run_id}/` +- Standalone: Output in `.workflow/sessions/{run_id}/` ## 5-Phase Execution @@ -188,7 +188,7 @@ IF --session: session_mode = "integrated" ELSE: session_id = null - relative_base_path = ".workflow/{design_id}" + relative_base_path = ".workflow/sessions/{design_id}" session_mode = "standalone" # Create base directory and convert to absolute path diff --git a/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt b/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt index 683da7d2..9bd78472 100644 --- a/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt +++ b/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt @@ -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/{session_id}/.process/ path +□ Write output to specified .workflow/sessions/{session_id}/.process/ path ## PREREQUISITE ANALYSIS @@ -94,7 +94,7 @@ Review Gemini's proposed code targets: ## OUTPUT REQUIREMENTS ### Output File -**Path**: `.workflow/{session_id}/.process/codex-feasibility-validation.md` +**Path**: `.workflow/sessions/{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/{session_id}/.process/codex-feasibility-validation.md +□ Output written to .workflow/sessions/{session_id}/.process/codex-feasibility-validation.md Focus: Technical feasibility validation with realistic risk assessment and mitigation strategies. diff --git a/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt b/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt index 1d00878b..c179efc7 100644 --- a/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +++ b/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt @@ -5,7 +5,7 @@ Analyze and design optimal solution with comprehensive architecture evaluation a □ Analyze current architecture patterns and code structure □ Propose solution design with key decisions and rationale □ Focus on SOLUTION IMPROVEMENTS and KEY DESIGN DECISIONS -□ Write output to specified .workflow/{session_id}/.process/ path +□ Write output to specified .workflow/sessions/{session_id}/.process/ path ## ANALYSIS PRIORITY @@ -73,7 +73,7 @@ For each target: ## OUTPUT REQUIREMENTS ### Output File -**Path**: `.workflow/{session_id}/.process/gemini-solution-design.md` +**Path**: `.workflow/sessions/{session_id}/.process/gemini-solution-design.md` **Format**: Follow structure from `~/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt` ### Required Sections @@ -126,6 +126,6 @@ If brainstorming artifacts exist: □ Code targets specified in correct format □ Feasibility scores provided (X/5) □ Final recommendation (PROCEED/RECONSIDER/REJECT) -□ Output written to .workflow/{session_id}/.process/gemini-solution-design.md +□ Output written to .workflow/sessions/{session_id}/.process/gemini-solution-design.md Focus: Comprehensive solution design emphasizing architecture decisions and critical insights. diff --git a/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt b/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt index 4d8e376f..04e0ccc7 100644 --- a/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt +++ b/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt @@ -6,9 +6,9 @@ IMPL_PLAN.md Template - Implementation Plan Document Structure --- identifier: WFS-{session-id} source: "User requirements" | "File: path" | "Issue: ISS-001" -analysis: .workflow/{session-id}/.process/ANALYSIS_RESULTS.md -artifacts: .workflow/{session-id}/.brainstorming/ -context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context +analysis: .workflow/sessions//{session-id}/.process/ANALYSIS_RESULTS.md +artifacts: .workflow/sessions//{session-id}/.brainstorming/ +context_package: .workflow/sessions//{session-id}/.process/context-package.json # CCW smart context workflow_type: "standard | tdd | design" # Indicates execution model verification_history: # CCW quality gates concept_verify: "passed | skipped | pending"