Commit Graph

8 Commits

Author SHA1 Message Date
catlog22
c3818fdb79 Refactor workflow file paths from .workflow/sessions/ to .workflow/active/ for improved session management and consistency across commands. Updated documentation and command references to reflect the new directory structure, ensuring all relevant commands and outputs are correctly aligned with the active session model. 2025-11-20 09:40:58 +08:00
catlog22
19ebb2dc82 fix(workflow): complete path migration and enhance session:complete
Comprehensive update to eliminate all old path references and implement transactional archival in session:complete.

## Part 1: Complete Path Migration (43 files)

### Files Updated
- action-plan-verify.md
- session/list.md, session/resume.md
- tdd-verify.md, tdd-plan.md, test-*.md
- All brainstorm/*.md files (13 files)
- All tools/*.md files (10 files)
- All ui-design/*.md files (10 files)
- lite-plan.md, lite-execute.md, plan.md

### Path Changes
- `.workflow/.active-*` → `find .workflow/sessions/ -name "WFS-*" -type d`
- `.workflow/WFS-{session}` → `.workflow/sessions/WFS-{session}`
- `.workflow/.archives/` → `.workflow/archives/`
- Removed all marker file operations (touch/rm .active-*)

### Verification
-  0 references to .active-* markers remain
-  0 references to direct .workflow/WFS-* paths
-  0 references to .workflow/.archives/ (dot prefix)

## Part 2: Transactional Archival Enhancement

### session/complete.md - Complete Rewrite

**New Four-Phase Architecture**:

1. **Phase 1: Pre-Archival Preparation**
   - Find active session in .workflow/sessions/
   - Check for existing .archiving marker (resume detection)
   - Create .archiving marker to prevent concurrent operations

2. **Phase 2: Agent Analysis (In-Place)**
   - Agent processes session WHILE STILL in sessions/ directory
   - Pure analysis - no file moves or manifest updates
   - Returns complete metadata package for atomic commit
   - Failure here → session remains active, safe to retry

3. **Phase 3: Atomic Commit**
   - Only executes if Phase 2 succeeds
   - Move session to archives/
   - Update manifest.json
   - Remove .archiving marker
   - All-or-nothing guarantee

4. **Phase 4: Project Registry Update**
   - Extract feature metadata and update project.json

**Key Improvements**:
- **Agent-first, move-second**: Prevents inconsistent states
- **Transactional guarantees**: All-or-nothing file operations
- **Resume capability**: .archiving marker enables safe retry
- **Error recovery**: Comprehensive failure handling documented

**Old Design Flaw (Fixed)**:
- Old: Move first → Agent processes → If agent fails, session moved but metadata incomplete
- New: Agent processes → If success, atomic commit → Guaranteed consistency

## Benefits

1. **Consistency**: All commands use identical path patterns
2. **Robustness**: Transactional archival prevents data loss
3. **Maintainability**: Single source of truth for directory structure
4. **Recoverability**: Failed operations can be safely retried
5. **Alignment**: Closer to OpenSpec's clean three-layer model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 12:39:23 +08:00
catlog22
920b179440 docs: 更新所有命令描述并重新生成索引文件
- 更新所有69个命令文件的description字段,基于实际功能重新生成详细描述
- 重新生成5个索引文件(all-commands, by-category, by-use-case, essential-commands, command-relationships)
- 移动analyze_commands.py到scripts/目录并完善功能
- 移除临时备份文件

命令描述改进示例:
- workflow:plan: 增加了工具和代理的详细说明(Gemini, action-planning-agent)
- cli:execute: 说明了YOLO权限和多种执行模式
- memory:update-related: 详细说明了批处理策略和工具回退链

索引文件改进:
- usage_scenario从2种扩展到10种(更精细分类)
- command-relationships覆盖所有69个命令
- 区分built-in(内置调用)和sequential(用户顺序执行)关系

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 15:11:31 +08:00
catlog22
57fa379e45 Refactor workflow to replace synthesis-specification.md with role analysis documents
- Updated references in various workflow commands to utilize role analysis documents instead of synthesis-specification.md.
- Modified CLI templates and command references to reflect the new architecture and document structure.
- Introduced conflict-resolution command to analyze and resolve conflicts between implementation plans and existing codebase.
- Deprecated synthesis role template and provided migration guidance for transitioning to the new role analysis approach.
2025-10-24 11:08:15 +08:00
catlog22
75ec70ad23 更新 generate.md 和 layout-extract.md 文档:添加对参考图像的自动检测和使用说明 2025-10-12 10:11:08 +08:00
catlog22
369bfa8a08 Refactor command YAML headers: replace examples with argument-hint
**Summary:**
Updated all 62 command files in `.claude/commands` directory to improve parameter documentation clarity by replacing `examples` field with descriptive `argument-hint` field.

**Changes:**
- Added/improved `argument-hint` for all commands based on usage patterns
- Removed `examples` field and all example items from YAML headers
- Maintained all other YAML fields (name, description, usage, allowed-tools)
- Deleted obsolete commands: workflow/issue/*, workflow/session/pause.md, workflow/session/switch.md
- Cleaned up temporary analysis files

**Rationale:**
The `argument-hint` field provides clearer, more concise parameter documentation than example lists, improving command discoverability and usability in the Claude Code interface.

**Files Modified:** 62 command files
**Lines Changed:** -1570 insertions, +192 deletions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 23:45:55 +08:00
catlog22
94a2150836 fix: Correct workflow-session.json path references in brainstorming docs
- Fix incorrect path: .brainstorming/workflow-session.json → /workflow-session.json
- Update 8 role files: data-architect, product-manager, product-owner, scrum-master,
  subject-matter-expert, ui-designer, ux-expert, auto-parallel
- Update artifacts.md to clarify correct session file location
- Align all paths with workflow-architecture.md standard structure

Fixes session file path confusion issue. workflow-session.json should be at
session root (.workflow/WFS-{session}/), not in .brainstorming/ subdirectory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 22:08:56 +08:00
catlog22
17e8243d35 refactor: Update brainstorming workflow roles and documentation
Major role restructuring to improve workflow efficiency and clarity:

## New Roles Added (4)
- product-owner: Backlog management and user story definition
- scrum-master: Sprint planning and agile process facilitation
- ux-expert: User experience optimization and usability testing
- subject-matter-expert: Domain expertise and industry standards

## Roles Removed (5)
- business-analyst → functionality split to product-owner and scrum-master
- feature-planner → merged into product-owner responsibilities
- innovation-lead → integrated into subject-matter-expert
- security-expert → integrated into subject-matter-expert
- user-researcher → merged into ux-expert

## Files Updated
### Command Files (.claude/commands/workflow/brainstorm/)
- Created: product-owner.md, scrum-master.md, ux-expert.md, subject-matter-expert.md
- Deleted: business-analyst.md, feature-planner.md, innovation-lead.md, security-expert.md, user-researcher.md
- Updated: artifacts.md, auto-parallel.md, auto-squeeze.md, synthesis.md

### Planning Templates (.claude/workflows/cli-templates/planning-roles/)
- Created: product-owner.md, scrum-master.md, ux-expert.md, subject-matter-expert.md
- Archived: Moved 5 deprecated roles to _deprecated/ with migration guide
- Added: _deprecated/README.md with deprecation details and migration paths

### Agent Configurations
- Updated conceptual-planning-agent.md with new role mappings
- Updated action-planning-agent.md with new role references

### Documentation
- Updated README.md brainstorming role tables and descriptions
- Updated README_CN.md with Chinese translations for new roles
- Updated workflow documentation files with new role references

## Breaking Changes
Commands for removed roles are no longer available. Use replacement roles:
- /workflow:brainstorm:business-analyst → use product-owner or scrum-master
- /workflow:brainstorm:feature-planner → use product-owner
- /workflow:brainstorm:innovation-lead → use subject-matter-expert
- /workflow:brainstorm:security-expert → use subject-matter-expert
- /workflow:brainstorm:user-researcher → use ux-expert

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 23:31:10 +08:00